diff options
Diffstat (limited to 'bpmn/MSOCommonBPMN/src')
3 files changed, 45 insertions, 7 deletions
diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LineOfBusiness.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LineOfBusiness.java index 5868da563c..d2651e6055 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LineOfBusiness.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/LineOfBusiness.java @@ -21,6 +21,7 @@ package org.onap.so.bpmn.servicedecomposition.bbobjects; import java.io.Serializable; +import java.util.List; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonRootName; @@ -39,6 +40,14 @@ public class LineOfBusiness implements Serializable, ShallowCopy<LineOfBusiness> @JsonProperty("line-of-business-name") private String lineOfBusinessName; + public LineOfBusiness() { + } + + + public LineOfBusiness(String lineOfBusinessName) { + this.lineOfBusinessName = lineOfBusinessName; + } + public String getLineOfBusinessName() { return lineOfBusinessName; } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Platform.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Platform.java index 642417fa56..d13707deb4 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Platform.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/bbobjects/Platform.java @@ -38,6 +38,14 @@ public class Platform implements Serializable, ShallowCopy<Platform> { @Id @JsonProperty("platform-name") private String platformName; + + public Platform() { + } + + + public Platform(String platformName) { + this.platformName = platformName; + } public String getPlatformName() { return platformName; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java index 80d8d928aa..80625dd4d5 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/mock/StubResponseAAI.java @@ -552,6 +552,21 @@ public class StubResponseAAI { .withBodyFile(responseFile))); } + public static void MockPostNetwork(WireMockServer wireMockServer, String networkId) { + wireMockServer.stubFor(post(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId)) + .willReturn(aResponse() + .withStatus(201) + .withHeader("Content-Type", "text/xml"))); + } + + public static void MockPostNetworkSubnet(WireMockServer wireMockServer, String networkId, String subnetId) { + wireMockServer.stubFor(post(urlMatching( + "/aai/v[0-9]+/network/l3-networks/l3-network/" + networkId + "/subnets/subnet/" + subnetId)) + .willReturn(aResponse() + .withStatus(201) + .withHeader("Content-Type", "text/xml"))); + } + public static void MockGetNetworkName(WireMockServer wireMockServer, String networkPolicyName, String responseFile, int statusCode) { wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/l3-networks/l3-network[?]network-name=" + networkPolicyName)) .willReturn(aResponse() @@ -560,13 +575,19 @@ public class StubResponseAAI { .withBodyFile(responseFile))); } - public static void MockGetNetworkVpnBinding(WireMockServer wireMockServer, String responseFile, String vpnBinding) { - wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/"+vpnBinding + "[?]depth=all")) - .willReturn(aResponse() - .withStatus(200) - .withHeader("Content-Type", "text/xml") - .withBodyFile(responseFile))); - } + public static void MockGetNetworkVpnBinding(WireMockServer wireMockServer, String responseFile, String vpnBinding) { + MockGetNetworkVpnBindingWithDepth(wireMockServer, responseFile, vpnBinding, "all"); + } + + public static void MockGetNetworkVpnBindingWithDepth(WireMockServer wireMockServer, String responseFile, + String vpnBinding, String depth) { + wireMockServer.stubFor( + get(urlMatching("/aai/v[0-9]+/network/vpn-bindings/vpn-binding/" + vpnBinding + "[?]depth=" + depth)) + .willReturn(aResponse() + .withStatus(200) + .withHeader("Content-Type", "text/xml") + .withBodyFile(responseFile))); + } public static void MockGetNetworkPolicy(WireMockServer wireMockServer, String responseFile, String policy) { wireMockServer.stubFor(get(urlMatching("/aai/v[0-9]+/network/network-policies/network-policy/"+policy + "[?]depth=all")) |