use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance in project so by onap.
the class TestDataSetup method setServiceInstance.
public ServiceInstance setServiceInstance() {
ServiceInstance serviceInstance = buildServiceInstance();
if (gBBInput.getCustomer() == null) {
gBBInput.setCustomer(buildCustomer());
}
gBBInput.getCustomer().getServiceSubscription().getServiceInstances().add(serviceInstance);
lookupKeyMap.put(ResourceKey.SERVICE_INSTANCE_ID, serviceInstance.getServiceInstanceId());
return serviceInstance;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance in project so by onap.
the class TestDataSetup method setVpnBondingLink.
public VpnBondingLink setVpnBondingLink() {
VpnBondingLink vpnBondingLink = buildVpnBondingLink();
ServiceInstance serviceInstance = null;
try {
serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
} catch (BBObjectNotFoundException e) {
serviceInstance = setServiceInstance();
}
serviceInstance.getVpnBondingLinks().add(vpnBondingLink);
lookupKeyMap.put(ResourceKey.VPN_BONDING_LINK_ID, vpnBondingLink.getVpnBondingLinkId());
return vpnBondingLink;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance in project so by onap.
the class TestDataSetup method setConfiguration.
public Configuration setConfiguration() {
Configuration config = new Configuration();
config.setConfigurationId("testConfigurationId");
List<Configuration> configurations = new ArrayList<>();
configurations.add(config);
ServiceInstance serviceInstance = new ServiceInstance();
try {
serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
} catch (BBObjectNotFoundException e) {
serviceInstance = setServiceInstance();
}
lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "testConfigurationId");
serviceInstance.setConfigurations(configurations);
return config;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance in project so by onap.
the class TestDataSetup method setGenericVnf.
public GenericVnf setGenericVnf() {
GenericVnf genericVnf = buildGenericVnf();
ServiceInstance serviceInstance = null;
try {
serviceInstance = extractPojosForBB.extractByKey(execution, ResourceKey.SERVICE_INSTANCE_ID);
} catch (BBObjectNotFoundException e) {
serviceInstance = setServiceInstance();
}
serviceInstance.getVnfs().add(genericVnf);
lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, genericVnf.getVnfId());
return genericVnf;
}
use of org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance in project so by onap.
the class AAIServiceInstanceResources method updateOrchestrationStatusServiceInstance.
public void updateOrchestrationStatusServiceInstance(ServiceInstance serviceInstance, OrchestrationStatus orchestrationStatus) {
ServiceInstance copiedServiceInstance = serviceInstance.shallowCopyId();
copiedServiceInstance.setOrchestrationStatus(orchestrationStatus);
copiedServiceInstance.setServiceInstanceName(serviceInstance.getServiceInstanceName());
serviceInstance.setOrchestrationStatus(orchestrationStatus);
updateServiceInstance(copiedServiceInstance);
}
Aggregations