diff options
author | Rob Daugherty <rd472p@att.com> | 2018-11-27 20:51:05 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-27 20:51:05 +0000 |
commit | 36f1cf5f916d97dfb8c1b345771e58951fea8849 (patch) | |
tree | eef2a6f7a9f83dc585623d2a0ac71c1a651b8636 /bpmn/so-bpmn-tasks/src/test/java | |
parent | 3fa5bd58e24606ed4cb7d388446125e8ce0f52ec (diff) | |
parent | 6dbb06382d06dd06e77e5aea5a58583415e6734a (diff) |
Merge "Add service role"
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 +} |