Search in sources :

Example 6 with CreateServiceInstanceBindingResponse

use of org.springframework.cloud.servicebroker.model.binding.CreateServiceInstanceBindingResponse in project spring-cloud-open-service-broker by spring-cloud.

the class ExampleServiceBindingService method createServiceInstanceBinding.

@Override
public Mono<CreateServiceInstanceBindingResponse> createServiceInstanceBinding(CreateServiceInstanceBindingRequest request) {
    String serviceInstanceId = request.getServiceInstanceId();
    String bindingId = request.getBindingId();
    // 
    // create credentials and store for later retrieval
    // 
    String url = new String();
    String bindingUsername = new String();
    String bindingPassword = new String();
    CreateServiceInstanceBindingResponse response = CreateServiceInstanceAppBindingResponse.builder().credentials("url", url).credentials("username", bindingUsername).credentials("password", bindingPassword).bindingExisted(false).async(true).build();
    return Mono.just(response);
}
Also used : CreateServiceInstanceBindingResponse(org.springframework.cloud.servicebroker.model.binding.CreateServiceInstanceBindingResponse)

Aggregations

CreateServiceInstanceBindingResponse (org.springframework.cloud.servicebroker.model.binding.CreateServiceInstanceBindingResponse)6 Test (org.junit.jupiter.api.Test)2 CreateServiceInstanceBindingRequest (org.springframework.cloud.servicebroker.model.binding.CreateServiceInstanceBindingRequest)2 Theory (org.junit.experimental.theories.Theory)1 ResponseEntity (org.springframework.http.ResponseEntity)1 PutMapping (org.springframework.web.bind.annotation.PutMapping)1