From 01481bc876d56221b72d23081764e233bdbad4a5 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Mon, 4 Feb 2019 20:10:13 -0500 Subject: Updated fields on sniro request Updated setter methods in avpn bonding classes. Updated fields on sniro request to be idenitier instead of candidate Change-Id: I67a98f742b28a93912c4b6fb05618449b629c883 Issue-ID: SO-1463 Signed-off-by: Benjamin, Max (mb388a) --- .../homingobjects/Candidate.java | 24 +++++++++++----------- .../onap/so/bpmn/buildingblock/SniroHomingV2.java | 12 +++++------ .../org/onap/so/client/sniro/beans/Candidate.java | 24 +++++++++++----------- .../flowspecific/tasks/SniroHomingV2IT.java | 6 +++--- .../SniroHoming/SniroManagerRequest1Vpn.json | 6 +++--- .../SniroHoming/SniroManagerRequest3AR.json | 2 +- .../SniroHoming/SniroManagerRequest3Vpn.json | 14 ++++++------- 7 files changed, 44 insertions(+), 44 deletions(-) (limited to 'bpmn') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/Candidate.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/Candidate.java index 91cd2ad791..a727162415 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/Candidate.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/Candidate.java @@ -31,10 +31,10 @@ public class Candidate implements Serializable { private static final long serialVersionUID = -3959572501582849328L; - @JsonProperty("candidateType") - private CandidateType candidateType; - @JsonProperty("candidates") - private List candidates; + @JsonProperty("identifierType") + private CandidateType identifierType; + @JsonProperty("identifiers") + private List identifiers; @JsonProperty("cloudOwner") private String cloudOwner; @@ -42,32 +42,32 @@ public class Candidate implements Serializable { * list of candidates * i.e. actual serviceInstanceId, actual vnfName, actual cloudRegionId, etc. */ - public List getCandidates() { - return candidates; + public List getIdentifiers() { + return identifiers; } /** * list of candidates * i.e. actual serviceInstanceId, actual vnfName, actual cloudRegionId, etc. */ - public void setCandidates(List candidates) { - this.candidates = candidates; + public void setIdentifiers(List identifiers) { + this.identifiers = identifiers; } /** * Way to identify the type of candidate * i.e. "serviceInstanceId", "vnfName", "cloudRegionId", etc. */ - public CandidateType getCandidateType(){ - return candidateType; + public CandidateType getIdentifierType(){ + return identifierType; } /** * Way to identify the type of candidate * i.e. "serviceInstanceId", "vnfName", "cloudRegionId", etc. */ - public void setCandidateType(CandidateType candidateType){ - this.candidateType = candidateType; + public void setIdentifierType(CandidateType identifierType){ + this.identifierType = identifierType; } /** diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java index e83c27c400..92b4e211d5 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java @@ -404,9 +404,9 @@ public class SniroHomingV2 { for(Candidate c:required){ org.onap.so.client.sniro.beans.Candidate can = new org.onap.so.client.sniro.beans.Candidate(); org.onap.so.client.sniro.beans.CandidateType type = new org.onap.so.client.sniro.beans.CandidateType(); - type.setName(c.getCandidateType().getName()); - can.setCandidateType(type); - can.setCandidates(c.getCandidates()); + type.setName(c.getIdentifierType().getName()); + can.setIdentifierType(type); + can.setIdentifiers(c.getIdentifiers()); can.setCloudOwner(c.getCloudOwner()); cans.add(can); } @@ -417,9 +417,9 @@ public class SniroHomingV2 { for(Candidate c:excluded){ org.onap.so.client.sniro.beans.Candidate can = new org.onap.so.client.sniro.beans.Candidate(); org.onap.so.client.sniro.beans.CandidateType type = new org.onap.so.client.sniro.beans.CandidateType(); - type.setName(c.getCandidateType().getName()); - can.setCandidateType(type); - can.setCandidates(c.getCandidates()); + type.setName(c.getIdentifierType().getName()); + can.setIdentifierType(type); + can.setIdentifiers(c.getIdentifiers()); can.setCloudOwner(c.getCloudOwner()); cans.add(can); } diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java index b42636b078..1f8c56e727 100644 --- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java +++ b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java @@ -29,28 +29,28 @@ public class Candidate implements Serializable{ private static final long serialVersionUID = -5474502255533410907L; - @JsonProperty("candidateType") - private CandidateType candidateType; - @JsonProperty("candidates") - private List candidates; + @JsonProperty("identifierType") + private CandidateType identifierType; + @JsonProperty("identifiers") + private List identifiers; @JsonProperty("cloudOwner") private String cloudOwner; - public CandidateType getCandidateType(){ - return candidateType; + public CandidateType getIdentifierType(){ + return identifierType; } - public void setCandidateType(CandidateType candidateType){ - this.candidateType = candidateType; + public void setIdentifierType(CandidateType identifierType){ + this.identifierType = identifierType; } - public List getCandidates(){ - return candidates; + public List getIdentifiers(){ + return identifiers; } - public void setCandidates(List candidates){ - this.candidates = candidates; + public void setIdentifiers(List identifiers){ + this.identifiers = identifiers; } public String getCloudOwner(){ diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java index f0bb6a369c..59fad5cdd6 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java @@ -84,7 +84,7 @@ public class SniroHomingV2IT extends BaseIntegrationTest{ requestContext.setMsoRequestId("testRequestId"); RequestParameters params = new RequestParameters(); params.setaLaCarte(false); - params.setSubscriptionServiceType("iptollfree"); + params.setSubscriptionServiceType("testSubscriptionServiceType"); requestContext.setRequestParameters(params); } @@ -94,10 +94,10 @@ public class SniroHomingV2IT extends BaseIntegrationTest{ bondingLink.getServiceProxies().add(setServiceProxy("1", "transport")); ServiceProxy sp2 = setServiceProxy("2", "infrastructure"); Candidate requiredCandidate = new Candidate(); - requiredCandidate.setCandidateType(CandidateType.VNF_ID); + requiredCandidate.setIdentifierType(CandidateType.VNF_ID); List c = new ArrayList(); c.add("testVnfId"); - requiredCandidate.setCandidates(c); + requiredCandidate.setIdentifiers(c); sp2.addRequiredCandidates(requiredCandidate); bondingLink.getServiceProxies().add(sp2); serviceInstance.getVpnBondingLinks().add(bondingLink); diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest1Vpn.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest1Vpn.json index b65203b24d..83ecd6add1 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest1Vpn.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest1Vpn.json @@ -42,13 +42,13 @@ "modelInvariantId" : "testProxyModelInvariantUuid2" }, "requiredCandidates" : [ { - "candidateType" : { + "identifierType" : { "name" : "vnfId" }, - "candidates" : [ "testVnfId" ] + "identifiers" : [ "testVnfId" ] } ] } ], - "requestParameters" : {"subscriptionServiceType":"iptollfree","aLaCarte":false} + "requestParameters" : {"subscriptionServiceType":"testSubscriptionServiceType","aLaCarte":false} }, "licenseInfo" : { "licenseDemands" : [ ] diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3AR.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3AR.json index ac460c328a..740a05d1be 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3AR.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3AR.json @@ -51,7 +51,7 @@ "modelInvariantId" : "testAllottedModelInvariantUuid3" } } ], - "requestParameters" : {"subscriptionServiceType":"iptollfree","aLaCarte":false} + "requestParameters" : {"subscriptionServiceType":"testSubscriptionServiceType","aLaCarte":false} }, "licenseInfo" : { "licenseDemands" : [ ] diff --git a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3Vpn.json b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3Vpn.json index 6db2153691..c3c5c0771a 100644 --- a/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3Vpn.json +++ b/bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3Vpn.json @@ -42,10 +42,10 @@ "modelInvariantId" : "testProxyModelInvariantUuid2" }, "requiredCandidates" : [ { - "candidateType" : { + "identifierType" : { "name" : "vnfId" }, - "candidates" : [ "testVnfId" ] + "identifiers" : [ "testVnfId" ] } ] }, { "serviceResourceId" : "testProxyId1", @@ -66,10 +66,10 @@ "modelInvariantId" : "testProxyModelInvariantUuid2" }, "requiredCandidates" : [ { - "candidateType" : { + "identifierType" : { "name" : "vnfId" }, - "candidates" : [ "testVnfId" ] + "identifiers" : [ "testVnfId" ] } ] }, { "serviceResourceId" : "testProxyId1", @@ -90,13 +90,13 @@ "modelInvariantId" : "testProxyModelInvariantUuid2" }, "requiredCandidates" : [ { - "candidateType" : { + "identifierType" : { "name" : "vnfId" }, - "candidates" : [ "testVnfId" ] + "identifiers" : [ "testVnfId" ] } ] } ], - "requestParameters" : {"subscriptionServiceType":"iptollfree","aLaCarte":false} + "requestParameters" : {"subscriptionServiceType":"testSubscriptionServiceType","aLaCarte":false} }, "licenseInfo" : { "licenseDemands" : [ ] -- cgit 1.2.3-korg