Closed ryanjbaxter closed 10 years ago
Take a look at https://github.com/cloudfoundry-samples/cf-s3-demo that shows how to create spring-cloud connectors for user-provided services. In particular, take a look at https://github.com/cloudfoundry-samples/cf-s3-demo/tree/master/src/main/java/com/gopivotal/cf/samples/s3/connector
The UPS connectors in https://github.com/spring-projects/spring-cloud/tree/master/cloudfoundry-ups-connector were kept as a separate module for precisely this reason - it would be very difficult to create a set of off-the-shelf connectors that parse credentials in all the various ways that users may choose to form them in a user-provided service.
One option is to check out the cloudfoundry-ups-connector
project and change the code to parse your credentials. For Oracle, that would be in https://github.com/spring-projects/spring-cloud/blob/master/cloudfoundry-ups-connector/src/main/java/org/springframework/cloud/cloudfoundry/UserProvidedOracleServiceInfoCreator.java.
@ramnivas since I am not using Spring in this case I can leave the AbstractServiceConnectorCreator out correct?
@ramnivas this worked great! Thanks for the pointer!
I am trying to access user provided services in my VCAP_SERVICE environment var. I see the ups connector but that seems to expect the user provided service to just have a URI. In my case I also have a username and password. Is there any other helper classes I can use to access this service?