summaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src
diff options
context:
space:
mode:
authorSteve Smokowski <ss835w@att.com>2019-02-14 16:32:40 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-14 16:32:40 +0000
commitf1435439699e4e08d2bf912634208e18c894722f (patch)
tree6866fcbd9028796e304876c00f95592d6dc09298 /bpmn/so-bpmn-tasks/src
parent8c26ced50d7ad4528d123d217e543c8a5fd6db98 (diff)
parent8d18569284ac43ef315b41c628872e0de0bbb57a (diff)
Merge "fixed CandidateType json serialization"
Diffstat (limited to 'bpmn/so-bpmn-tasks/src')
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/buildingblock/SniroHomingV2.java8
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/Candidate.java2
-rw-r--r--bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java43
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest1Vpn.json4
-rw-r--r--bpmn/so-bpmn-tasks/src/test/resources/__files/BuildingBlocks/SniroHoming/SniroManagerRequest3Vpn.json12
5 files changed, 8 insertions, 61 deletions
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 92b4e211d5..cb893ce950 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
@@ -403,9 +403,7 @@ public class SniroHomingV2 {
List<org.onap.so.client.sniro.beans.Candidate> cans = new ArrayList<org.onap.so.client.sniro.beans.Candidate>();
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.getIdentifierType().getName());
- can.setIdentifierType(type);
+ can.setIdentifierType(c.getIdentifierType());
can.setIdentifiers(c.getIdentifiers());
can.setCloudOwner(c.getCloudOwner());
cans.add(can);
@@ -416,9 +414,7 @@ public class SniroHomingV2 {
List<org.onap.so.client.sniro.beans.Candidate> cans = new ArrayList<org.onap.so.client.sniro.beans.Candidate>();
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.getIdentifierType().getName());
- can.setIdentifierType(type);
+ can.setIdentifierType(c.getIdentifierType());
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 1f8c56e727..3b7e509752 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
@@ -23,6 +23,8 @@ package org.onap.so.client.sniro.beans;
import java.io.Serializable;
import java.util.List;
+import org.onap.so.bpmn.servicedecomposition.homingobjects.CandidateType;
+
import com.fasterxml.jackson.annotation.JsonProperty;
public class Candidate implements Serializable{
diff --git a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java b/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java
deleted file mode 100644
index d8984c0b83..0000000000
--- a/bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/sniro/beans/CandidateType.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 - 2019 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.client.sniro.beans;
-
-import java.io.Serializable;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-public class CandidateType implements Serializable{
-
- private static final long serialVersionUID = 2273215496314532173L;
-
- @JsonProperty("name")
- private String name;
-
-
- public String getName(){
- return name;
- }
-
- public void setName(String name){
- this.name = name;
- }
-
-}
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 83ecd6add1..6713f80ad9 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,9 +42,7 @@
"modelInvariantId" : "testProxyModelInvariantUuid2"
},
"requiredCandidates" : [ {
- "identifierType" : {
- "name" : "vnfId"
- },
+ "identifierType" : "vnfId",
"identifiers" : [ "testVnfId" ]
} ]
} ],
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 c3c5c0771a..14a89c90fc 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,9 +42,7 @@
"modelInvariantId" : "testProxyModelInvariantUuid2"
},
"requiredCandidates" : [ {
- "identifierType" : {
- "name" : "vnfId"
- },
+ "identifierType" : "vnfId",
"identifiers" : [ "testVnfId" ]
} ]
}, {
@@ -66,9 +64,7 @@
"modelInvariantId" : "testProxyModelInvariantUuid2"
},
"requiredCandidates" : [ {
- "identifierType" : {
- "name" : "vnfId"
- },
+ "identifierType" : "vnfId",
"identifiers" : [ "testVnfId" ]
} ]
}, {
@@ -90,9 +86,7 @@
"modelInvariantId" : "testProxyModelInvariantUuid2"
},
"requiredCandidates" : [ {
- "identifierType" : {
- "name" : "vnfId"
- },
+ "identifierType" : "vnfId",
"identifiers" : [ "testVnfId" ]
} ]
} ],