diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-11-17 01:31:19 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-11-17 01:31:33 -0500 |
commit | 6dbb06382d06dd06e77e5aea5a58583415e6734a (patch) | |
tree | 25f9a9e35c0952b5853cf88ecadb9a4a803cc9a9 /bpmn/so-bpmn-tasks/src/test/java | |
parent | 175d83adfa897a450cf646de863874b96f2e5f39 (diff) |
Add service role
Added service role to sniro request when not null.
Change-Id: Ie4c7db5c927c6b6869705e97d6402a0be2c755b7
Issue-ID: SO-1233
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test/java')
-rw-r--r-- | bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java index c96c38dab1..f8b1298dd8 100644 --- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java +++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/bpmn/common/data/TestDataSetup.java @@ -306,6 +306,7 @@ public class TestDataSetup{ modelInfoServiceInstance.setModelVersion("testModelVersion" + serviceInstanceCounter); modelInfoServiceInstance.setModelName("testModelName" + serviceInstanceCounter); modelInfoServiceInstance.setServiceType("testServiceType" + serviceInstanceCounter); + modelInfoServiceInstance.setServiceRole("testServiceRole" + serviceInstanceCounter); serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance); serviceInstance.setProject(buildProject()); @@ -381,6 +382,24 @@ public class TestDataSetup{ collection.setInstanceGroup(instanceGroup); + + return instanceGroup; + } + + public InstanceGroup setInstanceGroupVnf() { + InstanceGroup instanceGroup = buildInstanceGroup(); + + ServiceInstance serviceInstance = null; + + try { + serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID, execution.getLookupMap().get(ResourceKey.SERVICE_INSTANCE_ID)); + } catch(BBObjectNotFoundException e) { + serviceInstance = setServiceInstance(); + } + + serviceInstance.getInstanceGroups().add(instanceGroup); + lookupKeyMap.put(ResourceKey.INSTANCE_GROUP_ID, instanceGroup.getId()); + return instanceGroup; } @@ -700,4 +719,4 @@ public class TestDataSetup{ subnet.setNeutronSubnetId("testNeutronSubnetId"); return subnet; } -}
\ No newline at end of file +} |