Skip to content

Commit

Permalink
feat(Open Service Broker): add service to project (#31)
Browse files Browse the repository at this point in the history
Co-authored-by: John Odejar <[email protected]@Johns-MacBook-Pro.local>
  • Loading branch information
padamstx and John Odejar authored Jul 6, 2020
1 parent ddab4d2 commit 831788e
Show file tree
Hide file tree
Showing 53 changed files with 5,316 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ before_install:
&& openssl aes-256-cbc -K $encrypted_a72454cfb42f_key -iv $encrypted_a72454cfb42f_iv -in iam_policy_management.env.enc -out iam_policy_management.env -d
&& openssl aes-256-cbc -K $encrypted_6eaa1fc94541_key -iv $encrypted_6eaa1fc94541_iv -in catalog_mgmt.env.enc -out catalog_mgmt.env -d
&& openssl aes-256-cbc -K $encrypted_dac53b985913_key -iv $encrypted_dac53b985913_iv -in case_management.env.enc -out case_management.env -d
&& openssl aes-256-cbc -K $encrypted_9b829ae06290_key -iv $encrypted_9b829ae06290_iv -in open_service_broker.env.enc -out open_service_broker.env -d
|| true
# && openssl aes-256-cbc -K $encrypted_25d847003bcf_key -iv $encrypted_25d847003bcf_iv -in enterprise-management.env.enc -out enterprise-management.env -d
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Service Name | Artifact Coordinates
[Global Tagging](https://cloud.ibm.com/apidocs/tagging) | com.ibm.com:global-tagging:0.8.0
[IAM Access Groups](https://cloud.ibm.com/apidocs/iam-access-groups) | com.ibm.com:iam-access-groups:0.8.0
[IAM Policy Management](https://cloud.ibm.com/apidocs/iam-policy-management) | com.ibm.com:iam-policy-management:0.8.0
[Open Service Broker](https://cloud.ibm.com/apidocs/resource-controller/ibm-cloud-osb-api) | com.ibm.com:open-service-broker:0.8.0
[Resource Manager](https://cloud.ibm.com/apidocs/resource-controller/resource-manager) | com.ibm.com:resource-manager:0.8.0

## Prerequisites
Expand Down
5 changes: 5 additions & 0 deletions modules/coverage-reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@
<artifactId>iam-policy-management</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>open-service-broker</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>resource-manager</artifactId>
Expand Down
68 changes: 68 additions & 0 deletions modules/open-service-broker/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<!-- >>> Replace this with the parent pom's artifactId -->
<artifactId>platform-services</artifactId>
<groupId>com.ibm.cloud</groupId>
<version>99-SNAPSHOT</version>
<relativePath>../..</relativePath>
</parent>

<!-- >>> Replace this with the service module's artifactId (e.g. "example-service") -->
<artifactId>open-service-broker</artifactId>

<!-- >>> Replace this with a text description of this module (e.g. "Example Service") -->
<name>IBM Cloud Open Service Broker</name>
<packaging>jar</packaging>

<dependencies>
<dependency>
<groupId>com.ibm.cloud</groupId>
<artifactId>sdk-core</artifactId>
</dependency>
<dependency>
<!-- >>> Replace this with the "common" module's artifactId (e.g. my-services-common) -->
<artifactId>platform-services-common</artifactId>
<groupId>com.ibm.cloud</groupId>
</dependency>
<dependency>
<!-- >>> Replace this with the "common" module's artifactId (e.g. my-services-common) -->
<artifactId>platform-services-common</artifactId>
<groupId>${project.groupId}</groupId>
<type>test-jar</type>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-testng</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<developers>
<developer>
<name>IBM Cloud DevX SDK Development</name>
<email>[email protected]</email>
<url>https://www.ibm.com/</url>
</developer>
</developers>

</project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
/*
* (C) Copyright IBM Corp. 2020.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package com.ibm.cloud.platform_services.open_service_broker.v1.model;

import com.google.gson.annotations.SerializedName;
import com.ibm.cloud.sdk.core.service.model.GenericModel;

/**
* A JSON object that contains data for platform resources associated with the binding to be created.
*/
public class BindResource extends GenericModel {

@SerializedName("account_id")
protected String accountId;
@SerializedName("serviceid_crn")
protected String serviceidCrn;
@SerializedName("target_crn")
protected String targetCrn;
@SerializedName("app_guid")
protected String appGuid;
protected String route;

/**
* Builder.
*/
public static class Builder {
private String accountId;
private String serviceidCrn;
private String targetCrn;
private String appGuid;
private String route;

private Builder(BindResource bindResource) {
this.accountId = bindResource.accountId;
this.serviceidCrn = bindResource.serviceidCrn;
this.targetCrn = bindResource.targetCrn;
this.appGuid = bindResource.appGuid;
this.route = bindResource.route;
}

/**
* Instantiates a new builder.
*/
public Builder() {
}

/**
* Builds a BindResource.
*
* @return the new BindResource instance
*/
public BindResource build() {
return new BindResource(this);
}

/**
* Set the accountId.
*
* @param accountId the accountId
* @return the BindResource builder
*/
public Builder accountId(String accountId) {
this.accountId = accountId;
return this;
}

/**
* Set the serviceidCrn.
*
* @param serviceidCrn the serviceidCrn
* @return the BindResource builder
*/
public Builder serviceidCrn(String serviceidCrn) {
this.serviceidCrn = serviceidCrn;
return this;
}

/**
* Set the targetCrn.
*
* @param targetCrn the targetCrn
* @return the BindResource builder
*/
public Builder targetCrn(String targetCrn) {
this.targetCrn = targetCrn;
return this;
}

/**
* Set the appGuid.
*
* @param appGuid the appGuid
* @return the BindResource builder
*/
public Builder appGuid(String appGuid) {
this.appGuid = appGuid;
return this;
}

/**
* Set the route.
*
* @param route the route
* @return the BindResource builder
*/
public Builder route(String route) {
this.route = route;
return this;
}
}

protected BindResource(Builder builder) {
accountId = builder.accountId;
serviceidCrn = builder.serviceidCrn;
targetCrn = builder.targetCrn;
appGuid = builder.appGuid;
route = builder.route;
}

/**
* New builder.
*
* @return a BindResource builder
*/
public Builder newBuilder() {
return new Builder(this);
}

/**
* Gets the accountId.
*
* Account owner of resource to bind.
*
* @return the accountId
*/
public String accountId() {
return accountId;
}

/**
* Gets the serviceidCrn.
*
* Service ID of resource to bind.
*
* @return the serviceidCrn
*/
public String serviceidCrn() {
return serviceidCrn;
}

/**
* Gets the targetCrn.
*
* Target ID of resource to bind.
*
* @return the targetCrn
*/
public String targetCrn() {
return targetCrn;
}

/**
* Gets the appGuid.
*
* GUID of an application associated with the binding. For credentials bindings.
*
* @return the appGuid
*/
public String appGuid() {
return appGuid;
}

/**
* Gets the route.
*
* URL of the application to be intermediated. For route services bindings.
*
* @return the route
*/
public String route() {
return route;
}
}

Loading

0 comments on commit 831788e

Please sign in to comment.