Massively simplified foundational API focusing just on the app deployment initially
This commit is contained in:
committed by
Ollie Hughes
parent
1d9714c5a9
commit
df83f56d1f
11
.editorconfig
Normal file
11
.editorconfig
Normal file
@@ -0,0 +1,11 @@
|
||||
[*]
|
||||
charset=utf-8
|
||||
end_of_line=lf
|
||||
insert_final_newline=false
|
||||
indent_style=space
|
||||
indent_size=4
|
||||
|
||||
[*.java]
|
||||
indent_style=tab
|
||||
tab_width=4
|
||||
|
||||
54
build.gradle
54
build.gradle
@@ -17,8 +17,13 @@ configure(allprojects) {
|
||||
ext.springVersion = "5.0.5.RELEASE"
|
||||
}
|
||||
if (!project.hasProperty("springBootVersion")) {
|
||||
ext.springBootVersion = "2.0.1.RELEASE"
|
||||
ext.springBootVersion = "2.0.2.RELEASE"
|
||||
}
|
||||
ext.springCloudOpenServiceBrokerVersion = "2.0.0.RC1"
|
||||
ext.junitJupiterVersion = "5.2.0"
|
||||
ext.assertjVersion = "3.10.0"
|
||||
ext.mockitoVersion = "2.18.3"
|
||||
ext.joolVersion = "0.9.13"
|
||||
|
||||
apply plugin: "java"
|
||||
apply plugin: "maven"
|
||||
@@ -143,6 +148,53 @@ subprojects { subproject ->
|
||||
}
|
||||
}
|
||||
|
||||
project("spring-cloud-app-broker-core") {
|
||||
description = "Spring Cloud App Broker Core"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "org.springframework:spring-framework-bom:${springVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile("org.springframework:spring-core")
|
||||
compile("org.springframework:spring-context")
|
||||
compile("org.springframework.security:spring-security-core:${springVersion}")
|
||||
compile("org.springframework.cloud:spring-cloud-open-service-broker-core:${springCloudOpenServiceBrokerVersion}")
|
||||
compile("org.jooq:jool-java-8:${joolVersion}")
|
||||
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
|
||||
testCompile("org.springframework:spring-test") {
|
||||
exclude group:"commons-logging", module:"commons-logging"
|
||||
}
|
||||
testCompile("org.assertj:assertj-core:${assertjVersion}")
|
||||
testCompile("org.mockito:mockito-core:${mockitoVersion}")
|
||||
|
||||
}
|
||||
}
|
||||
project("spring-cloud-app-broker-autoconfigure") {
|
||||
description = "Spring Cloud App Broker Core"
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "org.springframework:spring-framework-bom:${springVersion}"
|
||||
mavenBom "org.springframework.boot:spring-boot-dependencies:${springBootVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile project(":spring-cloud-app-broker-core")
|
||||
compile("org.springframework.boot:spring-boot-starter-web")
|
||||
compile("org.springframework.cloud:spring-cloud-open-service-broker-autoconfigure:${springCloudOpenServiceBrokerVersion}")
|
||||
compile("org.jooq:jool-java-8:${joolVersion}")
|
||||
testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
|
||||
testCompile("org.springframework:spring-test") {
|
||||
exclude group:"commons-logging", module:"commons-logging"
|
||||
}
|
||||
testCompile('org.springframework.boot:spring-boot-starter-test')
|
||||
}
|
||||
}
|
||||
|
||||
configure(rootProject) {
|
||||
description = "Spring Cloud App Broker"
|
||||
|
||||
|
||||
1
gradle/wrapper/gradle-wrapper.properties
vendored
1
gradle/wrapper/gradle-wrapper.properties
vendored
@@ -1,6 +1,7 @@
|
||||
#Thu Jun 14 11:34:21 CDT 2018
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
rootProject.name = "spring-cloud-app-broker"
|
||||
|
||||
include "spring-cloud-app-broker-core"
|
||||
include "spring-cloud-app-broker-autoconfigure"
|
||||
include "spring-cloud-app-broker-deployer"
|
||||
include "spring-cloud-app-broker-deployer-cloudfoundry"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
package org.springframework.cloud.appbroker;
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class AppBrokerAutoConfiguration {
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.springframework.cloud.appbroker.config;
|
||||
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.cloud.appbroker.model.ServiceInstance;
|
||||
import org.springframework.cloud.appbroker.pipeline.output.DeployedServices;
|
||||
import org.springframework.cloud.appbroker.pipeline.output.GeneratedCredentials;
|
||||
import org.springframework.cloud.appbroker.pipeline.output.PersistResponse;
|
||||
import org.springframework.cloud.appbroker.pipeline.output.TransformedParameters;
|
||||
import org.springframework.cloud.appbroker.pipeline.step.InMemoryPersistenceService;
|
||||
import org.springframework.cloud.appbroker.pipeline.step.PersistenceService;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class WorkflowConfiguration {
|
||||
|
||||
@ConditionalOnMissingBean
|
||||
@Bean
|
||||
public PersistenceService<TransformedParameters<?>, DeployedServices<?>, DeployedApp<?>, GeneratedCredentials<?>, PersistResponse<?>>
|
||||
createServicePersistenceStep(ConcurrentHashMap<String, ServiceInstance> inMemoryStore) {
|
||||
return new InMemoryPersistenceService(inMemoryStore);
|
||||
}
|
||||
|
||||
@Bean
|
||||
ConcurrentHashMap<String, ServiceInstance> inMemoryStore() {
|
||||
return new ConcurrentHashMap<>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springframework.cloud.appbroker.config;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class ServiceBrokerLifecycleConfig {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package org.springframework.cloud.appbroker.spi;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.appbroker.workflow.CreateServiceInstanceWorkflow;
|
||||
import org.springframework.cloud.appbroker.workflow.DeleteServiceInstanceWorkflow;
|
||||
import org.springframework.cloud.appbroker.workflow.GetLastOperationWorkflow;
|
||||
import org.springframework.cloud.appbroker.workflow.GetServiceInstanceWorkflow;
|
||||
import org.springframework.cloud.appbroker.workflow.UpdateServiceInstanceWorkflow;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceResponse;
|
||||
import org.springframework.cloud.servicebroker.model.instance.DeleteServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.DeleteServiceInstanceResponse;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOperationRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOperationResponse;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetServiceInstanceResponse;
|
||||
import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceResponse;
|
||||
import org.springframework.cloud.servicebroker.service.ServiceInstanceService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class ServiceInstanceProvisionService implements ServiceInstanceService {
|
||||
|
||||
private CreateServiceInstanceWorkflow<CreateServiceInstanceRequest, CreateServiceInstanceResponse> createServiceInstanceWorkflow;
|
||||
private DeleteServiceInstanceWorkflow<DeleteServiceInstanceRequest, DeleteServiceInstanceResponse> deleteServiceInstanceWorkflow;
|
||||
private GetLastOperationWorkflow<GetLastServiceOperationRequest, GetLastServiceOperationResponse> getLastOperationWorkflow;
|
||||
private GetServiceInstanceWorkflow<GetServiceInstanceRequest, GetServiceInstanceResponse> getServiceInstanceWorkflow;
|
||||
private UpdateServiceInstanceWorkflow<UpdateServiceInstanceRequest, UpdateServiceInstanceResponse> updateServiceInstanceWorkflow;
|
||||
|
||||
|
||||
@Autowired
|
||||
public ServiceInstanceProvisionService(CreateServiceInstanceWorkflow<CreateServiceInstanceRequest, CreateServiceInstanceResponse> createServiceInstanceWorkflow,
|
||||
UpdateServiceInstanceWorkflow<UpdateServiceInstanceRequest, UpdateServiceInstanceResponse> updateServiceInstanceWorkflow,
|
||||
GetServiceInstanceWorkflow<GetServiceInstanceRequest, GetServiceInstanceResponse> getServiceInstanceWorkflow,
|
||||
GetLastOperationWorkflow<GetLastServiceOperationRequest, GetLastServiceOperationResponse> getLastOperationWorkflow,
|
||||
DeleteServiceInstanceWorkflow<DeleteServiceInstanceRequest, DeleteServiceInstanceResponse> deleteServiceInstanceWorkflow) {
|
||||
|
||||
this.createServiceInstanceWorkflow = createServiceInstanceWorkflow;
|
||||
this.updateServiceInstanceWorkflow = updateServiceInstanceWorkflow;
|
||||
this.getServiceInstanceWorkflow = getServiceInstanceWorkflow;
|
||||
this.getLastOperationWorkflow = getLastOperationWorkflow;
|
||||
this.deleteServiceInstanceWorkflow = deleteServiceInstanceWorkflow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateServiceInstanceResponse createServiceInstance(CreateServiceInstanceRequest request) {
|
||||
return createServiceInstanceWorkflow.perform(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public DeleteServiceInstanceResponse deleteServiceInstance(DeleteServiceInstanceRequest request) {
|
||||
return deleteServiceInstanceWorkflow.perform(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetLastServiceOperationResponse getLastOperation(GetLastServiceOperationRequest request) {
|
||||
return getLastOperationWorkflow.perform(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GetServiceInstanceResponse getServiceInstance(GetServiceInstanceRequest request) {
|
||||
return getServiceInstanceWorkflow.perform(request);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UpdateServiceInstanceResponse updateServiceInstance(UpdateServiceInstanceRequest request) {
|
||||
return updateServiceInstanceWorkflow.perform(request);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.ServiceBrokerRequest;
|
||||
|
||||
public interface AppBrokerWorkflow<REQ extends ServiceBrokerRequest, RES> {
|
||||
|
||||
RES perform(REQ requestData);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.CreateServiceRequestContext;
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.action.DefaultCreateServiceBrokerResponseBuilder;
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy.BackingAppDeployer;
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy.BackingAppParameters;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceResponse;
|
||||
|
||||
public class CreateServiceInstanceDefaultWorkflow implements CreateServiceInstanceWorkflow<CreateServiceInstanceRequest, CreateServiceInstanceResponse> {
|
||||
|
||||
private BackingAppDeployer backingAppDeployer;
|
||||
private BackingAppParameters backingAppParameters;
|
||||
private DefaultCreateServiceBrokerResponseBuilder createServiceBrokerResponseBuilder;
|
||||
|
||||
@Autowired
|
||||
public CreateServiceInstanceDefaultWorkflow(BackingAppDeployer backingAppDeployer,
|
||||
BackingAppParameters backingAppParameters,
|
||||
DefaultCreateServiceBrokerResponseBuilder createServiceBrokerResponseBuilder) {
|
||||
|
||||
this.backingAppDeployer = backingAppDeployer;
|
||||
this.backingAppParameters = backingAppParameters;
|
||||
this.createServiceBrokerResponseBuilder = createServiceBrokerResponseBuilder;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CreateServiceInstanceResponse perform(CreateServiceInstanceRequest requestData) {
|
||||
CreateServiceRequestContext requestContext = new CreateServiceRequestContext(requestData);
|
||||
backingAppDeployer.accept(backingAppParameters, requestContext);
|
||||
return createServiceBrokerResponseBuilder.apply(requestContext);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceResponse;
|
||||
|
||||
public interface CreateServiceInstanceWorkflow<REQ extends CreateServiceInstanceRequest, RES extends CreateServiceInstanceResponse>
|
||||
extends AppBrokerWorkflow<REQ, RES> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.DeleteServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.DeleteServiceInstanceResponse;
|
||||
|
||||
public class DeleteServiceInstanceDefaultWorkflow implements DeleteServiceInstanceWorkflow<DeleteServiceInstanceRequest, DeleteServiceInstanceResponse> {
|
||||
|
||||
@Override
|
||||
public DeleteServiceInstanceResponse perform(DeleteServiceInstanceRequest requestData) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.DeleteServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.DeleteServiceInstanceResponse;
|
||||
|
||||
public interface DeleteServiceInstanceWorkflow<REQ extends DeleteServiceInstanceRequest, RES extends DeleteServiceInstanceResponse>
|
||||
extends AppBrokerWorkflow<REQ, RES> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOperationRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOperationResponse;
|
||||
|
||||
public class GetLastOperationDefaultWorkflow implements GetLastOperationWorkflow<GetLastServiceOperationRequest, GetLastServiceOperationResponse> {
|
||||
|
||||
@Override
|
||||
public GetLastServiceOperationResponse perform(GetLastServiceOperationRequest requestData) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOperationRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetLastServiceOperationResponse;
|
||||
|
||||
public interface GetLastOperationWorkflow<REQ extends GetLastServiceOperationRequest, RES extends GetLastServiceOperationResponse>
|
||||
extends AppBrokerWorkflow<REQ, RES> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetServiceInstanceResponse;
|
||||
|
||||
public class GetServiceInstanceDefaultWorkflow implements GetServiceInstanceWorkflow<GetServiceInstanceRequest, GetServiceInstanceResponse> {
|
||||
|
||||
@Override
|
||||
public GetServiceInstanceResponse perform(GetServiceInstanceRequest requestData) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.GetServiceInstanceResponse;
|
||||
|
||||
public interface GetServiceInstanceWorkflow<REQ extends GetServiceInstanceRequest, RES extends GetServiceInstanceResponse>
|
||||
extends AppBrokerWorkflow<REQ, RES> {
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceResponse;
|
||||
|
||||
public class UpdateServiceInstanceDefaultWorkflow implements UpdateServiceInstanceWorkflow<UpdateServiceInstanceRequest, UpdateServiceInstanceResponse> {
|
||||
|
||||
@Override
|
||||
public UpdateServiceInstanceResponse perform(UpdateServiceInstanceRequest requestData) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package org.springframework.cloud.appbroker.workflow;
|
||||
|
||||
import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceRequest;
|
||||
import org.springframework.cloud.servicebroker.model.instance.UpdateServiceInstanceResponse;
|
||||
|
||||
public interface UpdateServiceInstanceWorkflow<REQ extends UpdateServiceInstanceRequest, RES extends UpdateServiceInstanceResponse>
|
||||
extends AppBrokerWorkflow<REQ, RES> {
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.springframework.cloud.appbroker.workflow.createserviceinstance;
|
||||
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy.BackingAppState;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceRequest;
|
||||
|
||||
public class CreateServiceRequestContext {
|
||||
|
||||
private BackingAppState backingAppState;
|
||||
private boolean instanceExisted;
|
||||
private CreateServiceInstanceRequest originatingRequest;
|
||||
|
||||
public CreateServiceRequestContext(CreateServiceInstanceRequest requestData) {
|
||||
this.originatingRequest = requestData;
|
||||
}
|
||||
|
||||
public BackingAppState getBackingAppState() {
|
||||
return backingAppState;
|
||||
}
|
||||
|
||||
public void setBackingAppState(BackingAppState backingAppState) {
|
||||
this.backingAppState = backingAppState;
|
||||
}
|
||||
|
||||
public boolean getInstanceExisted() {
|
||||
return instanceExisted;
|
||||
}
|
||||
|
||||
public void setInstanceExisted(boolean instanceExisted) {
|
||||
this.instanceExisted = instanceExisted;
|
||||
}
|
||||
|
||||
public CreateServiceInstanceRequest getOriginatingRequest() {
|
||||
return originatingRequest;
|
||||
}
|
||||
|
||||
public void setOriginatingRequest(CreateServiceInstanceRequest originatingRequest) {
|
||||
this.originatingRequest = originatingRequest;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springframework.cloud.appbroker.workflow.createserviceinstance.action;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.CreateServiceRequestContext;
|
||||
import org.springframework.cloud.servicebroker.model.instance.CreateServiceInstanceResponse;
|
||||
|
||||
public interface DefaultCreateServiceBrokerResponseBuilder extends Function<CreateServiceRequestContext, CreateServiceInstanceResponse> {
|
||||
|
||||
default CreateServiceInstanceResponse apply(CreateServiceRequestContext createServiceRequestContext) {
|
||||
return CreateServiceInstanceResponse.builder()
|
||||
.instanceExisted(createServiceRequestContext.getInstanceExisted())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy;
|
||||
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.CreateServiceRequestContext;
|
||||
|
||||
|
||||
public interface BackingAppDeployer extends BiConsumer<BackingAppParameters, CreateServiceRequestContext> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class BackingAppParameters {
|
||||
|
||||
private final String name;
|
||||
|
||||
private final Map<String, String> properties;
|
||||
|
||||
public BackingAppParameters(String name, Map<String, String> properties) {
|
||||
this.name = name;
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public Map<String, String> getProperties() {
|
||||
return properties;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class BackingAppState {
|
||||
|
||||
private Map<String, String> state;
|
||||
|
||||
public BackingAppState(Map<String, String> state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Map<String, String> getState() {
|
||||
return state;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.springframework.cloud.appbroker.workflow.createserviceinstance.action.appdeploy;
|
||||
|
||||
import java.util.Collections;
|
||||
|
||||
import org.springframework.cloud.appbroker.workflow.createserviceinstance.CreateServiceRequestContext;
|
||||
|
||||
public class CloudFoundryDefaultBackingAppDeployer implements BackingAppDeployer {
|
||||
|
||||
@Override
|
||||
public void accept(BackingAppParameters backingAppParameters, CreateServiceRequestContext createServiceRequestContext) {
|
||||
//Deploy app and store any data generated by the platform that might need to be persisted, such as app guid or generated route
|
||||
createServiceRequestContext.setBackingAppState(new BackingAppState(Collections.emptyMap()));
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user