use of org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup in project so by onap.
the class BBInputSetup method populateInstanceGroup.
protected void populateInstanceGroup(BBInputSetupParameter parameter) {
InstanceGroup instanceGroup = new InstanceGroup();
instanceGroup.setId(parameter.getInstanceGroupId());
instanceGroup.setInstanceGroupName(parameter.getInstanceName());
mapCatalogInstanceGroup(instanceGroup, parameter.getModelInfo(), parameter.getService());
parameter.getServiceInstance().getInstanceGroups().add(instanceGroup);
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup in project so by onap.
the class BBInputSetup method populateNetworkCollectionAndInstanceGroupAssign.
protected void populateNetworkCollectionAndInstanceGroupAssign(BBInputSetupParameter parameter) throws Exception {
if (parameter.getServiceInstance().getCollection() == null && parameter.getBbName().equalsIgnoreCase(AssignFlows.NETWORK_COLLECTION.toString())) {
Collection collection = this.createCollection(parameter.getResourceId());
parameter.getServiceInstance().setCollection(collection);
this.mapCatalogCollection(parameter.getService(), parameter.getServiceInstance().getCollection(), parameter.getKey());
if (isVlanTagging(parameter.getService(), parameter.getKey())) {
InstanceGroup instanceGroup = this.createInstanceGroup();
parameter.getServiceInstance().getCollection().setInstanceGroup(instanceGroup);
this.mapCatalogNetworkCollectionInstanceGroup(parameter.getService(), parameter.getServiceInstance().getCollection().getInstanceGroup(), parameter.getKey());
}
}
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup in project so by onap.
the class BBInputSetup method createInstanceGroup.
protected InstanceGroup createInstanceGroup() {
InstanceGroup instanceGroup = new InstanceGroup();
String instanceGroupId = this.generateRandomUUID();
instanceGroup.setId(instanceGroupId);
return instanceGroup;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup in project so by onap.
the class BBInputSetup method mapNetworkCollectionInstanceGroup.
protected void mapNetworkCollectionInstanceGroup(GenericVnf genericVnf, String instanceGroupId) {
org.onap.aai.domain.yang.InstanceGroup aaiInstanceGroup = bbInputSetupUtils.getAAIInstanceGroup(instanceGroupId);
InstanceGroup instanceGroup = this.mapperLayer.mapAAIInstanceGroupIntoInstanceGroup(aaiInstanceGroup);
instanceGroup.setModelInfoInstanceGroup(this.mapperLayer.mapCatalogInstanceGroupToInstanceGroup(null, this.bbInputSetupUtils.getCatalogInstanceGroup(aaiInstanceGroup.getModelVersionId())));
genericVnf.getInstanceGroups().add(instanceGroup);
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.InstanceGroup in project so by onap.
the class NetworkTopologyOperationRequestMapperTest method before.
@Before
public void before() {
// prepare and set service instance
serviceInstance = new ServiceInstance();
serviceInstanceNoCollection = new ServiceInstance();
ModelInfoServiceInstance modelInfoServiceInstance = new ModelInfoServiceInstance();
modelInfoServiceInstance.setModelInvariantUuid("modelInvariantUuid");
modelInfoServiceInstance.setModelName("modelName");
modelInfoServiceInstance.setModelUuid("modelUuid");
modelInfoServiceInstance.setModelVersion("modelVersion");
serviceInstance.setModelInfoServiceInstance(modelInfoServiceInstance);
serviceInstanceNoCollection.setModelInfoServiceInstance(modelInfoServiceInstance);
// prepare Customer object
customer = new Customer();
customer.setGlobalCustomerId("globalCustomerId");
// serviceInstance.setCustomer(customer);
// set Customer on service instance
ServiceSubscription serviceSubscription = new ServiceSubscription();
serviceSubscription.setServiceType("productFamilyId");
customer.setServiceSubscription(serviceSubscription);
// set Customer on service instance
customer.getServiceSubscription().getServiceInstances().add(serviceInstance);
customer.getServiceSubscription().getServiceInstances().add(serviceInstanceNoCollection);
//
InstanceGroup networkInstanceGroup = new InstanceGroup();
networkInstanceGroup.setId("networkInstanceGroupId");
networkInstanceGroup.setInstanceGroupFunction("instanceGroupFunction");
Collection networkCollection = new Collection();
networkCollection.setInstanceGroup(networkInstanceGroup);
serviceInstance.setCollection(networkCollection);
//
requestContext = new RequestContext();
Map<String, Object> userParams = new HashMap<>();
userParams.put("key1", "value1");
requestContext.setUserParams(userParams);
requestContext.setProductFamilyId("productFamilyId");
requestContext.setMsoRequestId("MsoRequestId");
network = new L3Network();
network.setNetworkId("TEST_NETWORK_ID");
network.setNetworkName("TEST_NETWORK_NAME");
ModelInfoNetwork modelInfoNetwork = new ModelInfoNetwork();
modelInfoNetwork.setModelInvariantUUID("modelInvariantUuid");
modelInfoNetwork.setModelName("modelName");
modelInfoNetwork.setModelVersion("modelVersion");
modelInfoNetwork.setModelUUID("modelUuid");
modelInfoNetwork.setModelCustomizationUUID("modelCustomizationUUID");
network.setModelInfoNetwork(modelInfoNetwork);
cloudRegion = new CloudRegion();
}
Aggregations