Merge "Updated fields on sniro request"
authorSteve Smokowski <ss835w@att.com>
Tue, 5 Feb 2019 12:45:57 +0000 (12:45 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 5 Feb 2019 12:45:57 +0000 (12:45 +0000)
bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/homingobjects/Candidate.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java
bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java
bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/SniroHomingV2IT.java
bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest1Vpn.json
bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3AR.json
bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3Vpn.json
mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/beans/avpnbondingbeans/AVPNServiceNames.java [deleted file]

index 91cd2ad..a727162 100644 (file)
@@ -31,10 +31,10 @@ public class Candidate implements Serializable {
 
        private static final long serialVersionUID = -3959572501582849328L;
 
-       @JsonProperty("candidateType")
-       private CandidateType candidateType;
-       @JsonProperty("candidates")
-       private List<String> candidates;
+       @JsonProperty("identifierType")
+       private CandidateType identifierType;
+       @JsonProperty("identifiers")
+       private List<String> 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<String> getCandidates() {
-               return candidates;
+       public List<String> getIdentifiers() {
+               return identifiers;
        }
 
        /**
         * list of candidates
         * i.e. actual serviceInstanceId, actual vnfName, actual cloudRegionId, etc.
         */
-       public void setCandidates(List<String> candidates) {
-               this.candidates = candidates;
+       public void setIdentifiers(List<String> 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;
        }
 
        /**
index e83c27c..92b4e21 100644 (file)
@@ -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);
                        }
index b42636b..1f8c56e 100644 (file)
@@ -29,28 +29,28 @@ public class Candidate implements Serializable{
 
        private static final long serialVersionUID = -5474502255533410907L;
 
-       @JsonProperty("candidateType")
-       private CandidateType candidateType;
-       @JsonProperty("candidates")
-       private List<String> candidates;
+       @JsonProperty("identifierType")
+       private CandidateType identifierType;
+       @JsonProperty("identifiers")
+       private List<String> 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<String> getCandidates(){
-               return candidates;
+       public List<String> getIdentifiers(){
+               return identifiers;
        }
 
-       public void setCandidates(List<String> candidates){
-               this.candidates = candidates;
+       public void setIdentifiers(List<String> identifiers){
+               this.identifiers = identifiers;
        }
 
        public String getCloudOwner(){
index f0bb6a3..59fad5c 100644 (file)
@@ -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<String> c = new ArrayList<String>();
                c.add("testVnfId");
-               requiredCandidate.setCandidates(c);
+               requiredCandidate.setIdentifiers(c);
                sp2.addRequiredCandidates(requiredCandidate);
                bondingLink.getServiceProxies().add(sp2);
                serviceInstance.getVpnBondingLinks().add(bondingLink);
index b65203b..83ecd6a 100644 (file)
         "modelInvariantId" : "testProxyModelInvariantUuid2"
       },
       "requiredCandidates" : [ {
-        "candidateType" : {
+        "identifierType" : {
           "name" : "vnfId"
         },
-        "candidates" : [ "testVnfId" ]
+        "identifiers" : [ "testVnfId" ]
       } ]
     } ],
-    "requestParameters" : {"subscriptionServiceType":"iptollfree","aLaCarte":false}
+    "requestParameters" : {"subscriptionServiceType":"testSubscriptionServiceType","aLaCarte":false}
   },
   "licenseInfo" : {
     "licenseDemands" : [ ]
index ac460c3..740a05d 100644 (file)
@@ -51,7 +51,7 @@
         "modelInvariantId" : "testAllottedModelInvariantUuid3"
       }
     } ],
-    "requestParameters" : {"subscriptionServiceType":"iptollfree","aLaCarte":false}
+    "requestParameters" : {"subscriptionServiceType":"testSubscriptionServiceType","aLaCarte":false}
   },
   "licenseInfo" : {
     "licenseDemands" : [ ]
index 6db2153..c3c5c07 100644 (file)
         "modelInvariantId" : "testProxyModelInvariantUuid2"
       },
       "requiredCandidates" : [ {
-        "candidateType" : {
+        "identifierType" : {
           "name" : "vnfId"
         },
-        "candidates" : [ "testVnfId" ]
+        "identifiers" : [ "testVnfId" ]
       } ]
     }, {
       "serviceResourceId" : "testProxyId1",
         "modelInvariantId" : "testProxyModelInvariantUuid2"
       },
       "requiredCandidates" : [ {
-        "candidateType" : {
+        "identifierType" : {
           "name" : "vnfId"
         },
-        "candidates" : [ "testVnfId" ]
+        "identifiers" : [ "testVnfId" ]
       } ]
     }, {
       "serviceResourceId" : "testProxyId1",
         "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/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/beans/avpnbondingbeans/AVPNServiceNames.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/beans/avpnbondingbeans/AVPNServiceNames.java
deleted file mode 100644 (file)
index ed4e8c9..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * 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.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.apihandler.beans.avpnbondingbeans;
-
-public enum AVPNServiceNames {
-  AVPN_BONDING_TO_COLLABORATE("AVPNBondingToCollaborate"),
-  AVPN_BONDING_TO_IP_FLEX_REACH("AVPNBondingToIPFlexReach"),
-  AVPN_BONDING_TO_IP_TOLL_FREE("AVPNBondingToIPTollFree");
-
-  private String serviceName;
-
-  AVPNServiceNames(String serviceName){
-    this.serviceName=serviceName;
-  }
-
-  public String getServiceName() {
-    return serviceName;
-  }
-
-  @Override
-  public String toString() {
-    return "AVPNServiceNames{" +
-            "serviceName='" + serviceName + '\'' +
-            '}';
-  }
-}