diff options
58 files changed, 3355 insertions, 6233 deletions
diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java index ed327fd981..9df20bac1c 100644 --- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java +++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/enums/ActionType.java @@ -20,26 +20,36 @@ package org.onap.so.adapters.nssmf.enums; +import lombok.Getter; + +@Getter public enum ActionType { - ALLOCATE, + ALLOCATE("allocate"), + + DEALLOCATE("deallocate"), + + CREATE("create"), + + TERMINATE("terminate"), - DEALLOCATE, + ACTIVATE("activate"), - CREATE, + DEACTIVATE("deactivate"), - TERMINATE, + QUERY_JOB_STATUS("query_job_status"), - ACTIVATE, + MODIFY_BY_ID("modify_by_id"), - DEACTIVATE, + MODIFY("modify"), - QUERY_JOB_STATUS, + QUERY_NSSI_SELECTION_CAPABILITY("query_nssi_selection_capability"), - MODIFY_BY_ID, + QUERY_SUB_NET_CAPABILITY("query_sub_net_capability"),; - MODIFY, + private String type; - QUERY_NSSI_SELECTION_CAPABILITY, - QUERY_SUB_NET_CAPABILITY + ActionType(String type) { + this.type = type; + } } diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java index 16a5b2ada0..d8a9088a42 100644 --- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java +++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/ExternalNssmfManager.java @@ -92,8 +92,13 @@ public abstract class ExternalNssmfManager extends BaseNssmfManager { private RestResponse doResponseStatus(ResourceOperationStatus status) throws ApplicationException { RestResponse restResponse = sendRequest(null); - ResponseDescriptor rspDesc = - unMarshal(restResponse.getResponseContent(), JobStatusResponse.class).getResponseDescriptor(); + JobStatusResponse jobStatusResponse = unMarshal(restResponse.getResponseContent(), JobStatusResponse.class); + + ResponseDescriptor rspDesc = jobStatusResponse.getResponseDescriptor(); + rspDesc.setNssiId(status.getResourceInstanceID()); + + jobStatusResponse.setResponseDescriptor(rspDesc); + restResponse.setResponseContent(marshal(jobStatusResponse)); updateRequestDbJobStatus(rspDesc, status, restResponse); return restResponse; } diff --git a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java index f439b400d9..348bf12bcb 100644 --- a/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java +++ b/adapters/mso-nssmf-adapter/src/main/java/org/onap/so/adapters/nssmf/manager/impl/InternalNssmfManager.java @@ -76,6 +76,7 @@ public abstract class InternalNssmfManager extends BaseNssmfManager { descriptor.setStatus(status.getStatus()); descriptor.setStatusDescription(status.getStatusDescription()); descriptor.setProgress(Integer.parseInt(status.getProgress())); + descriptor.setNssiId(status.getResourceInstanceID()); // descriptor.setResponseId(status.getOperationId()); return restUtil.createResponse(200, marshal(descriptor)); } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java index 1f0422b0b2..22e6b1fc22 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/inventory/delete/DeleteAAIInventory.java @@ -54,9 +54,9 @@ public class DeleteAAIInventory { CloudSite cloudSite = cloudConfig.getCloudSite(cloudInformation.getRegionId()) .orElseThrow(() -> new MsoCloudSiteNotFound(cloudInformation.getRegionId())); CloudIdentity cloudIdentity = cloudSite.getIdentityService(); - HeatBridgeApi heatBridgeClient = - new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudInformation.getOwner(), - cloudInformation.getRegionId(), cloudSite.getRegionId(), cloudInformation.getTenantId()); + HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, + cloudInformation.getOwner(), cloudInformation.getRegionId(), cloudSite.getRegionId(), + cloudInformation.getTenantId(), cloudInformation.getNodeType()); heatBridgeClient.authenticate(); heatBridgeClient.deleteVfModuleData(cloudInformation.getVnfId(), cloudInformation.getVfModuleId()); diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java index 12751f8c27..3f79c43bf8 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/inventory/CreateAAIInventory.java @@ -64,9 +64,9 @@ public class CreateAAIInventory { List<String> oobMgtNetNames = new ArrayList<>(); - HeatBridgeApi heatBridgeClient = - new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, cloudInformation.getOwner(), - cloudInformation.getRegionId(), cloudSite.getRegionId(), cloudInformation.getTenantId()); + HeatBridgeApi heatBridgeClient = new HeatBridgeImpl(new AAIResourcesClient(), cloudIdentity, + cloudInformation.getOwner(), cloudInformation.getRegionId(), cloudSite.getRegionId(), + cloudInformation.getTenantId(), cloudInformation.getNodeType()); heatBridgeClient.authenticate(); @@ -119,8 +119,8 @@ public class CreateAAIInventory { "Successfully queried neutron resources and built AAI actions to add l-interfaces to vservers."); // Update AAI - logger.debug("Current Dry Run Value: {}", env.getProperty("heatBridgeDryrun", Boolean.class, true)); - heatBridgeClient.submitToAai(env.getProperty("heatBridgeDryrun", Boolean.class, true)); + logger.debug("Current Dry Run Value: {}", env.getProperty("heatBridgeDryrun", Boolean.class, false)); + heatBridgeClient.submitToAai(env.getProperty("heatBridgeDryrun", Boolean.class, false)); } catch (Exception ex) { logger.debug("Heatbrige failed for stackId: " + cloudInformation.getTemplateInstanceId(), ex); } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java index a4e6cccc06..bafba3e901 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeApi.java @@ -155,7 +155,7 @@ public interface HeatBridgeApi { * @param cloudOwner */ void buildAddVserverLInterfacesToAaiAction(List<Resource> stackResources, List<String> oobMgtNetIds, - String cloudOwner); + String cloudOwner) throws HeatBridgeException; /** * Query and build AAI actions for Openstack Compute resources to AAI's pserver and pinterface objects diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java index 7e25ed600f..90a578d3b4 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/HeatBridgeImpl.java @@ -32,6 +32,8 @@ */ package org.onap.so.heatbridge; +import java.io.IOException; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -60,22 +62,31 @@ import org.onap.aai.domain.yang.SriovPf; import org.onap.aai.domain.yang.SriovPfs; import org.onap.aai.domain.yang.Subnets; import org.onap.aai.domain.yang.SriovVf; -import org.onap.aai.domain.yang.SriovVfs; import org.onap.aai.domain.yang.VfModule; import org.onap.aai.domain.yang.Vlan; -import org.onap.aai.domain.yang.Vlans; import org.onap.aai.domain.yang.Vserver; -import org.onap.aaiclient.client.aai.AAIObjectType; +import org.onap.aaiclient.client.aai.AAIDSLQueryClient; import org.onap.aaiclient.client.aai.AAIResourcesClient; import org.onap.aaiclient.client.aai.AAISingleTransactionClient; import org.onap.aaiclient.client.aai.entities.AAIResultWrapper; import org.onap.aaiclient.client.aai.entities.Relationships; +import org.onap.aaiclient.client.aai.entities.Results; import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; +import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder.Types; +import org.onap.aaiclient.client.graphinventory.Format; +import org.onap.aaiclient.client.graphinventory.entities.DSLQuery; +import org.onap.aaiclient.client.graphinventory.entities.DSLQueryBuilder; +import org.onap.aaiclient.client.graphinventory.entities.DSLStartNode; +import org.onap.aaiclient.client.graphinventory.entities.Node; +import org.onap.aaiclient.client.graphinventory.entities.Start; +import org.onap.aaiclient.client.graphinventory.entities.TraversalBuilder; +import org.onap.aaiclient.client.graphinventory.entities.__; import org.onap.aaiclient.client.graphinventory.entities.uri.Depth; import org.onap.aaiclient.client.graphinventory.exceptions.BulkProcessFailed; import org.onap.logging.filter.base.ErrorCode; +import org.onap.so.cloud.resource.beans.NodeType; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.db.catalog.beans.ServerType; import org.onap.so.heatbridge.constants.HeatBridgeConstants; @@ -97,6 +108,8 @@ import org.openstack4j.model.network.Subnet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.core.env.Environment; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; import com.google.common.base.Preconditions; import com.google.common.base.Strings; import com.google.common.collect.ImmutableMap; @@ -111,21 +124,34 @@ public class HeatBridgeImpl implements HeatBridgeApi { private static final String ERR_MSG_NULL_OS_CLIENT = "Initialization error: Null openstack client. Authenticate with Keystone first."; private static final String OOB_MGT_NETWORK_IDENTIFIER = "Management"; + + protected static final String DIRECT = "direct"; + protected static final String PCI_SLOT = "pci_slot"; + protected static final String OVSNET = "ovsnet"; + protected static final String SRIOV = "SRIOV"; + protected static final String RESOURCE_LINK = "resource-link"; + + protected static final Object PRIVATE_VLANS = "private_vlans"; + protected static final Object PUBLIC_VLANS = "public_vlans"; + + protected ObjectMapper mapper = new ObjectMapper(); + private OpenstackClient osClient; private AAIResourcesClient resourcesClient; + private AAIDSLQueryClient aaiDSLClient; private AAISingleTransactionClient transaction; private String cloudOwner; private String cloudRegionId; private String regionId; private String tenantId; + private NodeType nodeType; private AaiHelper aaiHelper = new AaiHelper(); private CloudIdentity cloudIdentity; private Environment env; - public HeatBridgeImpl(AAIResourcesClient resourcesClient, final CloudIdentity cloudIdentity, @Nonnull final String cloudOwner, @Nonnull final String cloudRegionId, @Nonnull final String regionId, - @Nonnull final String tenantId) { + @Nonnull final String tenantId, @Nonnull final NodeType nodeType) { Objects.requireNonNull(cloudOwner, "Null cloud-owner value!"); Objects.requireNonNull(cloudRegionId, "Null cloud-region identifier!"); Objects.requireNonNull(tenantId, "Null tenant identifier!"); @@ -137,6 +163,7 @@ public class HeatBridgeImpl implements HeatBridgeApi { this.regionId = regionId; this.tenantId = tenantId; this.resourcesClient = resourcesClient; + this.nodeType = nodeType; if (resourcesClient != null) this.transaction = resourcesClient.beginSingleTransaction(); if (SpringContextHelper.getAppContext() != null) @@ -202,6 +229,11 @@ public class HeatBridgeImpl implements HeatBridgeApi { return serverIds.stream().map(serverId -> osClient.getServerById(serverId)).collect(Collectors.toList()); } + + protected Server getOpenstackServerById(String deviceId) { + return osClient.getServerById(deviceId); + } + @Override public List<Network> getAllOpenstackProviderNetworks(final List<Resource> stackResources) { Objects.requireNonNull(osClient, ERR_MSG_NULL_OS_CLIENT); @@ -241,7 +273,8 @@ public class HeatBridgeImpl implements HeatBridgeApi { l3Network.setRelationshipList(relationshipList); transaction.createIfNotExists( - AAIUriFactory.createResourceUri(AAIObjectType.L3_NETWORK, l3Network.getNetworkId()), + AAIUriFactory + .createResourceUri(AAIFluentTypeBuilder.network().l3Network(l3Network.getNetworkId())), Optional.of(l3Network)); } }); @@ -253,8 +286,8 @@ public class HeatBridgeImpl implements HeatBridgeApi { for (org.openstack4j.model.compute.Image image : images) { Image aaiImage = aaiHelper.buildImage(image); try { - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.IMAGE, cloudOwner, cloudRegionId, - aaiImage.getImageId()); + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() + .cloudRegion(cloudOwner, cloudRegionId).image(aaiImage.getImageId())); if (!resourcesClient.exists(uri)) { transaction.create(uri, aaiImage); logger.debug("Queuing AAI command to add image: " + aaiImage.getImageId()); @@ -274,8 +307,8 @@ public class HeatBridgeImpl implements HeatBridgeApi { for (org.openstack4j.model.compute.Flavor flavor : flavors) { Flavor aaiFlavor = aaiHelper.buildFlavor(flavor); try { - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.FLAVOR, cloudOwner, cloudRegionId, - aaiFlavor.getFlavorId()); + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() + .cloudRegion(cloudOwner, cloudRegionId).flavor(aaiFlavor.getFlavorId())); transaction.createIfNotExists(uri, Optional.of(aaiFlavor)); } catch (WebApplicationException e) { throw new HeatBridgeException( @@ -293,20 +326,24 @@ public class HeatBridgeImpl implements HeatBridgeApi { // Build vserver relationships to: image, flavor, pserver, vf-module vserver.setRelationshipList( aaiHelper.getVserverRelationshipList(cloudOwner, cloudRegionId, genericVnfId, vfModuleId, server)); - transaction.createIfNotExists(AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, cloudOwner, - cloudRegionId, tenantId, vserver.getVserverId()), Optional.of(vserver)); + transaction.createIfNotExists( + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() + .cloudRegion(cloudOwner, cloudRegionId).tenant(tenantId).vserver(vserver.getVserverId())), + Optional.of(vserver)); }); } @Override public void buildAddVserverLInterfacesToAaiAction(final List<Resource> stackResources, - final List<String> oobMgtNetIds, String cloudOwner) { + final List<String> oobMgtNetIds, String cloudOwner) throws HeatBridgeException { Objects.requireNonNull(osClient, ERR_MSG_NULL_OS_CLIENT); List<String> portIds = extractStackResourceIdsByResourceType(stackResources, HeatBridgeConstants.OS_PORT_RESOURCE_TYPE); + if (portIds == null) return; for (String portId : portIds) { + boolean isL2Multicast = false; Port port = osClient.getPortById(portId); Network network = osClient.getNetworkById(port.getNetworkId()); LInterface lIf = new LInterface(); @@ -317,12 +354,7 @@ public class HeatBridgeImpl implements HeatBridgeApi { lIf.setIsPortMirrored(false); lIf.setIsIpUnnumbered(false); lIf.setInMaint(false); - if (oobMgtNetIds != null && oobMgtNetIds.contains(port.getNetworkId())) { - lIf.setInterfaceRole(OOB_MGT_NETWORK_IDENTIFIER); - } else { - lIf.setInterfaceRole(port.getvNicType()); - } - boolean isL2Multicast = false; + if (port.getProfile() != null && port.getProfile().get("trusted") != null) { String trusted = port.getProfile().get("trusted").toString(); if (Boolean.parseBoolean(trusted)) { @@ -330,19 +362,46 @@ public class HeatBridgeImpl implements HeatBridgeApi { } } lIf.setL2Multicasting(isL2Multicast); + lIf.setInterfaceType(getInterfaceType(nodeType, port.getvNicType())); + lIf.setRelationshipList(new RelationshipList()); - transaction.createIfNotExists(AAIUriFactory.createResourceUri(AAIObjectType.L_INTERFACE, cloudOwner, - cloudRegionId, tenantId, port.getDeviceId(), lIf.getInterfaceName()), Optional.of(lIf)); + if (oobMgtNetIds != null && oobMgtNetIds.contains(port.getNetworkId())) { + lIf.setInterfaceRole(OOB_MGT_NETWORK_IDENTIFIER); + } else { + lIf.setInterfaceRole(port.getvNicType()); + } + + // Update l-interface to the vserver + transaction.createIfNotExists( + AAIUriFactory.createResourceUri( + AAIFluentTypeBuilder.cloudInfrastructure().cloudRegion(cloudOwner, cloudRegionId) + .tenant(tenantId).vserver(port.getDeviceId()).lInterface(lIf.getInterfaceName())), + Optional.of(lIf)); updateLInterfaceIps(port, lIf); + if (cloudOwner.equals(env.getProperty("mso.cloudOwner.included", ""))) { - updateLInterfaceVlan(port, lIf); + Server server = getOpenstackServerById(port.getDeviceId()); + updateLInterfaceVlan(port, lIf, server.getHypervisorHostname()); } updateSriovPfToPserver(port, lIf); } } + protected String getInterfaceType(NodeType nodeType, String nicType) { + logger.debug("nicType: " + nicType + "nodeType: " + nodeType); + if (DIRECT.equalsIgnoreCase(nicType)) { + return SRIOV; + } else { + if (nodeType == NodeType.GREENFIELD) { + return NodeType.GREENFIELD.getNetworkTechnologyName(); + } else { + return NodeType.BROWNFIELD.getNetworkTechnologyName(); + } + } + } + @Override public void createPserversAndPinterfacesIfNotPresentInAai(final List<Resource> stackResources) throws HeatBridgeException { @@ -356,8 +415,10 @@ public class HeatBridgeImpl implements HeatBridgeApi { for (String portId : portIds) { Port port = osClient.getPortById(portId); if (port.getvNicType().equalsIgnoreCase(HeatBridgeConstants.OS_SRIOV_PORT_TYPE)) { - createPServerPInterfaceIfNotExists(serverHostnames.get(port.getHostId()).getHostname(), - aaiHelper.buildPInterface(port)); + Pserver foundServer = serverHostnames.get(port.getHostId()); + if (foundServer != null) { + createPServerPInterfaceIfNotExists(foundServer.getHostname(), aaiHelper.buildPInterface(port)); + } } } } @@ -369,6 +430,7 @@ public class HeatBridgeImpl implements HeatBridgeApi { for (Server server : osServers) { Pserver pserver = aaiHelper.buildPserver(server); if (pserver != null) { + logger.debug("Adding Pserver: " + server.getHost()); pserverMap.put(server.getHost(), pserver); } } @@ -392,18 +454,21 @@ public class HeatBridgeImpl implements HeatBridgeApi { private void createPServerIfNotExists(Map<String, Pserver> serverHostnames) { for (Pserver pserver : serverHostnames.values()) { - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, pserver.getHostname()); + AAIResourceUri uri = AAIUriFactory + .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver(pserver.getHostname())); resourcesClient.createIfNotExists(uri, Optional.of(pserver)); } } private void createPServerPInterfaceIfNotExists(String pserverHostname, PInterface pInterface) { - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.P_INTERFACE, pserverHostname, - pInterface.getInterfaceName()); + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() + .pserver(pserverHostname).pInterface(pInterface.getInterfaceName())); resourcesClient.createIfNotExists(uri, Optional.of(pInterface)); } - private void updateLInterfaceVlan(final Port port, final LInterface lIf) { + private void updateLInterfaceVlan(final Port port, final LInterface lIf, final String hostName) + throws HeatBridgeException { + // add back all vlan logic Vlan vlan = new Vlan(); Network network = osClient.getNetworkById(port.getNetworkId()); if (network.getNetworkType() != null && network.getNetworkType().equals(NetworkType.VLAN)) { @@ -413,7 +478,6 @@ public class HeatBridgeImpl implements HeatBridgeApi { vlan.setInMaint(false); vlan.setIsIpUnnumbered(false); vlan.setIsPrivate(false); - transaction .createIfNotExists( AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() @@ -422,6 +486,32 @@ public class HeatBridgeImpl implements HeatBridgeApi { Optional.of(vlan)); } + if (nodeType == NodeType.GREENFIELD) { + validatePhysicalNetwork(port, network); + processOVS(lIf, hostName, NodeType.GREENFIELD.getInterfaceName()); + } else { + processOVS(lIf, hostName, NodeType.BROWNFIELD.getInterfaceName()); + } + + List<String> privateVlans = (ArrayList<String>) port.getProfile().get(PRIVATE_VLANS); + List<String> publicVlans = (ArrayList<String>) port.getProfile().get(PUBLIC_VLANS); + List<String> vlans = null; + if (publicVlans != null && !publicVlans.isEmpty()) { + vlans = publicVlans.stream().filter(publicVlan -> !Strings.isNullOrEmpty(publicVlan)) + .collect(Collectors.toList()); + } else { + vlans = new ArrayList<>(); + } + + if (privateVlans != null && !privateVlans.isEmpty()) { + List<String> temp = privateVlans.stream().filter(privateVlan -> !Strings.isNullOrEmpty(privateVlan)) + .collect(Collectors.toList()); + vlans.addAll(temp); + } + vlans.stream().forEach(vlanLocal -> logger.debug("Vlan Id: {}", vlanLocal)); + + processVlanTag(lIf, vlans); + if (port.getvNicType() != null && port.getvNicType().equalsIgnoreCase(HeatBridgeConstants.OS_SRIOV_PORT_TYPE)) { SriovVf sriovVf = new SriovVf(); sriovVf.setPciId(port.getProfile().get(HeatBridgeConstants.OS_PCI_SLOT_KEY).toString()); @@ -439,6 +529,49 @@ public class HeatBridgeImpl implements HeatBridgeApi { } } + protected String createVlanTagUri(String vlanIdOuter) throws HeatBridgeException { + int vlanOuterInt = Integer.parseInt(vlanIdOuter); + DSLQueryBuilder<Start, Node> builder = TraversalBuilder + .fragment(new DSLStartNode(Types.CLOUD_REGION, __.key("cloud-owner", cloudOwner), + __.key("cloud-region-id", cloudRegionId))) + .to(__.node(Types.VLAN_RANGE)) + .to(__.node(Types.VLAN_TAG, __.key("vlan-id-outer", vlanOuterInt)).output()); + String results = getAAIDSLClient().query(Format.PATHED, new DSLQuery(builder.build())); + Optional<String> vlanTagURI = findLinkedURI(results); + if (vlanTagURI.isPresent()) + return vlanTagURI.get(); + else + throw new HeatBridgeException("Cannot find VlanTag Related Link " + vlanIdOuter); + } + + + protected void processVlanTag(LInterface lInterface, List<String> vlanTags) throws HeatBridgeException { + for (String vlanTag : vlanTags) { + Relationship vlanTagRelationship = new Relationship(); + vlanTagRelationship.setRelatedLink(createVlanTagUri(vlanTag)); + lInterface.getRelationshipList().getRelationship().add(vlanTagRelationship); + } + } + + protected void validatePhysicalNetwork(Port neutronPort, Network network) throws HeatBridgeException { + String physicalNetworkType = network.getProviderPhyNet(); + if (!OVSNET.equalsIgnoreCase(physicalNetworkType)) { + String exceptionMessage = String.format( + "The OVS-DPDK port is expected to have a physical network of type ovsnet but was found to have %s instead.", + physicalNetworkType); + throw new HeatBridgeException(exceptionMessage); + } + } + + protected void processOVS(LInterface lInterface, String hostName, String interfaceName) { + Relationship lagRelationship = new Relationship(); + lagRelationship.setRelatedLink(AAIUriFactory + .createResourceUri( + AAIFluentTypeBuilder.cloudInfrastructure().pserver(hostName).lagInterface(interfaceName)) + .build().toString()); + lInterface.getRelationshipList().getRelationship().add(lagRelationship); + } + /** * Needs to be corrected according to the specification that is in draft If pserver/p-interface does not have a * SRIOV-PF object matching the PCI-ID of the Openstack port object, then create it in AAI. Openstack SRIOV Port @@ -464,9 +597,11 @@ public class HeatBridgeImpl implements HeatBridgeApi { lIf.setInterfaceDescription( "Attached to SR-IOV port: " + pserverHostName + "::" + matchingPifName.get()); try { - Optional<PInterface> matchingPIf = resourcesClient.get(PInterface.class, AAIUriFactory - .createResourceUri(AAIObjectType.P_INTERFACE, pserverHostName, matchingPifName.get()) - .depth(Depth.ONE)); + Optional<PInterface> matchingPIf = resourcesClient.get(PInterface.class, + AAIUriFactory + .createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() + .pserver(pserverHostName).pInterface(matchingPifName.get())) + .depth(Depth.ONE)); if (matchingPIf.isPresent()) { SriovPfs pIfSriovPfs = matchingPIf.get().getSriovPfs(); if (pIfSriovPfs == null) { @@ -484,16 +619,18 @@ public class HeatBridgeImpl implements HeatBridgeApi { logger.debug("Queuing AAI command to update sriov-pf object to pserver: " + pserverHostName + "/" + matchingPifName.get()); - AAIResourceUri sriovPfUri = AAIUriFactory.createResourceUri(AAIObjectType.SRIOV_PF, - pserverHostName, matchingPifName.get(), sriovPf.getPfPciId()); + AAIResourceUri sriovPfUri = AAIUriFactory.createResourceUri( + AAIFluentTypeBuilder.cloudInfrastructure().pserver(pserverHostName) + .pInterface(matchingPifName.get()).sriovPf(sriovPf.getPfPciId())); + if (!resourcesClient.exists(sriovPfUri)) { transaction.create(sriovPfUri, sriovPf); - AAIResourceUri sriovVfUri = AAIUriFactory.createResourceUri(AAIObjectType.SRIOV_VF, - cloudOwner, cloudRegionId, tenantId, port.getDeviceId(), lIf.getInterfaceName(), - port.getProfile().get(HeatBridgeConstants.OS_PCI_SLOT_KEY).toString()); - + AAIResourceUri sriovVfUri = AAIUriFactory.createResourceUri(AAIFluentTypeBuilder + .cloudInfrastructure().cloudRegion(cloudOwner, cloudRegionId).tenant(tenantId) + .vserver(port.getDeviceId()).lInterface(lIf.getInterfaceName()).sriovVf( + port.getProfile().get(HeatBridgeConstants.OS_PCI_SLOT_KEY).toString())); transaction.connect(sriovPfUri, sriovVfUri); } } @@ -562,17 +699,16 @@ public class HeatBridgeImpl implements HeatBridgeApi { Objects.requireNonNull(vnfId, "Null vnf-id!"); Objects.requireNonNull(vfModuleId, "Null vf-module-id!"); try { - Optional<VfModule> vfModule = resourcesClient - .get(AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, vnfId, vfModuleId).depth(Depth.ONE), - NotFoundException.class) - .asBean(VfModule.class); + Optional<VfModule> vfModule = resourcesClient.get(AAIUriFactory + .createResourceUri(AAIFluentTypeBuilder.network().genericVnf(vnfId).vfModule(vfModuleId)) + .depth(Depth.ONE), NotFoundException.class).asBean(VfModule.class); AAIResultWrapper resultWrapper = new AAIResultWrapper(vfModule.get()); Optional<Relationships> relationships = resultWrapper.getRelationships(); logger.debug("VfModule contains relationships in AAI: {}", relationships.isPresent()); if (relationships.isPresent()) { - List<AAIResourceUri> l3NetworkUris = relationships.get().getRelatedUris(AAIObjectType.L3_NETWORK); + List<AAIResourceUri> l3NetworkUris = relationships.get().getRelatedUris(Types.L3_NETWORK); logger.debug("L3Network contains {} relationships in AAI", l3NetworkUris.size()); if (!l3NetworkUris.isEmpty()) { @@ -585,13 +721,13 @@ public class HeatBridgeImpl implements HeatBridgeApi { } } - List<AAIResourceUri> vserverUris = relationships.get().getRelatedUris(AAIObjectType.VSERVER); + List<AAIResourceUri> vserverUris = relationships.get().getRelatedUris(Types.VSERVER); logger.debug("VServer contains {} relationships in AAI", vserverUris.size()); createTransactionToDeleteSriovPfFromPserver(vserverUris); if (!vserverUris.isEmpty()) { for (AAIResourceUri vserverUri : vserverUris) { - if (env.getProperty("heatBridgeDryrun", Boolean.class, true)) { + if (env.getProperty("heatBridgeDryrun", Boolean.class, false)) { logger.debug("Would delete Vserver: {}", vserverUri.build().toString()); } else { resourcesClient.delete(vserverUri); @@ -617,7 +753,8 @@ public class HeatBridgeImpl implements HeatBridgeApi { String pserverName = entry.getKey(); List<String> pciIds = entry.getValue(); Optional<Pserver> pserver = resourcesClient.get(Pserver.class, - AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, pserverName).depth(Depth.TWO)); + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure().pserver(pserverName)) + .depth(Depth.TWO)); if (pserver.isPresent()) { // For each pserver/p-interface match sriov-vfs by pic-id and delete them. pserver.get().getPInterfaces().getPInterface().stream().filter( @@ -626,15 +763,15 @@ public class HeatBridgeImpl implements HeatBridgeApi { if (pciIds.contains(sriovPf.getPfPciId())) { logger.debug("creating transaction to delete SR-IOV PF: " + pIf.getInterfaceName() + " from PServer: " + pserverName); - if (env.getProperty("heatBridgeDryrun", Boolean.class, true)) { + if (env.getProperty("heatBridgeDryrun", Boolean.class, false)) { logger.debug("Would delete Sriov Pf: {}", - AAIUriFactory - .createResourceUri(AAIObjectType.SRIOV_PF, pserverName, - pIf.getInterfaceName(), sriovPf.getPfPciId()) - .build().toString()); + AAIUriFactory.createResourceUri(AAIFluentTypeBuilder.cloudInfrastructure() + .pserver(pserverName).pInterface(pIf.getInterfaceName()) + .sriovPf(sriovPf.getPfPciId())).build()); } else { - resourcesClient.delete(AAIUriFactory.createResourceUri(AAIObjectType.SRIOV_PF, - pserverName, pIf.getInterfaceName(), sriovPf.getPfPciId())); + resourcesClient.delete(AAIUriFactory.createResourceUri( + AAIFluentTypeBuilder.cloudInfrastructure().pserver(pserverName) + .pInterface(pIf.getInterfaceName()).sriovPf(sriovPf.getPfPciId()))); } } })); @@ -648,12 +785,11 @@ public class HeatBridgeImpl implements HeatBridgeApi { AAIResultWrapper vserverWrapper = resourcesClient.get(vserverUri.depth(Depth.TWO)); Optional<Relationships> vserverRelationships = vserverWrapper.getRelationships(); if (vserverRelationships.isPresent() - && CollectionUtils.isNotEmpty(vserverRelationships.get().getRelatedLinks(AAIObjectType.PSERVER))) { + && CollectionUtils.isNotEmpty(vserverRelationships.get().getRelatedLinks(Types.PSERVER))) { Vserver vserver = vserverWrapper.asBean(Vserver.class).get(); List<String> pciIds = HeatBridgeUtils.extractPciIdsFromVServer(vserver); if (CollectionUtils.isNotEmpty(pciIds)) { - List<AAIResourceUri> matchingPservers = - vserverRelationships.get().getRelatedUris(AAIObjectType.PSERVER); + List<AAIResourceUri> matchingPservers = vserverRelationships.get().getRelatedUris(Types.PSERVER); if (matchingPservers != null && matchingPservers.size() == 1) { pserverToPciIdMap.put(matchingPservers.get(0).getURIKeys().get("hostname"), pciIds); } @@ -667,4 +803,28 @@ public class HeatBridgeImpl implements HeatBridgeApi { Map<Object, Boolean> map = new ConcurrentHashMap<>(); return t -> map.putIfAbsent(keyExtractor.apply(t), Boolean.TRUE) == null; } + + protected Optional<String> findLinkedURI(String jsonResultsString) { + Results<Map<String, String>> results; + try { + results = mapper.readValue(jsonResultsString, new TypeReference<Results<Map<String, String>>>() {}); + if (results.getResult().size() == 1) { + return Optional.of(results.getResult().get(0).get(RESOURCE_LINK)); + } else if (results.getResult().isEmpty()) { + return Optional.empty(); + } else { + throw new IllegalStateException("more than one result returned"); + } + } catch (IOException e) { + logger.error("Error retrieving URI from Results JSON", e); + return Optional.empty(); + } + } + + protected AAIDSLQueryClient getAAIDSLClient() { + if (aaiDSLClient == null) { + aaiDSLClient = new AAIDSLQueryClient(); + } + return aaiDSLClient; + } } diff --git a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java index 7d4e92d9ad..1fa757f547 100644 --- a/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java +++ b/adapters/mso-openstack-adapters/src/main/java/org/onap/so/heatbridge/helpers/AaiHelper.java @@ -252,6 +252,9 @@ public class AaiHelper { .filter(link -> link.getRel().equals(HeatBridgeConstants.OS_RESOURCES_SELF_LINK_KEY)).findFirst() .ifPresent(link -> aaiImage.setImageSelflink(link.getHref())); } + if (aaiImage.getImageSelflink() == null || aaiImage.getImageSelflink().isEmpty()) { + aaiImage.setImageSelflink("NA"); + } return aaiImage; } diff --git a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java index 18348f19d7..cea436b799 100644 --- a/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java +++ b/adapters/mso-openstack-adapters/src/test/java/org/onap/so/heatbridge/HeatBridgeImplTest.java @@ -72,6 +72,7 @@ import org.onap.aai.domain.yang.L3InterfaceIpv6AddressList; import org.onap.aai.domain.yang.LInterface; import org.onap.aai.domain.yang.PInterface; import org.onap.aai.domain.yang.SriovPf; +import org.onap.aaiclient.client.aai.AAIDSLQueryClient; import org.onap.aaiclient.client.aai.AAIObjectType; import org.onap.aaiclient.client.aai.AAIResourcesClient; import org.onap.aaiclient.client.aai.AAISingleTransactionClient; @@ -80,6 +81,7 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.generated.fluentbuilders.AAIFluentTypeBuilder; import org.onap.aaiclient.client.graphinventory.GraphInventoryCommonObjectMapperProvider; import org.onap.aaiclient.client.graphinventory.exceptions.BulkProcessFailed; +import org.onap.so.cloud.resource.beans.NodeType; import org.onap.so.db.catalog.beans.CloudIdentity; import org.onap.so.heatbridge.constants.HeatBridgeConstants; import org.onap.so.heatbridge.helpers.AaiHelper; @@ -106,7 +108,7 @@ import com.google.common.collect.ImmutableMap; import inet.ipaddr.IPAddressString; -@RunWith(MockitoJUnitRunner.class) +@RunWith(MockitoJUnitRunner.Silent.class) public class HeatBridgeImplTest { private static final String CLOUD_OWNER = "CloudOwner"; @@ -126,33 +128,24 @@ public class HeatBridgeImplTest { private AAISingleTransactionClient transaction; @Mock + private AAIDSLQueryClient mockDSLClient; + + @Mock private Environment env; + @Mock + private Server server; + @InjectMocks - private HeatBridgeImpl heatbridge = - new HeatBridgeImpl(resourcesClient, cloudIdentity, CLOUD_OWNER, REGION_ID, REGION_ID, TENANT_ID); + private HeatBridgeImpl heatbridge = new HeatBridgeImpl(resourcesClient, cloudIdentity, CLOUD_OWNER, REGION_ID, + REGION_ID, TENANT_ID, NodeType.GREENFIELD); @Before public void setUp() throws HeatBridgeException, OpenstackClientException, BulkProcessFailed { when(resourcesClient.beginSingleTransaction()).thenReturn(transaction); } - @Ignore - @Test - public void testQueryNestedHeatStackResources() throws HeatBridgeException { - // Arrange - String heatStackId = "1234567"; - List<Resource> expectedResourceList = (List<Resource>) extractTestStackResources(); - when(osClient.getStackBasedResources(heatStackId, HeatBridgeConstants.OS_DEFAULT_HEAT_NESTING)) - .thenReturn(expectedResourceList); - - // Act - List<Resource> resourceList = heatbridge.queryNestedHeatStackResources(heatStackId); - // Assert - verify(osClient).getStackBasedResources(heatStackId, HeatBridgeConstants.OS_DEFAULT_HEAT_NESTING); - assertEquals(resourceList, expectedResourceList); - } @Test public void testExtractStackResourceIdsByResourceType() throws HeatBridgeException { @@ -169,73 +162,6 @@ public class HeatBridgeImplTest { assertEquals(expectedServerIds, serverIds); } - @Ignore - @Test - public void testGetAllOpenstackServers() { - // Arrange - List<Resource> stackResources = (List<Resource>) extractTestStackResources(); - - Server server1 = mock(Server.class); - Server server2 = mock(Server.class); - List<Server> expectedServers = Arrays.asList(server1, server2); - - when(osClient.getServerById("43c2159b-2c04-46ac-bda5-594110cae2d3")).thenReturn(server1); - when(osClient.getServerById("7cff109a-b2b7-4933-97b4-ec44a8365568")).thenReturn(server2); - - // Act - List<Server> servers = heatbridge.getAllOpenstackServers(stackResources); - - // Assert - assertEquals(expectedServers, servers); - } - - @Ignore - @Test - public void testExtractOpenstackImagesFromServers() { - // Arrange - Server server1 = mock(Server.class); - Server server2 = mock(Server.class); - List<Server> servers = Arrays.asList(server1, server2); - - Image image1 = mock(Image.class); - Image image2 = mock(Image.class); - when(image1.getId()).thenReturn("1"); - when(image2.getId()).thenReturn("1"); - List<Image> expectedDistinctImages = Collections.singletonList(image1); - - when(server1.getImage()).thenReturn(image1); - when(server2.getImage()).thenReturn(image2); - - // Act - List<Image> images = heatbridge.extractOpenstackImagesFromServers(servers); - - // Assert - assertEquals(expectedDistinctImages, images); - } - - @Ignore - @Test - public void testExtractOpenstackFlavorsFromServers() { - // Arrange - Server server1 = mock(Server.class); - Server server2 = mock(Server.class); - List<Server> servers = Arrays.asList(server1, server2); - - Flavor flavor1 = mock(Flavor.class); - Flavor flavor2 = mock(Flavor.class); - when(flavor1.getId()).thenReturn("1"); - when(flavor2.getId()).thenReturn("2"); - List<Flavor> expectedFlavors = Arrays.asList(flavor1, flavor2); - - when(server1.getFlavor()).thenReturn(flavor1); - when(server2.getFlavor()).thenReturn(flavor2); - - // Act - List<Flavor> flavors = heatbridge.extractOpenstackFlavorsFromServers(servers); - - // Assert - assertEquals(expectedFlavors, flavors); - } @Test public void testUpdateVserversToAai() throws HeatBridgeException { @@ -428,6 +354,9 @@ public class HeatBridgeImplTest { when(port.getMacAddress()).thenReturn("78:4f:43:68:e2:78"); when(port.getNetworkId()).thenReturn("890a203a-23gg-56jh-df67-731656a8f13a"); when(port.getDeviceId()).thenReturn("test-device-id"); + + when(osClient.getServerById("test-device-id")).thenReturn(server); + when(server.getHypervisorHostname()).thenReturn("test.server.name"); String pfPciId = "0000:08:00.0"; when(port.getProfile()).thenReturn(ImmutableMap.of(HeatBridgeConstants.OS_PCI_SLOT_KEY, pfPciId, HeatBridgeConstants.OS_PHYSICAL_NETWORK_KEY, "physical_network_id")); @@ -448,6 +377,7 @@ public class HeatBridgeImplTest { when(network.getId()).thenReturn("test-network-id"); when(network.getNetworkType()).thenReturn(NetworkType.VLAN); when(network.getProviderSegID()).thenReturn("2345"); + when(network.getProviderPhyNet()).thenReturn("ovsnet"); when(osClient.getPortById("212a203a-9764-4f42-84ea-731536a8f13a")).thenReturn(port); when(osClient.getPortById("387e3904-8948-43d1-8635-b6c2042b54da")).thenReturn(port); diff --git a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy index 040fc26f23..44188b462b 100644 --- a/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy +++ b/bpmn/MSOCommonBPMN/src/main/groovy/org/onap/so/bpmn/common/scripts/OofUtils.groovy @@ -22,6 +22,11 @@ package org.onap.so.bpmn.common.scripts +import org.onap.so.beans.nsmf.oof.NsiReqBody +import org.onap.so.beans.nsmf.oof.RequestInfo +import org.onap.so.beans.nsmf.oof.SubnetCapability +import org.onap.so.beans.nsmf.oof.TemplateInfo + import static org.onap.so.bpmn.common.scripts.GenericUtils.* import javax.ws.rs.core.UriBuilder @@ -650,4 +655,35 @@ json.add("requestInfo", requestInfo) return json.toString() } + + public String buildSelectNSIRequest(String requestId, TemplateInfo nstInfo, List<TemplateInfo> nsstInfo, + String messageType, Map<String, Object> serviceProfile, + List<SubnetCapability> subnetCapabilities, Integer timeOut){ + + def transactionId = requestId + logger.debug( "transactionId is: " + transactionId) + + String callbackUrl = UrnPropertiesReader.getVariable("mso.adapters.oof.callback.endpoint") + "/" + messageType + "/" + correlator + + NsiReqBody nsiReqBody = new NsiReqBody() + + RequestInfo requestInfo = new RequestInfo() + requestInfo.setRequestId(requestId) + requestInfo.setTransactionId(transactionId) + requestInfo.setCallbackUrl(callbackUrl) + requestInfo.setSourceId("so") + requestInfo.setTimeout(timeOut) + //requestInfo.setNumSolutions() + + nsiReqBody.setRequestInfo(requestInfo) + nsiReqBody.setNSTInfo(nstInfo) + nsiReqBody.setServiceProfile(serviceProfile) + nsiReqBody.setSubnetCapabilities(subnetCapabilities) + nsiReqBody.setNSSTInfo(nsstInfo) + + + ObjectMapper objectMapper = new ObjectMapper() + + return objectMapper.writeValueAsString(nsiReqBody) + } } diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java index 5a8244266b..b181a60f74 100644 --- a/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java +++ b/bpmn/MSOCommonBPMN/src/main/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetup.java @@ -443,6 +443,17 @@ public class BBInputSetup implements JavaDelegate { protected void populateConfiguration(BBInputSetupParameter parameter) { Configuration configuration = null; + String replaceVnfModelCustomizationUUID = ""; + if (parameter.getRelatedInstanceList() != null) { + for (RelatedInstanceList relatedInstList : parameter.getRelatedInstanceList()) { + RelatedInstance relatedInstance = relatedInstList.getRelatedInstance(); + if (relatedInstance.getModelInfo().getModelType().equals(ModelType.vnf)) { + if (parameter.getIsReplace()) { + replaceVnfModelCustomizationUUID = relatedInstance.getModelInfo().getModelCustomizationId(); + } + } + } + } for (Configuration configurationTemp : parameter.getServiceInstance().getConfigurations()) { if (parameter.getLookupKeyMap().get(ResourceKey.CONFIGURATION_ID) != null && configurationTemp.getConfigurationId() @@ -465,8 +476,17 @@ public class BBInputSetup implements JavaDelegate { if (configuration != null && parameter.getBbName().contains("Fabric")) { Vnfc vnfc = getVnfcToConfiguration(parameter.getConfigurationResourceKeys().getVnfcName()); configuration.setVnfc(vnfc); - this.mapCatalogConfiguration(configuration, parameter.getModelInfo(), parameter.getService(), - parameter.getConfigurationResourceKeys()); + if (!parameter.getBbName().contains("Delete")) { + if (parameter.getIsReplace()) { + parameter.getConfigurationResourceKeys() + .setVnfResourceCustomizationUUID(replaceVnfModelCustomizationUUID); + mapCatalogConfiguration(configuration, parameter.getModelInfo(), + parameter.getServiceModel().getNewService(), parameter.getConfigurationResourceKeys()); + } else { + mapCatalogConfiguration(configuration, parameter.getModelInfo(), + parameter.getServiceModel().getCurrentService(), parameter.getConfigurationResourceKeys()); + } + } } else if (configuration != null && parameter.getBbName().contains("Vrf")) { configuration.setModelInfoConfiguration(mapperLayer.mapCatalogConfigurationToConfiguration( findConfigurationResourceCustomization(parameter.getModelInfo(), parameter.getService()), null)); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java index 4755e58582..9195df0955 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupMapperLayerTest.java @@ -39,12 +39,12 @@ import org.onap.so.bpmn.servicedecomposition.bbobjects.Collection; import org.onap.so.bpmn.servicedecomposition.bbobjects.Configuration; import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; import org.onap.so.bpmn.servicedecomposition.bbobjects.GenericVnf; -import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.L3Network; import org.onap.so.bpmn.servicedecomposition.bbobjects.LineOfBusiness; import org.onap.so.bpmn.servicedecomposition.bbobjects.NetworkPolicy; import org.onap.so.bpmn.servicedecomposition.bbobjects.OwningEntity; import org.onap.so.bpmn.servicedecomposition.bbobjects.Platform; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Pnf; import org.onap.so.bpmn.servicedecomposition.bbobjects.Project; import org.onap.so.bpmn.servicedecomposition.bbobjects.RouteTableReference; import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceInstance; @@ -80,6 +80,7 @@ import org.onap.so.db.catalog.beans.VnfcCustomization; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; import com.fasterxml.jackson.core.JsonParseException; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.ObjectMapper; @@ -87,10 +88,11 @@ public class BBInputSetupMapperLayerTest { BBInputSetupMapperLayer bbInputSetupMapperLayer = new BBInputSetupMapperLayer(); - ObjectMapper mapper = new ObjectMapper(); + ObjectMapper mapper = new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); private static final String RESOURCE_PATH = "src/test/resources/__files/ExecuteBuildingBlock/"; + @Test public void testMapOrchestrationStatusFromAAI() { OrchestrationStatus expected = OrchestrationStatus.INVENTORIED; diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java index dd79d2772f..70bce65f5b 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupTest.java @@ -1337,6 +1337,10 @@ public class BBInputSetupTest { Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId"); String bbName = AssignFlows.FABRIC_CONFIGURATION.toString(); + + ServiceModel serviceModel = new ServiceModel(); + serviceModel.setCurrentService(service); + ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys(); configResourceKeys.setVnfcName(vnfcName); Vnfc vnfc = new Vnfc(); @@ -1348,7 +1352,8 @@ public class BBInputSetupTest { BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestId(REQUEST_ID) .setModelInfo(modelInfo).setService(service).setBbName(bbName).setServiceInstance(serviceInstance) .setLookupKeyMap(lookupKeyMap).setResourceId(resourceId).setInstanceName(instanceName) - .setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails).build(); + .setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails) + .setServiceModel(serviceModel).build(); SPY_bbInputSetup.populateConfiguration(parameter); verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); @@ -1374,6 +1379,52 @@ public class BBInputSetupTest { } @Test + public void testPopulateConfigurationReplace() throws JsonParseException, JsonMappingException, IOException { + String instanceName = "configurationName"; + ModelInfo modelInfo = new ModelInfo(); + modelInfo.setModelCustomizationUuid("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); + + ServiceInstance serviceInstance = new ServiceInstance(); + Configuration configuration = new Configuration(); + configuration.setConfigurationId("configurationId"); + configuration.setConfigurationName("configurationName"); + serviceInstance.getConfigurations().add(configuration); + String resourceId = "configurationId"; + String vnfcName = "vnfcName"; + // Mock service + Service service = mapper.readValue( + new File(RESOURCE_PATH + "CatalogDBService_getServiceInstanceNOAAIInput.json"), Service.class); + ConfigurationResourceCustomization configurationCust = new ConfigurationResourceCustomization(); + configurationCust.setModelCustomizationUUID("72d9d1cd-f46d-447a-abdb-451d6fb05fa9"); + service.getConfigurationCustomizations().add(configurationCust); + Map<ResourceKey, String> lookupKeyMap = new HashMap<>(); + lookupKeyMap.put(ResourceKey.CONFIGURATION_ID, "configurationId"); + String bbName = AssignFlows.FABRIC_CONFIGURATION.toString(); + + ServiceModel serviceModel = new ServiceModel(); + serviceModel.setNewService(service); + + ConfigurationResourceKeys configResourceKeys = prepareConfigurationResourceKeys(); + configResourceKeys.setVnfcName(vnfcName); + Vnfc vnfc = new Vnfc(); + vnfc.setVnfcName(vnfcName); + RequestDetails requestDetails = mapper.readValue( + new File(RESOURCE_PATH + "RequestDetailsInput_withRelatedInstanceList.json"), RequestDetails.class); + doNothing().when(SPY_bbInputSetup).mapCatalogConfiguration(configuration, modelInfo, service, + configResourceKeys); + doReturn(vnfc).when(SPY_bbInputSetup).getVnfcToConfiguration(vnfcName); + BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestId(REQUEST_ID) + .setModelInfo(modelInfo).setService(service).setBbName(bbName).setServiceInstance(serviceInstance) + .setLookupKeyMap(lookupKeyMap).setResourceId(resourceId).setInstanceName(instanceName) + .setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails) + .setServiceModel(serviceModel).setIsReplace(true).build(); + SPY_bbInputSetup.populateConfiguration(parameter); + configResourceKeys.setVnfResourceCustomizationUUID("my-test-uuid"); + verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service, + configResourceKeys); + } + + @Test public void testMapCatalogConfiguration() { ModelInfoNetwork modelInfoNetwork = new ModelInfoNetwork(); L3Network network = new L3Network(); @@ -1420,6 +1471,9 @@ public class BBInputSetupTest { vnfc.setVnfcName(vnfcName); RequestDetails requestDetails = new RequestDetails(); + ServiceModel serviceModel = new ServiceModel(); + serviceModel.setCurrentService(service); + CvnfcConfigurationCustomization vnfVfmoduleCvnfcConfigurationCustomization = new CvnfcConfigurationCustomization(); ConfigurationResource configurationResource = new ConfigurationResource(); @@ -1432,7 +1486,8 @@ public class BBInputSetupTest { BBInputSetupParameter parameter = new BBInputSetupParameter.Builder().setRequestId(REQUEST_ID) .setModelInfo(modelInfo).setService(service).setBbName(bbName).setServiceInstance(serviceInstance) .setLookupKeyMap(lookupKeyMap).setResourceId(resourceId).setInstanceName(instanceName) - .setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails).build(); + .setConfigurationResourceKeys(configResourceKeys).setRequestDetails(requestDetails) + .setServiceModel(serviceModel).build(); SPY_bbInputSetup.populateConfiguration(parameter); verify(SPY_bbInputSetup, times(1)).mapCatalogConfiguration(configuration, modelInfo, service, configResourceKeys); @@ -1462,6 +1517,10 @@ public class BBInputSetupTest { lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, "genericVnfId"); String bbName = AssignFlows.VNF.toString(); + + ServiceModel serviceModel = new ServiceModel(); + serviceModel.setCurrentService(service); + Platform expectedPlatform = new Platform(); LineOfBusiness expectedLineOfBusiness = new LineOfBusiness(); String resourceId = "123"; @@ -1481,7 +1540,8 @@ public class BBInputSetupTest { .setLineOfBusiness(lineOfBusiness).setService(service).setBbName(bbName) .setServiceInstance(serviceInstance).setLookupKeyMap(lookupKeyMap) .setRelatedInstanceList(requestDetails.getRelatedInstanceList()).setResourceId(resourceId) - .setVnfType(vnfType).setProductFamilyId(requestDetails.getRequestInfo().getProductFamilyId()).build(); + .setVnfType(vnfType).setProductFamilyId(requestDetails.getRequestInfo().getProductFamilyId()) + .setServiceModel(serviceModel).build(); SPY_bbInputSetup.populateGenericVnf(parameter); lookupKeyMap.put(ResourceKey.GENERIC_VNF_ID, null); diff --git a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java index b623475939..f6615e52c8 100644 --- a/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java +++ b/bpmn/MSOCommonBPMN/src/test/java/org/onap/so/bpmn/servicedecomposition/tasks/BBInputSetupUtilsTest.java @@ -24,7 +24,6 @@ package org.onap.so.bpmn.servicedecomposition.tasks; import static com.shazam.shazamcrest.MatcherAssert.assertThat; import static com.shazam.shazamcrest.matcher.Matchers.sameBeanAs; -import static org.hamcrest.CoreMatchers.containsString; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -65,12 +64,6 @@ import org.onap.aai.domain.yang.ServiceInstances; import org.onap.aai.domain.yang.VolumeGroup; import org.onap.aai.domain.yang.VolumeGroups; import org.onap.aai.domain.yang.VpnBinding; -import org.onap.so.bpmn.common.InjectionHelper; -import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; -import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; -import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; -import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.MultipleObjectsFoundException; -import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.NoServiceInstanceFoundException; import org.onap.aaiclient.client.aai.AAIObjectPlurals; import org.onap.aaiclient.client.aai.AAIObjectType; import org.onap.aaiclient.client.aai.AAIResourcesClient; @@ -78,20 +71,28 @@ import org.onap.aaiclient.client.aai.entities.uri.AAIPluralResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri; import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory; import org.onap.aaiclient.client.graphinventory.entities.uri.Depth; -import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; +import org.onap.so.bpmn.common.InjectionHelper; +import org.onap.so.bpmn.servicedecomposition.bbobjects.Customer; +import org.onap.so.bpmn.servicedecomposition.bbobjects.ServiceSubscription; +import org.onap.so.bpmn.servicedecomposition.entities.ExecuteBuildingBlock; +import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.MultipleObjectsFoundException; +import org.onap.so.bpmn.servicedecomposition.tasks.exceptions.NoServiceInstanceFoundException; import org.onap.so.db.catalog.beans.CollectionResourceInstanceGroupCustomization; import org.onap.so.db.catalog.beans.Service; +import org.onap.so.db.catalog.beans.VnfcInstanceGroupCustomization; import org.onap.so.db.catalog.client.CatalogDbClient; import org.onap.so.db.request.beans.InfraActiveRequests; import org.onap.so.db.request.beans.RequestProcessingData; import org.onap.so.db.request.client.RequestsDbClient; import org.onap.so.serviceinstancebeans.CloudConfiguration; import org.onap.so.serviceinstancebeans.RequestDetails; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; @RunWith(MockitoJUnitRunner.class) public class BBInputSetupUtilsTest { - protected ObjectMapper mapper = new ObjectMapper(); + protected ObjectMapper mapper = + new ObjectMapper().configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);; private static final String RESOURCE_PATH = "src/test/resources/__files/ExecuteBuildingBlock/"; @InjectMocks diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_withRelatedInstanceList.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_withRelatedInstanceList.json index bb1612b11d..cad8b91779 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_withRelatedInstanceList.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/RequestDetailsInput_withRelatedInstanceList.json @@ -15,5 +15,14 @@ "modelUuid":"modelUUID" } } + }, + { + "relatedInstance":{ + "instanceId":"instanceId", + "modelInfo": { + "modelType": "vnf", + "modelCustomizationId": "my-test-uuid" + } + } }] } diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json index 8e4e3632e9..0360c10d42 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/aaiL3NetworkInputWithSubnets.json @@ -71,8 +71,7 @@ }, "aggregateRoutes": { "aggregateRoute": [ - { - "aggRouteId": "routeId", + { "networkStartAddress": "10.80.12.0", "cidrMask": "23", "ipVersion": "4" @@ -80,4 +79,4 @@ ] }, "relationshipList": null -}
\ No newline at end of file +} diff --git a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json index f65fe17a2e..7c83df91a2 100644 --- a/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json +++ b/bpmn/MSOCommonBPMN/src/test/resources/__files/ExecuteBuildingBlock/l3NetworkExpectedWithSubnet.json @@ -53,8 +53,7 @@ } ], "aggregate-routes": [ - { - "route-id": "routeId", + { "network-start-address": "10.80.12.0", "cidr-mask": "23", "ip-version": "4" diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy index dcbaf746ea..342fce75a5 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceService.groovy @@ -2,19 +2,19 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2019 Huawei Technologies Co., Ltd. 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. + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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========================================================= */ @@ -22,21 +22,22 @@ package org.onap.so.bpmn.infrastructure.scripts import com.fasterxml.jackson.databind.ObjectMapper import org.onap.aai.domain.yang.ServiceInstance -import org.onap.so.client.HttpClient -import org.onap.so.client.HttpClientFactory import org.onap.aaiclient.client.aai.AAIObjectType import org.onap.aaiclient.client.aai.AAIResourcesClient import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory - -import javax.ws.rs.core.Response +import org.onap.so.beans.nsmf.EsrInfo +import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest +import org.onap.so.beans.nsmf.SliceTaskParamsAdapter +import org.onap.so.beans.nsmf.oof.TemplateInfo +import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils +import org.onap.so.bpmn.core.domain.ServiceDecomposition import static org.apache.commons.lang3.StringUtils.* import org.springframework.web.util.UriUtils import groovy.json.JsonSlurper import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.logging.filter.base.ONAPComponents import org.onap.so.beans.nsmf.SliceTaskParams import org.onap.so.db.request.beans.OrchestrationTask import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor @@ -59,8 +60,10 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { JsonSlurper jsonSlurper = new JsonSlurper() ObjectMapper objectMapper = new ObjectMapper() OofUtils oofUtils = new OofUtils() - private static final Logger logger = LoggerFactory.getLogger(CreateSliceService.class) + NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) + AAIResourcesClient client = getAAIClient() + private static final Logger logger = LoggerFactory.getLogger(CreateSliceService.class) public void preProcessRequest(DelegateExecution execution) { logger.debug("Start preProcessRequest") @@ -150,7 +153,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { logger.debug("User Input Parameters map: " + inputMap.toString()) String uuiRequest = inputMap.get("UUIRequest") - Map uuiReqMap = jsonSlurper.parseText(uuiRequest) + Map uuiReqMap = jsonSlurper.parseText(uuiRequest) as Map Map<String, Object> serviceObject = (Map<String, Object>) uuiReqMap.get("service") Map<String, Object> parameterObject = (Map<String, Object>) serviceObject.get("parameters") Map<String, Object> requestInputs = (Map<String, Object>) parameterObject.get("requestInputs") @@ -162,7 +165,8 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { execution.setVariable("serviceInputParams", inputMap) execution.setVariable("uuiRequest", uuiRequest) - execution.setVariable("serviceProfile", serviceProfile) + execution.setVariable("se" + + "rviceProfile", serviceProfile) //TODO //execution.setVariable("serviceInputParams", jsonUtil.getJsonValue(siRequest, "requestDetails.requestParameters.userParams")) @@ -178,76 +182,69 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { logger.debug("Finish preProcessRequest") } - public void prepareSelectNSTRequest(DelegateExecution execution) { - logger.debug("Start prepareSelectNSTRequest") - String requestId = execution.getVariable("msoRequestId") - String messageType = "NSTSelectionResponse" - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - execution.setVariable("nstSelectionUrl", "/api/oof/v1/selection/nst") - execution.setVariable("nstSelection_messageType",messageType) - execution.setVariable("nstSelection_correlator",requestId) - String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution); - execution.setVariable("nstSelection_timeout",timeout) - String oofRequest = oofUtils.buildSelectNSTRequest(requestId,messageType, serviceProfile) - execution.setVariable("nstSelection_oofRequest",oofRequest) - logger.debug("Finish prepareSelectNSTRequest") - - } - - public void processNSTSolutions(DelegateExecution execution) { - Map<String, Object> nstSolution - try { - logger.debug("Start processing NSTSolutions") - Map<String, Object> resMap = objectMapper.readValue(execution.getVariable("nstSelection_oofResponse"),Map.class) - List<Map<String, Object>> nstSolutions = (List<Map<String, Object>>) resMap.get("solutions") - nstSolution = nstSolutions.get(0) - execution.setVariable("nstSolution", nstSolution) - } catch (Exception ex) { - logger.debug( "Failed to get NST solution suggested by OOF.") - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Failed to get NST solution suggested by OOF.") - } - - } - - public void prepareDecomposeService(DelegateExecution execution) { - logger.debug("Start prepareDecomposeService") - String uuiRequest = execution.getVariable("uuiRequest") - String ssModelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid") - String ssModelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid") - String ssServiceModelInfo = """{ - "modelInvariantUuid":"${ssModelInvariantUuid}", - "modelUuid":"${ssModelUuid}", - "modelVersion":"" - }""" - execution.setVariable("ssServiceModelInfo", ssServiceModelInfo) - - logger.debug("Finish prepareDecomposeService") - } - - public void processDecomposition(DelegateExecution execution) { - logger.debug("Start processDecomposition") - String uuiRequest = execution.getVariable("uuiRequest") - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - Map<String, Object> nstSolution = execution.getVariable("nstSolution") - - Map uuiReqMap = jsonSlurper.parseText(uuiRequest) - Map<String, Object> serviceObject = (Map<String, Object>) uuiReqMap.get("service") - String subscriptionServiceType = serviceObject.get("serviceType") + /** + * + * @param execution + */ + public void prepareInitServiceOperationStatus(DelegateExecution execution) { + logger.debug("Start prepareInitServiceOperationStatus") + try{ + String serviceId = execution.getVariable("serviceInstanceId") + String operationId = execution.getVariable("operationId") + String operationType = "CREATE" + String userId = execution.getVariable("globalSubscriberId") + String result = "processing" + String progress = "0" + String reason = "" + String operationContent = "Prepare service creation" + logger.debug("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId) + serviceId = UriUtils.encode(serviceId,"UTF-8") + execution.setVariable("serviceInstanceId", serviceId) + execution.setVariable("operationType", operationType) - String serviceType = (String) serviceProfile.get("sST") - String resourceSharingLevel = (String) serviceProfile.get("resourceSharingLevel") - String nstModelUuid = (String) nstSolution.get("UUID") - String nstModelInvariantUuid = (String) nstSolution.get("invariantUUID") + def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint",execution) + execution.setVariable("CSSOS_dbAdapterEndpoint", dbAdapterEndpoint) + logger.debug("DB Adapter Endpoint is: " + dbAdapterEndpoint) + def dbAdapterAuth = UrnPropertiesReader.getVariable("mso.requestDb.auth") + Map<String, String> CSSOS_headerMap = [:] + CSSOS_headerMap.put("content-type", "application/soap+xml") + CSSOS_headerMap.put("Authorization", dbAdapterAuth) + execution.setVariable("CSSOS_headerMap", CSSOS_headerMap) + logger.debug("DB Adapter Header is: " + CSSOS_headerMap) - execution.setVariable("subscriptionServiceType", subscriptionServiceType) - execution.setVariable("serviceType", serviceType) - execution.setVariable("resourceSharingLevel", resourceSharingLevel) - execution.setVariable("nstModelUuid", nstModelUuid) - execution.setVariable("nstModelInvariantUuid", nstModelInvariantUuid) + String payload = + """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" + xmlns:ns="http://org.onap.so/requestsdb"> + <soapenv:Header/> + <soapenv:Body> + <ns:initServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb"> + <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId> + <operationId>${MsoUtils.xmlEscape(operationId)}</operationId> + <operationType>${MsoUtils.xmlEscape(operationType)}</operationType> + <userId>${MsoUtils.xmlEscape(userId)}</userId> + <result>${MsoUtils.xmlEscape(result)}</result> + <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent> + <progress>${MsoUtils.xmlEscape(progress)}</progress> + <reason>${MsoUtils.xmlEscape(reason)}</reason> + </ns:initServiceOperationStatus> + </soapenv:Body> + </soapenv:Envelope>""" - logger.debug("Finish processDecomposition") + payload = utils.formatXml(payload) + execution.setVariable("CSSOS_updateServiceOperStatusRequest", payload) + logger.debug("Outgoing updateServiceOperStatusRequest: \n" + payload) + }catch(Exception e){ + logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), + "Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN", + ErrorCode.UnknownError.getValue(), "Exception is:\n" + e) + } + logger.debug("Finish prepareInitServiceOperationStatus") } + /** + * prepare create OrchestrationTask + * @param execution + */ public void prepareCreateOrchestrationTask(DelegateExecution execution) { logger.debug("Start createOrchestrationTask") String taskId = execution.getBusinessKey() @@ -265,21 +262,104 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { execution.setVariable("CSSOT_isManual", isManual) execution.setVariable("CSSOT_requestMethod", requestMethod) - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") + Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") as Map<String, Object> - SliceTaskParams sliceTaskParams = new SliceTaskParams() + SliceTaskParamsAdapter sliceTaskParams = new SliceTaskParamsAdapter() sliceTaskParams.setServiceId(serviceInstanceId) sliceTaskParams.setServiceName(serviceInstanceName) sliceTaskParams.setServiceProfile(serviceProfile) + execution.setVariable("sliceTaskParams", sliceTaskParams) - String paramJson = sliceTaskParams.convertToJson() - execution.setVariable("CSSOT_paramJson", paramJson) - logger.debug("CSSOT_paramJson: " + paramJson) + //todo:---------------------------------------- +// String paramJson = sliceTaskParams.convertToJson() +// execution.setVariable("CSSOT_paramJson", paramJson) + /*-------------------------------------------*/ logger.debug("Finish createOrchestrationTask") } + /** + * send sync response to csmf + * @param execution + */ + public void sendSyncResponse(DelegateExecution execution) { + logger.debug("Start sendSyncResponse") + try { + String operationId = execution.getVariable("operationId") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + // RESTResponse for API Handler (APIH) Reply Task + String createServiceRestRequest = """ + { + "service": { + "serviceId":"${serviceInstanceId}", + "operationId":"${operationId}" + } + } + """.trim() + + logger.debug("sendSyncResponse to APIH:" + "\n" + createServiceRestRequest) + sendWorkflowResponse(execution, 202, createServiceRestRequest) + execution.setVariable("sentSyncResponse", true) + } catch (Exception e) { + String msg = "Exceptuion in sendSyncResponse:" + e.getMessage() + logger.debug(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + logger.debug("Finish sendSyncResponse") + } + + public void prepareSelectNSTRequest(DelegateExecution execution) { + logger.debug("Start prepareSelectNSTRequest") + String requestId = execution.getVariable("msoRequestId") + String messageType = "NSTSelectionResponse" + Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") as Map<String, Object> + execution.setVariable("nstSelectionUrl", "/api/oof/v1/selection/nst") + execution.setVariable("nstSelection_messageType", messageType) + execution.setVariable("nstSelection_correlator", requestId) + String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution); + execution.setVariable("nstSelection_timeout", timeout) + String oofRequest = oofUtils.buildSelectNSTRequest(requestId, messageType, serviceProfile) + execution.setVariable("nstSelection_oofRequest", oofRequest) + logger.debug("Finish prepareSelectNSTRequest") + + } + + /** + * process async response of oof, put the {@solutions} at {@nstSolution} + * @param execution + */ + public void processNSTSolutions(DelegateExecution execution) { + Map<String, Object> nstSolution + try { + logger.debug("Start processing NSTSolutions") + Map<String, Object> resMap = + objectMapper.readValue(execution.getVariable("nstSelection_oofResponse") as String, + Map.class) + + List<Map<String, Object>> nstSolutions = (List<Map<String, Object>>) resMap.get("solutions") + nstSolution = nstSolutions.get(0) + execution.setVariable("nstSolution", nstSolution) + + //set nst info into sliceTaskParams + SliceTaskParamsAdapter sliceTaskParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + TemplateInfo nstInfo = new TemplateInfo() + nstInfo.setUUID(nstSolution.get("UUID") as String) + nstInfo.setInvariantUUID(nstSolution.get("invariantUUID") as String) + nstInfo.setName(nstSolution.get("name") as String) + + sliceTaskParams.setNSTInfo(nstInfo) + + execution.setVariable("sliceTaskParams", sliceTaskParams) + + } catch (Exception ex) { + logger.debug( "Failed to get NST solution suggested by OOF.") + exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Failed to get NST solution suggested by OOF.") + } + + } + public void prepareUpdateOrchestrationTask(DelegateExecution execution) { logger.debug("Start prepareUpdateOrchestrationTask") String requestMethod = "PUT" @@ -292,6 +372,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { logger.debug("Finish prepareUpdateOrchestrationTask") } + public void prepareGetUserOptions(DelegateExecution execution) { logger.debug("Start prepareGetUserOptions") String requestMethod = "GET" @@ -325,7 +406,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { String orchStatus = execution.getVariable("orchestrationStatus") try { - ServiceInstance si = ServiceInstance si = new ServiceInstance() + ServiceInstance si = new ServiceInstance() si.setOrchestrationStatus(orchStatus) AAIResourcesClient client = new AAIResourcesClient() AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId) @@ -341,61 +422,6 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { logger.debug("Finish updateAAIOrchStatus") } - public void prepareInitServiceOperationStatus(DelegateExecution execution) { - logger.debug("Start prepareInitServiceOperationStatus") - try{ - String serviceId = execution.getVariable("serviceInstanceId") - String operationId = execution.getVariable("operationId") - String operationType = "CREATE" - String userId = execution.getVariable("globalSubscriberId") - String result = "processing" - String progress = "0" - String reason = "" - String operationContent = "Prepare service creation" - logger.debug("Generated new operation for Service Instance serviceId:" + serviceId + " operationId:" + operationId) - serviceId = UriUtils.encode(serviceId,"UTF-8") - execution.setVariable("serviceInstanceId", serviceId) - execution.setVariable("operationType", operationType) - - def dbAdapterEndpoint = UrnPropertiesReader.getVariable("mso.adapters.openecomp.db.endpoint",execution) - execution.setVariable("CSSOS_dbAdapterEndpoint", dbAdapterEndpoint) - logger.debug("DB Adapter Endpoint is: " + dbAdapterEndpoint) - def dbAdapterAuth = UrnPropertiesReader.getVariable("mso.requestDb.auth") - Map<String, String> CSSOS_headerMap = [:] - CSSOS_headerMap.put("content-type", "application/soap+xml") - CSSOS_headerMap.put("Authorization", dbAdapterAuth) - execution.setVariable("CSSOS_headerMap", CSSOS_headerMap) - logger.debug("DB Adapter Header is: " + CSSOS_headerMap) - - String payload = - """<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" - xmlns:ns="http://org.onap.so/requestsdb"> - <soapenv:Header/> - <soapenv:Body> - <ns:initServiceOperationStatus xmlns:ns="http://org.onap.so/requestsdb"> - <serviceId>${MsoUtils.xmlEscape(serviceId)}</serviceId> - <operationId>${MsoUtils.xmlEscape(operationId)}</operationId> - <operationType>${MsoUtils.xmlEscape(operationType)}</operationType> - <userId>${MsoUtils.xmlEscape(userId)}</userId> - <result>${MsoUtils.xmlEscape(result)}</result> - <operationContent>${MsoUtils.xmlEscape(operationContent)}</operationContent> - <progress>${MsoUtils.xmlEscape(progress)}</progress> - <reason>${MsoUtils.xmlEscape(reason)}</reason> - </ns:initServiceOperationStatus> - </soapenv:Body> - </soapenv:Envelope>""" - - payload = utils.formatXml(payload) - execution.setVariable("CSSOS_updateServiceOperStatusRequest", payload) - logger.debug("Outgoing updateServiceOperStatusRequest: \n" + payload) - }catch(Exception e){ - logger.error(LoggingAnchor.FIVE, MessageEnum.BPMN_GENERAL_EXCEPTION_ARG.toString(), - "Exception Occured Processing prepareInitServiceOperationStatus.", "BPMN", - ErrorCode.UnknownError.getValue(), "Exception is:\n" + e) - } - logger.debug("Finish prepareInitServiceOperationStatus") - } - public void prepareUpdateServiceOperationStatus(DelegateExecution execution) { logger.debug("Start preUpdateServiceOperationStatus") try{ @@ -438,23 +464,7 @@ public class CreateSliceService extends AbstractServiceTaskProcessor { logger.debug("Finish preUpdateServiceOperationStatus") } - public void sendSyncResponse(DelegateExecution execution) { - logger.debug("Start sendSyncResponse") - try { - String operationId = execution.getVariable("operationId") - String serviceInstanceId = execution.getVariable("serviceInstanceId") - // RESTResponse for API Handler (APIH) Reply Task - String createServiceRestRequest = """{"service":{"serviceId":"${serviceInstanceId}","operationId":"${operationId}"}}""".trim() - logger.debug("sendSyncResponse to APIH:" + "\n" + createServiceRestRequest) - sendWorkflowResponse(execution, 202, createServiceRestRequest) - execution.setVariable("sentSyncResponse", true) - } catch (Exception e) { - String msg = "Exceptuion in sendSyncResponse:" + e.getMessage() - logger.debug(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - logger.debug("Finish sendSyncResponse") - } + public void prepareCompletionRequest (DelegateExecution execution) { logger.trace("Start prepareCompletionRequest") diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy index 4a8469cc8d..c4068d2d5e 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSI.groovy @@ -2,19 +2,19 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2019 Huawei Technologies Co., Ltd. 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. + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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========================================================= */ @@ -23,19 +23,29 @@ package org.onap.so.bpmn.infrastructure.scripts import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution import org.onap.aai.domain.yang.Relationship -import org.onap.aai.domain.yang.RelationshipList import org.onap.aai.domain.yang.ServiceInstance -import org.onap.so.beans.nsmf.SliceTaskParams -import org.onap.so.bpmn.common.scripts.ExceptionUtil -import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils -import org.onap.so.bpmn.core.domain.ServiceDecomposition -import org.onap.so.bpmn.core.domain.ServiceProxy -import org.onap.so.bpmn.core.json.JsonUtils +import org.onap.aai.domain.yang.SliceProfile import org.onap.aaiclient.client.aai.AAIObjectType import org.onap.aaiclient.client.aai.AAIResourcesClient import org.onap.aaiclient.client.aai.entities.AAIResultWrapper import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory +import org.onap.so.beans.nsmf.AllocateAnNssi +import org.onap.so.beans.nsmf.AllocateCnNssi +import org.onap.so.beans.nsmf.AllocateTnNssi +import org.onap.so.beans.nsmf.AnSliceProfile +import org.onap.so.beans.nsmf.CnSliceProfile +import org.onap.so.beans.nsmf.EsrInfo +import org.onap.so.beans.nsmf.NssiResponse +import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest +import org.onap.so.beans.nsmf.ResponseDescriptor +import org.onap.so.beans.nsmf.ServiceInfo +import org.onap.so.beans.nsmf.SliceTaskInfo +import org.onap.so.beans.nsmf.SliceTaskParamsAdapter +import org.onap.so.beans.nsmf.TnSliceProfile +import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.core.json.JsonUtils import org.slf4j.Logger import org.slf4j.LoggerFactory @@ -43,15 +53,15 @@ import javax.ws.rs.NotFoundException import static org.apache.commons.lang3.StringUtils.isBlank -class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor{ +class DoAllocateNSIandNSSI extends AbstractServiceTaskProcessor{ - private static final Logger logger = LoggerFactory.getLogger( DoAllocateNSIandNSSI.class); + private static final Logger logger = LoggerFactory.getLogger(DoAllocateNSIandNSSI.class); ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() - private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) + AAIResourcesClient client = getAAIClient() /** * Pre Process the BPMN Flow Request @@ -72,165 +82,77 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi logger.trace("Exit preProcessRequest") } + /** + * Process NSI options + * @param execution + */ void retriveSliceOption(DelegateExecution execution) { logger.trace("Enter retriveSliceOption() of DoAllocateNSIandNSSI") - String uuiRequest = execution.getVariable("uuiRequest") - boolean isNSIOptionAvailable = false - List<String> nssiAssociated = new ArrayList<>() - SliceTaskParams sliceParams = execution.getVariable("sliceTaskParams") - try - { - Map<String, Object> nstSolution = execution.getVariable("nstSolution") as Map - String modelUuid = nstSolution.get("UUID") - String modelInvariantUuid = nstSolution.get("invariantUUID") - String serviceModelInfo = """{ - "modelInvariantUuid":"${modelInvariantUuid}", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("serviceModelInfo", serviceModelInfo) - //Params sliceParams = new Gson().fromJson(params, new TypeToken<Params>() {}.getType()); - execution.setVariable("sliceParams", sliceParams) - }catch (Exception ex) { - logger.debug( "Unable to get the task information from request DB: " + ex) - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Unable to get task information from request DB.") - } - if(isBlank(sliceParams.getSuggestNsiId())) - { - isNSIOptionAvailable=false - } - else - { - isNSIOptionAvailable=true - execution.setVariable('nsiServiceInstanceId',sliceParams.getSuggestNsiId()) - execution.setVariable('nsiServiceInstanceName',sliceParams.getSuggestNsiName()) - } - execution.setVariable("isNSIOptionAvailable",isNSIOptionAvailable) - logger.trace("Exit retriveSliceOption() of DoAllocateNSIandNSSI") - } + boolean isNSIOptionAvailable - void updateRelationship(DelegateExecution execution) { - logger.debug("Enter update relationship in DoAllocateNSIandNSSI()") - String allottedResourceId = execution.getVariable("allottedResourceId") - //Need to check whether nsi exist : Begin - org.onap.aai.domain.yang.ServiceInstance nsiServiceInstance = new org.onap.aai.domain.yang.ServiceInstance() - SliceTaskParams sliceParams = execution.getVariable("sliceParams") - String nsiServiceInstanceID = sliceParams.getSuggestNsiId() + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter - AAIResourcesClient resourceClient = new AAIResourcesClient() - AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), nsiServiceInstanceID) - //AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.QUERY_ALLOTTED_RESOURCE, execution.getVariable("globalSubscriberId"), execution.getVariable("serviceType"), nsiServiceInstanceID) - - try { - AAIResultWrapper wrapper = resourceClient.get(nsiServiceuri, NotFoundException.class) - Optional<org.onap.aai.domain.yang.ServiceInstance> si = wrapper.asBean(org.onap.aai.domain.yang.ServiceInstance.class) - nsiServiceInstance = si.get() - //allottedResourceId=nsiServiceInstance.getAllottedResources().getAllottedResource().get(0).getId() - -// if(resourceClient.exists(nsiServiceuri)){ -// execution.setVariable("nsi_resourceLink", nsiServiceuri.build().toString()) -// }else{ -// exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai to " + -// "associate for service :"+serviceInstanceId) -// } - - AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), execution.getVariable("sliceServiceInstanceId"), allottedResourceId) - getAAIClient().connect(allottedResourceUri,nsiServiceuri) - - List<String> nssiAssociated = new ArrayList<>() - RelationshipList relationshipList = nsiServiceInstance.getRelationshipList() - List<Relationship> relationships = relationshipList.getRelationship() - for(Relationship relationship in relationships) - { - if(relationship.getRelatedTo().equalsIgnoreCase("service-instance")) - { - String NSSIassociated = relationship.getRelatedLink().substring(relationship.getRelatedLink().lastIndexOf("/") + 1); - if(!NSSIassociated.equals(nsiServiceInstanceID)) - nssiAssociated.add(NSSIassociated) - } + if(isBlank(sliceParams.getSuggestNsiId())) { + isNSIOptionAvailable = false } - execution.setVariable("nssiAssociated",nssiAssociated) - execution.setVariable("nsiServiceInstanceName",nsiServiceInstance.getServiceInstanceName()) - }catch(BpmnError e) { - throw e - }catch (Exception ex){ - String msg = "NSI suggested in the option doesn't exist. " + nsiServiceInstanceID - logger.debug(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + else { + isNSIOptionAvailable = true + execution.setVariable('nsiServiceInstanceId', sliceParams.getSuggestNsiId()) + execution.setVariable('nsiServiceInstanceName', sliceParams.getSuggestNsiName()) } - logger.debug("Exit update relationship in DoAllocateNSIandNSSI()") + execution.setVariable("isNSIOptionAvailable", isNSIOptionAvailable) + logger.trace("Exit retriveSliceOption() of DoAllocateNSIandNSSI") } - void prepareNssiModelInfo(DelegateExecution execution){ - logger.trace("Enter prepareNssiModelInfo in DoAllocateNSIandNSSI()") - List<String> nssiAssociated = new ArrayList<>() - Map<String, Object> nssiMap = new HashMap<>() - nssiAssociated=execution.getVariable("nssiAssociated") - for(String nssiID in nssiAssociated) - { - try { - AAIResourcesClient resourceClient = new AAIResourcesClient() - AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), nssiID) - AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class) - Optional<org.onap.aai.domain.yang.ServiceInstance> si = wrapper.asBean(org.onap.aai.domain.yang.ServiceInstance.class) - org.onap.aai.domain.yang.ServiceInstance nssi = si.get() - nssiMap.put(nssi.getEnvironmentContext(),"""{ - "serviceInstanceId":"${nssi.getServiceInstanceId()}", - "modelUuid":"${nssi.getModelVersionId()}" - }""") - - }catch(NotFoundException e) - { - logger.debug("NSSI Service Instance not found in AAI: " + nssiID) - }catch(Exception e) - { - logger.debug("NSSI Service Instance not found in AAI: " + nssiID) - } - execution.setVariable("nssiMap",nssiMap) - - } - logger.trace("Exit prepareNssiModelInfo in DoAllocateNSIandNSSI()") - } + /** + * create nsi instance in aai + * @param execution + */ void createNSIinAAI(DelegateExecution execution) { logger.debug("Enter CreateNSIinAAI in DoAllocateNSIandNSSI()") - ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") - org.onap.aai.domain.yang.ServiceInstance nsi = new ServiceInstance(); + String sliceInstanceId = UUID.randomUUID().toString() - execution.setVariable("sliceInstanceId",sliceInstanceId) - nsi.setServiceInstanceId(sliceInstanceId) + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + //set new nsiId to sliceParams suggestNsiId + sliceParams.setSuggestNsiId(sliceInstanceId) + + ServiceInstance nsi = new ServiceInstance() + + String sliceInstanceName = "nsi_"+execution.getVariable("sliceServiceInstanceName") - nsi.setServiceInstanceName(sliceInstanceName) String serviceType = execution.getVariable("serviceType") - nsi.setServiceType(serviceType) String serviceStatus = "deactivated" + String modelInvariantUuid = sliceParams.getNSTInfo().invariantUUID + String modelUuid = sliceParams.getNSTInfo().UUID + + String uuiRequest = execution.getVariable("uuiRequest") + String serviceInstanceLocationid = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.plmnIdList") + String serviceRole = "nsi" + + execution.setVariable("sliceInstanceId", sliceInstanceId) + nsi.setServiceInstanceId(sliceInstanceId) + nsi.setServiceInstanceName(sliceInstanceName) + nsi.setServiceType(serviceType) nsi.setOrchestrationStatus(serviceStatus) - String modelInvariantUuid = serviceDecomposition.getModelInfo().getModelInvariantUuid() - String modelUuid = serviceDecomposition.getModelInfo().getModelUuid() nsi.setModelInvariantId(modelInvariantUuid) nsi.setModelVersionId(modelUuid) - String uuiRequest = execution.getVariable("uuiRequest") - String serviceInstanceLocationid = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.plmnIdList") nsi.setServiceInstanceLocationId(serviceInstanceLocationid) - //String snssai = jsonUtil.getJsonValue(uuiRequest, "service.requestInputs.snssai") - //nsi.setEnvironmentContext(snssai) - String serviceRole = "nsi" nsi.setServiceRole(serviceRole) - String msg = "" + String msg try { - AAIResourcesClient client = new AAIResourcesClient() - AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), sliceInstanceId) + AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + sliceInstanceId) client.create(nsiServiceUri, nsi) - Relationship relationship = new Relationship() - logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri.build().toString()) - relationship.setRelatedLink(nsiServiceUri.build().toString()) - AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, - execution.getVariable("globalSubscriberId"),execution.getVariable("subscriptionServiceType"), - execution.getVariable("sliceServiceInstanceId"), execution.getVariable("allottedResourceId")).relationshipAPI() - client.create(allottedResourceUri, relationship) + execution.setVariable("nsiServiceUri", nsiServiceUri) } catch (BpmnError e) { throw e @@ -239,124 +161,565 @@ class DoAllocateNSIandNSSI extends org.onap.so.bpmn.common.scripts.AbstractServi logger.info(msg) exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) } - Map<String, Object> nssiMap = new HashMap<>() - List<ServiceProxy> serviceProxyList = serviceDecomposition.getServiceProxy() - List<String> nsstModelInfoList = new ArrayList<>() - for(ServiceProxy serviceProxy : serviceProxyList) - { - //String nsstModelUuid = serviceProxy.getModelInfo().getModelUuid() - String nsstModelUuid = serviceProxy.getSourceModelUuid() - //String nsstModelInvariantUuid = serviceProxy.getModelInfo().getModelInvariantUuid() - String nsstServiceModelInfo = """{ - "modelInvariantUuid":"", - "modelUuid":"${nsstModelUuid}", - "modelVersion":"" - }""" - nsstModelInfoList.add(nsstServiceModelInfo) - } - int currentIndex=0 - int maxIndex=nsstModelInfoList.size() - if(maxIndex < 1) - { - msg = "Exception in DoAllocateNSIandNSSI. There is no NSST associated with NST " - logger.info(msg) + + logger.debug("Exit CreateNSIinAAI in DoAllocateNSIandNSSI()") + } + + + /** + * create relationship between nsi and service profile instance + * @param execution + */ + void createRelationship(DelegateExecution execution) { + //relation ship + String allottedResourceId = execution.getVariable("allottedResourceId") + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + AAIResourceUri nsiServiceUri = execution.getVariable("nsiServiceUri") as AAIResourceUri + logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri) + + AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri( + AAIObjectType.ALLOTTED_RESOURCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + sliceParams.suggestNsiId, + allottedResourceId) + + client.connect(allottedResourceUri, nsiServiceUri) + } + + /** + * + * @param execution + */ + void updateRelationship(DelegateExecution execution) { + logger.debug("Enter update relationship in DoAllocateNSIandNSSI()") + //todo: allottedResourceId + String allottedResourceId = execution.getVariable("allottedResourceId") + //Need to check whether nsi exist : Begin + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + String nsiServiceInstanceID = sliceParams.getSuggestNsiId() + //sliceParams.setServiceId(nsiServiceInstanceID) + + AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + nsiServiceInstanceID) + + try { + AAIResultWrapper wrapper = client.get(nsiServiceUri, NotFoundException.class) + Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) + //todo: if exists + if (!si.ifPresent()) { + String msg = "NSI suggested in the option doesn't exist. " + nsiServiceInstanceID + logger.debug(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + + AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri( + AAIObjectType.ALLOTTED_RESOURCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + sliceParams.suggestNsiId, //nsiId + allottedResourceId) + + client.connect(allottedResourceUri, nsiServiceUri) + + execution.setVariable("sliceTaskParams", sliceParams) + }catch(BpmnError e) { + throw e + }catch (Exception ex){ + String msg = "NSI suggested in the option doesn't exist. " + nsiServiceInstanceID + logger.debug(msg) exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) } - execution.setVariable("nsstModelInfoList",nsstModelInfoList) - execution.setVariable("currentIndex",currentIndex) - execution.setVariable("maxIndex",maxIndex) - execution.setVariable('nsiServiceInstanceId',sliceInstanceId) - execution.setVariable("nsiServiceInstanceName",sliceInstanceName) - logger.debug("Exit CreateNSIinAAI in DoAllocateNSIandNSSI()") + logger.debug("Exit update relationship in DoAllocateNSIandNSSI()") } - void getOneNsstInfo(DelegateExecution execution){ - List<String> nsstModelInfoList = new ArrayList<>() - nsstModelInfoList = execution.getVariable("nsstModelInfoList") - int currentIndex = execution.getVariable("currentIndex") - int maxIndex = execution.getVariable("maxIndex") - boolean isMoreNSSTtoProcess = true - String nsstServiceModelInfo = nsstModelInfoList.get(currentIndex) - execution.setVariable("serviceModelInfo", nsstServiceModelInfo) - execution.setVariable("currentIndex", currentIndex) - currentIndex = currentIndex+1 - if(currentIndex <= maxIndex ) - isMoreNSSTtoProcess = false - execution.setVariable("isMoreNSSTtoProcess", isMoreNSSTtoProcess) + /** + * create RAN Slice Profile Instance + * @param execution + */ + void createAnSliceProfileInstance(DelegateExecution execution) { + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + String serviceInstanceId = UUID.randomUUID().toString() + execution.setVariable("ranSliceProfileInstanceId", serviceInstanceId) //todo: + + String serviceType = "" + String serviceRole = "slice-profile" + String oStatus = "deactivated" + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + SliceTaskInfo<AnSliceProfile> sliceTaskInfo = sliceParams.anSliceTaskInfo + sliceTaskInfo.setSliceInstanceId(serviceInstanceId) + + // create slice profile + ServiceInstance rspi = new ServiceInstance() + rspi.setServiceInstanceName(sliceTaskInfo.NSSTInfo.name) + rspi.setServiceType(serviceType) + rspi.setServiceRole(serviceRole) + rspi.setOrchestrationStatus(oStatus) + rspi.setModelInvariantId(sliceTaskInfo.NSSTInfo.invariantUUID) + rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID) + rspi.setInputParameters(uuiRequest) + rspi.setWorkloadContext(useInterval) + rspi.setEnvironmentContext(sNSSAI_id) + + //timestamp format YYYY-MM-DD hh:mm:ss + rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault())) + + execution.setVariable("communicationServiceInstance", rspi) + + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + globalSubscriberId, + subscriptionServiceType, + serviceInstanceId) + client.create(uri, rspi) + + execution.setVariable("sliceTaskParams", sliceParams) } - void createNSSTMap(DelegateExecution execution){ - ServiceDecomposition serviceDecomposition = execution.getVariable("serviceDecomposition") - String modelUuid= serviceDecomposition.getModelInfo().getModelUuid() - String content = serviceDecomposition.getServiceInfo().getServiceArtifact().get(0).getContent() - //String nsstID = jsonUtil.getJsonValue(content, "metadata.id") - //String vendor = jsonUtil.getJsonValue(content, "metadata.vendor") - //String type = jsonUtil.getJsonValue(content, "metadata.type") - String domain = jsonUtil.getJsonValue(content, "metadata.domainType") - - Map<String, Object> nssiMap = execution.getVariable("nssiMap") - String servicename = execution.getVariable("sliceServiceInstanceName") - String nsiname = "nsi_"+servicename - nssiMap.put(domain,"""{ - "serviceInstanceId":"", - "modelUuid":"${modelUuid}" - }""") - execution.setVariable("nssiMap",nssiMap) + /** + * create An Slice Profile + * @param execution + */ + void createAnSliceProfile(DelegateExecution execution) { + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + //String serviceInstanceId = execution.getVariable("ranSliceProfileInstanceId") + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + SliceTaskInfo<AnSliceProfile> sliceTaskInfo = sliceParams.anSliceTaskInfo + AnSliceProfile anSliceProfile = sliceTaskInfo.sliceProfile + + String profileId = UUID.randomUUID().toString() + anSliceProfile.setSliceProfileId(profileId) + + SliceProfile sliceProfile = new SliceProfile() + sliceProfile.setProfileId(profileId) + sliceProfile.setCoverageAreaTAList(anSliceProfile.coverageAreaTAList as String) + //todo:... + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, + globalSubscriberId, + subscriptionServiceType, + sliceTaskInfo.sliceInstanceId, + profileId + ) + client.create(uri, sliceProfile) + execution.setVariable("sliceTaskParams", sliceParams) } - void prepareNSSIList(DelegateExecution execution){ - logger.trace("Enter prepareNSSIList in DoAllocateNSIandNSSI()") - Map<String, Object> nssiMap = new HashMap<>() - Boolean isMoreNSSI = false - nssiMap = execution.getVariable("nssiMap") - List<String> keys=new ArrayList<String>(nssiMap.values()) - List<String> nsstSequence = execution.getVariable("nsstSequence") - Integer currentIndex=0; - execution.setVariable("currentNssiIndex",currentIndex) - Integer maxIndex=keys.size() - execution.setVariable("maxIndex",maxIndex) - if(maxIndex>0) - isMoreNSSI=true - execution.setVariable("isMoreNSSI",isMoreNSSI) - logger.trace("Exit prepareNSSIList in DoAllocateNSIandNSSI()") + /** + * prepare AllocateAnNssi + * @param execution + */ + void prepareAllocateAnNssi(DelegateExecution execution) { + + //todo: + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + SliceTaskInfo<AnSliceProfile> sliceTaskInfo = sliceParams.anSliceTaskInfo + + NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() + + AllocateAnNssi allocateAnNssi = new AllocateAnNssi() + allocateAnNssi.nsstId = sliceTaskInfo.NSSTInfo.UUID + allocateAnNssi.nssiId = sliceTaskInfo.NSSTInfo.UUID + allocateAnNssi.nssiName = sliceTaskInfo.NSSTInfo.name + allocateAnNssi.sliceProfile = sliceTaskInfo.sliceProfile + allocateAnNssi.nsiInfo.nsiId = sliceParams.suggestNsiId + + EsrInfo esrInfo = new EsrInfo() + //todo: vendor and network + esrInfo.setVendor(sliceTaskInfo.getVendor()) + esrInfo.setNetworkType(sliceTaskInfo.getNetworkType()) + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + + //todo: service info + ServiceInfo serviceInfo = new ServiceInfo() + serviceInfo.globalSubscriberId = globalSubscriberId + serviceInfo.subscriptionServiceType = subscriptionServiceType + serviceInfo.nsiId = sliceParams.suggestNsiId + serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID + serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID + + nbiRequest.setServiceInfo(serviceInfo) + nbiRequest.setEsrInfo(esrInfo) + nbiRequest.setAllocateAnNssi(allocateAnNssi) + + execution.setVariable("AnAllocateNssiNbiRequest", nbiRequest) + execution.setVariable("anBHSliceTaskInfo", sliceTaskInfo) } - void getOneNSSIInfo(DelegateExecution execution){ - logger.trace("Enter getOneNSSIInfo in DoAllocateNSIandNSSI()") - - //ServiceDecomposition serviceDecompositionObj = execution.getVariable("serviceDecompositionObj") - Map<String, Object> nssiMap=execution.getVariable("nssiMap") - List<String> nsstSequence = execution.getVariable("nsstSequence") - String currentNSST= nsstSequence.get(execution.getVariable("currentNssiIndex")) - boolean isNSSIOptionAvailable = false - String nsstInput=nssiMap.get(currentNSST) - execution.setVariable("nsstInput",nsstInput) - String modelUuid = jsonUtil.getJsonValue(nsstInput, "modelUuid") - String nssiInstanceId = jsonUtil.getJsonValue(nsstInput, "serviceInstanceId") - String nssiserviceModelInfo = """{ - "modelInvariantUuid":"", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - Integer currentIndex = execution.getVariable("currentNssiIndex") - currentIndex=currentIndex+1; - execution.setVariable("currentNssiIndex",currentIndex) - execution.setVariable("nssiserviceModelInfo",nssiserviceModelInfo) - execution.setVariable("nssiInstanceId",nssiInstanceId) - logger.trace("Exit getOneNSSIInfo in DoAllocateNSIandNSSI()") + /** + * create RAN Slice Profile Instance + * @param execution + */ + void createCnSliceProfileInstance(DelegateExecution execution) { + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + String serviceInstanceId = UUID.randomUUID().toString() + execution.setVariable("cnSliceProfileInstanceId", serviceInstanceId) //todo: + + String serviceType = "" + String serviceRole = "slice-profile" + String oStatus = "deactivated" + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + SliceTaskInfo<CnSliceProfile> sliceTaskInfo = sliceParams.cnSliceTaskInfo + sliceTaskInfo.setSliceInstanceId(serviceInstanceId) + + // create slice profile + ServiceInstance rspi = new ServiceInstance() + rspi.setServiceInstanceName(sliceTaskInfo.NSSTInfo.name) + rspi.setServiceType(serviceType) + rspi.setServiceRole(serviceRole) + rspi.setOrchestrationStatus(oStatus) + rspi.setModelInvariantId(sliceTaskInfo.NSSTInfo.invariantUUID) + rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID) + rspi.setInputParameters(uuiRequest) + rspi.setWorkloadContext(useInterval) + rspi.setEnvironmentContext(sNSSAI_id) + + //timestamp format YYYY-MM-DD hh:mm:ss + rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault())) + + execution.setVariable("communicationServiceInstance", rspi) + + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + globalSubscriberId, + subscriptionServiceType, + serviceInstanceId) + client.create(uri, rspi) + execution.setVariable("sliceTaskParams", sliceParams) } - void updateCurrentIndex(DelegateExecution execution){ + /** + * create An Slice Profile + * @param execution + */ + void createCnSliceProfile(DelegateExecution execution) { + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + //String serviceInstanceId = execution.getVariable("ranSliceProfileInstanceId") + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + SliceTaskInfo<CnSliceProfile> sliceTaskInfo = sliceParams.cnSliceTaskInfo + CnSliceProfile cnSliceProfile = sliceTaskInfo.sliceProfile + + String profileId = UUID.randomUUID().toString() + cnSliceProfile.setSliceProfileId(profileId) + + SliceProfile sliceProfile = new SliceProfile() + sliceProfile.setProfileId(profileId) + sliceProfile.setCoverageAreaTAList(cnSliceProfile.coverageAreaTAList as String) + //todo:... + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, + globalSubscriberId, + subscriptionServiceType, + sliceTaskInfo.sliceInstanceId, + profileId + ) + client.create(uri, sliceProfile) + execution.setVariable("sliceTaskParams", sliceParams) + } - logger.trace("Enter updateCurrentIndex in DoAllocateNSIandNSSI()") - Integer currentIndex = execution.getVariable("currentNssiIndex") - Integer maxIndex = execution.getVariable("maxIndex") - if(currentIndex>=maxIndex) - { - Boolean isMoreNSSI=false - execution.setVariable("isMoreNSSI",isMoreNSSI) - } - logger.trace("Exit updateCurrentIndex in DoAllocateNSIandNSSI()") + /** + * prepare AllocateCnNssi + * @param execution + */ + void prepareAllocateCnNssi(DelegateExecution execution) { + + //todo: + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + SliceTaskInfo<CnSliceProfile> sliceTaskInfo = sliceParams.cnSliceTaskInfo + + NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() + + AllocateCnNssi allocateCnNssi = new AllocateCnNssi() + allocateCnNssi.nsstId = sliceTaskInfo.NSSTInfo.UUID + allocateCnNssi.nssiId = sliceTaskInfo.NSSTInfo.UUID + allocateCnNssi.nssiName = sliceTaskInfo.NSSTInfo.name + allocateCnNssi.sliceProfile = sliceTaskInfo.sliceProfile + allocateCnNssi.nsiInfo.nsiId = sliceParams.suggestNsiId + + EsrInfo esrInfo = new EsrInfo() + //todo: vendor and network + esrInfo.setVendor(sliceTaskInfo.getVendor()) + esrInfo.setNetworkType(sliceTaskInfo.getNetworkType()) + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + + //todo: service info + ServiceInfo serviceInfo = new ServiceInfo() + serviceInfo.globalSubscriberId = globalSubscriberId + serviceInfo.subscriptionServiceType = subscriptionServiceType + serviceInfo.nsiId = sliceParams.suggestNsiId + serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID + serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID + + nbiRequest.setServiceInfo(serviceInfo) + nbiRequest.setEsrInfo(esrInfo) + nbiRequest.setAllocateCnNssi(allocateCnNssi) + + execution.setVariable("CnAllocateNssiNbiRequest", nbiRequest) + execution.setVariable("cnSliceTaskInfo", sliceTaskInfo) } + + + /** + * create TN Slice Profile Instance + * @param execution + */ + void createTnBHSliceProfileInstance(DelegateExecution execution) { + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + + String serviceType = "" + String serviceRole = "slice-profile" + String oStatus = "deactivated" + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + SliceTaskInfo<TnSliceProfile> sliceTaskInfo = sliceParams.tnBHSliceTaskInfo + String serviceInstanceId = UUID.randomUUID().toString() + + sliceTaskInfo.setSliceInstanceId(serviceInstanceId) + //execution.setVariable("cnSliceProfileInstanceId", serviceInstanceId) //todo: + + // create slice profile + ServiceInstance rspi = new ServiceInstance() + rspi.setServiceInstanceName(sliceTaskInfo.NSSTInfo.name) + rspi.setServiceType(serviceType) + rspi.setServiceRole(serviceRole) + rspi.setOrchestrationStatus(oStatus) + rspi.setModelInvariantId(sliceTaskInfo.NSSTInfo.invariantUUID) + rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID) + rspi.setInputParameters(uuiRequest) + rspi.setWorkloadContext(useInterval) + rspi.setEnvironmentContext(sNSSAI_id) + + //timestamp format YYYY-MM-DD hh:mm:ss + rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault())) + + execution.setVariable("communicationServiceInstance", rspi) + + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + globalSubscriberId, + subscriptionServiceType, + serviceInstanceId) + client.create(uri, rspi) + + execution.setVariable("sliceTaskParams", sliceParams) + } + + /** + * create An Slice Profile + * @param execution + */ + void createTnBHSliceProfile(DelegateExecution execution) { + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + SliceTaskInfo<TnSliceProfile> sliceTaskInfo = sliceParams.tnBHSliceTaskInfo + + TnSliceProfile tnSliceProfile = sliceTaskInfo.sliceProfile + String profileId = UUID.randomUUID().toString() + tnSliceProfile.setSliceProfileId(profileId) + + SliceProfile sliceProfile = new SliceProfile() + sliceProfile.setProfileId(profileId) + //todo:... + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, + globalSubscriberId, + subscriptionServiceType, + sliceTaskInfo.sliceInstanceId, + profileId + ) + client.create(uri, sliceProfile) + + execution.setVariable("sliceTaskParams", sliceParams) + } + + /** + * prepare AllocateCnNssi + * @param execution + */ + void prepareAllocateTnBHNssi(DelegateExecution execution) { + + //todo: + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + SliceTaskInfo<TnSliceProfile> sliceTaskInfo = sliceParams.tnBHSliceTaskInfo + + NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() + + AllocateTnNssi allocateTnNssi = new AllocateTnNssi() + //todo: AllocateTnNssi + allocateTnNssi.setTransportSliceNetworks() + allocateTnNssi.setNetworkSliceInfos() + + + //allocateTnNssi.networkSliceInfos + + EsrInfo esrInfo = new EsrInfo() + esrInfo.setVendor(sliceTaskInfo.getVendor()) + esrInfo.setNetworkType(sliceTaskInfo.getNetworkType()) + + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String subscriptionServiceType = execution.getVariable("subscriptionServiceType") + + ServiceInfo serviceInfo = new ServiceInfo() + serviceInfo.globalSubscriberId = globalSubscriberId + serviceInfo.subscriptionServiceType = subscriptionServiceType + serviceInfo.nsiId = sliceParams.suggestNsiId + serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID + serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID + + nbiRequest.setServiceInfo(serviceInfo) + nbiRequest.setEsrInfo(esrInfo) + nbiRequest.setAllocateTnNssi(allocateTnNssi) + + execution.setVariable("TnBHAllocateNssiNbiRequest", nbiRequest) + execution.setVariable("tnBHSliceTaskInfo", sliceTaskInfo) + } + + /** + * Update relationship between + * 1. NSI and NSSI + * 2. Slice Profile and Service Profile + * 3. SliceProfile and NSSI + * 4. sliceProfile and endpoint + * + * @param execution + */ + public void updateAnRelationship(DelegateExecution execution) { + //todo: + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + ResponseDescriptor result = execution.getVariable("anNssiAllocateResult") as ResponseDescriptor + String nssiId = result.getNssiId() + String endPointId = result.getEndPointId() + String nsiId = sliceParams.getSuggestNsiId() + String sliceProfileInstanceId = sliceParams.anSliceTaskInfo.sliceInstanceId + String serviceProfileInstanceId = sliceParams.serviceId + //nsi id + + updateRelationship(execution, nsiId, nssiId) + + updateRelationship(execution, serviceProfileInstanceId, sliceProfileInstanceId) + + updateRelationship(execution, sliceProfileInstanceId, nssiId) + + updateRelationship(execution, sliceProfileInstanceId, endPointId) + + } + + + /** + * Update relationship between + * 1. NSI and NSSI + * 2. Slice Profile and Service Profile + * 3. SliceProfile and NSSI + * + * @param execution + */ + public void updateCnRelationship(DelegateExecution execution) { + //todo: + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + NssiResponse result = execution.getVariable("cnNssiAllocateResult") as NssiResponse + String nssiId = result.getNssiId() + String nsiId = sliceParams.getSuggestNsiId() + String sliceProfileInstanceId = sliceParams.cnSliceTaskInfo.sliceInstanceId + String serviceProfileInstanceId = sliceParams.serviceId + //nsi id + + updateRelationship(execution, nsiId, nssiId) + + updateRelationship(execution, serviceProfileInstanceId, sliceProfileInstanceId) + + updateRelationship(execution,sliceProfileInstanceId, nssiId) + + + } + + /** + * Update relationship between + * 1. NSI and NSSI + * 2. Slice Profile and Service Profile + * 3. SliceProfile and NSSI + * + * @param execution + */ + public void updateTnBHRelationship(DelegateExecution execution) { + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + NssiResponse result = execution.getVariable("tnBHNssiAllocateResult") as NssiResponse + String nssiId = result.getNssiId() + String nsiId = sliceParams.getSuggestNsiId() + String sliceProfileInstanceId = sliceParams.tnBHSliceTaskInfo.sliceInstanceId + String serviceProfileInstanceId = sliceParams.serviceId + //nsi id + + updateRelationship(execution, nsiId, nssiId) + + updateRelationship(execution, serviceProfileInstanceId, sliceProfileInstanceId) + + updateRelationship(execution,sliceProfileInstanceId, nssiId) + } + + /** + * sourceId -> targetId + * @param execution + * @param sourceId + * @param targetId + */ + void updateRelationship(DelegateExecution execution, String sourceId, String targetId) { + //relation ship + Relationship relationship = new Relationship() + + AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + targetId) + + logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri) + + relationship.setRelatedLink(nsiServiceUri.build().toString()) + + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + sourceId).relationshipAPI() + client.create(uri, relationship) + } + }
\ No newline at end of file diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSIV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSIV2.groovy deleted file mode 100644 index 924b42fe9f..0000000000 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSIandNSSIV2.groovy +++ /dev/null @@ -1,613 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - * Copyright (C) 2019 Huawei Technologies Co., Ltd. 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.bpmn.infrastructure.scripts - -import org.apache.commons.lang3.StringUtils -import org.camunda.bpm.engine.delegate.BpmnError -import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.aai.domain.yang.Relationship -import org.onap.aai.domain.yang.ServiceInstance -import org.onap.aai.domain.yang.SliceProfile -import org.onap.aaiclient.client.aai.AAIObjectType -import org.onap.aaiclient.client.aai.AAIResourcesClient -import org.onap.aaiclient.client.aai.entities.AAIResultWrapper -import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri -import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory -import org.onap.so.beans.nsmf.* -import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.onap.so.bpmn.common.scripts.ExceptionUtil -import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils -import org.onap.so.bpmn.core.json.JsonUtils -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -import javax.ws.rs.NotFoundException - -class DoAllocateNSIandNSSIV2 extends AbstractServiceTaskProcessor{ - - private static final Logger logger = LoggerFactory.getLogger( DoAllocateNSIandNSSIV2.class); - - ExceptionUtil exceptionUtil = new ExceptionUtil() - - JsonUtils jsonUtil = new JsonUtils() - - private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) - - AAIResourcesClient client = getAAIClient() - - /** - * Pre Process the BPMN Flow Request - * Inclouds: - * generate the nsOperationKey - * generate the nsParameters - */ - - void preProcessRequest (DelegateExecution execution) { - String msg = "" - logger.trace("Enter preProcessRequest()") - Map<String, Object> nssiMap = new HashMap<>() - execution.setVariable("nssiMap", nssiMap) - boolean isMoreNSSTtoProcess = true - execution.setVariable("isMoreNSSTtoProcess", isMoreNSSTtoProcess) - List<String> nsstSequence = new ArrayList<>(Arrays.asList("cn")) - execution.setVariable("nsstSequence", nsstSequence) - logger.trace("Exit preProcessRequest") - } - - /** - * Process NSI options - * @param execution - */ - void retriveSliceOption(DelegateExecution execution) { - logger.trace("Enter retriveSliceOption() of DoAllocateNSIandNSSI") - - boolean isNSIOptionAvailable - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter -// try -// { -// Map<String, Object> nstSolution = execution.getVariable("nstSolution") as Map -// String modelUuid = nstSolution.get("UUID") -// String modelInvariantUuid = nstSolution.get("invariantUUID") -// String serviceModelInfo = """{ -// "modelInvariantUuid":"${modelInvariantUuid}", -// "modelUuid":"${modelUuid}", -// "modelVersion":"" -// }""" -// execution.setVariable("serviceModelInfo", serviceModelInfo) -// -// execution.setVariable("sliceParams", sliceParams) -// }catch (Exception ex) { -// logger.debug( "Unable to get the task information from request DB: " + ex) -// exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Unable to get task information from request DB.") -// } - - if(StringUtils.isBlank(sliceParams.getSuggestNsiId())) { - isNSIOptionAvailable = false - } - else { - isNSIOptionAvailable = true - execution.setVariable('nsiServiceInstanceId', sliceParams.getSuggestNsiId()) - execution.setVariable('nsiServiceInstanceName', sliceParams.getSuggestNsiName()) - } - execution.setVariable("isNSIOptionAvailable", isNSIOptionAvailable) - logger.trace("Exit retriveSliceOption() of DoAllocateNSIandNSSI") - } - - - /** - * create nsi instance in aai - * @param execution - */ - void createNSIinAAI(DelegateExecution execution) { - logger.debug("Enter CreateNSIinAAI in DoAllocateNSIandNSSI()") - - String sliceInstanceId = UUID.randomUUID().toString() - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter - - sliceParams.setServiceId(sliceInstanceId) - - ServiceInstance nsi = new ServiceInstance() - - - String sliceInstanceName = "nsi_"+execution.getVariable("sliceServiceInstanceName") - String serviceType = execution.getVariable("serviceType") - String serviceStatus = "deactivated" - String modelInvariantUuid = sliceParams.getNSTInfo().invariantUUID - String modelUuid = sliceParams.getNSTInfo().UUID - - String uuiRequest = execution.getVariable("uuiRequest") - String serviceInstanceLocationid = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.plmnIdList") - String serviceRole = "nsi" - - execution.setVariable("sliceInstanceId", sliceInstanceId) - nsi.setServiceInstanceId(sliceInstanceId) - nsi.setServiceInstanceName(sliceInstanceName) - nsi.setServiceType(serviceType) - nsi.setOrchestrationStatus(serviceStatus) - nsi.setModelInvariantId(modelInvariantUuid) - nsi.setModelVersionId(modelUuid) - nsi.setServiceInstanceLocationId(serviceInstanceLocationid) - nsi.setServiceRole(serviceRole) - String msg - try { - - AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, - execution.getVariable("globalSubscriberId"), - execution.getVariable("subscriptionServiceType"), - sliceInstanceId) - client.create(nsiServiceUri, nsi) - - execution.setVariable("nsiServiceUri", nsiServiceUri.build().toString()) - - } catch (BpmnError e) { - throw e - } catch (Exception ex) { - msg = "Exception in DoCreateSliceServiceInstance.instantiateSliceService. " + ex.getMessage() - logger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - - logger.debug("Exit CreateNSIinAAI in DoAllocateNSIandNSSI()") - } - - - /** - * create relationship between nsi and service profile instance - * @param execution - */ - void createRelationship(DelegateExecution execution) { - //relation ship - Relationship relationship = new Relationship() - String nsiServiceUri = execution.getVariable("nsiServiceUri") as String - logger.info("Creating Allotted resource relationship, nsiServiceUri: " + nsiServiceUri) - - relationship.setRelatedLink(nsiServiceUri) - - AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri( - AAIObjectType.ALLOTTED_RESOURCE, - execution.getVariable("globalSubscriberId"), - execution.getVariable("subscriptionServiceType"), - execution.getVariable("sliceServiceInstanceId"), - execution.getVariable("allottedResourceId")) - .relationshipAPI() - client.create(allottedResourceUri, relationship) - } - - /** - * - * @param execution - */ - void updateRelationship(DelegateExecution execution) { - logger.debug("Enter update relationship in DoAllocateNSIandNSSI()") - String allottedResourceId = execution.getVariable("allottedResourceId") - //Need to check whether nsi exist : Begin - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - - String nsiServiceInstanceID = sliceParams.getSuggestNsiId() - sliceParams.setServiceId(nsiServiceInstanceID) - - AAIResourceUri nsiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, - execution.getVariable("globalSubscriberId"), - execution.getVariable("subscriptionServiceType"), - nsiServiceInstanceID) - - try { - AAIResultWrapper wrapper = client.get(nsiServiceUri, NotFoundException.class) - Optional<ServiceInstance> si = wrapper.asBean(ServiceInstance.class) - //todo: if exists - if (!si.ifPresent()) { - String msg = "NSI suggested in the option doesn't exist. " + nsiServiceInstanceID - logger.debug(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - - AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, - execution.getVariable("globalSubscriberId"), - execution.getVariable("subscriptionServiceType"), - execution.getVariable("sliceServiceInstanceId"), - allottedResourceId) - - client.connect(allottedResourceUri, nsiServiceUri) - - execution.setVariable("sliceParams", sliceParams) - }catch(BpmnError e) { - throw e - }catch (Exception ex){ - String msg = "NSI suggested in the option doesn't exist. " + nsiServiceInstanceID - logger.debug(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - logger.debug("Exit update relationship in DoAllocateNSIandNSSI()") - } - - /** - * create RAN Slice Profile Instance - * @param execution - */ - void createAnSliceProfileInstance(DelegateExecution execution) { - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - String serviceInstanceId = UUID.randomUUID().toString() - execution.setVariable("ranSliceProfileInstanceId", serviceInstanceId) //todo: - - String serviceType = "" - String serviceRole = "slice-profile" - String oStatus = "deactivated" - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - SliceTaskInfo<AnSliceProfile> sliceTaskInfo = sliceParams.anSliceTaskInfo - sliceTaskInfo.setServiceInstanceId(serviceInstanceId) - - // create slice profile - ServiceInstance rspi = new ServiceInstance() - rspi.setServiceInstanceName(sliceTaskInfo.NSSTInfo.name) - rspi.setServiceType(serviceType) - rspi.setServiceRole(serviceRole) - rspi.setOrchestrationStatus(oStatus) - rspi.setModelInvariantId(sliceTaskInfo.NSSTInfo.invariantUUID) - rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID) - rspi.setInputParameters(uuiRequest) - rspi.setWorkloadContext(useInterval) - rspi.setEnvironmentContext(sNSSAI_id) - - //timestamp format YYYY-MM-DD hh:mm:ss - rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault())) - - execution.setVariable("communicationServiceInstance", rspi) - - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, - globalSubscriberId, - subscriptionServiceType, - serviceInstanceId) - client.create(uri, rspi) - - execution.setVariable("sliceParams", sliceParams) - } - - /** - * create An Slice Profile - * @param execution - */ - void createAnSliceProfile(DelegateExecution execution) { - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - //String serviceInstanceId = execution.getVariable("ranSliceProfileInstanceId") - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - SliceTaskInfo<AnSliceProfile> sliceTaskInfo = sliceParams.anSliceTaskInfo - AnSliceProfile anSliceProfile = sliceTaskInfo.sliceProfile - - String profileId = UUID.randomUUID().toString() - anSliceProfile.setSliceProfileId(profileId) - - SliceProfile sliceProfile = new SliceProfile() - sliceProfile.setProfileId(profileId) - sliceProfile.setCoverageAreaTAList(anSliceProfile.coverageAreaTAList as String) - //todo:... - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, - globalSubscriberId, - subscriptionServiceType, - sliceTaskInfo.serviceInstanceId, - profileId - ) - client.create(uri, sliceProfile) - execution.setVariable("sliceParams", sliceParams) - } - - /** - * prepare AllocateAnNssi - * @param execution - */ - void prepareAllocateAnNssi(DelegateExecution execution) { - - //todo: - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - SliceTaskInfo<AnSliceProfile> sliceTaskInfo = sliceParams.anSliceTaskInfo - - NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() - - AllocateAnNssi allocateAnNssi = new AllocateAnNssi() - allocateAnNssi.nsstId = sliceTaskInfo.NSSTInfo.UUID - allocateAnNssi.nssiId = sliceTaskInfo.NSSTInfo.UUID - allocateAnNssi.nssiName = sliceTaskInfo.NSSTInfo.name - allocateAnNssi.sliceProfile = sliceTaskInfo.sliceProfile - allocateAnNssi.nsiInfo.nsiId = sliceParams - - EsrInfo esrInfo = new EsrInfo() - //todo: vendor and network - esrInfo.setVendor(sliceTaskInfo.getVendor()) - esrInfo.setNetworkType(sliceTaskInfo.getNetworkType()) - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - - //todo: service info - ServiceInfo serviceInfo = new ServiceInfo() - serviceInfo.globalSubscriberId = globalSubscriberId - serviceInfo.subscriptionServiceType = subscriptionServiceType - serviceInfo.nsiId = sliceParams.serviceId - serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID - serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID - - nbiRequest.setServiceInfo(serviceInfo) - nbiRequest.setEsrInfo(esrInfo) - nbiRequest.setAllocateAnNssi(allocateAnNssi) - - execution.setVariable("AnAllocateNssiNbiRequest", nbiRequest) - execution.setVariable("anBHSliceTaskInfo", sliceTaskInfo) - } - - - /** - * create RAN Slice Profile Instance - * @param execution - */ - void createCnSliceProfileInstance(DelegateExecution execution) { - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - String serviceInstanceId = UUID.randomUUID().toString() - execution.setVariable("cnSliceProfileInstanceId", serviceInstanceId) //todo: - - String serviceType = "" - String serviceRole = "slice-profile" - String oStatus = "deactivated" - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - SliceTaskInfo<CnSliceProfile> sliceTaskInfo = sliceParams.cnSliceTaskInfo - sliceTaskInfo.setServiceInstanceId(serviceInstanceId) - - // create slice profile - ServiceInstance rspi = new ServiceInstance() - rspi.setServiceInstanceName(sliceTaskInfo.NSSTInfo.name) - rspi.setServiceType(serviceType) - rspi.setServiceRole(serviceRole) - rspi.setOrchestrationStatus(oStatus) - rspi.setModelInvariantId(sliceTaskInfo.NSSTInfo.invariantUUID) - rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID) - rspi.setInputParameters(uuiRequest) - rspi.setWorkloadContext(useInterval) - rspi.setEnvironmentContext(sNSSAI_id) - - //timestamp format YYYY-MM-DD hh:mm:ss - rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault())) - - execution.setVariable("communicationServiceInstance", rspi) - - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, - globalSubscriberId, - subscriptionServiceType, - serviceInstanceId) - client.create(uri, rspi) - execution.setVariable("sliceParams", sliceParams) - } - - /** - * create An Slice Profile - * @param execution - */ - void createCnSliceProfile(DelegateExecution execution) { - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - //String serviceInstanceId = execution.getVariable("ranSliceProfileInstanceId") - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - - SliceTaskInfo<CnSliceProfile> sliceTaskInfo = sliceParams.cnSliceTaskInfo - CnSliceProfile cnSliceProfile = sliceTaskInfo.sliceProfile - - String profileId = UUID.randomUUID().toString() - cnSliceProfile.setSliceProfileId(profileId) - - SliceProfile sliceProfile = new SliceProfile() - sliceProfile.setProfileId(profileId) - sliceProfile.setCoverageAreaTAList(cnSliceProfile.coverageAreaTAList as String) - //todo:... - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, - globalSubscriberId, - subscriptionServiceType, - sliceTaskInfo.serviceInstanceId, - profileId - ) - client.create(uri, sliceProfile) - execution.setVariable("sliceParams", sliceParams) - } - - /** - * prepare AllocateCnNssi - * @param execution - */ - void prepareAllocateCnNssi(DelegateExecution execution) { - - //todo: - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - SliceTaskInfo<CnSliceProfile> sliceTaskInfo = sliceParams.cnSliceTaskInfo - - NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() - - AllocateCnNssi allocateCnNssi = new AllocateCnNssi() - allocateCnNssi.nsstId = sliceTaskInfo.NSSTInfo.UUID - allocateCnNssi.nssiId = sliceTaskInfo.NSSTInfo.UUID - allocateCnNssi.nssiName = sliceTaskInfo.NSSTInfo.name - allocateCnNssi.sliceProfile = sliceTaskInfo.sliceProfile - allocateCnNssi.nsiInfo.nsiId = sliceParams - - EsrInfo esrInfo = new EsrInfo() - //todo: vendor and network - esrInfo.setVendor(sliceTaskInfo.getVendor()) - esrInfo.setNetworkType(sliceTaskInfo.getNetworkType()) - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - - //todo: service info - ServiceInfo serviceInfo = new ServiceInfo() - serviceInfo.globalSubscriberId = globalSubscriberId - serviceInfo.subscriptionServiceType = subscriptionServiceType - serviceInfo.nsiId = sliceParams.serviceId - serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID - serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID - - nbiRequest.setServiceInfo(serviceInfo) - nbiRequest.setEsrInfo(esrInfo) - nbiRequest.setAllocateCnNssi(allocateCnNssi) - - execution.setVariable("CnAllocateNssiNbiRequest", nbiRequest) - execution.setVariable("cnSliceTaskInfo", sliceTaskInfo) - } - - - /** - * create TN Slice Profile Instance - * @param execution - */ - void createTnBHSliceProfileInstance(DelegateExecution execution) { - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - - String serviceType = "" - String serviceRole = "slice-profile" - String oStatus = "deactivated" - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - - SliceTaskInfo<TnSliceProfile> sliceTaskInfo = sliceParams.tnBHSliceTaskInfo - String serviceInstanceId = UUID.randomUUID().toString() - - sliceTaskInfo.setServiceInstanceId(serviceInstanceId) - //execution.setVariable("cnSliceProfileInstanceId", serviceInstanceId) //todo: - - // create slice profile - ServiceInstance rspi = new ServiceInstance() - rspi.setServiceInstanceName(sliceTaskInfo.NSSTInfo.name) - rspi.setServiceType(serviceType) - rspi.setServiceRole(serviceRole) - rspi.setOrchestrationStatus(oStatus) - rspi.setModelInvariantId(sliceTaskInfo.NSSTInfo.invariantUUID) - rspi.setModelVersionId(sliceTaskInfo.NSSTInfo.UUID) - rspi.setInputParameters(uuiRequest) - rspi.setWorkloadContext(useInterval) - rspi.setEnvironmentContext(sNSSAI_id) - - //timestamp format YYYY-MM-DD hh:mm:ss - rspi.setCreatedAt(new Date(System.currentTimeMillis()).format("yyyy-MM-dd HH:mm:ss", TimeZone.getDefault())) - - execution.setVariable("communicationServiceInstance", rspi) - - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, - globalSubscriberId, - subscriptionServiceType, - serviceInstanceId) - client.create(uri, rspi) - - execution.setVariable("sliceParams", sliceParams) - } - - /** - * create An Slice Profile - * @param execution - */ - void createTnBHSliceProfile(DelegateExecution execution) { - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - String serviceInstanceId = execution.getVariable("ranSliceProfileInstanceId") - - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - - SliceTaskInfo<TnSliceProfile> sliceTaskInfo = sliceParams.tnBHSliceTaskInfo - - TnSliceProfile tnSliceProfile = sliceTaskInfo.sliceProfile - String profileId = UUID.randomUUID().toString() - tnSliceProfile.setSliceProfileId(profileId) - - SliceProfile sliceProfile = new SliceProfile() - sliceProfile.setProfileId(profileId) - //todo:... - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, - globalSubscriberId, - subscriptionServiceType, - serviceInstanceId, - profileId - ) - client.create(uri, sliceProfile) - - execution.setVariable("sliceParams", sliceParams) - } - - /** - * prepare AllocateCnNssi - * @param execution - */ - void prepareAllocateTnBHNssi(DelegateExecution execution) { - - //todo: - SliceTaskParamsAdapter sliceParams = - execution.getVariable("sliceParams") as SliceTaskParamsAdapter - SliceTaskInfo<TnSliceProfile> sliceTaskInfo = sliceParams.tnBHSliceTaskInfo - - NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() - - AllocateTnNssi allocateTnNssi = new AllocateTnNssi() - //todo: AllocateTnNssi - //allocateTnNssi.networkSliceInfos - - EsrInfo esrInfo = new EsrInfo() - //todo: vendor and network - esrInfo.setVendor(sliceTaskInfo.getVendor()) - esrInfo.setNetworkType(sliceTaskInfo.getNetworkType()) - - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String subscriptionServiceType = execution.getVariable("subscriptionServiceType") - - //todo: service info - ServiceInfo serviceInfo = new ServiceInfo() - serviceInfo.globalSubscriberId = globalSubscriberId - serviceInfo.subscriptionServiceType = subscriptionServiceType - serviceInfo.nsiId = sliceParams.serviceId - serviceInfo.serviceInvariantUuid = sliceTaskInfo.NSSTInfo.invariantUUID - serviceInfo.serviceUuid = sliceTaskInfo.NSSTInfo.UUID - - nbiRequest.setServiceInfo(serviceInfo) - nbiRequest.setEsrInfo(esrInfo) - nbiRequest.setAllocateTnNssi(allocateTnNssi) - - execution.setVariable("TnBHAllocateNssiNbiRequest", nbiRequest) - execution.setVariable("tnBHSliceTaskInfo", sliceTaskInfo) - } - -}
\ No newline at end of file diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy index 88edd79d6d..9aa044a649 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSI.groovy @@ -1,713 +1,114 @@ package org.onap.so.bpmn.infrastructure.scripts -import org.camunda.bpm.engine.delegate.BpmnError +import com.fasterxml.jackson.databind.ObjectMapper import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.aai.domain.yang.ServiceInstance -import org.onap.aai.domain.yang.SliceProfile -import org.onap.so.beans.nsmf.AllocateAnNssi -import org.onap.so.beans.nsmf.AllocateCnNssi -import org.onap.so.beans.nsmf.AllocateTnNssi -import org.onap.so.beans.nsmf.AnSliceProfile -import org.onap.so.beans.nsmf.CnSliceProfile import org.onap.so.beans.nsmf.EsrInfo -import org.onap.so.beans.nsmf.JobStatusRequest -import org.onap.so.beans.nsmf.NetworkType -import org.onap.so.beans.nsmf.NsiInfo -import org.onap.so.beans.nsmf.NssiAllocateRequest -import org.onap.so.beans.nsmf.PerfReq -import org.onap.so.beans.nsmf.PerfReqEmbb -import org.onap.so.beans.nsmf.PerfReqUrllc -import org.onap.so.beans.nsmf.ResourceSharingLevel -import org.onap.so.beans.nsmf.SliceTaskParams -import org.onap.so.beans.nsmf.TnSliceProfile -import org.onap.so.beans.nsmf.UeMobilityLevel +import org.onap.so.beans.nsmf.NssiResponse +import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest +import org.onap.so.beans.nsmf.ResponseDescriptor +import org.onap.so.beans.nsmf.ServiceInfo +import org.onap.so.beans.nsmf.SliceTaskInfo +import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils -import org.onap.so.bpmn.core.RollbackData import org.onap.so.bpmn.core.domain.ModelInfo import org.onap.so.bpmn.core.domain.ServiceDecomposition import org.onap.so.bpmn.core.json.JsonUtils -import org.onap.aaiclient.client.aai.AAIObjectType -import org.onap.aaiclient.client.aai.AAIResourcesClient -import org.onap.aaiclient.client.aai.entities.AAIEdgeLabel -import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri -import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory import org.slf4j.Logger import org.slf4j.LoggerFactory -import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.http.ResponseEntity import static org.apache.commons.lang3.StringUtils.isBlank +class DoAllocateNSSI extends AbstractServiceTaskProcessor { -class DoAllocateNSSI extends org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor{ - - private static final Logger logger = LoggerFactory.getLogger( DoAllocateNSSI.class); - private static final ObjectMapper MAPPER = new ObjectMapper(); + private static final Logger logger = LoggerFactory.getLogger(DoAllocateNSSI.class); ExceptionUtil exceptionUtil = new ExceptionUtil() JsonUtils jsonUtil = new JsonUtils() - private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) - - /** - * Pre Process the BPMN Flow Request - * Inclouds: - * generate the nsOperationKey - * generate the nsParameters - */ - void preProcessRequest (DelegateExecution execution) { - logger.trace("Enter preProcessRequest()") - String msg = "" - String nssmfOperation = "" - String msoRequestId = execution.getVariable("msoRequestId") - String nsstInput = execution.getVariable("nsstInput") - String modelUuid = jsonUtil.getJsonValue(nsstInput, "modelUuid") - //modelUuid="2763777c-27bd-4df7-93b8-c690e23f4d3f" - String nssiInstanceId = jsonUtil.getJsonValue(nsstInput, "serviceInstanceId") - String serviceModelInfo = """{ - "modelInvariantUuid":"", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("serviceModelInfo",serviceModelInfo) - execution.setVariable("nssiInstanceId",nssiInstanceId) - String nssiProfileID = UUID.randomUUID().toString() - execution.setVariable("nssiProfileID",nssiProfileID) - if(isBlank(nssiInstanceId)) - { - nssmfOperation="create" - nssiInstanceId = UUID.randomUUID().toString() - }else { - nssmfOperation = "update" - } - execution.setVariable("nssmfOperation",nssmfOperation) - execution.setVariable("nssiInstanceId",nssiInstanceId) - - def isDebugLogEnabled ="false" - def isNSSICreated = false - execution.setVariable("isNSSICreated",isNSSICreated) - - int currentCycle = 0 - execution.setVariable("currentCycle", currentCycle) - - logger.trace("Exit preProcessRequest") - } - - - void getNSSTInfo(DelegateExecution execution){ - logger.trace("Enter getNSSTInfo in DoAllocateNSSI()") - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - ModelInfo modelInfo = serviceDecomposition.getModelInfo() - String serviceRole = "nssi" - String nssiServiceInvariantUuid = serviceDecomposition.modelInfo.getModelInvariantUuid() - String nssiServiceUuid = serviceDecomposition.modelInfo.getModelUuid() - String nssiServiceType = serviceDecomposition.getServiceType() - String uuiRequest = execution.getVariable("uuiRequest") - String nssiServiceName = "nssi_"+jsonUtil.getJsonValue(uuiRequest, "service.name") - execution.setVariable("nssiServiceName",nssiServiceName) - execution.setVariable("nssiServiceType",nssiServiceType) - execution.setVariable("nssiServiceInvariantUuid",nssiServiceInvariantUuid) - execution.setVariable("nssiServiceUuid",nssiServiceUuid) - execution.setVariable("serviceRole",serviceRole) - - String content = serviceDecomposition.getServiceInfo().getServiceArtifact().get(0).getContent() - String nsstID = jsonUtil.getJsonValue(content, "metadata.id") - String nsstVendor = jsonUtil.getJsonValue(content, "metadata.vendor") - String nsstDomain = jsonUtil.getJsonValue(content, "metadata.domainType") - String nsstType = jsonUtil.getJsonValue(content, "metadata.type") + ObjectMapper objectMapper = new ObjectMapper() - execution.setVariable("nsstID",nsstID) - execution.setVariable("nsstVendor",nsstVendor) - execution.setVariable("nsstDomain",nsstDomain) - execution.setVariable("nssiServiceUuid",nssiServiceUuid) - execution.setVariable("nsstType",nsstType) - - String nsstContentInfo = """{ - "NsstID":"${nsstID}", - "Vendor":"${nsstVendor}", - "type":"${nsstType}" - }""" - - logger.trace("Exit getNSSTInfo in DoAllocateNSSI()") - } - - void timeDelay(DelegateExecution execution) { - logger.trace("Enter timeDelay in DoAllocateNSSI()") - try { - Thread.sleep(60000); - int currentCycle = execution.getVariable("currentCycle") - currentCycle=currentCycle+1 - if(currentCycle>60) - { - logger.trace("Completed all the retry times... but still nssmf havent completed the creation process...") - exceptionUtil.buildAndThrowWorkflowException(execution, 500, "NSSMF creation didnt complete by time...") - } - execution.setVariable("currentCycle",currentCycle) - } catch(InterruptedException e) { - logger.info("Time Delay exception" + e) - } - logger.trace("Exit timeDelay in DoAllocateNSSI()") - } + private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) + private static final NSSMF_ALLOCATE_URL = "/api/rest/provMns/v1/NSS/SliceProfiles" - void sendUpdateRequestNSSMF(DelegateExecution execution) { - logger.debug("Enter sendUpdateRequestNSSMF in DoAllocateNSSI()") - String domain = execution.getVariable("nsstDomain") - String nssmfRequest = buildUpdateNSSMFRequest(execution, domain.toUpperCase()) + private static final NSSMF_QUERY_JOB_STATUS_URL = "/NSS/jobs/%s" - String urlString = "/api/rest/provMns/v1/NSS/SliceProfiles" + @Override + void preProcessRequest(DelegateExecution execution) { + logger.trace("Enter preProcessRequest()") - String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlString, nssmfRequest) + NssmfAdapterNBIRequest nbiRequest = execution.getVariable("nbiRequest") as NssmfAdapterNBIRequest - if (nssmfResponse != null) { - execution.setVariable("nssmfResponse", nssmfResponse) - String nssiId = jsonUtil.getJsonValue(nssmfResponse, "nssiId") - String jobId = jsonUtil.getJsonValue(nssmfResponse, "jobId") - execution.setVariable("nssiId",nssiId) - execution.setVariable("jobId",jobId) + //SliceTaskInfo sliceTaskInfo = execution.getVariable("sliceTaskInfo") as SliceTaskInfo + boolean isNSIOptionAvailable = execution.getVariable("isNSIOptionAvailable") as Boolean + if (isNSIOptionAvailable) { + nbiRequest.serviceInfo.setActionType("modify") } else { - logger.error("received error message from NSSMF : "+ nssmfResponse) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000,"Received a Bad Sync Response from NSSMF.") + nbiRequest.serviceInfo.setActionType("allocate") } - logger.trace("Exit sendUpdateRequestNSSMF in DoAllocateNSSI()") + execution.setVariable("nbiRequest", nbiRequest) + logger.trace("Exit preProcessRequest") } + /** + * send Create Request NSSMF + * @param execution + */ void sendCreateRequestNSSMF(DelegateExecution execution) { - logger.debug("Enter sendCreateRequestNSSMF in DoAllocateNSSI()") - //Prepare auth for NSSMF - Begin - String domain = execution.getVariable("nsstDomain") - String nssmfRequest = buildCreateNSSMFRequest(execution, domain.toUpperCase()) - - String urlString = "/api/rest/provMns/v1/NSS/SliceProfiles" - - String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, urlString, nssmfRequest) - - if (nssmfResponse != null) { - execution.setVariable("nssmfResponse", nssmfResponse) - String nssiId = jsonUtil.getJsonValue(nssmfResponse, "nssiId") - String jobId = jsonUtil.getJsonValue(nssmfResponse, "jobId") - execution.setVariable("nssiId",nssiId) - execution.setVariable("jobId",jobId) - - } else { - logger.error("received error message from NSSMF : "+ nssmfResponse) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000,"Received a Bad Sync Response from NSSMF.") - } - - logger.debug("Exit sendCreateRequestNSSMF in DoAllocateNSSI()") + NssmfAdapterNBIRequest nbiRequest = execution.getVariable("nbiRequest") as NssmfAdapterNBIRequest + String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, NSSMF_ALLOCATE_URL, + objectMapper.writeValueAsString(nbiRequest)) + ResponseEntity responseEntity = objectMapper.readValue(response, ResponseEntity.class) + String respBody = responseEntity.getBody() + NssiResponse result = objectMapper.readValue(respBody, NssiResponse.class) + //todo: if success + //todo: + execution.setVariable("serviceInfo", nbiRequest.getServiceInfo()) + execution.setVariable("esrInfo", nbiRequest.getEsrInfo()) } - void getNSSMFProgresss(DelegateExecution execution) { - logger.debug("Enter getNSSMFProgresss in DoAllocateNSSI()") - - String nssmfRequest = buildNSSMFProgressRequest(execution) - String strUrl="/api/rest/provMns/v1/NSS/jobs/" + execution.getVariable("jobId") - - String nssmfResponse = nssmfAdapterUtils.sendPostRequestNSSMF(execution, strUrl, nssmfRequest) - - if(nssmfResponse != null){ - Boolean isNSSICreated = false - execution.setVariable("nssmfResponse", nssmfResponse) - Integer progress = Integer.parseInt(jsonUtil.getJsonValue(nssmfResponse, "responseDescriptor.progress")) - String status = jsonUtil.getJsonValue(nssmfResponse, "responseDescriptor.status") - String statusDescription = jsonUtil.getJsonValue(nssmfResponse, "responseDescriptor.statusDescription") - execution.setVariable("nssmfProgress",progress) - execution.setVariable("nssmfStatus",status) - execution.setVariable("nddmfStatusDescription",statusDescription) - if(progress > 99) - isNSSICreated = true - execution.setVariable("isNSSICreated",isNSSICreated) - } else { - logger.error("received error message from NSSMF : "+ nssmfResponse) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000,"Received a Bad Sync Response from NSSMF.") - } - logger.debug("Exit getNSSMFProgresss in DoAllocateNSSI()") - } - - void updateRelationship(DelegateExecution execution) { - logger.debug("Enter updateRelationship in DoAllocateNSSI()") - String nssiInstanceId = execution.getVariable("nssiInstanceId") - String nsiInstanceId = execution.getVariable("nsiServiceInstanceId") - try{ - AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nsiInstanceId); - AAIResourceUri nssiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiInstanceId) - getAAIClient().connect(nsiServiceuri, nssiServiceUri, AAIEdgeLabel.COMPOSED_OF); - }catch(Exception ex) { - String msg = "Exception in DoAllocateNSSI InstantiateNSSI service while creating relationship " + ex.getMessage() - logger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - logger.debug("Exit updateRelationship in DoAllocateNSSI()") - } - - - void instantiateNSSIService(DelegateExecution execution) { - logger.trace("Enter instantiateNSSIService in DoAllocateNSSI()") - //String nssiInstanceId = execution.getVariable("nssiInstanceId") - String nssiInstanceId = execution.getVariable("nssiId") - execution.setVariable("nssiInstanceId",nssiInstanceId) - String sliceInstanceId = execution.getVariable("nsiServiceInstanceId") - try { - org.onap.aai.domain.yang.ServiceInstance nssi = new ServiceInstance(); - Map<String, Object> serviceProfileMap = execution.getVariable("serviceProfile") - - nssi.setServiceInstanceId(nssiInstanceId) - nssi.setServiceInstanceName(execution.getVariable("nssiServiceName")) - //nssi.setServiceType(execution.getVariable("nssiServiceType")) - nssi.setServiceType(serviceProfileMap.get("sST").toString()) - String serviceStatus = "deactivated" - nssi.setOrchestrationStatus(serviceStatus) - String modelInvariantUuid = execution.getVariable("nssiServiceInvariantUuid") - String modelUuid = execution.getVariable("nssiServiceUuid") - nssi.setModelInvariantId(modelInvariantUuid) - nssi.setModelVersionId(modelUuid) - String uuiRequest = execution.getVariable("uuiRequest") - String serviceInstanceLocationid = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.plmnIdList") - nssi.setServiceInstanceLocationId(serviceInstanceLocationid) - //String snssai = jsonUtil.getJsonValue(uuiRequest, "service.parameters.requestInputs.sNSSAI") - String envContext=execution.getVariable("nsstDomain") - nssi.setEnvironmentContext(envContext) - nssi.setServiceRole(execution.getVariable("serviceRole")) - AAIResourcesClient client = new AAIResourcesClient() - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), nssiInstanceId) - client.create(uri, nssi) - } catch (BpmnError e) { - throw e - } catch (Exception ex) { - String msg = "Exception in DoCreateSliceServiceInstance.instantiateSliceService. " + ex.getMessage() - logger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - try{ - AAIResourceUri nsiServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, sliceInstanceId); - AAIResourceUri nssiServiceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, nssiInstanceId) - getAAIClient().connect(nsiServiceuri, nssiServiceUri, AAIEdgeLabel.COMPOSED_OF); - }catch(Exception ex) { - String msg = "Exception in DoAllocateNSSI InstantiateNSSI service while creating relationship " + ex.getMessage() - logger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - - - - def rollbackData = execution.getVariable("RollbackData") - if (rollbackData == null) { - rollbackData = new RollbackData(); - } - //rollbackData.put("SERVICEINSTANCE", "disableRollback", idisableRollback.toStrng()) - rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true") - rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", nssiInstanceId) - rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("subscriptionServiceType")) - rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId")) - execution.setVariable("rollbackData", rollbackData) - execution.setVariable("RollbackData", rollbackData) - logger.debug("RollbackData:" + rollbackData) - logger.trace("Exit instantiateNSSIService in DoAllocateNSSI()") - } - - - void createSliceProfile(DelegateExecution execution) { - logger.trace("Enter createSliceProfile in DoAllocateNSSI()") - String sliceserviceInstanceId = execution.getVariable("nssiInstanceId") - String nssiProfileID = execution.getVariable("nssiProfileID") - Map<String, Object> sliceProfileMap = execution.getVariable("sliceProfileCn") - Map<String, Object> serviceProfileMap = execution.getVariable("serviceProfile") - SliceProfile sliceProfile = new SliceProfile() - sliceProfile.setServiceAreaDimension("") - sliceProfile.setPayloadSize(0) - sliceProfile.setJitter(0) - sliceProfile.setSurvivalTime(0) - //sliceProfile.setCsAvailability() - //sliceProfile.setReliability() - sliceProfile.setExpDataRate(0) - sliceProfile.setTrafficDensity(0) - sliceProfile.setConnDensity(0) - sliceProfile.setSNssai(sliceProfileMap.get("sNSSAI").toString()) - sliceProfile.setExpDataRateUL(Integer.parseInt(sliceProfileMap.get("expDataRateUL").toString())) - sliceProfile.setExpDataRateDL(Integer.parseInt(sliceProfileMap.get("expDataRateDL").toString())) - sliceProfile.setActivityFactor(Integer.parseInt(sliceProfileMap.get("activityFactor").toString())) - sliceProfile.setResourceSharingLevel(sliceProfileMap.get("activityFactor").toString()) - sliceProfile.setUeMobilityLevel(serviceProfileMap.get("uEMobilityLevel").toString()) - sliceProfile.setCoverageAreaTAList(serviceProfileMap.get("coverageAreaTAList").toString()) - sliceProfile.setMaxNumberOfUEs(Integer.parseInt(sliceProfileMap.get("activityFactor").toString())) - sliceProfile.setLatency(Integer.parseInt(sliceProfileMap.get("latency").toString())) - sliceProfile.setProfileId(nssiProfileID) - sliceProfile.setE2ELatency(0) - - try { - AAIResourcesClient client = new AAIResourcesClient() - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SLICE_PROFILE, - execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), sliceserviceInstanceId, nssiProfileID) - client.create(uri, sliceProfile) - } catch (BpmnError e) { - throw e - } catch (Exception ex) { - String msg = "Exception in DoCreateSliceServiceInstance.instantiateSliceService. " + ex.getMessage() - logger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - - def rollbackData = execution.getVariable("RollbackData") - if (rollbackData == null) { - rollbackData = new RollbackData(); - } - //rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString()) - rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true") - rollbackData.put("SERVICEINSTANCE", "serviceInstanceId", sliceserviceInstanceId) - rollbackData.put("SERVICEINSTANCE", "subscriptionServiceType", execution.getVariable("serviceType")) - rollbackData.put("SERVICEINSTANCE", "globalSubscriberId", execution.getVariable("globalSubscriberId")) - execution.setVariable("rollbackData", rollbackData) - execution.setVariable("RollbackData", rollbackData) - logger.debug("RollbackData:" + rollbackData) - logger.trace("Exit createSliceProfile in DoAllocateNSSI()") - } - - - String buildCreateNSSMFRequest(DelegateExecution execution, String domain) { - - NssiAllocateRequest request = new NssiAllocateRequest() - String strRequest = "" - //String uuiRequest = execution.getVariable("uuiRequest") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - - switch (domain) { - case "AN": - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(execution.getVariable("networkType")) - esrInfo.setVendor(execution.getVariable("nsstVendor")) - - NsiInfo nsiInfo = new NsiInfo() - nsiInfo.setNsiId(execution.getVariable("nsiInstanceID")) - nsiInfo.setNsiName(execution.getVariable("nsiInstanceName")) - - AnSliceProfile anSliceProfile = new AnSliceProfile() - anSliceProfile.setLatency(execution.getVariable("latency")) - anSliceProfile.setCoverageAreaTAList(execution.getVariable("coverageAreaList")) - anSliceProfile.setQi(execution.getVariable("qi")) - - AllocateAnNssi allocateAnNssi = new AllocateAnNssi() - allocateAnNssi.setNsstId(execution.getVariable("nsstId")) - allocateAnNssi.setNssiName(execution.getVariable("nssiName")) - allocateAnNssi.setNsiInfo(nsiInfo) - allocateAnNssi.setSliceProfile(anSliceProfile) - String anScriptName = sliceTaskParams.getAnScriptName() - allocateAnNssi.setScriptName(anScriptName) - - request.setAllocateAnNssi(allocateAnNssi) - request.setEsrInfo(esrInfo) - break; - case "CN": - Map<String, Object> sliceProfileCn =execution.getVariable("sliceProfileCn") - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - NsiInfo nsiInfo = new NsiInfo() - nsiInfo.setNsiId(execution.getVariable("nsiServiceInstanceId")) - nsiInfo.setNsiName(execution.getVariable("nsiServiceInstanceName")) - - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(NetworkType.fromString(domain)) - esrInfo.setVendor(execution.getVariable("nsstVendor")) - execution.setVariable("esrInfo",esrInfo) - - - PerfReqEmbb perfReqEmbb = new PerfReqEmbb() - perfReqEmbb.setActivityFactor(sliceProfileCn.get("activityFactor")) - perfReqEmbb.setAreaTrafficCapDL(sliceProfileCn.get("areaTrafficCapDL")) - perfReqEmbb.setAreaTrafficCapUL(sliceProfileCn.get("areaTrafficCapUL")) - perfReqEmbb.setExpDataRateDL(sliceProfileCn.get("expDataRateDL")) - perfReqEmbb.setExpDataRateUL(sliceProfileCn.get("expDataRateUL")) - - List<PerfReqEmbb> listPerfReqEmbbList = new ArrayList<>() - listPerfReqEmbbList.add(perfReqEmbb) - - PerfReq perfReq = new PerfReq() - perfReq.setPerfReqEmbbList(listPerfReqEmbbList) - - PerfReqUrllc perfReqUrllc = new PerfReqUrllc() - perfReqUrllc.setConnDensity(0) - perfReqUrllc.setTrafficDensity(0) - perfReqUrllc.setExpDataRate(0) - perfReqUrllc.setReliability(0) - perfReqUrllc.setCsAvailability(0) - perfReqUrllc.setSurvivalTime(0) - perfReqUrllc.setJitter(0) - perfReqUrllc.setE2eLatency(0) - perfReqUrllc.setPayloadSize("0") - perfReqUrllc.setServiceAreaDimension("") - - List<PerfReqUrllc> perfReqUrllcList = new ArrayList<>() - perfReqUrllcList.add(perfReqUrllc) - perfReq.setPerfReqUrllcList(perfReqUrllcList) - - CnSliceProfile cnSliceProfile = new CnSliceProfile() - cnSliceProfile.setSliceProfileId(execution.getVariable("nssiProfileID")) - String plmnStr = serviceProfile.get("plmnIdList") - List<String> plmnIdList=Arrays.asList(plmnStr.split("\\|")) - cnSliceProfile.setPlmnIdList(plmnIdList) - - String resourceSharingLevel = serviceProfile.get("resourceSharingLevel").toString() - cnSliceProfile.setResourceSharingLevel(ResourceSharingLevel.fromString(resourceSharingLevel)) - - String coverageArea = serviceProfile.get("coverageAreaTAList") - List<String> coverageAreaList=Arrays.asList(coverageArea.split("\\|")) - cnSliceProfile.setCoverageAreaTAList(coverageAreaList) - - String ueMobilityLevel = serviceProfile.get("uEMobilityLevel").toString() - cnSliceProfile.setUeMobilityLevel(UeMobilityLevel.fromString(ueMobilityLevel)) - - int latency = serviceProfile.get("latency") - cnSliceProfile.setLatency(latency) - - int maxUE = serviceProfile.get("maxNumberofUEs") - cnSliceProfile.setMaxNumberofUEs(maxUE) - - String snssai = serviceProfile.get("sNSSAI") - List<String> snssaiList = Arrays.asList(snssai.split("\\|")) - cnSliceProfile.setSnssaiList(snssaiList) - - cnSliceProfile.setPerfReq(perfReq) - - AllocateCnNssi allocateCnNssi = new AllocateCnNssi() - allocateCnNssi.setNsstId(execution.getVariable("nsstid")) - allocateCnNssi.setNssiName(execution.getVariable("nssiName")) - allocateCnNssi.setSliceProfile(cnSliceProfile) - allocateCnNssi.setNsiInfo(nsiInfo) - String cnScriptName = sliceTaskParams.getCnScriptName() - allocateCnNssi.setScriptName(cnScriptName) - request.setAllocateCnNssi(allocateCnNssi) - request.setEsrInfo(esrInfo) - break; - case "TN": - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(execution.getVariable("networkType")) - esrInfo.setVendor(execution.getVariable("vendor")) - - TnSliceProfile tnSliceProfile = new TnSliceProfile() - tnSliceProfile.setLatency(execution.getVariable("latency")) - tnSliceProfile.setBandwidth(execution.getVariable("bandWidth")) - - NsiInfo nsiInfo = new NsiInfo() - nsiInfo.setNsiId(execution.getVariable("nsiInstanceID")) - nsiInfo.setNsiName(execution.getVariable("nsiInstanceName")) - - AllocateTnNssi allocateTnNssi = new AllocateTnNssi() - allocateTnNssi.setSliceProfile(tnSliceProfile) - allocateTnNssi.setNsiInfo(nsiInfo) - allocateTnNssi.setNsstId(execution.getVariable("nsstid")) - String tnScriptName = sliceTaskParams.getTnScriptName() - allocateTnNssi.setScriptName(tnScriptName) - - request.setAllocateTnNssi(allocateTnNssi) - request.setEsrInfo(esrInfo) - break; - default: - break; - } - try { - strRequest = MAPPER.writeValueAsString(request); - } catch (IOException e) { - logger.error("Invalid get progress request bean to convert as string"); - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Invalid get progress request bean to convert as string") - } - return strRequest - } - - - String buildUpdateNSSMFRequest(DelegateExecution execution, String domain) { - NssiAllocateRequest request = new NssiAllocateRequest() - String nsstInput = execution.getVariable("nsstInput") - String nssiId = jsonUtil.getJsonValue(nsstInput, "serviceInstanceId") - String strRequest = "" - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - switch (domain) { - case "AN": - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(execution.getVariable("nsstType")) - esrInfo.setVendor(execution.getVariable("vendor")) - - NsiInfo nsiInfo = new NsiInfo() - nsiInfo.setNsiId(execution.getVariable("nsiInstanceID")) - nsiInfo.setNsiName(execution.getVariable("nsiInstanceName")) - - AnSliceProfile anSliceProfile = new AnSliceProfile() - anSliceProfile.setLatency(execution.getVariable("latency")) - anSliceProfile.setCoverageAreaTAList(execution.getVariable("coverageAreaList")) - anSliceProfile.setQi(execution.getVariable("qi")) - - AllocateAnNssi allocateAnNssi = new AllocateAnNssi() - allocateAnNssi.setNsstId(execution.getVariable("nsstId")) - allocateAnNssi.setNssiName(execution.getVariable("nssiName")) - allocateAnNssi.setNsiInfo(nsiInfo) - allocateAnNssi.setSliceProfile(anSliceProfile) - String anScriptName = sliceTaskParams.getAnScriptName() - allocateAnNssi.setScriptName(anScriptName) - request.setAllocateAnNssi(allocateAnNssi) - request.setEsrInfo(esrInfo) - break; - case "CN": - Map<String, Object> sliceProfileCn =execution.getVariable("sliceProfileCn") - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - NsiInfo nsiInfo = new NsiInfo() - nsiInfo.setNsiId(execution.getVariable("nsiServiceInstanceId")) - nsiInfo.setNsiName(execution.getVariable("nsiServiceInstanceName")) - - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(NetworkType.fromString(domain)) - esrInfo.setVendor(execution.getVariable("nsstVendor")) - execution.setVariable("esrInfo",esrInfo) - - - PerfReqEmbb perfReqEmbb = new PerfReqEmbb() - perfReqEmbb.setActivityFactor(sliceProfileCn.get("activityFactor")) - perfReqEmbb.setAreaTrafficCapDL(sliceProfileCn.get("areaTrafficCapDL")) - perfReqEmbb.setAreaTrafficCapUL(sliceProfileCn.get("areaTrafficCapUL")) - perfReqEmbb.setExpDataRateDL(sliceProfileCn.get("expDataRateDL")) - perfReqEmbb.setExpDataRateUL(sliceProfileCn.get("expDataRateUL")) - - List<PerfReqEmbb> listPerfReqEmbbList = new ArrayList<>() - listPerfReqEmbbList.add(perfReqEmbb) - - PerfReq perfReq = new PerfReq() - perfReq.setPerfReqEmbbList(listPerfReqEmbbList) - - PerfReqUrllc perfReqUrllc = new PerfReqUrllc() - perfReqUrllc.setConnDensity(0) - perfReqUrllc.setTrafficDensity(0) - perfReqUrllc.setExpDataRate(0) - perfReqUrllc.setReliability(0) - perfReqUrllc.setCsAvailability(0) - perfReqUrllc.setSurvivalTime(0) - perfReqUrllc.setJitter(0) - perfReqUrllc.setE2eLatency(0) - perfReqUrllc.setPayloadSize("0") - perfReqUrllc.setServiceAreaDimension("") - - List<PerfReqUrllc> perfReqUrllcList = new ArrayList<>() - perfReqUrllcList.add(perfReqUrllc) - perfReq.setPerfReqUrllcList(perfReqUrllcList) - - CnSliceProfile cnSliceProfile = new CnSliceProfile() - cnSliceProfile.setSliceProfileId(execution.getVariable("nssiProfileID")) - String plmnStr = serviceProfile.get("plmnIdList") - List<String> plmnIdList=Arrays.asList(plmnStr.split("\\|")) - cnSliceProfile.setPlmnIdList(plmnIdList) - - String resourceSharingLevel = serviceProfile.get("resourceSharingLevel").toString() - cnSliceProfile.setResourceSharingLevel(ResourceSharingLevel.fromString(resourceSharingLevel)) - - String coverageArea = serviceProfile.get("coverageAreaTAList") - List<String> coverageAreaList=Arrays.asList(coverageArea.split("\\|")) - cnSliceProfile.setCoverageAreaTAList(coverageAreaList) - - String ueMobilityLevel = serviceProfile.get("uEMobilityLevel").toString() - cnSliceProfile.setUeMobilityLevel(UeMobilityLevel.fromString(ueMobilityLevel)) - - int latency = serviceProfile.get("latency") - cnSliceProfile.setLatency(latency) - - int maxUE = serviceProfile.get("maxNumberofUEs") - cnSliceProfile.setMaxNumberofUEs(maxUE) + /** + * query nssi allocate status + * @param execution + */ + void queryNSSIStatus(DelegateExecution execution) { + NssmfAdapterNBIRequest nbiRequest = new NssmfAdapterNBIRequest() + NssiResponse nssiAllocateResult = execution.getVariable("nssiAllocateResult") as NssiResponse + String jobId = nssiAllocateResult.getJobId() + String nssiId = nssiAllocateResult.getNssiId() - String snssai = serviceProfile.get("sNSSAI") - List<String> snssaiList = Arrays.asList(snssai.split("\\|")) - cnSliceProfile.setSnssaiList(snssaiList) + ServiceInfo serviceInfo = execution.getVariable("serviceInfo") as ServiceInfo + serviceInfo.setNssiId(nssiId) + EsrInfo esrInfo = execution.getVariable("esrInfo") as EsrInfo - cnSliceProfile.setPerfReq(perfReq) + //nbiRequest.setResponseId(jobId) + nbiRequest.setServiceInfo(serviceInfo) + nbiRequest.setEsrInfo(esrInfo) - AllocateCnNssi allocateCnNssi = new AllocateCnNssi() - allocateCnNssi.setNsstId(execution.getVariable("nsstid")) - allocateCnNssi.setNssiName(execution.getVariable("nssiName")) - allocateCnNssi.setSliceProfile(cnSliceProfile) - allocateCnNssi.setNsiInfo(nsiInfo) - allocateCnNssi.setNssiId(nssiId) // need to check this - String cnScriptName = sliceTaskParams.getCnScriptName() - allocateCnNssi.setScriptName(cnScriptName) - request.setAllocateCnNssi(allocateCnNssi) - request.setEsrInfo(esrInfo) - break; - case "TN": - EsrInfo esrInfo = new EsrInfo() - esrInfo.setNetworkType(execution.getVariable("networkType")) - esrInfo.setVendor(execution.getVariable("vendor")) + String endpoint = String.format(NSSMF_QUERY_JOB_STATUS_URL, jobId) - TnSliceProfile tnSliceProfile = new TnSliceProfile() - tnSliceProfile.setLatency(execution.getVariable("latency")) - tnSliceProfile.setBandwidth(execution.getVariable("bandWidth")) + String response = + nssmfAdapterUtils.sendPostRequestNSSMF(execution, endpoint, objectMapper.writeValueAsString(nbiRequest)) - NsiInfo nsiInfo = new NsiInfo() - nsiInfo.setNsiId(execution.getVariable("nsiInstanceID")) - nsiInfo.setNsiName(execution.getVariable("nsiInstanceName")) + ResponseEntity responseEntity = objectMapper.readValue(response, ResponseEntity.class) + String result = responseEntity.getBody() + //todo;if success + ResponseDescriptor responseDescriptor = objectMapper.readValue(result, ResponseDescriptor.class) - AllocateTnNssi allocateTnNssi = new AllocateTnNssi() - allocateTnNssi.setSliceProfile(tnSliceProfile) - allocateTnNssi.setNsiInfo(nsiInfo) - allocateTnNssi.setNsstId(execution.getVariable("nsstid")) - String tnScriptName = sliceTaskParams.getTnScriptName() - allocateTnNssi.setScriptName(tnScriptName) - request.setAllocateTnNssi(allocateTnNssi) - request.setEsrInfo(esrInfo) - break; - default: - break; - } - try { - strRequest = MAPPER.writeValueAsString(request); - } catch (IOException e) { - logger.error("Invalid get progress request bean to convert as string"); - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Invalid get progress request bean to convert as string") - } - return strRequest + //todo: handle status + execution.setVariable("nssiAllocateResult", responseDescriptor) } - String buildNSSMFProgressRequest(DelegateExecution execution){ - JobStatusRequest request = new JobStatusRequest() - String strRequest = "" - EsrInfo esrInfo = execution.getVariable("esrInfo") - request.setNsiId(execution.getVariable("nsiServiceInstanceId")) - request.setNssiId(execution.getVariable("nssiId")) - request.setEsrInfo(esrInfo) - - try { - strRequest = MAPPER.writeValueAsString(request); - } catch (IOException e) { - logger.error("Invalid get progress request bean to convert as string"); - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Invalid get progress request bean to convert as string") - } - return strRequest + void prepareUpdateOrchestrationTask(DelegateExecution execution) { + //todo;update orchestration task } - public void prepareUpdateOrchestrationTask(DelegateExecution execution) { - logger.debug("Start prepareUpdateOrchestrationTask progress") - String requestMethod = "PUT" - String progress = execution.getVariable("nssmfProgress") - String status = execution.getVariable("nssmfStatus") - String statusDescription=execution.getVariable("nddmfStatusDescription") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - String domain = execution.getVariable("nsstDomain") - switch (domain.toUpperCase()) { - case "AN": - sliceTaskParams.setAnProgress(progress) - sliceTaskParams.setAnStatus(status) - sliceTaskParams.setAnStatusDescription(statusDescription) - break; - case "CN": - sliceTaskParams.setCnProgress(progress) - sliceTaskParams.setCnStatus(status) - sliceTaskParams.setCnStatusDescription(statusDescription) - break; - case "TN": - sliceTaskParams.setTnProgress(progress) - sliceTaskParams.setTnStatus(status) - sliceTaskParams.setTnStatusDescription(statusDescription) - break; - default: - break; - } - String paramJson = sliceTaskParams.convertToJson() - execution.setVariable("CSSOT_paramJson", paramJson) - execution.setVariable("CSSOT_requestMethod", requestMethod) - logger.debug("Finish prepareUpdateOrchestrationTask progress") + void timeDelay(DelegateExecution execution) { + //todo: time delay } } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSIV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSIV2.groovy deleted file mode 100644 index 05bb53a61e..0000000000 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoAllocateNSSIV2.groovy +++ /dev/null @@ -1,117 +0,0 @@ -package org.onap.so.bpmn.infrastructure.scripts - -import com.fasterxml.jackson.databind.ObjectMapper -import org.apache.commons.lang3.StringUtils -import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.so.beans.nsmf.SliceTaskInfo -import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.onap.so.bpmn.common.scripts.ExceptionUtil -import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils -import org.onap.so.bpmn.core.domain.ModelInfo -import org.onap.so.bpmn.core.domain.ServiceDecomposition -import org.onap.so.bpmn.core.json.JsonUtils -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -class DoAllocateNSSIV2 extends AbstractServiceTaskProcessor { - - private static final Logger logger = LoggerFactory.getLogger( DoAllocateNSSIV2.class); - private static final ObjectMapper MAPPER = new ObjectMapper(); - - ExceptionUtil exceptionUtil = new ExceptionUtil() - - JsonUtils jsonUtil = new JsonUtils() - - private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) - - @Override - void preProcessRequest(DelegateExecution execution) { - logger.trace("Enter preProcessRequest()") - -// String nssmfOperation -// -// String nsstInput = execution.getVariable("nsstInput") -// String modelUuid = jsonUtil.getJsonValue(nsstInput, "modelUuid") -// //modelUuid="2763777c-27bd-4df7-93b8-c690e23f4d3f" -// String nssiInstanceId = jsonUtil.getJsonValue(nsstInput, "serviceInstanceId") -// String serviceModelInfo = """{ -// "modelInvariantUuid":"", -// "modelUuid":"${modelUuid}", -// "modelVersion":"" -// }""" -// execution.setVariable("serviceModelInfo", serviceModelInfo) -// execution.setVariable("nssiInstanceId", nssiInstanceId) -// String nssiProfileID = UUID.randomUUID().toString() -// execution.setVariable("nssiProfileID", nssiProfileID) -// if(isBlank(nssiInstanceId)) -// { -// nssmfOperation="create" -// nssiInstanceId = UUID.randomUUID().toString() -// }else { -// nssmfOperation = "update" -// } -// execution.setVariable("nssmfOperation",nssmfOperation) -// execution.setVariable("nssiInstanceId",nssiInstanceId) -// -// def isNSSICreated = false -// execution.setVariable("isNSSICreated",isNSSICreated) -// -// int currentCycle = 0 -// execution.setVariable("currentCycle", currentCycle) - - - SliceTaskInfo sliceTaskInfo = execution.getVariable("sliceTaskInfo") as SliceTaskInfo - if (StringUtils.isBlank(sliceTaskInfo.suggestNssiId)) { - execution.setVariable("nssmfOperation", "create") - } else { - execution.setVariable("nssmfOperation", "update") - } - logger.trace("Exit preProcessRequest") - } - - /** - * prepare nssi request - * @param execution - */ - void prepareNSSIReq(DelegateExecution execution) { - - } - - void getNSSTInfo(DelegateExecution execution){ - logger.trace("Enter getNSSTInfo in DoAllocateNSSI()") - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - ModelInfo modelInfo = serviceDecomposition.getModelInfo() - String serviceRole = "nssi" - String nssiServiceInvariantUuid = serviceDecomposition.modelInfo.getModelInvariantUuid() - String nssiServiceUuid = serviceDecomposition.modelInfo.getModelUuid() - String nssiServiceType = serviceDecomposition.getServiceType() - String uuiRequest = execution.getVariable("uuiRequest") - String nssiServiceName = "nssi_"+jsonUtil.getJsonValue(uuiRequest, "service.name") - execution.setVariable("nssiServiceName",nssiServiceName) - execution.setVariable("nssiServiceType",nssiServiceType) - execution.setVariable("nssiServiceInvariantUuid",nssiServiceInvariantUuid) - execution.setVariable("nssiServiceUuid",nssiServiceUuid) - execution.setVariable("serviceRole",serviceRole) - - String content = serviceDecomposition.getServiceInfo().getServiceArtifact().get(0).getContent() - String nsstID = jsonUtil.getJsonValue(content, "metadata.id") - String nsstVendor = jsonUtil.getJsonValue(content, "metadata.vendor") - String nsstDomain = jsonUtil.getJsonValue(content, "metadata.domainType") - String nsstType = jsonUtil.getJsonValue(content, "metadata.type") - - execution.setVariable("nsstID",nsstID) - execution.setVariable("nsstVendor",nsstVendor) - execution.setVariable("nsstDomain",nsstDomain) - execution.setVariable("nssiServiceUuid",nssiServiceUuid) - execution.setVariable("nsstType",nsstType) - - String nsstContentInfo = """{ - "NsstID":"${nsstID}", - "Vendor":"${nsstVendor}", - "type":"${nsstType}" - }""" - - logger.trace("Exit getNSSTInfo in DoAllocateNSSI()") - } - -} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy index b71379449e..181e9d062a 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceInstance.groovy @@ -1,28 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.bpmn.infrastructure.scripts import org.onap.aai.domain.yang.AllottedResource - -import static org.apache.commons.lang3.StringUtils.*; - +import org.onap.aai.domain.yang.ServiceInstance +import org.onap.so.beans.nsmf.SliceTaskParamsAdapter import org.camunda.bpm.engine.delegate.BpmnError import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.aai.domain.yang.OwningEntity -import org.onap.aai.domain.yang.ServiceProfile; +import org.onap.aai.domain.yang.ServiceProfile import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.onap.so.bpmn.common.scripts.CatalogDbUtils -import org.onap.so.bpmn.common.scripts.CatalogDbUtilsFactory import org.onap.so.bpmn.common.scripts.ExceptionUtil -import org.onap.so.bpmn.common.scripts.MsoUtils -import org.onap.so.bpmn.common.scripts.SDNCAdapterUtils import org.onap.so.bpmn.core.RollbackData -import org.onap.so.bpmn.core.UrnPropertiesReader -import org.onap.so.bpmn.core.WorkflowException import org.onap.so.bpmn.core.domain.ModelInfo import org.onap.so.bpmn.core.domain.ServiceDecomposition -import org.onap.so.bpmn.core.domain.ServiceInstance import org.onap.so.bpmn.core.json.JsonUtils -import org.onap.so.bpmn.infrastructure.aai.groovyflows.AAICreateResources import org.onap.aaiclient.client.aai.AAIObjectType import org.onap.aaiclient.client.aai.AAIResourcesClient import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri @@ -34,13 +43,13 @@ import org.slf4j.LoggerFactory class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{ - private static final Logger logger = LoggerFactory.getLogger( DoCreateSliceServiceInstance.class); + private static final Logger logger = LoggerFactory.getLogger( DoCreateSliceServiceInstance.class) + JsonUtils jsonUtil = new JsonUtils() ExceptionUtil exceptionUtil = new ExceptionUtil() - CatalogDbUtils catalogDbUtils = new CatalogDbUtilsFactory().create() - + AAIResourcesClient client = getAAIClient() /** * Pre Process the BPMN Flow Request * Inclouds: @@ -48,86 +57,54 @@ class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{ * generate the nsParameters */ void preProcessRequest (DelegateExecution execution) { - String msg = "" logger.trace("Enter preProcessRequest()") - //Need update - //1. Prepare service parameter. - //2. Prepare slice profile parameters. + //here modelVersion is not set, we use modelUuid to decompose the service. + def isDebugLogEnabled = true + execution.setVariable("isDebugLogEnabled", isDebugLogEnabled) - String sliceserviceInstanceId = execution.getVariable("serviceInstanceId") - String allottedResourceId = UUID.randomUUID().toString() - execution.setVariable("sliceserviceInstanceId", sliceserviceInstanceId) - execution.setVariable("allottedResourceId", allottedResourceId) + logger.trace("Exit preProcessRequest") + } + + /** + * prepare decompose service profile instance template + * @param execution + */ + public void prepareDecomposeService(DelegateExecution execution) { String uuiRequest = execution.getVariable("uuiRequest") String modelInvariantUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceInvariantUuid") String modelUuid = jsonUtil.getJsonValue(uuiRequest, "service.serviceUuid") - //here modelVersion is not set, we use modelUuid to decompose the service. - def isDebugLogEnabled = true - execution.setVariable("serviceInstanceId",sliceserviceInstanceId) - execution.setVariable("isDebugLogEnabled",isDebugLogEnabled) String serviceModelInfo = """{ "modelInvariantUuid":"${modelInvariantUuid}", "modelUuid":"${modelUuid}", "modelVersion":"" }""" execution.setVariable("serviceModelInfo", serviceModelInfo) - - logger.trace("Exit preProcessRequest") } + /** + * create service-profile instance in aai + * @param execution + */ + void createServiceProfileInstance(DelegateExecution execution) { - void createServiceProfile(DelegateExecution execution) { - - String sliceserviceInstanceId = execution.getVariable("sliceserviceInstanceId") - Map<String, Object> serviceProfileMap = execution.getVariable("serviceProfile") - String serviceProfileID = UUID.randomUUID().toString() - ServiceProfile serviceProfile = new ServiceProfile(); - serviceProfile.setProfileId(serviceProfileID) - serviceProfile.setLatency(Integer.parseInt(serviceProfileMap.get("latency").toString())) - serviceProfile.setMaxNumberOfUEs(Integer.parseInt(serviceProfileMap.get("maxNumberofUEs").toString())) - serviceProfile.setCoverageAreaTAList(serviceProfileMap.get("coverageAreaTAList").toString()) - serviceProfile.setUeMobilityLevel(serviceProfileMap.get("uEMobilityLevel").toString()) - serviceProfile.setResourceSharingLevel(serviceProfileMap.get("resourceSharingLevel").toString()) - serviceProfile.setExpDataRateUL(Integer.parseInt(serviceProfileMap.get("expDataRateUL").toString())) - serviceProfile.setExpDataRateDL(Integer.parseInt(serviceProfileMap.get("expDataRateDL").toString())) - serviceProfile.setAreaTrafficCapUL(Integer.parseInt(serviceProfileMap.get("areaTrafficCapUL").toString())) - serviceProfile.setAreaTrafficCapDL(Integer.parseInt(serviceProfileMap.get("areaTrafficCapDL").toString())) - serviceProfile.setActivityFactor(Integer.parseInt(serviceProfileMap.get("activityFactor").toString())) - - serviceProfile.setJitter(0) - serviceProfile.setSurvivalTime(0) - serviceProfile.setCsAvailability(new Object()) - serviceProfile.setReliability(new Object()) - serviceProfile.setExpDataRate(0) - serviceProfile.setTrafficDensity(0) - serviceProfile.setConnDensity(0) - try { - AAIResourcesClient client = new AAIResourcesClient() - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE, execution.getVariable("globalSubscriberId"), - execution.getVariable("subscriptionServiceType"), sliceserviceInstanceId, serviceProfileID) - client.create(uri, serviceProfile) - - } catch (BpmnError e) { - throw e - } catch (Exception ex) { - String msg = "Exception in DoCreateSliceServiceInstance.instantiateSliceService. " + ex.getMessage() - logger.info(msg) - exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) - } - } - - void instantiateSliceService(DelegateExecution execution) { + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter - ServiceDecomposition serviceDecomposition= execution.getVariable("sliceServiceDecomposition") - String uuiRequest = execution.getVariable("uuiRequest") + ServiceDecomposition serviceDecomposition = + execution.getVariable("serviceProfileDecomposition") as ServiceDecomposition ModelInfo modelInfo = serviceDecomposition.getModelInfo() - String serviceRole = "e2eslice-service" + //String serviceRole = "e2eslice-service" + /** + * todo: ServiceProfile params changed + * todo: role + */ + String serviceRole = "service-profile" String serviceType = execution.getVariable("serviceType") - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") + Map<String, Object> serviceProfile = sliceParams.getServiceProfile() String ssInstanceId = execution.getVariable("serviceInstanceId") try { - org.onap.aai.domain.yang.ServiceInstance ss = new org.onap.aai.domain.yang.ServiceInstance() + ServiceInstance ss = new ServiceInstance() ss.setServiceInstanceId(ssInstanceId) String sliceInstanceName = execution.getVariable("serviceInstanceName") ss.setServiceInstanceName(sliceInstanceName) @@ -143,8 +120,11 @@ class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{ String snssai = serviceProfile.get("sNSSAI") ss.setEnvironmentContext(snssai) ss.setServiceRole(serviceRole) - AAIResourcesClient client = new AAIResourcesClient() - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, execution.getVariable("globalSubscriberId"), execution.getVariable("subscriptionServiceType"), ssInstanceId) + + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + ssInstanceId) client.create(uri, ss) } catch (BpmnError e) { throw e @@ -157,7 +137,7 @@ class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{ def rollbackData = execution.getVariable("RollbackData") if (rollbackData == null) { - rollbackData = new RollbackData(); + rollbackData = new RollbackData() } //rollbackData.put("SERVICEINSTANCE", "disableRollback", disableRollback.toString()) rollbackData.put("SERVICEINSTANCE", "rollbackAAI", "true") @@ -170,57 +150,100 @@ class DoCreateSliceServiceInstance extends AbstractServiceTaskProcessor{ } + /** + * create service profile in aai + * @param execution + */ + void createServiceProfile(DelegateExecution execution) { + + /** + * todo: ServiceProfile params changed + */ + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + Map<String, Object> serviceProfileMap = sliceParams.getServiceProfile() - void createAllottedResource(DelegateExecution execution) { - String serviceInstanceId = execution.getVariable('sliceserviceInstanceId') - - AAIResourcesClient resourceClient = new AAIResourcesClient() - AAIResourceUri ssServiceuri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, serviceInstanceId) - -// try { -// -// if(resourceClient.exists(ssServiceuri)){ -// execution.setVariable("ssi_resourceLink", uri.build().toString()) -// }else{ -// exceptionUtil.buildAndThrowWorkflowException(execution, 2500, "Service instance was not found in aai to " + -// "associate allotted resource for service :"+serviceInstanceId) -// } -// }catch(BpmnError e) { -// throw e; -// }catch (Exception ex){ -// String msg = "Exception in getServiceInstance. " + ex.getMessage() -// logger.debug(msg) -// exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) -// } + String serviceProfileInstanceId = execution.getVariable("serviceInstanceId") + String serviceProfileId = UUID.randomUUID().toString() + sliceParams.serviceProfile.put("profileId", serviceProfileId) + + ServiceProfile serviceProfile = new ServiceProfile() + serviceProfile.setProfileId(serviceProfileId) + serviceProfile.setLatency(Integer.parseInt(serviceProfileMap.get("latency").toString())) + serviceProfile.setMaxNumberOfUEs(Integer.parseInt(serviceProfileMap.get("maxNumberofUEs").toString())) + serviceProfile.setCoverageAreaTAList(serviceProfileMap.get("coverageAreaTAList").toString()) + serviceProfile.setUeMobilityLevel(serviceProfileMap.get("uEMobilityLevel").toString()) + serviceProfile.setResourceSharingLevel(serviceProfileMap.get("resourceSharingLevel").toString()) + serviceProfile.setExpDataRateUL(Integer.parseInt(serviceProfileMap.get("expDataRateUL").toString())) + serviceProfile.setExpDataRateDL(Integer.parseInt(serviceProfileMap.get("expDataRateDL").toString())) + serviceProfile.setAreaTrafficCapUL(Integer.parseInt(serviceProfileMap.get("areaTrafficCapUL").toString())) + serviceProfile.setAreaTrafficCapDL(Integer.parseInt(serviceProfileMap.get("areaTrafficCapDL").toString())) + serviceProfile.setActivityFactor(Integer.parseInt(serviceProfileMap.get("activityFactor").toString())) + + serviceProfile.setJitter(0) + serviceProfile.setSurvivalTime("0") + serviceProfile.setCsAvailability(new Object()) + serviceProfile.setReliability("") + serviceProfile.setExpDataRate(0) + serviceProfile.setTrafficDensity(0) + serviceProfile.setConnDensity(0) + try { + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_PROFILE, + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + serviceProfileInstanceId, + serviceProfileId) + client.create(uri, serviceProfile) + execution.setVariable("sliceTaskParams", sliceParams) + + } catch (BpmnError e) { + throw e + } catch (Exception ex) { + String msg = "Exception in DoCreateSliceServiceInstance.instantiateSliceService. " + ex.getMessage() + logger.info(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + } + + /** + * create allotted resource + * todo: unfinished + * @param execution + */ + public void createAllottedResource(DelegateExecution execution) { try { - String allottedResourceId = execution.getVariable("allottedResourceId") - ServiceDecomposition serviceDecomposition = execution.getVariable("sliceServiceDecomposition") + + ServiceDecomposition serviceDecomposition = + execution.getVariable("serviceProfileDecomposition") as ServiceDecomposition + List<org.onap.so.bpmn.core.domain.AllottedResource> allottedResourceList = serviceDecomposition.getAllottedResources() - for(org.onap.so.bpmn.core.domain.AllottedResource allottedResource : allottedResourceList) - { - //AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceFromParentURI(ssServiceuri, AAIObjectType.ALLOTTED_RESOURCE, allottedResourceId) + for(org.onap.so.bpmn.core.domain.AllottedResource allottedResource : allottedResourceList) { + String allottedResourceId = UUID.randomUUID().toString() + AAIResourceUri allottedResourceUri = AAIUriFactory.createResourceUri(AAIObjectType.ALLOTTED_RESOURCE, - execution.getVariable("globalSubscriberId"),execution.getVariable("subscriptionServiceType"), - execution.getVariable("sliceserviceInstanceId"), allottedResourceId) + execution.getVariable("globalSubscriberId"), + execution.getVariable("subscriptionServiceType"), + execution.getVariable("serviceInstanceId"), + allottedResourceId) + execution.setVariable("allottedResourceUri", allottedResourceUri) String arType = allottedResource.getAllottedResourceType() String arRole = allottedResource.getAllottedResourceRole() String modelInvariantId = allottedResource.getModelInfo().getModelInvariantUuid() String modelVersionId = allottedResource.getModelInfo().getModelUuid() - org.onap.aai.domain.yang.AllottedResource resource = new org.onap.aai.domain.yang.AllottedResource() + AllottedResource resource = new AllottedResource() resource.setId(allottedResourceId) resource.setType(arType) resource.setAllottedResourceName("Allotted_"+ execution.getVariable("serviceInstanceName")) resource.setRole(arRole) resource.setModelInvariantId(modelInvariantId) resource.setModelVersionId(modelVersionId) - getAAIClient().create(allottedResourceUri, resource) - //AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceFromExistingURI(AAIObjectType.SERVICE_INSTANCE, UriBuilder.fromPath(ssServiceuri).build()) - //getAAIClient().connect(allottedResourceUri,ssServiceuri) + + client.create(allottedResourceUri, resource) + } - //execution.setVariable("aaiARPath", allottedResourceUri.build().toString()); }catch (Exception ex) { exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "Exception in createAaiAR " + ex.getMessage()) diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy index 9b78afba03..5cde856251 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOption.groovy @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - # Copyright (c) 2019, CMCC Technologies Co., Ltd. + # Copyright (c) 2020, CMCC Technologies Co., Ltd. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. @@ -20,37 +20,36 @@ package org.onap.so.bpmn.infrastructure.scripts -import com.fasterxml.jackson.core.type.TypeReference import com.fasterxml.jackson.databind.ObjectMapper -import groovy.json.JsonSlurper import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.logging.filter.base.ONAPComponents +import org.onap.so.beans.nsmf.AnSliceProfile +import org.onap.so.beans.nsmf.CnSliceProfile +import org.onap.so.beans.nsmf.EsrInfo +import org.onap.so.beans.nsmf.NetworkType +import org.onap.so.beans.nsmf.NssmfAdapterNBIRequest import org.onap.so.beans.nsmf.SliceTaskParams +import org.onap.so.beans.nsmf.SliceTaskParamsAdapter +import org.onap.so.beans.nsmf.TnSliceProfile +import org.onap.so.beans.nsmf.oof.SubnetCapability +import org.onap.so.beans.nsmf.oof.SubnetType +import org.onap.so.beans.nsmf.oof.TemplateInfo import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils import org.onap.so.bpmn.common.scripts.OofUtils import org.onap.so.bpmn.core.UrnPropertiesReader +import org.onap.so.bpmn.core.domain.AllottedResource +import org.onap.so.bpmn.core.domain.ModelInfo import org.onap.so.bpmn.core.domain.ServiceDecomposition -import org.onap.so.bpmn.core.domain.ServiceProxy import org.onap.so.bpmn.core.json.JsonUtils -import org.onap.so.client.HttpClient -import org.onap.so.client.HttpClientFactory -import org.onap.aaiclient.client.aai.AAIObjectType -import org.onap.aaiclient.client.aai.AAIResourcesClient -import org.onap.aaiclient.client.aai.entities.AAIResultWrapper -import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri -import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory + import org.slf4j.Logger import org.slf4j.LoggerFactory - -import javax.ws.rs.NotFoundException -import javax.ws.rs.core.Response - -import static org.apache.commons.lang3.StringUtils.isBlank +import org.springframework.http.ResponseEntity class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{ - private static final Logger logger = LoggerFactory.getLogger( DoCreateSliceServiceOption.class) + private static final Logger logger = LoggerFactory.getLogger(DoCreateSliceServiceOption.class) ExceptionUtil exceptionUtil = new ExceptionUtil() @@ -58,426 +57,528 @@ class DoCreateSliceServiceOption extends AbstractServiceTaskProcessor{ OofUtils oofUtils = new OofUtils() - ObjectMapper objectMapper = new ObjectMapper() + private static final ObjectMapper objectMapper = new ObjectMapper() + + private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) + + private static final String QUERY_SUB_NET_CAPABILITY = "/api/rest/provMns/v1/NSS/subnetCapabilityQuery" + + private static final String QUERY_NSSI_SELECTION_CAPABILITY = "/api/rest/provMns/v1/NSS/NSSISelectionCapability" void preProcessRequest (DelegateExecution execution) { } + /** + * prepare the params for decompose nst + * @param execution + */ + public void prepareDecomposeNST(DelegateExecution execution) { - void prepareSelectNSIRequest(DelegateExecution execution) { + SliceTaskParamsAdapter sliceTaskParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter - String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) - logger.debug( "get NSI option OOF Url: " + urlString) - - boolean isNSISuggested = true - execution.setVariable("isNSISuggested",isNSISuggested) - String requestId = execution.getVariable("msoRequestId") - String messageType = "NSISelectionResponse" - - Map<String, Object> profileInfo = execution.getVariable("serviceProfile") - Map<String, Object> nstSolution = execution.getVariable("nstSolution") - logger.debug("Get NST selection from OOF: " + nstSolution.toString()) - String nstInfo = """{ - "modelInvariantId":"${nstSolution.invariantUUID}", - "modelVersionId":"${nstSolution.UUID}", - "modelName":"${nstSolution.NSTName}" - }""" - - execution.setVariable("nsiSelectionUrl", "/api/oof/selection/nsi/v1") - execution.setVariable("nsiSelection_messageType",messageType) - execution.setVariable("nsiSelection_correlator",requestId) - String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution); - execution.setVariable("nsiSelection_timeout",timeout) - String oofRequest = oofUtils.buildSelectNSIRequest(requestId, nstInfo,messageType, profileInfo) - execution.setVariable("nsiSelection_oofRequest",oofRequest) - logger.debug("Sending request to OOF: " + oofRequest) - } + String modelUuid = sliceTaskParams.getNSTInfo().getUUID() + String modelInvariantUuid = sliceTaskParams.getNSTInfo().getInvariantUUID() - void processOOFResponse(Response httpResponse, DelegateExecution execution) { - int responseCode = httpResponse.getStatus() - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - String OOFResponse = execution.getVariable("nsiSelection_oofResponse") - logger.debug("NSI OOFResponse is: " + OOFResponse) - execution.setVariable("OOFResponse", OOFResponse) - //This needs to be changed to derive a value when we add policy to decide the solution options. - Map OOFResponseObject = new JsonSlurper().parseText(OOFResponse) - Map solutions = OOFResponseObject.get("solutions") - - String resourceSharingLevel = execution.getVariable("resourceSharingLevel") - Boolean isSharable = resourceSharingLevel.equals("shared") - - if (solutions != null) { - if (isSharable && hasSharedNSIsolutions(solutions)) { - //sharedNSISolution - processSharedNSISolutions(solutions, execution) - } - else if(solutions.containsKey("newNSISolutions")) { - processNewNSISolutions(solutions, execution) - } - } - execution.setVariable("sliceTaskParams", sliceTaskParams) - logger.debug("sliceTaskParams: "+sliceTaskParams.convertToJson()) - logger.debug("*** Completed options Call to OOF ***") - //解析sliceProfile - logger.debug("start parseServiceProfile") - parseServiceProfile(execution) - logger.debug("end parseServiceProfile") + String serviceModelInfo = """{ + "modelInvariantUuid":"${modelInvariantUuid}", + "modelUuid":"${modelUuid}", + "modelVersion":"" + }""" + execution.setVariable("nstServiceModelInfo", serviceModelInfo) } - private boolean hasSharedNSIsolutions( Map solutions){ - if(solutions.containsKey("sharedNSISolutions")){ - List sharedNSIsolutions = solutions.get("sharedNSISolutions") - if (sharedNSIsolutions != null && !sharedNSIsolutions.isEmpty()) { - return true - } + /** + * process the result of NST Decomposition + * @param execution + */ + public void processDecompositionNST(DelegateExecution execution) { + + List<TemplateInfo> nsstInfos = new ArrayList<>() + ServiceDecomposition nstServiceDecomposition = + execution.getVariable("nstServiceDecomposition") as ServiceDecomposition + //todo: + List<AllottedResource> allottedResources = nstServiceDecomposition.getAllottedResources() + for (AllottedResource allottedResource : allottedResources) { + TemplateInfo nsstInfo = new TemplateInfo() + nsstInfo.setUUID(allottedResource.getProvidingServiceModelUuid()) + nsstInfo.setInvariantUUID(allottedResource.getProvidingServiceModelInvariantUuid()) + nsstInfo.setName(allottedResource.getProvidingServiceModelName()) + nsstInfos.add(nsstInfo) } - return false + execution.setVariable("nsstInfos", nsstInfos) + + execution.setVariable("maxNsstIndex", allottedResources.size() - 1) + execution.setVariable("currentNsstIndex", 0) + + List<ServiceDecomposition> nsstServiceDecompositions = new ArrayList<>() + execution.setVariable("nsstServiceDecompositions", nsstServiceDecompositions) } - private void processNewNSISolutions(Map solutions, DelegateExecution execution) { - int index = 0 - List<Map> newNSISolutions = solutions.get("newNSISolutions") - List<Map> NSSImap = new ArrayList<>() - if (newNSISolutions != null && newNSISolutions.size() > 0) { - NSSImap = newNSISolutions.get(index).get("NSSISolutions") as List<Map> - for (Map nssi : NSSImap) { - Map oofSliceProfile = nssi.get("sliceProfile") - String domain = oofSliceProfile.getOrDefault("domainType","") - logger.debug("OOF newNSISolutions SliceProfile: " +oofSliceProfile.toString()+",domain:${domain}") - if(null != domain){ - //TODO -// def nssiSolution = nssi.get("NSSISolution") as Map<String, ?> -// String nssiName = nssiSolution.getOrDefault("NSSIName", "") -// String nssiId = nssiSolution.getOrDefault("NSSIId", "") -// saveNSSIId(nssi, sliceTaskParams) - Map<String, Object> sliceProfile = getSliceProfile(domain, execution, oofSliceProfile) - saveSliceProfile(execution, domain, sliceProfile) - - } - } - } + /** + * prepare the params for decompose nsst + * @param execution + */ + public void prepareDecomposeNSST(DelegateExecution execution) { + + List<TemplateInfo> nsstInfos = execution.getVariable("nsstInfos") as List<TemplateInfo> + int index = execution.getVariable("currentNsstIndex") as Integer + + String modelUuid = nsstInfos.get(index).getUUID() + String modelInvariantUuid = nsstInfos.get(index).getInvariantUUID() + + String serviceModelInfo = """{ + "modelInvariantUuid":"${modelInvariantUuid}", + "modelUuid":"${modelUuid}", + "modelVersion":"" + }""" + execution.setVariable("nsstServiceModelInfo", serviceModelInfo) + } - private void processSharedNSISolutions(Map solutions, DelegateExecution execution) { - String nsiName, nsiInstanceId, nssiId, nssiName - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - - Map sharedNSIsolution = ((List) solutions.get("sharedNSISolutions"))?.get(0) - nsiInstanceId = sharedNSIsolution.getOrDefault("NSIId", "") - nsiName = sharedNSIsolution.getOrDefault("NSIName", "") - sliceTaskParams.setSuggestNsiId(nsiInstanceId) - sliceTaskParams.setSuggestNsiName(nsiName) - - //Temporary modification - List NSSIs = sharedNSIsolution.get("NSSIs") - for(Map nssi : NSSIs){ - Map oofSliceProfile = ((List)nssi.get("sliceProfile"))?.get(0) - String domain = oofSliceProfile.getOrDefault("domainType","") - nssiId = nssi.getOrDefault("NSSIId","") - nssiName = nssi.getOrDefault("NSSIName","") - saveNSSIId(domain, nssiId, nssiName,execution) - Map<String, Object> sliceProfile = getSliceProfile(domain, execution, oofSliceProfile) - saveSliceProfile(execution, domain, sliceProfile) - logger.debug("OOF sharedNSISolution SliceProfile:"+oofSliceProfile.toString()+",domain:${domain}") - logger.debug("OOF sharedNSISolution nsiInstanceId:${nsiInstanceId}, nsiName:${nsiName}, nssiId:${nssiId}, nssiName:${nssiName}") + /** + * process the result of NSST Decomposition + * @param execution + */ + public void processDecompositionNSST(DelegateExecution execution) { + + List<ServiceDecomposition> nsstServiceDecompositions = + execution.getVariable("nsstServiceDecompositions") as List<ServiceDecomposition> + + ServiceDecomposition nsstServiceDecomposition = + execution.getVariable("nsstServiceDecomposition") as ServiceDecomposition + + nsstServiceDecompositions.add(nsstServiceDecomposition) + + execution.setVariable("nsstServiceDecompositions", nsstServiceDecompositions) + + + + + int num = execution.getVariable("maxNsstIndex") as Integer + int index = execution.getVariable("currentNsstIndex") as Integer + + execution.setVariable("currentNsstIndex", index + 1) + + if (index >= num) { + execution.setVariable("nsstHandleContinue", false) + } else { + execution.setVariable("nsstHandleContinue", true) } + } - private void parseServiceProfile(DelegateExecution execution) { - logger.debug("Start parseServiceProfile") - String serviceType = execution.getVariable("serviceType") - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - // set sliceProfile for three domains - if(!sliceTaskParams.getSliceProfileAn()){ - Map<String, Object> sliceProfileAn = getSliceProfile( "AN", execution,null) - saveSliceProfile(execution,"AN",sliceProfileAn) - } + /** + * set nsst info to sliceTaskParams by type + * @param execution + */ + public void handleNsstByType(DelegateExecution execution) { + //todo: set to sliceTaskParams by type - if(!sliceTaskParams.getSliceProfileTn()){ - Map<String, Object> sliceProfileTn = getSliceProfile( "TN", execution,null) - saveSliceProfile(execution,"TN",sliceProfileTn) - } + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + List<ServiceDecomposition> nsstServiceDecompositions = + execution.getVariable("nsstServiceDecompositions") as List<ServiceDecomposition> + + List<SubnetCapability> subnetCapabilities = new ArrayList<>() + + + + for (ServiceDecomposition serviceDecomposition : nsstServiceDecompositions) { + //todo: + SubnetCapability subnetCapability = new SubnetCapability() - if(!sliceTaskParams.getSliceProfileCn()){ - Map<String, Object> sliceProfileCn = getSliceProfile( "CN", execution,null, ) - saveSliceProfile(execution,"CN",sliceProfileCn) + handleByType(execution, serviceDecomposition, sliceParams, subnetCapability) + + subnetCapabilities.add(subnetCapability) } - logger.debug("Finish parseServiceProfile") + execution.setVariable("sliceTaskParams", sliceParams) + execution.setVariable("subnetCapabilities", subnetCapabilities) } - private void saveSliceProfile(DelegateExecution execution, String domain, Map<String, Object> sliceProfile){ - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - if(domain.equalsIgnoreCase("AN")){ - execution.setVariable("sliceProfileAn", sliceProfile) - sliceTaskParams.setSliceProfileAn(sliceProfile) - logger.debug("sliceProfileAn: " + sliceProfile) + private void handleByType(DelegateExecution execution, ServiceDecomposition serviceDecomposition, + SliceTaskParamsAdapter sliceParams, SubnetCapability subnetCapability) { + //todo: + String domainType = "" + ModelInfo modelInfo = serviceDecomposition.getModelInfo() + String vendor = serviceDecomposition.getServiceRole() + SubnetType subnetType + + switch (domainType) { + case "tn_bh": + subnetType = SubnetType.TN_BH + sliceParams.tnBHSliceTaskInfo.vendor = vendor + sliceParams.tnBHSliceTaskInfo.subnetType = subnetType + sliceParams.tnBHSliceTaskInfo.networkType = subnetType.networkType + sliceParams.tnBHSliceTaskInfo.NSSTInfo.UUID = modelInfo.getModelUuid() + sliceParams.tnBHSliceTaskInfo.NSSTInfo.invariantUUID = modelInfo.getModelInvariantUuid() + sliceParams.tnBHSliceTaskInfo.NSSTInfo.name = modelInfo.getModelName() + + break + case "tn_mh": + subnetType = SubnetType.TN_MH + sliceParams.tnMHSliceTaskInfo.vendor = vendor + sliceParams.tnMHSliceTaskInfo.subnetType = subnetType + sliceParams.tnMHSliceTaskInfo.networkType = subnetType.networkType + sliceParams.tnMHSliceTaskInfo.NSSTInfo.UUID = modelInfo.getModelUuid() + sliceParams.tnMHSliceTaskInfo.NSSTInfo.invariantUUID = modelInfo.getModelInvariantUuid() + sliceParams.tnMHSliceTaskInfo.NSSTInfo.name = modelInfo.getModelName() + + break + case "an_nf": + subnetType = SubnetType.AN_NF + sliceParams.anSliceTaskInfo.vendor = vendor + sliceParams.anSliceTaskInfo.subnetType = subnetType + sliceParams.anSliceTaskInfo.networkType = subnetType.networkType + sliceParams.anSliceTaskInfo.NSSTInfo.UUID = modelInfo.getModelUuid() + sliceParams.anSliceTaskInfo.NSSTInfo.invariantUUID = modelInfo.getModelInvariantUuid() + sliceParams.anSliceTaskInfo.NSSTInfo.name = modelInfo.getModelName() + break + case "cn": + subnetType = SubnetType.CN + sliceParams.cnSliceTaskInfo.vendor = vendor + sliceParams.cnSliceTaskInfo.subnetType = subnetType + sliceParams.cnSliceTaskInfo.networkType = subnetType.networkType + sliceParams.cnSliceTaskInfo.NSSTInfo.UUID = modelInfo.getModelUuid() + sliceParams.cnSliceTaskInfo.NSSTInfo.invariantUUID = modelInfo.getModelInvariantUuid() + sliceParams.cnSliceTaskInfo.NSSTInfo.name = modelInfo.getModelName() + break + default: + subnetType = null + break + + //todo + } - else if(domain.equalsIgnoreCase("TN")){ - execution.setVariable("sliceProfileTn", sliceProfile) - sliceTaskParams.setSliceProfileTn(sliceProfile) - logger.debug("sliceProfileTn: " + sliceProfile) + if (subnetType == null) { + //todo: throw error + return } - else if(domain.equalsIgnoreCase("CN")){ - execution.setVariable("sliceProfileCn", sliceProfile) - sliceTaskParams.setSliceProfileCn(sliceProfile) - logger.debug("sliceProfileCn: " + sliceProfile) + String response = querySubnetCapability(execution, vendor, subnetType) + ResponseEntity responseEntity = objectMapper.readValue(response, ResponseEntity.class) + + Map<String, Object> result = responseEntity.getBody() as Map + for (Map.Entry<String, Object> entry : result.entrySet()) { + subnetCapability.setDomainType(entry.getKey()) + subnetCapability.setCapabilityDetails(entry.getValue()) } } - private void saveNSSIId(String domain, String nssiId, String nssiName, DelegateExecution execution) { - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - if(domain.equalsIgnoreCase("AN")){ - sliceTaskParams.setAnSuggestNssiId(nssiId) - sliceTaskParams.setAnSuggestNssiName(nssiName) - } - else if(domain.equalsIgnoreCase("CN")){ - sliceTaskParams.setCnSuggestNssiId(nssiId) - sliceTaskParams.setCnSuggestNssiName(nssiName) - } - else if(domain.equalsIgnoreCase("TN")){ - sliceTaskParams.setTnSuggestNssiId(nssiId) - sliceTaskParams.setTnSuggestNssiName(nssiName) - } + /** + * query Subnet Capability of TN AN CN + * @param execution + */ + private String querySubnetCapability(DelegateExecution execution, String vendor, SubnetType subnetType) { + + String strRequest = objectMapper.writeValueAsString(buildQuerySubnetCapRequest(vendor, subnetType)) + + String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_SUB_NET_CAPABILITY, strRequest) + return response } - private Map getSliceProfile(String domain, DelegateExecution execution, Map<String, Object> oofSliceProfile) { - String profileMapStr - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - Integer domainLatency = (Integer) serviceProfile.get("latency")/3 - - if(domain.equalsIgnoreCase("AN")){ - profileMapStr = """ { - "latency": ${domainLatency}, - "sNSSAI": "sNSSAI", - "uEMobilityLevel": "uEMobilityLevel", - "coverageAreaTAList": "coverageAreaTAList", - "5QI": 100 - }""" - } - else if(domain.equalsIgnoreCase("TN")){ - profileMapStr =""" { - "latency":${domainLatency}, - "sNSSAI":"sNSSAI", - "e2eLatency":"latency", - "bandwidth": 100 - }""" - } - else if(domain.equalsIgnoreCase("CN")){ - profileMapStr = """ { - "areaTrafficCapDL":"areaTrafficCapDL", - "maxNumberofUEs":"maxNumberofUEs", - "latency":${domainLatency}, - "expDataRateUL":"expDataRateUL", - "sNSSAI":"sNSSAI", - "areaTrafficCapUL":"areaTrafficCapUL", - "uEMobilityLevel":"uEMobilityLevel", - "expDataRateDL":"expDataRateDL", - "activityFactor":"activityFactor", - "resourceSharingLevel":"resourceSharingLevel" - }""" - } + /** + * build request body for querying Subnet Capability + * @param vendor + * @param subnetTypes + * @param networkType + * @return + */ + private static String buildQuerySubnetCapRequest(String vendor, SubnetType subnetType) { + NssmfAdapterNBIRequest request = new NssmfAdapterNBIRequest() + + List<String> subnetTypes = new ArrayList<>() + subnetTypes.add(subnetType.subnetType) + Map<String, Object> paramMap = new HashMap() + paramMap.put("subnetTypes", subnetTypes) + + request.setSubnetCapabilityQuery(objectMapper.writeValueAsString(paramMap)) + + EsrInfo esrInfo = new EsrInfo() + esrInfo.setVendor(vendor) + esrInfo.setNetworkType(subnetType.networkType) + + request.setEsrInfo(esrInfo) + + String strRequest = objectMapper.writeValueAsString(request) + + return strRequest + } + + /** + * todo: need rewrite + * prepare select nsi request + * @param execution + */ + public void preNSIRequest(DelegateExecution execution) { - logger.debug("Profile map for " + domain + " : " + profileMapStr) - Map<String, Object> profileMaps = objectMapper.readValue(profileMapStr.trim().replaceAll(" ", ""), new TypeReference<Map<String, String>>(){}) - Map<String, Object> sliceProfile = [:] - for (Map.Entry<String, String> profileMap : profileMaps) { - String key = profileMap.key - String value = profileMaps.get(key) - if(null != oofSliceProfile && oofSliceProfile.keySet().contains(key)){ - sliceProfile.put(key, oofSliceProfile.get(key)) - logger.debug("Get from oof, key:${key}, value: ${oofSliceProfile.get(key)}") + String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) + logger.debug( "get NSI option OOF Url: " + urlString) + + + String requestId = execution.getVariable("msoRequestId") + String messageType = "NSISelectionResponse" + + execution.setVariable("nsiSelectionUrl", "/api/oof/selection/nsi/v1") + execution.setVariable("nsiSelection_messageType", messageType) + execution.setVariable("nsiSelection_correlator", requestId) + String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution) + execution.setVariable("nsiSelection_timeout", timeout) + + SliceTaskParamsAdapter sliceParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + Map<String, Object> profileInfo = sliceParams.getServiceProfile() + TemplateInfo nstInfo = sliceParams.getNSTInfo() + + List<TemplateInfo> nsstInfos = execution.getVariable("nsstInfos") as List<TemplateInfo> + + List<SubnetCapability> subnetCapabilities = + execution.getVariable("subnetCapabilities") as List<SubnetCapability> + + String oofRequest = oofUtils.buildSelectNSIRequest(requestId, nstInfo, nsstInfos, + messageType, profileInfo, subnetCapabilities, timeout as Integer) + + execution.setVariable("nsiSelection_oofRequest", oofRequest) + logger.debug("Sending request to OOF: " + oofRequest) + } + + /** + * todo: need rewrite + * process select nsi response + * @param execution + */ + public void processNSIResp(DelegateExecution execution) { + + SliceTaskParamsAdapter sliceTaskParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + + String OOFResponse = execution.getVariable("nsiSelection_oofResponse") + logger.debug("NSI OOFResponse is: " + OOFResponse) + execution.setVariable("OOFResponse", OOFResponse) + //This needs to be changed to derive a value when we add policy to decide the solution options. + + Map<String, Object> resMap = objectMapper.readValue(OOFResponse, Map.class) + List<Map<String, Object>> nsiSolutions = (List<Map<String, Object>>) resMap.get("solutions") + Map<String, Object> solution = nsiSolutions.get(0) + + String resourceSharingLevel = execution.getVariable("resourceSharingLevel") + Boolean isSharable = resourceSharingLevel == "shared" + + if (solution != null) { + if (isSharable && solution.get("existingNSI")) { + //sharedNSISolution + processSharedNSI(solution, sliceTaskParams) } - else if(serviceProfile.keySet().contains(value)){ - sliceProfile.put(key, serviceProfile.get(value)) + else if(solution.containsKey("newNSISolution")) { + processNewNSI(solution, sliceTaskParams) } - else{ - sliceProfile.put(key, profileMaps.get(key)) + } + execution.setVariable("sliceTaskParams", sliceTaskParams) + //logger.debug("sliceTaskParams: " + sliceTaskParams.convertToJson()) + logger.debug("*** Completed options Call to OOF ***") + } + + private void processSharedNSI(Map<String, Object> solution, SliceTaskParamsAdapter sliceParams) { + Map<String, Object> sharedNSISolution = solution.get("sharedNSISolution") as Map + + String nsiId = sharedNSISolution.get("NSIId") + String nsiName = sharedNSISolution.get("NSIName") + sliceParams.setSuggestNsiId(nsiId) + sliceParams.setSuggestNsiName(nsiName) + } + + private void processNewNSI(Map<String, Object> solution, SliceTaskParamsAdapter sliceParams) { + Map<String, Object> newNSISolution = solution.get("newNSISolution") as Map + List<Map> sliceProfiles = newNSISolution.get("sliceProfiles") as List<Map> + for (Map sliceProfile : sliceProfiles) { + String domainType = sliceProfile.get("domainType") + switch (domainType.toLowerCase()) { + case "tn-bh": + sliceParams.tnBHSliceTaskInfo.sliceProfile = sliceProfile as TnSliceProfile + break + case "an-nf": + sliceParams.anSliceTaskInfo.sliceProfile = sliceProfile as AnSliceProfile + break + case "cn": + sliceParams.cnSliceTaskInfo.sliceProfile = sliceProfile as CnSliceProfile + break + default: + break } + + //todo + } - return sliceProfile } - void processDecomposition(DelegateExecution execution){ - logger.debug("Start processDecomposition") + /** + * get NSSI Selection Capability for AN + * @param execution + */ + public void getNSSISelectionCap4AN(DelegateExecution execution) { + + def vendor = execution.getVariable("vendor") as String + + String strRequest = buildNSSISelectionReq(vendor, NetworkType.ACCESS) - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - String nstName = serviceDecomposition.getModelInfo().getModelName() - String nstId = serviceDecomposition.getModelInfo().getModelUuid() - sliceTaskParams.setNstName(nstName) - sliceTaskParams.setNstId(nstId) + String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_NSSI_SELECTION_CAPABILITY, strRequest) - logger.debug("End processDecomposition") + Map<String, Object> resMap = objectMapper.readValue(response, Map.class) + + String selection = resMap.get("selection") + + + if ("NSMF".equalsIgnoreCase(selection)) { + execution.setVariable("NEED_AN_NSSI_SELECTION", true) + } } + /** + * get NSSI Selection Capability for TN + * @param execution + */ + public void getNSSISelectionCap4TN(DelegateExecution execution) { - void prepareNSTDecompose(DelegateExecution execution) { + def vendor = execution.getVariable("vendor") as String - String modelUuid = execution.getVariable("nstModelUuid") - String modelInvariantUuid = execution.getVariable("nstModelInvariantUuid") + String strRequest = buildNSSISelectionReq(vendor, NetworkType.TRANSPORT) - String serviceModelInfo = """{ - "modelInvariantUuid":"${modelInvariantUuid}", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("serviceModelInfo", serviceModelInfo) + String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_NSSI_SELECTION_CAPABILITY, strRequest) + + Map<String, Object> resMap = objectMapper.readValue(response, Map.class) + + String selection = resMap.get("selection") + + if ("NSMF".equalsIgnoreCase(selection)) { + execution.setVariable("NEED_TN_NSSI_SELECTION", true) + } } - void prepareNSSTDecompose(DelegateExecution execution) { - Boolean isMoreNSSTtoProcess = false - Integer maxNSST = execution.getVariable("maxNSST") - Integer currentNSST=execution.getVariable("currentNSST") - List<String> nsstModelUUIDList = new ArrayList<>() - nsstModelUUIDList = execution.getVariable("nsstModelUUIDList") - String modelUuid = nsstModelUUIDList.get(currentNSST) - String serviceModelInfo = """{ - "modelInvariantUuid":"", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("serviceModelInfo", serviceModelInfo) - currentNSST=currentNSST+1 - if(currentNSST<maxNSST) - isMoreNSSTtoProcess=true - execution.setVariable("isMoreNSSTtoProcess",isMoreNSSTtoProcess) - execution.setVariable("maxNSST",maxNSST) - execution.setVariable("currentNSST",currentNSST) + /** + * get NSSI Selection Capability for CN + * @param execution + */ + public void getNSSISelectionCap4CN(DelegateExecution execution) { + + def vendor = execution.getVariable("vendor") as String + + String strRequest = buildNSSISelectionReq(vendor, NetworkType.CORE) + + String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_NSSI_SELECTION_CAPABILITY, strRequest) + + Map<String, Object> resMap = objectMapper.readValue(response, Map.class) + + String selection = resMap.get("selection") + + if ("NSMF".equalsIgnoreCase(selection)) { + execution.setVariable("NEED_CN_NSSI_SELECTION", true) + } } + /** + * build NSSI Selection Capability Request body to nssmf adapter + * @param vendor + * @param networkType + * @return + */ + private static String buildNSSISelectionReq(String vendor, NetworkType networkType) { + NssmfAdapterNBIRequest request = new NssmfAdapterNBIRequest() + EsrInfo esrInfo = new EsrInfo() + esrInfo.setVendor(vendor) + esrInfo.setNetworkType(networkType) + request.setEsrInfo(esrInfo) + + return objectMapper.writeValueAsString(request) + } + + /** + * if exist nssi need to select? + * @param execution + */ + public void handleNssiSelect(DelegateExecution execution) { - void prepareNSSTlistfromNST(DelegateExecution execution) { - //Need to update this part from decomposition. - logger.trace("Enter prepareNSSTlistfromNST()") - Boolean isMoreNSSTtoProcess = false - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - String nstName = serviceDecomposition.getModelInfo().getModelName() - sliceTaskParams.setNstName(nstName) - String nstId = serviceDecomposition.getModelInfo().getModelUuid() - sliceTaskParams.setNstId(nstId) - execution.setVariable("sliceTaskParams",sliceTaskParams) - - List<ServiceProxy> proxyList = serviceDecomposition.getServiceProxy() - List<String> nsstModelUUIDList = new ArrayList<>() - for(ServiceProxy serviceProxy:proxyList) - nsstModelUUIDList.add(serviceProxy.getSourceModelUuid()) - execution.setVariable("nsstModelUUIDList",nsstModelUUIDList) - Integer maxNSST = nsstModelUUIDList.size() - Integer currentNSST=0 - execution.setVariable("maxNSST",maxNSST) - execution.setVariable("currentNSST",currentNSST) - if(currentNSST<maxNSST) - isMoreNSSTtoProcess=true - execution.setVariable("isMoreNSSTtoProcess",isMoreNSSTtoProcess) - logger.trace("Exit prepareNSSTlistfromNST()") + SliceTaskParamsAdapter sliceTaskParams = + execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter + //todo } - void getNSSTOption(DelegateExecution execution) { - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") + /** + * todo: need rewrite + * prepare select nssi request + * @param execution + */ + public void preNSSIRequest(DelegateExecution execution) { + String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String serviceType = execution.getVariable("subscriptionServiceType") - String nssiInstanceId ="" - String nssiName ="" - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") logger.debug( "get NSI option OOF Url: " + urlString) - boolean isNSISuggested = false - execution.setVariable("isNSISuggested",isNSISuggested) - - //Prepare auth for OOF - Begin - def authHeader = "" - String basicAuth = UrnPropertiesReader.getVariable("mso.oof.auth", execution) - String msokey = UrnPropertiesReader.getVariable("mso.msoKey", execution) - - String basicAuthValue = utils.encrypt(basicAuth, msokey) - if (basicAuthValue != null) { - logger.debug( "Obtained BasicAuth username and password for OOF: " + basicAuthValue) - try { - authHeader = utils.getBasicAuth(basicAuthValue, msokey) - execution.setVariable("BasicAuthHeaderValue", authHeader) - } catch (Exception ex) { - logger.debug( "Unable to encode username and password string: " + ex) - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - Unable to " + - "encode username and password string") - } - } else { - logger.debug( "Unable to obtain BasicAuth - BasicAuth value null") - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - BasicAuth " + - "value null") - } - //Prepare auth for OOF - End - //Prepare send request to OOF - Begin + + boolean isNSISuggested = true + execution.setVariable("isNSISuggested", isNSISuggested) String requestId = execution.getVariable("msoRequestId") - Map<String, Object> profileInfo = execution.getVariable("serviceProfile") - String nsstModelInvariantUuid = serviceDecomposition.getModelInfo().getModelInvariantUuid() - String nsstModelUuid = serviceDecomposition.getModelInfo().getModelUuid() - String nsstInfo = """"NSSTInfo": { - "invariantUUID":"${nsstModelInvariantUuid}", - "UUID":"${nsstModelUuid}" - }""" - String oofRequest = oofUtils.buildSelectNSSIRequest(execution, requestId, nsstInfo ,profileInfo) + String messageType = "NSISelectionResponse" + Map<String, Object> profileInfo = execution.getVariable("serviceProfile") as Map + Map<String, Object> nstSolution = execution.getVariable("nstSolution") as Map + logger.debug("Get NST selection from OOF: " + nstSolution.toString()) + String nstInfo = """{ + "modelInvariantId":"${nstSolution.invariantUUID}", + "modelVersionId":"${nstSolution.UUID}", + "modelName":"${nstSolution.NSTName}" + }""" - URL url = new URL(urlString+"/api/oof/v1/selectnssi") - HttpClient httpClient = new HttpClientFactory().newJsonClient(url, ONAPComponents.OOF) - httpClient.addAdditionalHeader("Authorization", authHeader) - Response httpResponse = httpClient.post(oofRequest) + execution.setVariable("nsiSelectionUrl", "/api/oof/selection/nsi/v1") + execution.setVariable("nsiSelection_messageType", messageType) + execution.setVariable("nsiSelection_correlator", requestId) + String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution) + execution.setVariable("nsiSelection_timeout", timeout) - int responseCode = httpResponse.getStatus() - logger.debug("OOF sync response code is: " + responseCode) + //todo + String oofRequest = oofUtils.buildSelectNSIRequest(requestId, nstInfo, messageType, profileInfo) - if(responseCode != 200){ - exceptionUtil.buildAndThrowWorkflowException(execution, responseCode, "Received a Bad Sync Response from OOF.") - } + execution.setVariable("nsiSelection_oofRequest", oofRequest) + logger.debug("Sending request to OOF: " + oofRequest) + } - if(httpResponse.hasEntity()){ - String OOFResponse = httpResponse.readEntity(String.class) - execution.setVariable("OOFResponse", OOFResponse) - nssiInstanceId = jsonUtil.getJsonValue(OOFResponse, "NSSIIInfo.NSSIID") - nssiName = jsonUtil.getJsonValue(OOFResponse, "NSSIInfo.NSSIName") - execution.setVariable("nssiInstanceId",nssiInstanceId) - execution.setVariable("nssiName",nssiName) - } - if(isBlank(nssiInstanceId)){ - logger.debug( "There is no valid NSST suggested by OOF.") - }else - { - try { - AAIResourcesClient resourceClient = new AAIResourcesClient() - AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, nssiInstanceId) - AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class) - Optional<org.onap.aai.domain.yang.ServiceInstance> si = wrapper.asBean(org.onap.aai.domain.yang.ServiceInstance.class) - org.onap.aai.domain.yang.ServiceInstance nssi = si.get() - - String domain = nssi.getEnvironmentContext().toString().toUpperCase() - switch (domain) { - case "AN": - sliceTaskParams.setAnSuggestNssiId(nssi.getServiceInstanceId()) - sliceTaskParams.setAnSuggestNssiName(nssi.getServiceInstanceName()) - break - case "CN": - sliceTaskParams.setCnSuggestNssiId(nssi.getServiceInstanceId()) - sliceTaskParams.setCnSuggestNssiName(nssi.getServiceInstanceName()) - break - case "TN": - sliceTaskParams.setTnSuggestNssiId(nssi.getServiceInstanceId()) - sliceTaskParams.setTnSuggestNssiName(nssi.getServiceInstanceName()) - break - default: - break - } - }catch(NotFoundException e) - { - logger.debug("NSSI Service Instance not found in AAI: " + nssiInstanceId) - }catch(Exception e) - { - logger.debug("NSSI Service Instance not found in AAI: " + nssiInstanceId) + /** + * process select nssi response + * todo: unfinished + * @param execution + */ + public void processNSSIResp(DelegateExecution execution) { + + SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") as SliceTaskParams + String OOFResponse = execution.getVariable("nsiSelection_oofResponse") + logger.debug("NSI OOFResponse is: " + OOFResponse) + execution.setVariable("OOFResponse", OOFResponse) + //This needs to be changed to derive a value when we add policy to decide the solution options. + + Map<String, Object> resMap = objectMapper.readValue(OOFResponse, Map.class) + List<Map<String, Object>> nsiSolutions = (List<Map<String, Object>>) resMap.get("solutions") + Map<String, Object> solutions = nsiSolutions.get(0) + + String resourceSharingLevel = execution.getVariable("resourceSharingLevel") + Boolean isSharable = resourceSharingLevel == "shared" + + if (solutions != null) { + if (isSharable && solutions.get("existingNSI")) { + //sharedNSISolution + //processSharedNSISolutions(solutions, execution) + } + else if(solutions.containsKey("newNSISolution")) { + //processNewNSISolutions(solutions, execution) } } - logger.debug("Prepare NSSI option completed ") + execution.setVariable("sliceTaskParams", sliceTaskParams) + logger.debug("sliceTaskParams: "+sliceTaskParams.convertToJson()) + logger.debug("*** Completed options Call to OOF ***") + + logger.debug("start parseServiceProfile") + //parseServiceProfile(execution) + logger.debug("end parseServiceProfile") } + + } diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOptionV2.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOptionV2.groovy deleted file mode 100644 index ca262172d0..0000000000 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoCreateSliceServiceOptionV2.groovy +++ /dev/null @@ -1,907 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP - SO - * ================================================================================ - # Copyright (c) 2019, CMCC Technologies Co., Ltd. - # - # 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.bpmn.infrastructure.scripts - -import com.fasterxml.jackson.core.type.TypeReference -import com.fasterxml.jackson.databind.ObjectMapper -import org.apache.commons.lang3.StringUtils -import org.camunda.bpm.engine.delegate.DelegateExecution -import org.onap.aai.domain.yang.ServiceInstance -import org.onap.aaiclient.client.aai.AAIObjectType -import org.onap.aaiclient.client.aai.AAIResourcesClient -import org.onap.aaiclient.client.aai.entities.AAIResultWrapper -import org.onap.aaiclient.client.aai.entities.uri.AAIResourceUri -import org.onap.aaiclient.client.aai.entities.uri.AAIUriFactory -import org.onap.logging.filter.base.ONAPComponents -import org.onap.so.beans.nsmf.* -import org.onap.so.beans.nsmf.oof.SubnetCapability -import org.onap.so.beans.nsmf.oof.TemplateInfo -import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor -import org.onap.so.bpmn.common.scripts.ExceptionUtil -import org.onap.so.bpmn.common.scripts.NssmfAdapterUtils -import org.onap.so.bpmn.common.scripts.OofUtils -import org.onap.so.bpmn.core.UrnPropertiesReader -import org.onap.so.bpmn.core.domain.ServiceDecomposition -import org.onap.so.bpmn.core.domain.ServiceProxy -import org.onap.so.bpmn.core.json.JsonUtils -import org.onap.so.client.HttpClient -import org.onap.so.client.HttpClientFactory -import org.slf4j.Logger -import org.slf4j.LoggerFactory - -import javax.ws.rs.NotFoundException -import javax.ws.rs.core.Response - -class DoCreateSliceServiceOptionV2 extends AbstractServiceTaskProcessor{ - - private static final Logger logger = LoggerFactory.getLogger( DoCreateSliceServiceOptionV2.class) - - ExceptionUtil exceptionUtil = new ExceptionUtil() - - JsonUtils jsonUtil = new JsonUtils() - - OofUtils oofUtils = new OofUtils() - - ObjectMapper objectMapper = new ObjectMapper() - - void preProcessRequest (DelegateExecution execution) { - } - - - /** - * prepare select nsi request - * @param execution - */ - void prepareSelectNSIRequest(DelegateExecution execution) { - - String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) - logger.debug( "get NSI option OOF Url: " + urlString) - - boolean isNSISuggested = true - execution.setVariable("isNSISuggested",isNSISuggested) - String requestId = execution.getVariable("msoRequestId") - String messageType = "NSISelectionResponse" - - Map<String, Object> profileInfo = execution.getVariable("serviceProfile") - Map<String, Object> nstSolution = execution.getVariable("nstSolution") - logger.debug("Get NST selection from OOF: " + nstSolution.toString()) - String nstInfo = """{ - "modelInvariantId":"${nstSolution.invariantUUID}", - "modelVersionId":"${nstSolution.UUID}", - "modelName":"${nstSolution.NSTName}" - }""" - - execution.setVariable("nsiSelectionUrl", "/api/oof/selection/nsi/v1") - execution.setVariable("nsiSelection_messageType",messageType) - execution.setVariable("nsiSelection_correlator",requestId) - String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution); - execution.setVariable("nsiSelection_timeout",timeout) - String oofRequest = oofUtils.buildSelectNSIRequest(requestId, nstInfo,messageType, profileInfo) - execution.setVariable("nsiSelection_oofRequest",oofRequest) - logger.debug("Sending request to OOF: " + oofRequest) - } - - /** - * process select nsi response - * @param execution - */ - void processOOFResponse(DelegateExecution execution) { - - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") as SliceTaskParams - String OOFResponse = execution.getVariable("nsiSelection_oofResponse") - logger.debug("NSI OOFResponse is: " + OOFResponse) - execution.setVariable("OOFResponse", OOFResponse) - //This needs to be changed to derive a value when we add policy to decide the solution options. - - Map<String, Object> resMap = objectMapper.readValue(OOFResponse, Map.class) - List<Map<String, Object>> nsiSolutions = (List<Map<String, Object>>) resMap.get("solutions") - Map<String, Object> solutions = nsiSolutions.get(0) - - String resourceSharingLevel = execution.getVariable("resourceSharingLevel") - Boolean isSharable = resourceSharingLevel == "shared" - - if (solutions != null) { - if (isSharable && solutions.get("existingNSI")) { - //sharedNSISolution - processSharedNSISolutions(solutions, execution) - } - else if(solutions.containsKey("newNSISolution")) { - processNewNSISolutions(solutions, execution) - } - } - execution.setVariable("sliceTaskParams", sliceTaskParams) - logger.debug("sliceTaskParams: "+sliceTaskParams.convertToJson()) - logger.debug("*** Completed options Call to OOF ***") - - logger.debug("start parseServiceProfile") - parseServiceProfile(execution) - logger.debug("end parseServiceProfile") - } - - - private void processNewNSISolutions(Map solutions, DelegateExecution execution) { - int index = 0 - List<Map> newNSISolutions = solutions.get("newNSISolution") - List<Map> NSSImap = new ArrayList<>() - if (newNSISolutions != null && newNSISolutions.size() > 0) { - NSSImap = newNSISolutions.get(index).get("NSSISolutions") as List<Map> - for (Map nssi : NSSImap) { - Map oofSliceProfile = nssi.get("sliceProfile") - String domain = oofSliceProfile.getOrDefault("domainType","") - logger.debug("OOF newNSISolutions SliceProfile: " +oofSliceProfile.toString()+",domain:${domain}") - if(null != domain){ - //TODO -// def nssiSolution = nssi.get("NSSISolution") as Map<String, ?> -// String nssiName = nssiSolution.getOrDefault("NSSIName", "") -// String nssiId = nssiSolution.getOrDefault("NSSIId", "") -// saveNSSIId(nssi, sliceTaskParams) - Map<String, Object> sliceProfile = getSliceProfile(domain, execution, oofSliceProfile) - saveSliceProfile(execution, domain, sliceProfile) - - } - } - } - } - - private void processSharedNSISolutions(Map solutions, DelegateExecution execution) { - String nsiName, nsiInstanceId, nssiId, nssiName - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - - Map sharedNSIsolution = ((List) solutions.get("sharedNSISolutions"))?.get(0) - nsiInstanceId = sharedNSIsolution.getOrDefault("NSIId", "") - nsiName = sharedNSIsolution.getOrDefault("NSIName", "") - sliceTaskParams.setSuggestNsiId(nsiInstanceId) - sliceTaskParams.setSuggestNsiName(nsiName) - - //Temporary modification - List NSSIs = sharedNSIsolution.get("NSSIs") - for(Map nssi : NSSIs){ - Map oofSliceProfile = ((List)nssi.get("sliceProfile"))?.get(0) - String domain = oofSliceProfile.getOrDefault("domainType","") - nssiId = nssi.getOrDefault("NSSIId","") - nssiName = nssi.getOrDefault("NSSIName","") - saveNSSIId(domain, nssiId, nssiName,execution) - Map<String, Object> sliceProfile = getSliceProfile(domain, execution, oofSliceProfile) - saveSliceProfile(execution, domain, sliceProfile) - logger.debug("OOF sharedNSISolution SliceProfile:"+oofSliceProfile.toString()+",domain:${domain}") - logger.debug("OOF sharedNSISolution nsiInstanceId:${nsiInstanceId}, nsiName:${nsiName}, nssiId:${nssiId}, nssiName:${nssiName}") - } - } - - private void parseServiceProfile(DelegateExecution execution) { - logger.debug("Start parseServiceProfile") - String serviceType = execution.getVariable("serviceType") - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - // set sliceProfile for three domains - if(!sliceTaskParams.getSliceProfileAn()){ - Map<String, Object> sliceProfileAn = getSliceProfile( "AN", execution,null) - saveSliceProfile(execution,"AN",sliceProfileAn) - } - - if(!sliceTaskParams.getSliceProfileTn()){ - Map<String, Object> sliceProfileTn = getSliceProfile( "TN", execution,null) - saveSliceProfile(execution,"TN",sliceProfileTn) - } - - if(!sliceTaskParams.getSliceProfileCn()){ - Map<String, Object> sliceProfileCn = getSliceProfile( "CN", execution,null, ) - saveSliceProfile(execution,"CN",sliceProfileCn) - } - - logger.debug("Finish parseServiceProfile") - } - - private void saveSliceProfile(DelegateExecution execution, String domain, Map<String, Object> sliceProfile){ - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - if(domain.equalsIgnoreCase("AN")){ - execution.setVariable("sliceProfileAn", sliceProfile) - sliceTaskParams.setSliceProfileAn(sliceProfile) - logger.debug("sliceProfileAn: " + sliceProfile) - } - else if(domain.equalsIgnoreCase("TN")){ - execution.setVariable("sliceProfileTn", sliceProfile) - sliceTaskParams.setSliceProfileTn(sliceProfile) - logger.debug("sliceProfileTn: " + sliceProfile) - } - else if(domain.equalsIgnoreCase("CN")){ - execution.setVariable("sliceProfileCn", sliceProfile) - sliceTaskParams.setSliceProfileCn(sliceProfile) - logger.debug("sliceProfileCn: " + sliceProfile) - } - } - - private void saveNSSIId(String domain, String nssiId, String nssiName, DelegateExecution execution) { - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - if(domain.equalsIgnoreCase("AN")){ - sliceTaskParams.setAnSuggestNssiId(nssiId) - sliceTaskParams.setAnSuggestNssiName(nssiName) - } - else if(domain.equalsIgnoreCase("CN")){ - sliceTaskParams.setCnSuggestNssiId(nssiId) - sliceTaskParams.setCnSuggestNssiName(nssiName) - } - else if(domain.equalsIgnoreCase("TN")){ - sliceTaskParams.setTnSuggestNssiId(nssiId) - sliceTaskParams.setTnSuggestNssiName(nssiName) - } - } - - private Map getSliceProfile(String domain, DelegateExecution execution, Map<String, Object> oofSliceProfile) { - String profileMapStr - Map<String, Object> serviceProfile = execution.getVariable("serviceProfile") - Integer domainLatency = (Integer) serviceProfile.get("latency")/3 - - if(domain.equalsIgnoreCase("AN")){ - profileMapStr = """ { - "latency": ${domainLatency}, - "sNSSAI": "sNSSAI", - "uEMobilityLevel": "uEMobilityLevel", - "coverageAreaTAList": "coverageAreaTAList", - "5QI": 100 - }""" - } - else if(domain.equalsIgnoreCase("TN")){ - profileMapStr =""" { - "latency":${domainLatency}, - "sNSSAI":"sNSSAI", - "e2eLatency":"latency", - "bandwidth": 100 - }""" - } - else if(domain.equalsIgnoreCase("CN")){ - profileMapStr = """ { - "areaTrafficCapDL":"areaTrafficCapDL", - "maxNumberofUEs":"maxNumberofUEs", - "latency":${domainLatency}, - "expDataRateUL":"expDataRateUL", - "sNSSAI":"sNSSAI", - "areaTrafficCapUL":"areaTrafficCapUL", - "uEMobilityLevel":"uEMobilityLevel", - "expDataRateDL":"expDataRateDL", - "activityFactor":"activityFactor", - "resourceSharingLevel":"resourceSharingLevel" - }""" - } - - logger.debug("Profile map for " + domain + " : " + profileMapStr) - Map<String, Object> profileMaps = objectMapper.readValue(profileMapStr.trim().replaceAll(" ", ""), new TypeReference<Map<String, String>>(){}) - Map<String, Object> sliceProfile = [:] - for (Map.Entry<String, String> profileMap : profileMaps) { - String key = profileMap.key - String value = profileMaps.get(key) - if(null != oofSliceProfile && oofSliceProfile.keySet().contains(key)){ - sliceProfile.put(key, oofSliceProfile.get(key)) - logger.debug("Get from oof, key:${key}, value: ${oofSliceProfile.get(key)}") - } - else if(serviceProfile.keySet().contains(value)){ - sliceProfile.put(key, serviceProfile.get(value)) - } - else{ - sliceProfile.put(key, profileMaps.get(key)) - } - } - return sliceProfile - } - - void processDecomposition(DelegateExecution execution){ - logger.debug("Start processDecomposition") - - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - String nstName = serviceDecomposition.getModelInfo().getModelName() - String nstId = serviceDecomposition.getModelInfo().getModelUuid() - sliceTaskParams.setNstName(nstName) - sliceTaskParams.setNstId(nstId) - - logger.debug("End processDecomposition") - } - - - void prepareNSTDecompose(DelegateExecution execution) { - - String modelUuid = execution.getVariable("nstModelUuid") - String modelInvariantUuid = execution.getVariable("nstModelInvariantUuid") - - String serviceModelInfo = """{ - "modelInvariantUuid":"${modelInvariantUuid}", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("serviceModelInfo", serviceModelInfo) - } - - void prepareNSSTDecompose(DelegateExecution execution) { - Boolean isMoreNSSTtoProcess = false - Integer maxNSST = execution.getVariable("maxNSST") - Integer currentNSST=execution.getVariable("currentNSST") - List<String> nsstModelUUIDList = new ArrayList<>() - nsstModelUUIDList = execution.getVariable("nsstModelUUIDList") - String modelUuid = nsstModelUUIDList.get(currentNSST) - String serviceModelInfo = """{ - "modelInvariantUuid":"", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("serviceModelInfo", serviceModelInfo) - currentNSST=currentNSST+1 - if(currentNSST<maxNSST) - isMoreNSSTtoProcess=true - execution.setVariable("isMoreNSSTtoProcess",isMoreNSSTtoProcess) - execution.setVariable("maxNSST",maxNSST) - execution.setVariable("currentNSST",currentNSST) - } - - - void prepareNSSTlistfromNST(DelegateExecution execution) { - //Need to update this part from decomposition. - logger.trace("Enter prepareNSSTlistfromNST()") - Boolean isMoreNSSTtoProcess = false - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - String nstName = serviceDecomposition.getModelInfo().getModelName() - sliceTaskParams.setNstName(nstName) - String nstId = serviceDecomposition.getModelInfo().getModelUuid() - sliceTaskParams.setNstId(nstId) - execution.setVariable("sliceTaskParams",sliceTaskParams) - - List<ServiceProxy> proxyList = serviceDecomposition.getServiceProxy() - List<String> nsstModelUUIDList = new ArrayList<>() - for(ServiceProxy serviceProxy:proxyList) - nsstModelUUIDList.add(serviceProxy.getSourceModelUuid()) - execution.setVariable("nsstModelUUIDList",nsstModelUUIDList) - Integer maxNSST = nsstModelUUIDList.size() - Integer currentNSST=0 - execution.setVariable("maxNSST",maxNSST) - execution.setVariable("currentNSST",currentNSST) - if(currentNSST<maxNSST) - isMoreNSSTtoProcess=true - execution.setVariable("isMoreNSSTtoProcess",isMoreNSSTtoProcess) - logger.trace("Exit prepareNSSTlistfromNST()") - - } - - void getNSSTOption(DelegateExecution execution) { - ServiceDecomposition serviceDecomposition= execution.getVariable("serviceDecomposition") - String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) - String globalSubscriberId = execution.getVariable("globalSubscriberId") - String serviceType = execution.getVariable("subscriptionServiceType") - String nssiInstanceId ="" - String nssiName ="" - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") - logger.debug( "get NSI option OOF Url: " + urlString) - boolean isNSISuggested = false - execution.setVariable("isNSISuggested",isNSISuggested) - - //Prepare auth for OOF - Begin - def authHeader = "" - String basicAuth = UrnPropertiesReader.getVariable("mso.oof.auth", execution) - String msokey = UrnPropertiesReader.getVariable("mso.msoKey", execution) - - String basicAuthValue = utils.encrypt(basicAuth, msokey) - if (basicAuthValue != null) { - logger.debug( "Obtained BasicAuth username and password for OOF: " + basicAuthValue) - try { - authHeader = utils.getBasicAuth(basicAuthValue, msokey) - execution.setVariable("BasicAuthHeaderValue", authHeader) - } catch (Exception ex) { - logger.debug( "Unable to encode username and password string: " + ex) - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - Unable to " + - "encode username and password string") - } - } else { - logger.debug( "Unable to obtain BasicAuth - BasicAuth value null") - exceptionUtil.buildAndThrowWorkflowException(execution, 401, "Internal Error - BasicAuth " + - "value null") - } - //Prepare auth for OOF - End - //Prepare send request to OOF - Begin - String requestId = execution.getVariable("msoRequestId") - Map<String, Object> profileInfo = execution.getVariable("serviceProfile") - String nsstModelInvariantUuid = serviceDecomposition.getModelInfo().getModelInvariantUuid() - String nsstModelUuid = serviceDecomposition.getModelInfo().getModelUuid() - String nsstInfo = """"NSSTInfo": { - "invariantUUID":"${nsstModelInvariantUuid}", - "UUID":"${nsstModelUuid}" - }""" - String oofRequest = oofUtils.buildSelectNSSIRequest(execution, requestId, nsstInfo ,profileInfo) - - - URL url = new URL(urlString+"/api/oof/v1/selectnssi") - HttpClient httpClient = new HttpClientFactory().newJsonClient(url, ONAPComponents.OOF) - httpClient.addAdditionalHeader("Authorization", authHeader) - Response httpResponse = httpClient.post(oofRequest) - - int responseCode = httpResponse.getStatus() - logger.debug("OOF sync response code is: " + responseCode) - - if(responseCode != 200){ - exceptionUtil.buildAndThrowWorkflowException(execution, responseCode, "Received a Bad Sync Response from OOF.") - } - - if(httpResponse.hasEntity()){ - String OOFResponse = httpResponse.readEntity(String.class) - execution.setVariable("OOFResponse", OOFResponse) - nssiInstanceId = jsonUtil.getJsonValue(OOFResponse, "NSSIIInfo.NSSIID") - nssiName = jsonUtil.getJsonValue(OOFResponse, "NSSIInfo.NSSIName") - execution.setVariable("nssiInstanceId",nssiInstanceId) - execution.setVariable("nssiName",nssiName) - } - if(StringUtils.isBlank(nssiInstanceId)){ - logger.debug( "There is no valid NSST suggested by OOF.") - }else - { - try { - AAIResourcesClient resourceClient = new AAIResourcesClient() - AAIResourceUri serviceInstanceUri = AAIUriFactory.createResourceUri(AAIObjectType.SERVICE_INSTANCE, globalSubscriberId, serviceType, nssiInstanceId) - AAIResultWrapper wrapper = resourceClient.get(serviceInstanceUri, NotFoundException.class) - Optional<ServiceInstance> si = wrapper.asBean(org.onap.aai.domain.yang.ServiceInstance.class) - org.onap.aai.domain.yang.ServiceInstance nssi = si.get() - - String domain = nssi.getEnvironmentContext().toString().toUpperCase() - switch (domain) { - case "AN": - sliceTaskParams.setAnSuggestNssiId(nssi.getServiceInstanceId()) - sliceTaskParams.setAnSuggestNssiName(nssi.getServiceInstanceName()) - break - case "CN": - sliceTaskParams.setCnSuggestNssiId(nssi.getServiceInstanceId()) - sliceTaskParams.setCnSuggestNssiName(nssi.getServiceInstanceName()) - break - case "TN": - sliceTaskParams.setTnSuggestNssiId(nssi.getServiceInstanceId()) - sliceTaskParams.setTnSuggestNssiName(nssi.getServiceInstanceName()) - break - default: - break - } - }catch(NotFoundException e) - { - logger.debug("NSSI Service Instance not found in AAI: " + nssiInstanceId) - }catch(Exception e) - { - logger.debug("NSSI Service Instance not found in AAI: " + nssiInstanceId) - } - } - logger.debug("Prepare NSSI option completed ") - } - - - /** - * new - */ - - private static final ObjectMapper MAPPER = new ObjectMapper() - - private NssmfAdapterUtils nssmfAdapterUtils = new NssmfAdapterUtils(httpClientFactory, jsonUtil) - - private static final String QUERY_SUB_NET_CAPABILITY = "/api/rest/provMns/v1/NSS/subnetCapabilityQuery" - - private static final String QUERY_NSSI_SELECTION_CAPABILITY = "/api/rest/provMns/v1/NSS/NSSISelectionCapability" - - /** - * query Subnet Capability of TN - * @param execution - */ - public void queryTNSubnetCapability(DelegateExecution execution) { - - String vendor = execution.getVariable("vendor") - - List<String> subnetTypes = new ArrayList<>() - subnetTypes.add("TN_FH") - subnetTypes.add("TN_MH") - subnetTypes.add("TN_BH") - - String strRequest = MAPPER.writeValueAsString( - buildQuerySubnetCapRequest(vendor, subnetTypes, NetworkType.TRANSPORT)) - - String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_SUB_NET_CAPABILITY, strRequest) - execution.setVariable("subnetCapabilityOfTN", response) - } - - /** - * query Subnet Capability of CN - * @param execution - */ - public void queryCNSubnetCapability(DelegateExecution execution) { - - String vendor = execution.getVariable("vendor") - - List<String> subnetTypes = new ArrayList<>() - subnetTypes.add("CN") - - String strRequest = MAPPER.writeValueAsString(buildQuerySubnetCapRequest(vendor, subnetTypes, NetworkType.CORE)) - - String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_SUB_NET_CAPABILITY, strRequest) - - execution.setVariable("subnetCapabilityOfCN", response) - } - - /** - * query Subnet Capability of AN - * @param execution - */ - public void queryANSubnetCapability(DelegateExecution execution) { - - String vendor = execution.getVariable("vendor") - - List<String> subnetTypes = new ArrayList<>() - subnetTypes.add("AN-NF") - - String strRequest = MAPPER.writeValueAsString(buildQuerySubnetCapRequest(vendor, subnetTypes, NetworkType.ACCESS)) - - String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_SUB_NET_CAPABILITY, strRequest) - - execution.setVariable("subnetCapabilityOfAN", response) - } - - /** - * build request body for querying Subnet Capability - * @param vendor - * @param subnetTypes - * @param networkType - * @return - */ - private static String buildQuerySubnetCapRequest(String vendor, List<String> subnetTypes, NetworkType networkType) { - NssmfAdapterNBIRequest request = new NssmfAdapterNBIRequest() - - Map<String, Object> paramMap = new HashMap() - paramMap.put("subnetTypes", subnetTypes) - - request.setSubnetCapabilityQuery(MAPPER.writeValueAsString(paramMap)) - - EsrInfo esrInfo = new EsrInfo() - esrInfo.setVendor(vendor) - esrInfo.setNetworkType(networkType) - - request.setEsrInfo(esrInfo) - - String strRequest = MAPPER.writeValueAsString(request) - - return strRequest - } - - /** - * handle response of Subnet Capability, generate SubnetCapabilities Info for request to oof - * @param execution - */ - public void generateSubnetCapabilities(DelegateExecution execution) { - //todo: - execution.setVariable("subnetCapabilities", []) - } - - /** - * prepare the params for decompose nst - * @param execution - */ - public void prepareDecomposeNST(DelegateExecution execution) { - - String modelUuid = execution.getVariable("nstModelUuid") - String modelInvariantUuid = execution.getVariable("nstModelInvariantUuid") - - String serviceModelInfo = """{ - "modelInvariantUuid":"${modelInvariantUuid}", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("nstServiceModelInfo", serviceModelInfo) - } - - /** - * process the result of NST Decomposition - * @param execution - */ - public void processDecompositionNST(DelegateExecution execution) { - - ServiceDecomposition nstServiceDecomposition = execution.getVariable("nstServiceDecomposition") - //todo: - - } - - - /** - * prepare the params for decompose nsst - * @param execution - */ - public void prepareDecomposeNSST(DelegateExecution execution) { - Boolean isMoreNSSTtoProcess = false - def maxNSST = execution.getVariable("maxNSST") as Integer - def currentNSST = execution.getVariable("currentNSST") as Integer - def nsstModelUUIDList = execution.getVariable("nsstModelUUIDList") as List - String modelUuid = nsstModelUUIDList.get(currentNSST) - String serviceModelInfo = """{ - "modelInvariantUuid":"", - "modelUuid":"${modelUuid}", - "modelVersion":"" - }""" - execution.setVariable("nsstServiceModelInfo", serviceModelInfo) - currentNSST = currentNSST + 1 - - if(currentNSST < maxNSST) { - isMoreNSSTtoProcess = true - } - - execution.setVariable("isMoreNSSTtoProcess", isMoreNSSTtoProcess) - execution.setVariable("maxNSST", maxNSST) - execution.setVariable("currentNSST", currentNSST) - - //todo: - } - - /** - * process the result of NSST Decomposition - * @param execution - */ - public void processDecompositionNSST(DelegateExecution execution) { - ServiceDecomposition nsstServiceDecomposition = execution.getVariable("nsstServiceDecomposition") - //todo: - } - - /** - * todo: need rewrite - * prepare select nsi request - * @param execution - */ - public void preNSIRequest(DelegateExecution execution) { - - String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) - logger.debug( "get NSI option OOF Url: " + urlString) - - boolean isNSISuggested = true - execution.setVariable("isNSISuggested", isNSISuggested) - String requestId = execution.getVariable("msoRequestId") - String messageType = "NSISelectionResponse" - - ServiceProfile profileInfo = execution.getVariable("serviceProfile") as ServiceProfile - Map<String, Object> nstSolution = execution.getVariable("nstSolution") as Map - logger.debug("Get NST selection from OOF: " + nstSolution.toString()) - - execution.setVariable("nsiSelectionUrl", "/api/oof/selection/nsi/v1") - execution.setVariable("nsiSelection_messageType", messageType) - execution.setVariable("nsiSelection_correlator", requestId) - String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution) - execution.setVariable("nsiSelection_timeout", timeout) - - - TemplateInfo nstInfo = new TemplateInfo() - nstInfo.setInvariantUUID(nstSolution.get("invariantUUID") as String) - nstInfo.setUUID(nstSolution.get("UUID") as String) - nstInfo.setName(nstSolution.get("NSTName") as String) - - execution.setVariable("NSTInfo", nstInfo) - - List<TemplateInfo> nsstInfos = execution.getVariable("NSSTInfos") as List<TemplateInfo> - - List<SubnetCapability> subnetCapabilities = execution.getVariable("subnetCapabilities") as List<SubnetCapability> - - String oofRequest = oofUtils.buildSelectNSIRequest(requestId, nstInfo, nsstInfos, - messageType, profileInfo, subnetCapabilities, timeout as Integer) - - execution.setVariable("nsiSelection_oofRequest", oofRequest) - logger.debug("Sending request to OOF: " + oofRequest) - } - - /** - * todo: need rewrite - * process select nsi response - * @param execution - */ - public void processNSIResp(DelegateExecution execution) { - - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") as SliceTaskParams - String OOFResponse = execution.getVariable("nsiSelection_oofResponse") - logger.debug("NSI OOFResponse is: " + OOFResponse) - execution.setVariable("OOFResponse", OOFResponse) - //This needs to be changed to derive a value when we add policy to decide the solution options. - - Map<String, Object> resMap = objectMapper.readValue(OOFResponse, Map.class) - List<Map<String, Object>> nsiSolutions = (List<Map<String, Object>>) resMap.get("solutions") - Map<String, Object> solutions = nsiSolutions.get(0) - - String resourceSharingLevel = execution.getVariable("resourceSharingLevel") - Boolean isSharable = resourceSharingLevel == "shared" - - if (solutions != null) { - if (isSharable && solutions.get("existingNSI")) { - //sharedNSISolution - processSharedNSISolutions(solutions, execution) - } - else if(solutions.containsKey("newNSISolution")) { - processNewNSISolutions(solutions, execution) - } - } - execution.setVariable("sliceTaskParams", sliceTaskParams) - logger.debug("sliceTaskParams: " + sliceTaskParams.convertToJson()) - logger.debug("*** Completed options Call to OOF ***") - - logger.debug("start parseServiceProfile") - parseServiceProfile(execution) - logger.debug("end parseServiceProfile") - } - - /** - * get NSSI Selection Capability for AN - * @param execution - */ - public void getNSSISelectionCap4AN(DelegateExecution execution) { - - def vendor = execution.getVariable("vendor") as String - - String strRequest = buildNSSISelectionReq(vendor, NetworkType.ACCESS) - - String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_NSSI_SELECTION_CAPABILITY, strRequest) - - Map<String, Object> resMap = objectMapper.readValue(response, Map.class) - - String selection = resMap.get("selection") - - - if ("NSMF".equalsIgnoreCase(selection)) { - execution.setVariable("NEED_AN_NSSI_SELECTION", true) - } - } - - /** - * get NSSI Selection Capability for TN - * @param execution - */ - public void getNSSISelectionCap4TN(DelegateExecution execution) { - - def vendor = execution.getVariable("vendor") as String - - String strRequest = buildNSSISelectionReq(vendor, NetworkType.TRANSPORT) - - String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_NSSI_SELECTION_CAPABILITY, strRequest) - - Map<String, Object> resMap = objectMapper.readValue(response, Map.class) - - String selection = resMap.get("selection") - - if ("NSMF".equalsIgnoreCase(selection)) { - execution.setVariable("NEED_TN_NSSI_SELECTION", true) - } - } - - /** - * get NSSI Selection Capability for CN - * @param execution - */ - public void getNSSISelectionCap4CN(DelegateExecution execution) { - - def vendor = execution.getVariable("vendor") as String - - String strRequest = buildNSSISelectionReq(vendor, NetworkType.CORE) - - String response = nssmfAdapterUtils.sendPostRequestNSSMF(execution, QUERY_NSSI_SELECTION_CAPABILITY, strRequest) - - Map<String, Object> resMap = objectMapper.readValue(response, Map.class) - - String selection = resMap.get("selection") - - if ("NSMF".equalsIgnoreCase(selection)) { - execution.setVariable("NEED_CN_NSSI_SELECTION", true) - } - } - - /** - * build NSSI Selection Capability Request body to nssmf adapter - * @param vendor - * @param networkType - * @return - */ - private static String buildNSSISelectionReq(String vendor, NetworkType networkType) { - NssmfAdapterNBIRequest request = new NssmfAdapterNBIRequest() - EsrInfo esrInfo = new EsrInfo() - esrInfo.setVendor(vendor) - esrInfo.setNetworkType(networkType) - request.setEsrInfo(esrInfo) - - return MAPPER.writeValueAsString(request) - } - - /** - * if exist nssi need to select? - * @param execution - */ - public void handleNssiSelect(DelegateExecution execution) { - - SliceTaskParamsAdapter sliceTaskParams = - execution.getVariable("sliceTaskParams") as SliceTaskParamsAdapter - - execution.setVariable() - } - - /** - * todo: need rewrite - * prepare select nssi request - * @param execution - */ - public void preNSSIRequest(DelegateExecution execution) { - - String urlString = UrnPropertiesReader.getVariable("mso.oof.endpoint", execution) - logger.debug( "get NSI option OOF Url: " + urlString) - - boolean isNSISuggested = true - execution.setVariable("isNSISuggested", isNSISuggested) - String requestId = execution.getVariable("msoRequestId") - String messageType = "NSISelectionResponse" - - Map<String, Object> profileInfo = execution.getVariable("serviceProfile") as Map - Map<String, Object> nstSolution = execution.getVariable("nstSolution") as Map - logger.debug("Get NST selection from OOF: " + nstSolution.toString()) - String nstInfo = """{ - "modelInvariantId":"${nstSolution.invariantUUID}", - "modelVersionId":"${nstSolution.UUID}", - "modelName":"${nstSolution.NSTName}" - }""" - - execution.setVariable("nsiSelectionUrl", "/api/oof/selection/nsi/v1") - execution.setVariable("nsiSelection_messageType", messageType) - execution.setVariable("nsiSelection_correlator", requestId) - String timeout = UrnPropertiesReader.getVariable("mso.adapters.oof.timeout", execution) - execution.setVariable("nsiSelection_timeout", timeout) - - //todo - String oofRequest = oofUtils.buildSelectNSIRequest(requestId, nstInfo, messageType, profileInfo) - - execution.setVariable("nsiSelection_oofRequest", oofRequest) - logger.debug("Sending request to OOF: " + oofRequest) - } - - /** - * process select nssi response - * @param execution - */ - public void processNSSIResp(DelegateExecution execution) { - - SliceTaskParams sliceTaskParams = execution.getVariable("sliceTaskParams") as SliceTaskParams - String OOFResponse = execution.getVariable("nsiSelection_oofResponse") - logger.debug("NSI OOFResponse is: " + OOFResponse) - execution.setVariable("OOFResponse", OOFResponse) - //This needs to be changed to derive a value when we add policy to decide the solution options. - - Map<String, Object> resMap = objectMapper.readValue(OOFResponse, Map.class) - List<Map<String, Object>> nsiSolutions = (List<Map<String, Object>>) resMap.get("solutions") - Map<String, Object> solutions = nsiSolutions.get(0) - - String resourceSharingLevel = execution.getVariable("resourceSharingLevel") - Boolean isSharable = resourceSharingLevel == "shared" - - if (solutions != null) { - if (isSharable && solutions.get("existingNSI")) { - //sharedNSISolution - processSharedNSISolutions(solutions, execution) - } - else if(solutions.containsKey("newNSISolution")) { - processNewNSISolutions(solutions, execution) - } - } - execution.setVariable("sliceTaskParams", sliceTaskParams) - logger.debug("sliceTaskParams: "+sliceTaskParams.convertToJson()) - logger.debug("*** Completed options Call to OOF ***") - - logger.debug("start parseServiceProfile") - parseServiceProfile(execution) - logger.debug("end parseServiceProfile") - } - - -} diff --git a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceServiceTest.groovy b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceServiceTest.groovy index 46f061d89c..01f4d6b97b 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceServiceTest.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/test/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSliceServiceTest.groovy @@ -160,45 +160,6 @@ class CreateSliceServiceTest extends MsoGroovyTest { } @Test - void testPrepareDecomposeService() { - when(mockExecution.getVariable("uuiRequest")).thenReturn(uuiRequest) - when(mockExecution.getVariable("serviceProfile")).thenReturn(serviceProfile) - CreateSliceService sliceService = new CreateSliceService() - sliceService.prepareDecomposeService(mockExecution) - - String serviceModelInfoExcept = """{ - "modelInvariantUuid":"123456", - "modelUuid":"123456", - "modelVersion":"" - }""" - Mockito.verify(mockExecution, times(1)).setVariable(eq("ssServiceModelInfo"), captor.capture()) - String serviceModelInfo = captor.getValue() - assertEquals(serviceModelInfoExcept.replaceAll("\\s+", ""), - serviceModelInfo.replaceAll("\\s+", "")) - } - - @Test - void testProcessDecomposition() { - when(mockExecution.getVariable("uuiRequest")).thenReturn(uuiRequest) - when(mockExecution.getVariable("serviceProfile")).thenReturn(serviceProfile) - when(mockExecution.getVariable("nstSolution")).thenReturn(nstSolution) - - CreateSliceService sliceService = new CreateSliceService() - sliceService.processDecomposition(mockExecution) - - Mockito.verify(mockExecution, times(1)).setVariable(eq("subscriptionServiceType"), captor.capture()) - assertEquals(captor.getValue(), "5G") - Mockito.verify(mockExecution, times(1)).setVariable(eq("serviceType"), captor.capture()) - assertEquals(captor.getValue(), "embb") - Mockito.verify(mockExecution, times(1)).setVariable(eq("resourceSharingLevel"), captor.capture()) - assertEquals(captor.getValue(), "shared") - Mockito.verify(mockExecution, times(1)).setVariable(eq("nstModelUuid"), captor.capture()) - assertEquals(captor.getValue(), "aaaaaa") - Mockito.verify(mockExecution, times(1)).setVariable(eq("nstModelInvariantUuid"), captor.capture()) - assertEquals(captor.getValue(), "bbbbbb") - } - - @Test void testPrepareCreateOrchestrationTask() { when(mockExecution.getVariable("serviceInstanceId")).thenReturn("123456") when(mockExecution.getVariable("serviceInstanceName")).thenReturn("test") diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn index 27bd01bda9..60d7355a9c 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/process/CreateSliceService.bpmn @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1wio50w" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.1.1"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1wio50w" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> <bpmn:process id="CreateSliceService" name="CreateSliceService" isExecutable="true"> <bpmn:startEvent id="StartEvent_1nbljfd" name="Create Slice Service Creation Flow"> <bpmn:outgoing>SequenceFlow_03s744c</bpmn:outgoing> </bpmn:startEvent> <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0vilb24" name="Waiting for confirmation"> - <bpmn:outgoing>SequenceFlow_1fk37v7</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_060j650</bpmn:outgoing> <bpmn:linkEventDefinition id="LinkEventDefinition_197u5pe" name="WaitingForConfirmation" /> </bpmn:intermediateCatchEvent> <bpmn:scriptTask id="ScriptTask_1tc44ge" name="PreProcess Incoming Request" scriptFormat="groovy"> @@ -16,7 +16,7 @@ def css= new CreateSliceService() css.preProcessRequest(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:scriptTask id="ScriptTask_1jgtb0y" name="Process User Options" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1cv0wop</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1whq7vc</bpmn:incoming> <bpmn:outgoing>SequenceFlow_197cm2e</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def css = new CreateSliceService() @@ -27,50 +27,27 @@ css.processUserOptions(execution)</bpmn:script> <bpmn:outgoing>SequenceFlow_12t5exy</bpmn:outgoing> <bpmn:outgoing>SequenceFlow_038lb9m</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:scriptTask id="ScriptTask_0l3d1ai" name="Process Decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1t19ips</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0jrclmc</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def css = new CreateSliceService() -css.processDecomposition(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1eo3m4q" name="Prepare NST Selection" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_046irye</bpmn:incoming> - <bpmn:outgoing>Flow_1l8mfej</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def css = new CreateSliceService() -css.prepareSelectNSTRequest(execution)</bpmn:script> - </bpmn:scriptTask> <bpmn:callActivity id="CallActivity_139l55g" name="Call DoCreateSliceServiceInstance " calledElement="DoCreateSliceServiceInstance"> <bpmn:extensionElements> <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> <camunda:in source="serviceInstanceName" target="serviceInstanceName" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> - <camunda:in source="productFamilyId" target="productFamilyId" /> - <camunda:in source="serviceInputParams" target="serviceInputParams" /> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> <camunda:in source="serviceType" target="serviceType" /> <camunda:in source="uuiRequest" target="uuiRequest" /> - <camunda:in source="requestAction" target="operationType" /> <camunda:in source="operationId" target="operationId" /> - <camunda:in source="serviceProfile" target="serviceProfile" /> - <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> - <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> - <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> - <camunda:in source="sliceServiceDecomposition" target="sliceServiceDecomposition" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="rollbackData" target="rollbackData" /> <camunda:out source="rolledBack" target="rolledBack" /> - <camunda:out source="allottedResourceId" target="allottedResourceId" /> <camunda:out source="serviceInstanceData" target="serviceInstanceData" /> + <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1p8vxo5</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1g8m7tq</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_1dfon41</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0jhqtls</bpmn:outgoing> </bpmn:callActivity> <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1v96asi" name="Goto Waiting for Confirmation"> - <bpmn:incoming>SequenceFlow_0it2g9j</bpmn:incoming> + <bpmn:incoming>SequenceFlow_00kcej9</bpmn:incoming> <bpmn:linkEventDefinition id="LinkEventDefinition_0uj34dx" name="WaitingForConfirmation" /> </bpmn:intermediateThrowEvent> <bpmn:scriptTask id="ScriptTask_0gb975b" name="Prepare Update Orchestration Task" scriptFormat="groovy"> @@ -126,14 +103,6 @@ css.prepareUpdateOrchestrationTask(execution)</bpmn:script> def css = new CreateSliceService() css.prepareInitServiceOperationStatus(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1ex8ke9" name="Goto Create Slice Service"> - <bpmn:incoming>SequenceFlow_0jrclmc</bpmn:incoming> - <bpmn:linkEventDefinition id="LinkEventDefinition_0de65en" name="CreateSliceService" /> - </bpmn:intermediateThrowEvent> - <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_1wii8im" name="Create Slice Service"> - <bpmn:outgoing>SequenceFlow_1o1tu0f</bpmn:outgoing> - <bpmn:linkEventDefinition id="LinkEventDefinition_1krpcdk" name="CreateSliceService" /> - </bpmn:intermediateCatchEvent> <bpmn:scriptTask id="ScriptTask_1ssh2l9" name="Prepare Update Service Oper Status((finish)" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_0lbdfmt</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1qv8qw1</bpmn:outgoing> @@ -161,34 +130,8 @@ css.prepareUpdateServiceOperationStatus(execution)</bpmn:script> </camunda:connector> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_0t094g7</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_046irye</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0xmvg4v</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:callActivity id="CallActivity_1bnkmaz" name="Call Decompose Service" calledElement="DecomposeService"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="serviceDecomposition" target="sliceServiceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0q7yc2c</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1t19ips</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_0o2r07o" name="Prepare Decompose Service " scriptFormat="groovy"> - <bpmn:incoming>Flow_1u4srgq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0q7yc2c</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcsi= new CreateSliceService() -dcsi.prepareDecomposeService(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0b7senu" name="Prepare Create OrchestrationTask" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1o1tu0f</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1sq6kp6</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def css= new CreateSliceService() -css.prepareCreateOrchestrationTask(execution)</bpmn:script> - </bpmn:scriptTask> <bpmn:callActivity id="CallActivity_0h88mep" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> <bpmn:extensionElements> <camunda:out source="statusCode" target="CSSOT_dbResponseCode" /> @@ -201,8 +144,8 @@ css.prepareCreateOrchestrationTask(execution)</bpmn:script> <camunda:in source="CSSOT_paramJson" target="paramJson" /> <camunda:in source="CSSOT_requestMethod" target="method" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1sq6kp6</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1p8vxo5</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_1x4n7an</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1dfon41</bpmn:outgoing> </bpmn:callActivity> <bpmn:callActivity id="CallActivity_0n47zoh" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> <bpmn:extensionElements> @@ -217,7 +160,7 @@ css.prepareCreateOrchestrationTask(execution)</bpmn:script> <camunda:in source="CSSOT_requestMethod" target="method" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_18kur12</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0it2g9j</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_00kcej9</bpmn:outgoing> </bpmn:callActivity> <bpmn:scriptTask id="ScriptTask_12h8542" name="Prepare Update Orchestration Task" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_12t5exy</bpmn:incoming> @@ -242,28 +185,6 @@ css.prepareUpdateOrchestrationTask(execution)</bpmn:script> <bpmn:incoming>SequenceFlow_0thd6ny</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0477975</bpmn:outgoing> </bpmn:callActivity> - <bpmn:callActivity id="CallActivity_0g98b71" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> - <bpmn:extensionElements> - <camunda:out source="statusCode" target="CSSOT_dbResponseCode" /> - <camunda:out source="response" target="CSSOT_dbResponse" /> - <camunda:in source="CSSOT_taskId" target="taskId" /> - <camunda:in source="msoRequestId" target="requestId" /> - <camunda:in source="CSSOT_name" target="taskName" /> - <camunda:in source="CSSOT_status" target="taskStatus" /> - <camunda:in source="CSSOT_isManual" target="isManual" /> - <camunda:in source="CSSOT_paramJson" target="paramJson" /> - <camunda:in source="CSSOT_requestMethod" target="method" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0h2oree</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1cv0wop</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_08wim95" name="Prepare Get User Options" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_16uz2t9</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0h2oree</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def css = new CreateSliceService() -css.prepareGetUserOptions(execution)</bpmn:script> - </bpmn:scriptTask> <bpmn:callActivity id="CallActivity_0jdzpem" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> <bpmn:extensionElements> <camunda:out source="statusCode" target="CSSOT_dbResponseCode" /> @@ -332,13 +253,6 @@ css.prepareUpdateOrchestrationTask(execution)</bpmn:script> <bpmn:incoming>SequenceFlow_1qv8qw1</bpmn:incoming> <bpmn:outgoing>SequenceFlow_11rbv41</bpmn:outgoing> </bpmn:serviceTask> - <bpmn:scriptTask id="ScriptTask_1jj846g" name="Send Sync Ack Response" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1g8m7tq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ey6m1e</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def css = new CreateSliceService() -css.sendSyncResponse(execution)</bpmn:script> - </bpmn:scriptTask> <bpmn:callActivity id="CallActivity_0cxst1i" name="Call DoAllocateNSIandNSSI " calledElement="DoAllocateNSIandNSSI"> <bpmn:extensionElements> <camunda:in source="msoRequestId" target="msoRequestId" /> @@ -354,42 +268,27 @@ css.sendSyncResponse(execution)</bpmn:script> <camunda:in source="uuiRequest" target="uuiRequest" /> <camunda:in source="requestAction" target="operationType" /> <camunda:in source="operationId" target="operationId" /> - <camunda:in source="serviceProfile" target="serviceProfile" /> - <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> - <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> - <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> <camunda:in source="CSSOT_taskId" target="taskId" /> <camunda:in source="CSSOT_name" target="taskName" /> <camunda:in source="CSSOT_status" target="taskStatus" /> <camunda:in source="CSSOT_isManual" target="isManual" /> <camunda:in source="resourceSharingLevel" target="resourceSharingLevel" /> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:out source="rollbackData" target="rollbackData" /> <camunda:out source="rolledBack" target="rolledBack" /> <camunda:in source="allottedResourceId" target="allottedResourceId" /> - <camunda:in source="nstSolution" target="nstSolution" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1bevt3a</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0mlrlbv</bpmn:outgoing> </bpmn:callActivity> - <bpmn:endEvent id="EndEvent_0bh0kwx"> - <bpmn:incoming>SequenceFlow_12qt5ci</bpmn:incoming> - <bpmn:errorEventDefinition id="ErrorEventDefinition_1xa66sx" errorRef="Error_0p2naox" /> - </bpmn:endEvent> <bpmn:sequenceFlow id="SequenceFlow_03s744c" sourceRef="StartEvent_1nbljfd" targetRef="ScriptTask_1tc44ge" /> <bpmn:sequenceFlow id="SequenceFlow_07e12rt" sourceRef="ScriptTask_1tc44ge" targetRef="ScriptTask_1xxag1o" /> - <bpmn:sequenceFlow id="SequenceFlow_1cv0wop" sourceRef="CallActivity_0g98b71" targetRef="ScriptTask_1jgtb0y" /> <bpmn:sequenceFlow id="SequenceFlow_197cm2e" sourceRef="ScriptTask_1jgtb0y" targetRef="ExclusiveGateway_0elbczl" /> <bpmn:sequenceFlow id="SequenceFlow_12t5exy" name="continue" sourceRef="ExclusiveGateway_0elbczl" targetRef="ScriptTask_12h8542"> <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{execution.getVariable("taskAction") == "commit"}</bpmn:conditionExpression> </bpmn:sequenceFlow> <bpmn:sequenceFlow id="SequenceFlow_038lb9m" name="abort" sourceRef="ExclusiveGateway_0elbczl" targetRef="ScriptTask_1mscu5w" /> - <bpmn:sequenceFlow id="SequenceFlow_1t19ips" sourceRef="CallActivity_1bnkmaz" targetRef="ScriptTask_0l3d1ai" /> - <bpmn:sequenceFlow id="SequenceFlow_1p8vxo5" sourceRef="CallActivity_0h88mep" targetRef="CallActivity_139l55g" /> - <bpmn:sequenceFlow id="SequenceFlow_1g8m7tq" sourceRef="CallActivity_139l55g" targetRef="ScriptTask_1jj846g" /> - <bpmn:sequenceFlow id="SequenceFlow_0it2g9j" sourceRef="CallActivity_0n47zoh" targetRef="IntermediateThrowEvent_1v96asi" /> <bpmn:sequenceFlow id="SequenceFlow_18kur12" sourceRef="ScriptTask_0gb975b" targetRef="CallActivity_0n47zoh" /> <bpmn:sequenceFlow id="SequenceFlow_0mlrlbv" sourceRef="CallActivity_0cxst1i" targetRef="ExclusiveGateway_18eld2o" /> <bpmn:sequenceFlow id="SequenceFlow_1c6ka9h" name="No" sourceRef="ExclusiveGateway_18eld2o" targetRef="EndEvent_0x406rw" /> @@ -399,36 +298,15 @@ css.sendSyncResponse(execution)</bpmn:script> <bpmn:sequenceFlow id="SequenceFlow_0klb3ey" sourceRef="ScriptTask_1ef3voz" targetRef="CallActivity_15pl4ld" /> <bpmn:sequenceFlow id="SequenceFlow_11rbv41" sourceRef="ServiceTask_0esr949" targetRef="EndEvent_05h01gx" /> <bpmn:sequenceFlow id="SequenceFlow_0t094g7" sourceRef="ScriptTask_1xxag1o" targetRef="ServiceTask_0kd6p6p" /> - <bpmn:sequenceFlow id="SequenceFlow_1o1tu0f" sourceRef="IntermediateCatchEvent_1wii8im" targetRef="ScriptTask_0b7senu" /> <bpmn:sequenceFlow id="SequenceFlow_0lbdfmt" sourceRef="CallActivity_15pl4ld" targetRef="ScriptTask_1ssh2l9" /> <bpmn:sequenceFlow id="SequenceFlow_1qv8qw1" sourceRef="ScriptTask_1ssh2l9" targetRef="ServiceTask_0esr949" /> - <bpmn:sequenceFlow id="SequenceFlow_0q7yc2c" sourceRef="ScriptTask_0o2r07o" targetRef="CallActivity_1bnkmaz" /> - <bpmn:sequenceFlow id="SequenceFlow_1sq6kp6" sourceRef="ScriptTask_0b7senu" targetRef="CallActivity_0h88mep" /> <bpmn:sequenceFlow id="SequenceFlow_0thd6ny" sourceRef="ScriptTask_12h8542" targetRef="CallActivity_0o89wmf" /> <bpmn:sequenceFlow id="SequenceFlow_0477975" sourceRef="CallActivity_0o89wmf" targetRef="IntermediateThrowEvent_0ktwpki" /> - <bpmn:sequenceFlow id="SequenceFlow_0h2oree" sourceRef="ScriptTask_08wim95" targetRef="CallActivity_0g98b71" /> <bpmn:sequenceFlow id="SequenceFlow_19lsayh" sourceRef="ScriptTask_1mscu5w" targetRef="CallActivity_0jdzpem" /> <bpmn:sequenceFlow id="SequenceFlow_10ng1vx" sourceRef="CallActivity_0jdzpem" targetRef="EndEvent_1oouvuh" /> <bpmn:sequenceFlow id="SequenceFlow_1bevt3a" sourceRef="IntermediateCatchEvent_0pkvfun" targetRef="CallActivity_0cxst1i" /> - <bpmn:sequenceFlow id="SequenceFlow_1ey6m1e" sourceRef="ScriptTask_1jj846g" targetRef="CallActivity_0v4mw2x" /> - <bpmn:receiveTask id="Task_1b5t88h" name="Waiting for confirmation" messageRef="Message_0c4b2r5"> - <bpmn:incoming>SequenceFlow_1fk37v7</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_16uz2t9</bpmn:outgoing> - </bpmn:receiveTask> - <bpmn:sequenceFlow id="SequenceFlow_1fk37v7" sourceRef="IntermediateCatchEvent_0vilb24" targetRef="Task_1b5t88h" /> - <bpmn:sequenceFlow id="SequenceFlow_16uz2t9" sourceRef="Task_1b5t88h" targetRef="ScriptTask_08wim95" /> - <bpmn:boundaryEvent id="BoundaryEvent_0clo9pv" attachedToRef="Task_1b5t88h"> - <bpmn:outgoing>SequenceFlow_12qt5ci</bpmn:outgoing> - <bpmn:timerEventDefinition> - <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT2H</bpmn:timeDuration> - </bpmn:timerEventDefinition> - </bpmn:boundaryEvent> - <bpmn:sequenceFlow id="SequenceFlow_12qt5ci" sourceRef="BoundaryEvent_0clo9pv" targetRef="EndEvent_0bh0kwx" /> <bpmn:callActivity id="CallActivity_0v4mw2x" name="Call DoCreateSliceServiceOption " calledElement="DoCreateSliceServiceOption"> <bpmn:extensionElements> - <camunda:in source="nstModelUuid" target="nstModelUuid" /> - <camunda:in source="nstModelInvariantUuid" target="nstModelInvariantUuid" /> - <camunda:in source="serviceProfile" target="serviceProfile" /> <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> <camunda:in source="resourceSharingLevel" target="resourceSharingLevel" /> @@ -436,17 +314,11 @@ css.sendSyncResponse(execution)</bpmn:script> <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> <camunda:in source="serviceType" target="serviceType" /> - <camunda:in source="nstSolution" target="nstSolution" /> - <camunda:out source="sliceProfileTn" target="sliceProfileTn" /> - <camunda:out source="sliceProfileCn" target="sliceProfileCn" /> - <camunda:out source="sliceProfileAn" target="sliceProfileAn" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1ey6m1e</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1f6dyxo</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1aaozcg</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_1aaozcg" sourceRef="CallActivity_0v4mw2x" targetRef="ScriptTask_0gb975b" /> - <bpmn:sequenceFlow id="SequenceFlow_046irye" sourceRef="ServiceTask_0kd6p6p" targetRef="ScriptTask_1eo3m4q" /> - <bpmn:sequenceFlow id="SequenceFlow_0jrclmc" sourceRef="ScriptTask_0l3d1ai" targetRef="IntermediateThrowEvent_1ex8ke9" /> <bpmn:scriptTask id="ScriptTask_19uxoi8" name="Update AAI Status" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_0n4xku8</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0kixzdj</bpmn:outgoing> @@ -456,8 +328,81 @@ def css = new CreateSliceService() css.updateAAIOrchStatus(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:sequenceFlow id="SequenceFlow_0kixzdj" sourceRef="ScriptTask_19uxoi8" targetRef="ScriptTask_1ef3voz" /> - <bpmn:sequenceFlow id="Flow_1l8mfej" sourceRef="ScriptTask_1eo3m4q" targetRef="Activity_1ge49xu" /> - <bpmn:callActivity id="Activity_1ge49xu" name="Handle NST Selection OOF request" calledElement="DoHandleOofRequest"> + <bpmn:scriptTask id="ScriptTask_09mxr0w" name="Send Sync Ack Response" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0jhqtls</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_12wo878</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def css = new CreateSliceService() +css.sendSyncResponse(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_1ac05ww" name="Prepare Create OrchestrationTask" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0xmvg4v</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1x4n7an</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def css= new CreateSliceService() +css.prepareCreateOrchestrationTask(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0xmvg4v" sourceRef="ServiceTask_0kd6p6p" targetRef="ScriptTask_1ac05ww" /> + <bpmn:sequenceFlow id="SequenceFlow_1x4n7an" sourceRef="ScriptTask_1ac05ww" targetRef="CallActivity_0h88mep" /> + <bpmn:sequenceFlow id="SequenceFlow_1dfon41" sourceRef="CallActivity_0h88mep" targetRef="CallActivity_139l55g" /> + <bpmn:sequenceFlow id="SequenceFlow_0jhqtls" sourceRef="CallActivity_139l55g" targetRef="ScriptTask_09mxr0w" /> + <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0gceuxu" name="Create Slice Service"> + <bpmn:outgoing>SequenceFlow_14c2tav</bpmn:outgoing> + <bpmn:linkEventDefinition id="LinkEventDefinition_0wnloof" name="CreateSliceService" /> + </bpmn:intermediateCatchEvent> + <bpmn:sequenceFlow id="SequenceFlow_14c2tav" sourceRef="IntermediateCatchEvent_0gceuxu" targetRef="ScriptTask_1ayg9y8" /> + <bpmn:sequenceFlow id="SequenceFlow_00kcej9" sourceRef="CallActivity_0n47zoh" targetRef="IntermediateThrowEvent_1v96asi" /> + <bpmn:sequenceFlow id="SequenceFlow_060j650" sourceRef="IntermediateCatchEvent_0vilb24" targetRef="ScriptTask_04qudo2" /> + <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0lpvnze" name="Goto Create Slice Service"> + <bpmn:incoming>SequenceFlow_12wo878</bpmn:incoming> + <bpmn:linkEventDefinition id="LinkEventDefinition_1oxsvp3" name="CreateSliceService" /> + </bpmn:intermediateThrowEvent> + <bpmn:sequenceFlow id="SequenceFlow_12wo878" sourceRef="ScriptTask_09mxr0w" targetRef="IntermediateThrowEvent_0lpvnze" /> + <bpmn:scriptTask id="ScriptTask_13roglo" name="Process NST Solutions" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1r2jtal</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1f6dyxo</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def css = new CreateSliceService() +css.processNSTSolutions(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_1f6dyxo" sourceRef="ScriptTask_13roglo" targetRef="CallActivity_0v4mw2x" /> + <bpmn:receiveTask id="ReceiveTask_02qzb6i" name="Waiting for confirmation" /> + <bpmn:endEvent id="EndEvent_0bz8a65"> + <bpmn:incoming>SequenceFlow_1vesvto</bpmn:incoming> + <bpmn:errorEventDefinition id="ErrorEventDefinition_1hni1r1" errorRef="Error_0p2naox" /> + </bpmn:endEvent> + <bpmn:boundaryEvent id="BoundaryEvent_0p4swyp" attachedToRef="ReceiveTask_02qzb6i"> + <bpmn:outgoing>SequenceFlow_1vesvto</bpmn:outgoing> + <bpmn:timerEventDefinition id="TimerEventDefinition_112p48l"> + <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT2H</bpmn:timeDuration> + </bpmn:timerEventDefinition> + </bpmn:boundaryEvent> + <bpmn:sequenceFlow id="SequenceFlow_1vesvto" sourceRef="BoundaryEvent_0p4swyp" targetRef="EndEvent_0bz8a65" /> + <bpmn:scriptTask id="ScriptTask_04qudo2" name="Prepare Get User Options" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_060j650</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ti386y</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def css = new CreateSliceService() +css.prepareGetUserOptions(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0ti386y" sourceRef="ScriptTask_04qudo2" targetRef="CallActivity_1vu3zcv" /> + <bpmn:callActivity id="CallActivity_1vu3zcv" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> + <bpmn:extensionElements> + <camunda:out source="statusCode" target="CSSOT_dbResponseCode" /> + <camunda:out source="response" target="CSSOT_dbResponse" /> + <camunda:in source="CSSOT_taskId" target="taskId" /> + <camunda:in source="msoRequestId" target="requestId" /> + <camunda:in source="CSSOT_name" target="taskName" /> + <camunda:in source="CSSOT_status" target="taskStatus" /> + <camunda:in source="CSSOT_isManual" target="isManual" /> + <camunda:in source="CSSOT_paramJson" target="paramJson" /> + <camunda:in source="CSSOT_requestMethod" target="method" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0ti386y</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1whq7vc</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_1whq7vc" sourceRef="CallActivity_1vu3zcv" targetRef="ScriptTask_1jgtb0y" /> + <bpmn:callActivity id="CallActivity_0xf2g6c" name="Handle NST Selection OOF request" calledElement="DoHandleOofRequest"> <bpmn:extensionElements> <camunda:in source="nstSelectionUrl" target="apiPath" /> <camunda:in source="nstSelection_correlator" target="correlator" /> @@ -467,18 +412,18 @@ css.updateAAIOrchStatus(execution)</bpmn:script> <camunda:out source="asyncCallbackResponse" target="nstSelection_oofResponse" /> <camunda:in source="nstSelection_oofRequest" target="oofRequest" /> </bpmn:extensionElements> - <bpmn:incoming>Flow_1l8mfej</bpmn:incoming> - <bpmn:outgoing>Flow_0vq2rmw</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_02sve8o</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1r2jtal</bpmn:outgoing> </bpmn:callActivity> - <bpmn:sequenceFlow id="Flow_0vq2rmw" sourceRef="Activity_1ge49xu" targetRef="Activity_12v8ykp" /> - <bpmn:scriptTask id="Activity_12v8ykp" name="Process NST Solutions" scriptFormat="groovy"> - <bpmn:incoming>Flow_0vq2rmw</bpmn:incoming> - <bpmn:outgoing>Flow_1u4srgq</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1r2jtal" sourceRef="CallActivity_0xf2g6c" targetRef="ScriptTask_13roglo" /> + <bpmn:scriptTask id="ScriptTask_1ayg9y8" name="Prepare NST Selection" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_14c2tav</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_02sve8o</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def css = new CreateSliceService() -css.processNSTSolutions(execution)</bpmn:script> +css.prepareSelectNSTRequest(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="Flow_1u4srgq" sourceRef="Activity_12v8ykp" targetRef="ScriptTask_0o2r07o" /> + <bpmn:sequenceFlow id="SequenceFlow_02sve8o" sourceRef="ScriptTask_1ayg9y8" targetRef="CallActivity_0xf2g6c" /> </bpmn:process> <bpmn:message id="Message_0c4b2r5" name="SliceServiceTask" /> <bpmn:error id="Error_03akl5v" name="MSOWorkflowException" errorCode="MSOWorkflowException" /> @@ -486,360 +431,334 @@ css.processNSTSolutions(execution)</bpmn:script> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CreateSliceService"> <bpmndi:BPMNEdge id="SequenceFlow_0kixzdj_di" bpmnElement="SequenceFlow_0kixzdj"> - <di:waypoint x="745" y="801" /> - <di:waypoint x="823" y="801" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0jrclmc_di" bpmnElement="SequenceFlow_0jrclmc"> - <di:waypoint x="1540" y="121" /> - <di:waypoint x="1584" y="121" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_046irye_di" bpmnElement="SequenceFlow_046irye"> - <di:waypoint x="650" y="121" /> - <di:waypoint x="685" y="121" /> + <di:waypoint x="684" y="965" /> + <di:waypoint x="764" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1aaozcg_di" bpmnElement="SequenceFlow_1aaozcg"> - <di:waypoint x="1115" y="289" /> - <di:waypoint x="1193" y="289" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_12qt5ci_di" bpmnElement="SequenceFlow_12qt5ci"> - <di:waypoint x="335" y="514" /> - <di:waypoint x="335" y="611" /> - <di:waypoint x="335" y="593" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_16uz2t9_di" bpmnElement="SequenceFlow_16uz2t9"> - <di:waypoint x="385" y="456" /> - <di:waypoint x="467" y="456" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1fk37v7_di" bpmnElement="SequenceFlow_1fk37v7"> - <di:waypoint x="214" y="456" /> - <di:waypoint x="285" y="456" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ey6m1e_di" bpmnElement="SequenceFlow_1ey6m1e"> - <di:waypoint x="930" y="289" /> - <di:waypoint x="1015" y="289" /> + <di:waypoint x="980" y="350" /> + <di:waypoint x="1060" y="350" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1bevt3a_di" bpmnElement="SequenceFlow_1bevt3a"> - <di:waypoint x="214" y="801" /> - <di:waypoint x="285" y="801" /> + <di:waypoint x="213" y="965" /> + <di:waypoint x="274" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_10ng1vx_di" bpmnElement="SequenceFlow_10ng1vx"> - <di:waypoint x="1471" y="645" /> - <di:waypoint x="1584" y="645" /> + <di:waypoint x="1294" y="805" /> + <di:waypoint x="1396" y="805" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_19lsayh_di" bpmnElement="SequenceFlow_19lsayh"> - <di:waypoint x="1293" y="645" /> - <di:waypoint x="1371" y="645" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0h2oree_di" bpmnElement="SequenceFlow_0h2oree"> - <di:waypoint x="567" y="456" /> - <di:waypoint x="645" y="456" /> + <di:waypoint x="1124" y="805" /> + <di:waypoint x="1194" y="805" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0477975_di" bpmnElement="SequenceFlow_0477975"> - <di:waypoint x="1471" y="456" /> - <di:waypoint x="1584" y="456" /> + <di:waypoint x="1294" y="620" /> + <di:waypoint x="1396" y="620" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0thd6ny_di" bpmnElement="SequenceFlow_0thd6ny"> - <di:waypoint x="1293" y="456" /> - <di:waypoint x="1371" y="456" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1sq6kp6_di" bpmnElement="SequenceFlow_1sq6kp6"> - <di:waypoint x="385" y="289" /> - <di:waypoint x="467" y="289" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0q7yc2c_di" bpmnElement="SequenceFlow_0q7yc2c"> - <di:waypoint x="1240" y="121" /> - <di:waypoint x="1280" y="121" /> + <di:waypoint x="1124" y="620" /> + <di:waypoint x="1194" y="620" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1qv8qw1_di" bpmnElement="SequenceFlow_1qv8qw1"> - <di:waypoint x="1297" y="801" /> - <di:waypoint x="1375" y="801" /> + <di:waypoint x="1174" y="965" /> + <di:waypoint x="1244" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0lbdfmt_di" bpmnElement="SequenceFlow_0lbdfmt"> - <di:waypoint x="1105" y="801" /> - <di:waypoint x="1197" y="801" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1o1tu0f_di" bpmnElement="SequenceFlow_1o1tu0f"> - <di:waypoint x="214" y="289" /> - <di:waypoint x="285" y="289" /> + <di:waypoint x="1034" y="965" /> + <di:waypoint x="1074" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0t094g7_di" bpmnElement="SequenceFlow_0t094g7"> - <di:waypoint x="510" y="121" /> - <di:waypoint x="550" y="121" /> + <di:waypoint x="510" y="122" /> + <di:waypoint x="564" y="122" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_11rbv41_di" bpmnElement="SequenceFlow_11rbv41"> - <di:waypoint x="1475" y="801" /> - <di:waypoint x="1585" y="801" /> + <di:waypoint x="1344" y="965" /> + <di:waypoint x="1396" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0klb3ey_di" bpmnElement="SequenceFlow_0klb3ey"> - <di:waypoint x="923" y="801" /> - <di:waypoint x="1005" y="801" /> + <di:waypoint x="864" y="965" /> + <di:waypoint x="934" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0n4xku8_di" bpmnElement="SequenceFlow_0n4xku8"> - <di:waypoint x="538" y="801" /> - <di:waypoint x="645" y="801" /> + <di:waypoint x="489" y="965" /> + <di:waypoint x="584" y="965" /> <bpmndi:BPMNLabel> - <dc:Bounds x="584" y="783" width="18" height="14" /> + <dc:Bounds x="529" y="947" width="18" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1c6ka9h_di" bpmnElement="SequenceFlow_1c6ka9h"> - <di:waypoint x="513" y="826" /> - <di:waypoint x="513" y="926" /> + <di:waypoint x="464" y="990" /> + <di:waypoint x="464" y="1090" /> <bpmndi:BPMNLabel> - <dc:Bounds x="521" y="832" width="15" height="14" /> + <dc:Bounds x="472" y="998" width="15" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0mlrlbv_di" bpmnElement="SequenceFlow_0mlrlbv"> - <di:waypoint x="385" y="801" /> - <di:waypoint x="488" y="801" /> + <di:waypoint x="374" y="965" /> + <di:waypoint x="439" y="965" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_18kur12_di" bpmnElement="SequenceFlow_18kur12"> - <di:waypoint x="1293" y="289" /> - <di:waypoint x="1371" y="289" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0it2g9j_di" bpmnElement="SequenceFlow_0it2g9j"> - <di:waypoint x="1471" y="289" /> - <di:waypoint x="1584" y="289" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1g8m7tq_di" bpmnElement="SequenceFlow_1g8m7tq"> - <di:waypoint x="745" y="289" /> - <di:waypoint x="830" y="289" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1p8vxo5_di" bpmnElement="SequenceFlow_1p8vxo5"> - <di:waypoint x="567" y="289" /> - <di:waypoint x="645" y="289" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1t19ips_di" bpmnElement="SequenceFlow_1t19ips"> - <di:waypoint x="1380" y="121" /> - <di:waypoint x="1440" y="121" /> + <di:waypoint x="1160" y="350" /> + <di:waypoint x="1220" y="350" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_038lb9m_di" bpmnElement="SequenceFlow_038lb9m"> - <di:waypoint x="1065" y="481" /> - <di:waypoint x="1065" y="645" /> - <di:waypoint x="1193" y="645" /> + <di:waypoint x="884" y="645" /> + <di:waypoint x="884" y="805" /> + <di:waypoint x="1024" y="805" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1067" y="560" width="27" height="14" /> + <dc:Bounds x="886" y="722" width="27" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_12t5exy_di" bpmnElement="SequenceFlow_12t5exy"> - <di:waypoint x="1090" y="456" /> - <di:waypoint x="1193" y="456" /> + <di:waypoint x="909" y="620" /> + <di:waypoint x="1024" y="620" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1121.5" y="438" width="42" height="14" /> + <dc:Bounds x="911" y="602" width="42" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_197cm2e_di" bpmnElement="SequenceFlow_197cm2e"> - <di:waypoint x="930" y="456" /> - <di:waypoint x="1040" y="456" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1cv0wop_di" bpmnElement="SequenceFlow_1cv0wop"> - <di:waypoint x="745" y="456" /> - <di:waypoint x="830" y="456" /> + <di:waypoint x="804" y="620" /> + <di:waypoint x="859" y="620" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_07e12rt_di" bpmnElement="SequenceFlow_07e12rt"> - <di:waypoint x="350" y="121" /> - <di:waypoint x="410" y="121" /> + <di:waypoint x="350" y="122" /> + <di:waypoint x="410" y="122" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_03s744c_di" bpmnElement="SequenceFlow_03s744c"> - <di:waypoint x="214" y="121" /> - <di:waypoint x="250" y="121" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_1l8mfej_di" bpmnElement="Flow_1l8mfej"> - <di:waypoint x="785" y="121" /> - <di:waypoint x="830" y="121" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_0vq2rmw_di" bpmnElement="Flow_0vq2rmw"> - <di:waypoint x="930" y="121" /> - <di:waypoint x="1000" y="121" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_1u4srgq_di" bpmnElement="Flow_1u4srgq"> - <di:waypoint x="1100" y="121" /> - <di:waypoint x="1140" y="121" /> + <di:waypoint x="214" y="122" /> + <di:waypoint x="250" y="122" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="StartEvent_1nbljfd_di" bpmnElement="StartEvent_1nbljfd"> - <dc:Bounds x="178" y="103" width="36" height="36" /> + <dc:Bounds x="178" y="104" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="156" y="146" width="82" height="40" /> + <dc:Bounds x="156" y="147" width="82" height="40" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateCatchEvent_0vilb24_di" bpmnElement="IntermediateCatchEvent_0vilb24"> - <dc:Bounds x="178" y="438" width="36" height="36" /> + <dc:Bounds x="177" y="602" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="168" y="481" width="60" height="27" /> + <dc:Bounds x="167" y="645" width="60" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1jgtb0y_di" bpmnElement="ScriptTask_1jgtb0y"> - <dc:Bounds x="830" y="416" width="100" height="80" /> + <dc:Bounds x="704" y="580" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_0elbczl_di" bpmnElement="ExclusiveGateway_0elbczl" isMarkerVisible="true"> - <dc:Bounds x="1040" y="431" width="50" height="50" /> + <dc:Bounds x="859" y="595" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1027" y="413" width="78" height="14" /> + <dc:Bounds x="846" y="577" width="78" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_139l55g_di" bpmnElement="CallActivity_139l55g"> - <dc:Bounds x="645" y="249" width="100" height="80" /> + <dc:Bounds x="1060" y="84" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateThrowEvent_1v96asi_di" bpmnElement="IntermediateThrowEvent_1v96asi"> - <dc:Bounds x="1584" y="271" width="36" height="36" /> + <dc:Bounds x="1402" y="332" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1567" y="312" width="81" height="27" /> + <dc:Bounds x="1385" y="373" width="81" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_0gb975b_di" bpmnElement="ScriptTask_0gb975b"> - <dc:Bounds x="1193" y="249" width="100" height="80" /> + <dc:Bounds x="1060" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ExclusiveGateway_18eld2o_di" bpmnElement="ExclusiveGateway_18eld2o" isMarkerVisible="true"> - <dc:Bounds x="488" y="776" width="50" height="50" /> + <dc:Bounds x="439" y="940" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="483" y="746" width="60" height="27" /> + <dc:Bounds x="434" y="910" width="60" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_0x406rw_di" bpmnElement="EndEvent_0x406rw"> - <dc:Bounds x="495" y="926" width="36" height="36" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0l3d1ai_di" bpmnElement="ScriptTask_0l3d1ai"> - <dc:Bounds x="1440" y="81" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_1bnkmaz_di" bpmnElement="CallActivity_1bnkmaz"> - <dc:Bounds x="1280" y="81" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0o2r07o_di" bpmnElement="ScriptTask_0o2r07o"> - <dc:Bounds x="1140" y="81" width="100" height="80" /> + <dc:Bounds x="446" y="1090" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1tc44ge_di" bpmnElement="ScriptTask_1tc44ge"> - <dc:Bounds x="250" y="81" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_0yce5sp_di" bpmnElement="Activity_12v8ykp"> - <dc:Bounds x="1000" y="81" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_0uymgnp_di" bpmnElement="Activity_1ge49xu"> - <dc:Bounds x="830" y="81" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1eo3m4q_di" bpmnElement="ScriptTask_1eo3m4q"> - <dc:Bounds x="685" y="81" width="100" height="80" /> + <dc:Bounds x="250" y="82" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0kd6p6p_di" bpmnElement="ServiceTask_0kd6p6p"> - <dc:Bounds x="550" y="81" width="100" height="80" /> + <dc:Bounds x="564" y="82" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1xxag1o_di" bpmnElement="ScriptTask_1xxag1o"> - <dc:Bounds x="410" y="81" width="100" height="80" /> + <dc:Bounds x="410" y="82" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="SubProcess_1yv9i68_di" bpmnElement="SubProcess_1yv9i68" isExpanded="true"> - <dc:Bounds x="685" y="1080" width="781" height="196" /> + <dc:Bounds x="688" y="1072" width="781" height="196" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_08mlzwz_di" bpmnElement="SequenceFlow_08mlzwz"> - <di:waypoint x="1079" y="1184" /> - <di:waypoint x="1353" y="1184" /> + <di:waypoint x="1082" y="1176" /> + <di:waypoint x="1356" y="1176" /> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_1w67v6s_di" bpmnElement="SequenceFlow_1w67v6s"> - <di:waypoint x="751" y="1184" /> - <di:waypoint x="979" y="1184" /> + <di:waypoint x="754" y="1176" /> + <di:waypoint x="982" y="1176" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="StartEvent_1omdx56_di" bpmnElement="StartEvent_1omdx56"> - <dc:Bounds x="715" y="1166" width="36" height="36" /> + <dc:Bounds x="718" y="1158" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1jx3026_di" bpmnElement="EndEvent_1jx3026"> - <dc:Bounds x="1353" y="1166" width="36" height="36" /> + <dc:Bounds x="1356" y="1158" width="36" height="36" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1swzdpw_di" bpmnElement="ScriptTask_1swzdpw"> - <dc:Bounds x="979" y="1144" width="100" height="80" /> + <dc:Bounds x="982" y="1136" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1ef3voz_di" bpmnElement="ScriptTask_1ef3voz"> - <dc:Bounds x="823" y="761" width="100" height="80" /> + <dc:Bounds x="764" y="925" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_05h01gx_di" bpmnElement="EndEvent_05h01gx"> - <dc:Bounds x="1585" y="783" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1593" y="826" width="20" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="IntermediateThrowEvent_1ex8ke9_di" bpmnElement="IntermediateThrowEvent_1ex8ke9"> - <dc:Bounds x="1584" y="103" width="36" height="36" /> + <dc:Bounds x="1396" y="947" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1564" y="144" width="87" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="IntermediateCatchEvent_1wii8im_di" bpmnElement="IntermediateCatchEvent_1wii8im"> - <dc:Bounds x="178" y="271" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="171" y="314" width="60" height="27" /> + <dc:Bounds x="1404" y="990" width="20" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1ssh2l9_di" bpmnElement="ScriptTask_1ssh2l9"> - <dc:Bounds x="1197" y="761" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0b7senu_di" bpmnElement="ScriptTask_0b7senu"> - <dc:Bounds x="285" y="249" width="100" height="80" /> + <dc:Bounds x="1074" y="925" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0h88mep_di" bpmnElement="CallActivity_0h88mep"> - <dc:Bounds x="467" y="249" width="100" height="80" /> + <dc:Bounds x="890" y="82" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0n47zoh_di" bpmnElement="CallActivity_0n47zoh"> - <dc:Bounds x="1371" y="249" width="100" height="80" /> + <dc:Bounds x="1220" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_12h8542_di" bpmnElement="ScriptTask_12h8542"> - <dc:Bounds x="1193" y="416" width="100" height="80" /> + <dc:Bounds x="1024" y="580" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0o89wmf_di" bpmnElement="CallActivity_0o89wmf"> - <dc:Bounds x="1371" y="416" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0g98b71_di" bpmnElement="CallActivity_0g98b71"> - <dc:Bounds x="645" y="416" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_08wim95_di" bpmnElement="ScriptTask_08wim95"> - <dc:Bounds x="467" y="416" width="100" height="80" /> + <dc:Bounds x="1194" y="580" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0jdzpem_di" bpmnElement="CallActivity_0jdzpem"> - <dc:Bounds x="1371" y="605" width="100" height="80" /> + <dc:Bounds x="1194" y="765" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1mscu5w_di" bpmnElement="ScriptTask_1mscu5w"> - <dc:Bounds x="1193" y="605" width="100" height="80" /> + <dc:Bounds x="1024" y="765" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateCatchEvent_0pkvfun_di" bpmnElement="IntermediateCatchEvent_0pkvfun"> - <dc:Bounds x="178" y="783" width="36" height="36" /> + <dc:Bounds x="177" y="947" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="168" y="826" width="66" height="14" /> + <dc:Bounds x="167" y="990" width="66" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="IntermediateThrowEvent_0ktwpki_di" bpmnElement="IntermediateThrowEvent_0ktwpki"> - <dc:Bounds x="1584" y="438" width="36" height="36" /> + <dc:Bounds x="1396" y="602" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1577" y="479" width="67" height="27" /> + <dc:Bounds x="1389" y="643" width="67" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_15pl4ld_di" bpmnElement="CallActivity_15pl4ld"> - <dc:Bounds x="1005" y="761" width="100" height="80" /> + <dc:Bounds x="934" y="925" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_1oouvuh_di" bpmnElement="EndEvent_1oouvuh"> - <dc:Bounds x="1584" y="627" width="36" height="36" /> + <dc:Bounds x="1396" y="787" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1592" y="670" width="20" height="14" /> + <dc:Bounds x="1404" y="830" width="20" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ServiceTask_0esr949_di" bpmnElement="ServiceTask_0esr949"> - <dc:Bounds x="1375" y="761" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1jj846g_di" bpmnElement="ScriptTask_1jj846g"> - <dc:Bounds x="830" y="249" width="100" height="80" /> + <dc:Bounds x="1244" y="925" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0cxst1i_di" bpmnElement="CallActivity_0cxst1i"> - <dc:Bounds x="285" y="761" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_0bh0kwx_di" bpmnElement="EndEvent_0bh0kwx"> - <dc:Bounds x="317" y="593" width="36" height="36" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ReceiveTask_0zkpdpa_di" bpmnElement="Task_1b5t88h"> - <dc:Bounds x="285" y="416" width="100" height="80" /> + <dc:Bounds x="274" y="925" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="CallActivity_0v4mw2x_di" bpmnElement="CallActivity_0v4mw2x"> - <dc:Bounds x="1015" y="249" width="100" height="80" /> + <dc:Bounds x="880" y="310" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_19uxoi8_di" bpmnElement="ScriptTask_19uxoi8"> - <dc:Bounds x="645" y="761" width="100" height="80" /> + <dc:Bounds x="584" y="925" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_09mxr0w_di" bpmnElement="ScriptTask_09mxr0w"> + <dc:Bounds x="1230" y="84" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1ac05ww_di" bpmnElement="ScriptTask_1ac05ww"> + <dc:Bounds x="720" y="82" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0xmvg4v_di" bpmnElement="SequenceFlow_0xmvg4v"> + <di:waypoint x="664" y="122" /> + <di:waypoint x="720" y="122" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1x4n7an_di" bpmnElement="SequenceFlow_1x4n7an"> + <di:waypoint x="820" y="122" /> + <di:waypoint x="890" y="122" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1dfon41_di" bpmnElement="SequenceFlow_1dfon41"> + <di:waypoint x="990" y="122" /> + <di:waypoint x="1060" y="122" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0jhqtls_di" bpmnElement="SequenceFlow_0jhqtls"> + <di:waypoint x="1160" y="124" /> + <di:waypoint x="1230" y="124" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_0gceuxu_di" bpmnElement="IntermediateCatchEvent_0gceuxu"> + <dc:Bounds x="168" y="332" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="161" y="375" width="60" height="27" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14c2tav_di" bpmnElement="SequenceFlow_14c2tav"> + <di:waypoint x="204" y="350" /> + <di:waypoint x="310" y="350" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00kcej9_di" bpmnElement="SequenceFlow_00kcej9"> + <di:waypoint x="1320" y="350" /> + <di:waypoint x="1402" y="350" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_060j650_di" bpmnElement="SequenceFlow_060j650"> + <di:waypoint x="213" y="620" /> + <di:waypoint x="394" y="620" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0lpvnze_di" bpmnElement="IntermediateThrowEvent_0lpvnze"> + <dc:Bounds x="1402" y="106" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1382" y="147" width="87" height="27" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_12wo878_di" bpmnElement="SequenceFlow_12wo878"> + <di:waypoint x="1330" y="124" /> + <di:waypoint x="1402" y="124" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_13roglo_di" bpmnElement="ScriptTask_13roglo"> + <dc:Bounds x="710" y="310" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1f6dyxo_di" bpmnElement="SequenceFlow_1f6dyxo"> + <di:waypoint x="810" y="350" /> + <di:waypoint x="880" y="350" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ReceiveTask_02qzb6i_di" bpmnElement="ReceiveTask_02qzb6i"> + <dc:Bounds x="254" y="580" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0bz8a65_di" bpmnElement="EndEvent_0bz8a65"> + <dc:Bounds x="286" y="757" width="36" height="36" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="BoundaryEvent_15igwk2_di" bpmnElement="BoundaryEvent_0clo9pv"> - <dc:Bounds x="317" y="478" width="36" height="36" /> + <bpmndi:BPMNShape id="BoundaryEvent_0p4swyp_di" bpmnElement="BoundaryEvent_0p4swyp"> + <dc:Bounds x="286" y="642" width="36" height="36" /> </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1vesvto_di" bpmnElement="SequenceFlow_1vesvto"> + <di:waypoint x="304" y="678" /> + <di:waypoint x="304" y="757" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_04qudo2_di" bpmnElement="ScriptTask_04qudo2"> + <dc:Bounds x="394" y="580" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ti386y_di" bpmnElement="SequenceFlow_0ti386y"> + <di:waypoint x="494" y="620" /> + <di:waypoint x="534" y="620" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_1vu3zcv_di" bpmnElement="CallActivity_1vu3zcv"> + <dc:Bounds x="534" y="580" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1whq7vc_di" bpmnElement="SequenceFlow_1whq7vc"> + <di:waypoint x="634" y="620" /> + <di:waypoint x="704" y="620" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0xf2g6c_di" bpmnElement="CallActivity_0xf2g6c"> + <dc:Bounds x="520" y="310" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1r2jtal_di" bpmnElement="SequenceFlow_1r2jtal"> + <di:waypoint x="620" y="350" /> + <di:waypoint x="710" y="350" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1ayg9y8_di" bpmnElement="ScriptTask_1ayg9y8"> + <dc:Bounds x="310" y="310" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_02sve8o_di" bpmnElement="SequenceFlow_02sve8o"> + <di:waypoint x="410" y="350" /> + <di:waypoint x="520" y="350" /> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSI.bpmn index 9c090e0594..e42f001012 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSI.bpmn @@ -1,105 +1,188 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> <bpmn:process id="DoAllocateNSIandNSSI" name="DoAllocateNSIandNSSI" isExecutable="true"> - <bpmn:scriptTask id="Task_09nzhwk" name="Generate NSI and create NSI in AAI with E2ESS and NSI relationship" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1e40h52</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1uiz85h</bpmn:outgoing> + <bpmn:startEvent id="StartEvent_1ym3sha" name="Start"> + <bpmn:outgoing>SequenceFlow_0xgfj7z</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0xgfj7z" sourceRef="StartEvent_1ym3sha" targetRef="Task_027u6m6" /> + <bpmn:scriptTask id="Task_027u6m6" name="Preprocess Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0xgfj7z</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_00aukg6</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createNSIinAAI(execution)</bpmn:script> +def dansi = new DoAllocateNSIandNSSI() +dansi.preProcessRequest(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_0qorxd9" name="Process NSI options" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_00aukg6</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ggo6s5</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dansi = new DoAllocateNSIandNSSI() +dansi.retriveSliceOption(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_0b9d9l0" name="Is nsi option available?" default="SequenceFlow_1h5bw41"> - <bpmn:incoming>SequenceFlow_0dj0jvq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1h5bw41</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0ueeeca</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_00aukg6" sourceRef="Task_027u6m6" targetRef="ScriptTask_0qorxd9" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_00pt1ek" name="Is nsi option available?" default="SequenceFlow_0c986i9"> + <bpmn:incoming>SequenceFlow_1ggo6s5</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0c986i9</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_03ye8m4</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:scriptTask id="ScriptTask_1ehyrsg" name="Update AAI relationship for E2ESS and NSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0ueeeca</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0xfhbqw</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1ggo6s5" sourceRef="ScriptTask_0qorxd9" targetRef="ExclusiveGateway_00pt1ek" /> + <bpmn:sequenceFlow id="SequenceFlow_0c986i9" sourceRef="ExclusiveGateway_00pt1ek" targetRef="ScriptTask_1tizl6b" /> + <bpmn:scriptTask id="ScriptTask_1tizl6b" name="create NSI in AAI and Update relationship" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0c986i9</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1k3cspv</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcsi = new DoAllocateNSIandNSSI() -dcsi.updateRelationship(execution)</bpmn:script> +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createNSIinAAI(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_1s23hty" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn:sequenceFlow id="SequenceFlow_1k3cspv" sourceRef="ScriptTask_1tizl6b" targetRef="ScriptTask_1r6kuwy" /> + <bpmn:sequenceFlow id="SequenceFlow_03ye8m4" sourceRef="ExclusiveGateway_00pt1ek" targetRef="ScriptTask_07sgklo"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSIOptionAvailable" ) == true)}</bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0fx1nyj" name="GoTo Create Slice Profile"> + <bpmn:incoming>SequenceFlow_0t0wddg</bpmn:incoming> + <bpmn:incoming>SequenceFlow_05ovikm</bpmn:incoming> + <bpmn:linkEventDefinition name="CreateSliceProfile" /> + </bpmn:intermediateThrowEvent> + <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_0k54pph" name="Create Slice Profile"> + <bpmn:outgoing>SequenceFlow_0ct8yh4</bpmn:outgoing> + <bpmn:linkEventDefinition name="CreateSliceProfile" /> + </bpmn:intermediateCatchEvent> + <bpmn:sequenceFlow id="SequenceFlow_0ct8yh4" sourceRef="IntermediateThrowEvent_0k54pph" targetRef="ExclusiveGateway_00ufetn" /> + <bpmn:parallelGateway id="ExclusiveGateway_00ufetn"> + <bpmn:incoming>SequenceFlow_0ct8yh4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1m68yca</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0k5iu2n</bpmn:outgoing> + </bpmn:parallelGateway> + <bpmn:sequenceFlow id="SequenceFlow_1m68yca" sourceRef="ExclusiveGateway_00ufetn" targetRef="Task_1tv7jy5" /> + <bpmn:sequenceFlow id="SequenceFlow_0k5iu2n" sourceRef="ExclusiveGateway_00ufetn" targetRef="Task_1en3luv" /> + <bpmn:callActivity id="CallActivity_1yh9tiq" name="Call DoAllocateNSSI(RAN)" calledElement="DoAllocateNSSI"> <bpmn:extensionElements> <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="nsstInput" target="nsstInput" /> + <camunda:in source="serviceProfile" target="serviceProfile" /> + <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> + <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> + <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> + <camunda:in source="uuiRequest" target="uuiRequest" /> + <camunda:in source="nsiServiceInstanceId" target="nsiServiceInstanceId" /> + <camunda:in source="nsiServiceInstanceName" target="nsiServiceInstanceName" /> + <camunda:in source="nssiserviceModelInfo" target="nssiserviceModelInfo" /> + <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> + <camunda:in source="taskId" target="CSSOT_taskId" /> + <camunda:in source="taskName" target="CSSOT_name" /> + <camunda:in source="taskStatus" target="CSSOT_status" /> + <camunda:in source="isManual" target="CSSOT_isManual" /> + <camunda:in source="isNSIOptionAvailable" target="isNSIOptionAvailable" /> + <camunda:in source="anSliceTaskInfo" target="sliceTaskInfo" /> + <camunda:out source="nssiAllocateResult" target="anNssiAllocateResult" /> + <camunda:in source="AnAllocateNssiNbiRequest" target="nbiRequest" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1h5bw41</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1e40h52</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_0npsyye</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1xb5nx1</bpmn:outgoing> </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_1q3ftu4" name="Prepare NSSI model info and instance id" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0xfhbqw</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0uhaps2</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcsi = new DoAllocateNSIandNSSI() -dcsi.prepareNssiModelInfo(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:startEvent id="allocateslice_StartEvent" name="allocatensi_StartEvent"> - <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="Preprocess Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoAllocateNSIandNSSI() -dcso.preProcessRequest(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0o93dvp" name="read NSI options from request DB" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0dj0jvq</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dansi = new DoAllocateNSIandNSSI() -dansi.retriveSliceOption(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_1k1oonn" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn:sequenceFlow id="SequenceFlow_1hfjn79" sourceRef="Task_1tv7jy5" targetRef="ScriptTask_1r2li91" /> + <bpmn:callActivity id="CallActivity_1ixah3o" name="Call DoAllocateNSSI(Core)" calledElement="DoAllocateNSSI"> <bpmn:extensionElements> <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:in source="nsstInput" target="nsstInput" /> + <camunda:in source="serviceProfile" target="serviceProfile" /> + <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> + <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> + <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> + <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> + <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> + <camunda:in source="uuiRequest" target="uuiRequest" /> + <camunda:in source="nsiServiceInstanceId" target="nsiServiceInstanceId" /> + <camunda:in source="nsiServiceInstanceName" target="nsiServiceInstanceName" /> + <camunda:in source="nssiserviceModelInfo" target="nssiserviceModelInfo" /> + <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> + <camunda:in source="taskId" target="CSSOT_taskId" /> + <camunda:in source="taskName" target="CSSOT_name" /> + <camunda:in source="taskStatus" target="CSSOT_status" /> + <camunda:in source="isManual" target="CSSOT_isManual" /> + <camunda:in source="isNSIOptionAvailable" target="isNSIOptionAvailable" /> + <camunda:in source="cnSliceTaskInfo" target="sliceTaskInfo" /> + <camunda:in source="domainType" target="domainType" /> + <camunda:out source="nssiAllocateResult" target="cnNssiAllocateResult" /> + <camunda:in source="CnAllocateNssiNbiRequest" target="nbiRequest" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1dhpkhd</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0hxky5e</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_0cwbtmr</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1l74seh</bpmn:outgoing> </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_0gunols" name="Get one NSST Info" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1uiz85h</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1ui528w</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1dhpkhd</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_0f36cu2" sourceRef="Task_1en3luv" targetRef="Task_1g8n8iz" /> + <bpmn:sequenceFlow id="SequenceFlow_1xb5nx1" sourceRef="CallActivity_1yh9tiq" targetRef="ScriptTask_0mls87v" /> + <bpmn:parallelGateway id="ExclusiveGateway_19ru3hp"> + <bpmn:incoming>SequenceFlow_0xx5bwa</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0jqxxjq</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ax2c4p</bpmn:outgoing> + </bpmn:parallelGateway> + <bpmn:scriptTask id="ScriptTask_07sgklo" name="Update relationship between NSI and Service Profile" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_03ye8m4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0t0wddg</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.getOneNsstInfo(execution)</bpmn:script> +dcnsio.updateRelationship(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1lpgn98" name="prepare NSST Info" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0hxky5e</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_19jztxv</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_0t0wddg" sourceRef="ScriptTask_07sgklo" targetRef="IntermediateThrowEvent_0fx1nyj" /> + <bpmn:scriptTask id="ScriptTask_1r6kuwy" name="create relationship between nsi and SP" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1k3cspv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_05ovikm</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createNSSTMap(execution)</bpmn:script> +dcnsio.createRelationship(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:endEvent id="EndEvent_1x6k78c"> - <bpmn:incoming>SequenceFlow_0u8fycy</bpmn:incoming> - </bpmn:endEvent> - <bpmn:scriptTask id="finishNSCreate_Task" name="Get a NSSI to process" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_16nvnxi</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0cq2q6g</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_05ovikm" sourceRef="ScriptTask_1r6kuwy" targetRef="IntermediateThrowEvent_0fx1nyj" /> + <bpmn:scriptTask id="Task_1tv7jy5" name="Create RAN Slice Profile Instance" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1m68yca</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1hfjn79</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcsi = new DoAllocateNSIandNSSI() -dcsi.getOneNSSIInfo(execution)</bpmn:script> +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createAnSliceProfileInstance(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_07qkrrb" name="Is there more NSSI to process?" default="SequenceFlow_0u8fycy"> - <bpmn:incoming>SequenceFlow_0g5bwvl</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1jaxstd</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_16nvnxi</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0u8fycy</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:callActivity id="CallActivity_130tuxn" name="Call DoAllocateNSSI" calledElement="DoAllocateNSSI"> + <bpmn:scriptTask id="ScriptTask_1r2li91" name="Create RAN Slice Profile" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1hfjn79</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0zbd2tq</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createAnSliceProfile(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0zbd2tq" sourceRef="ScriptTask_1r2li91" targetRef="ScriptTask_0s8vhha" /> + <bpmn:scriptTask id="Task_1en3luv" name="Create Core Slice Profile Instance" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0k5iu2n</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0f36cu2</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createCnSliceProfileInstance(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_1g8n8iz" name="Create Core Slice Profile" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0f36cu2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wffel4</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createCnSliceProfile(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0ax2c4p" sourceRef="ExclusiveGateway_19ru3hp" targetRef="EndEvent_02c8wsp" /> + <bpmn:scriptTask id="ScriptTask_0stnvp3" name="Create TN (BH) Slice Profile" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0paqrtx</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1d48cil</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createTnBHSliceProfileInstance(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_1f4o46q" name="Create TN(BH) Slice Profile" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1d48cil</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_00dexhy</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.createTnBHSliceProfile(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:callActivity id="CallActivity_0b28wlb" name="Call DoAllocateNSSI(TN)" calledElement="DoAllocateNSSI"> <bpmn:extensionElements> <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> @@ -121,241 +204,305 @@ dcsi.getOneNSSIInfo(execution)</bpmn:script> <camunda:in source="taskStatus" target="CSSOT_status" /> <camunda:in source="isManual" target="CSSOT_isManual" /> <camunda:in source="isNSIOptionAvailable" target="isNSIOptionAvailable" /> + <camunda:in source="tnBHSliceTaskInfo" target="sliceTaskInfo" /> + <camunda:out source="nssiAllocateResult" target="tnBHNssiAllocateResult" /> + <camunda:in source="TnBHAllocateNssiNbiRequest" target="nbiRequest" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0cq2q6g</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_00b8ryw</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_01isn2q</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1omynpt</bpmn:outgoing> </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_0anyn7v" name="Update current Index" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_00b8ryw</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1jaxstd</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1d48cil" sourceRef="ScriptTask_0stnvp3" targetRef="ScriptTask_1f4o46q" /> + <bpmn:sequenceFlow id="SequenceFlow_00dexhy" sourceRef="ScriptTask_1f4o46q" targetRef="ScriptTask_0ci5g6y" /> + <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_08wpvhs" name="Create Tn SliceProfile"> + <bpmn:outgoing>SequenceFlow_0paqrtx</bpmn:outgoing> + <bpmn:linkEventDefinition id="LinkEventDefinition_1beugxy" name="CreateTnSliceProfile" /> + </bpmn:intermediateCatchEvent> + <bpmn:sequenceFlow id="SequenceFlow_0paqrtx" sourceRef="IntermediateCatchEvent_08wpvhs" targetRef="ScriptTask_0stnvp3" /> + <bpmn:scriptTask id="ScriptTask_0sssiii" name="Update relationship between NSI and NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1omynpt</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_150xio1</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.updateTnBHRelationship(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_150xio1" sourceRef="ScriptTask_0sssiii" targetRef="EndEvent_0elqlhv" /> + <bpmn:scriptTask id="ScriptTask_0mls87v" name="Update relationship between NSI and NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1xb5nx1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0xx5bwa</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcsi = new DoAllocateNSIandNSSI() -dcsi.updateCurrentIndex(execution)</bpmn:script> +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.updateAnRelationship(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:scriptTask id="instantiate_NSTask" name="Prepare NSSI list (with and without shared NSSI)" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0uhaps2</bpmn:incoming> - <bpmn:incoming>SequenceFlow_04yx9ii</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0g5bwvl</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_0xx5bwa" sourceRef="ScriptTask_0mls87v" targetRef="ExclusiveGateway_19ru3hp" /> + <bpmn:scriptTask id="ScriptTask_0z9x5uh" name="Update relationship between NSI and NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1l74seh</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0jqxxjq</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoAllocateNSIandNSSI() -dcso.prepareNSSIList(execution)</bpmn:script> +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.updateCnRelationship(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_1jg3el3" name="Is NSST available?" default="SequenceFlow_04yx9ii"> - <bpmn:incoming>SequenceFlow_19jztxv</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_04yx9ii</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1ui528w</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_0uhaps2" sourceRef="ScriptTask_1q3ftu4" targetRef="instantiate_NSTask" /> - <bpmn:sequenceFlow id="SequenceFlow_1e40h52" sourceRef="CallActivity_1s23hty" targetRef="Task_09nzhwk" /> - <bpmn:sequenceFlow id="SequenceFlow_0xfhbqw" sourceRef="ScriptTask_1ehyrsg" targetRef="ScriptTask_1q3ftu4" /> - <bpmn:sequenceFlow id="SequenceFlow_0dj0jvq" sourceRef="ScriptTask_0o93dvp" targetRef="ExclusiveGateway_0b9d9l0" /> - <bpmn:sequenceFlow id="SequenceFlow_0ueeeca" name="Yes" sourceRef="ExclusiveGateway_0b9d9l0" targetRef="ScriptTask_1ehyrsg"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSIOptionAvailable" ) == true)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1h5bw41" name="No" sourceRef="ExclusiveGateway_0b9d9l0" targetRef="CallActivity_1s23hty" /> - <bpmn:sequenceFlow id="SequenceFlow_1uiz85h" sourceRef="Task_09nzhwk" targetRef="ScriptTask_0gunols" /> - <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="allocateslice_StartEvent" targetRef="PreprocessIncomingRequest_task" /> - <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="ScriptTask_0o93dvp" /> - <bpmn:sequenceFlow id="SequenceFlow_0g5bwvl" sourceRef="instantiate_NSTask" targetRef="ExclusiveGateway_07qkrrb" /> - <bpmn:sequenceFlow id="SequenceFlow_0hxky5e" sourceRef="CallActivity_1k1oonn" targetRef="ScriptTask_1lpgn98" /> - <bpmn:sequenceFlow id="SequenceFlow_1dhpkhd" sourceRef="ScriptTask_0gunols" targetRef="CallActivity_1k1oonn" /> - <bpmn:sequenceFlow id="SequenceFlow_19jztxv" sourceRef="ScriptTask_1lpgn98" targetRef="ExclusiveGateway_1jg3el3" /> - <bpmn:sequenceFlow id="SequenceFlow_0u8fycy" name="No" sourceRef="ExclusiveGateway_07qkrrb" targetRef="EndEvent_1x6k78c" /> - <bpmn:sequenceFlow id="SequenceFlow_16nvnxi" name="Yes" sourceRef="ExclusiveGateway_07qkrrb" targetRef="finishNSCreate_Task"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isMoreNSSI" ) == true)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0cq2q6g" sourceRef="finishNSCreate_Task" targetRef="CallActivity_130tuxn" /> - <bpmn:sequenceFlow id="SequenceFlow_1jaxstd" sourceRef="ScriptTask_0anyn7v" targetRef="ExclusiveGateway_07qkrrb" /> - <bpmn:sequenceFlow id="SequenceFlow_00b8ryw" sourceRef="CallActivity_130tuxn" targetRef="ScriptTask_0anyn7v" /> - <bpmn:sequenceFlow id="SequenceFlow_04yx9ii" name="No" sourceRef="ExclusiveGateway_1jg3el3" targetRef="instantiate_NSTask" /> - <bpmn:sequenceFlow id="SequenceFlow_1ui528w" sourceRef="ExclusiveGateway_1jg3el3" targetRef="ScriptTask_0gunols"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isMoreNSSTtoProcess" ) == true)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_1l74seh" sourceRef="CallActivity_1ixah3o" targetRef="ScriptTask_0z9x5uh" /> + <bpmn:sequenceFlow id="SequenceFlow_0jqxxjq" sourceRef="ScriptTask_0z9x5uh" targetRef="ExclusiveGateway_19ru3hp" /> + <bpmn:sequenceFlow id="SequenceFlow_1omynpt" sourceRef="CallActivity_0b28wlb" targetRef="ScriptTask_0sssiii" /> + <bpmn:endEvent id="EndEvent_0elqlhv"> + <bpmn:incoming>SequenceFlow_150xio1</bpmn:incoming> + </bpmn:endEvent> + <bpmn:intermediateThrowEvent id="EndEvent_02c8wsp" name="GoTo Create Tn SliceProfile"> + <bpmn:incoming>SequenceFlow_0ax2c4p</bpmn:incoming> + <bpmn:linkEventDefinition name="CreateTnSliceProfile" /> + </bpmn:intermediateThrowEvent> + <bpmn:scriptTask id="ScriptTask_0s8vhha" name="prepare Allocate An Nssi" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0zbd2tq</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0npsyye</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0npsyye" sourceRef="ScriptTask_0s8vhha" targetRef="CallActivity_1yh9tiq" /> + <bpmn:scriptTask id="ScriptTask_0z0ec5b" name="prepare Allocate Cn Nssi" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1wffel4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0cwbtmr</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.prepareAllocateCnNssi(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0cwbtmr" sourceRef="ScriptTask_0z0ec5b" targetRef="CallActivity_1ixah3o" /> + <bpmn:sequenceFlow id="SequenceFlow_1wffel4" sourceRef="Task_1g8n8iz" targetRef="ScriptTask_0z0ec5b" /> + <bpmn:scriptTask id="ScriptTask_0ci5g6y" name="prepare Allocate Tn-BH Nssi" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_00dexhy</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01isn2q</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnsio = new DoAllocateNSIandNSSI() +dcnsio.prepareAllocateTnBHNssi(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_01isn2q" sourceRef="ScriptTask_0ci5g6y" targetRef="CallActivity_0b28wlb" /> </bpmn:process> + <bpmn:message id="Message_1i10pf1" name="Message_2mc69tg" /> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateNSIandNSSI"> - <bpmndi:BPMNEdge id="SequenceFlow_0uhaps2_di" bpmnElement="SequenceFlow_0uhaps2"> - <di:waypoint x="978" y="350" /> - <di:waypoint x="1736" y="350" /> - <di:waypoint x="1736" y="487" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1e40h52_di" bpmnElement="SequenceFlow_1e40h52"> - <di:waypoint x="799" y="527" /> - <di:waypoint x="878" y="527" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0xfhbqw_di" bpmnElement="SequenceFlow_0xfhbqw"> - <di:waypoint x="799" y="350" /> - <di:waypoint x="878" y="350" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0dj0jvq_di" bpmnElement="SequenceFlow_0dj0jvq"> - <di:waypoint x="520" y="527" /> - <di:waypoint x="583" y="527" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0ueeeca_di" bpmnElement="SequenceFlow_0ueeeca"> - <di:waypoint x="608" y="502" /> - <di:waypoint x="608" y="350" /> - <di:waypoint x="699" y="350" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="584" y="422" width="19" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1h5bw41_di" bpmnElement="SequenceFlow_1h5bw41"> - <di:waypoint x="633" y="527" /> - <di:waypoint x="699" y="527" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="630" y="509" width="14" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1uiz85h_di" bpmnElement="SequenceFlow_1uiz85h"> - <di:waypoint x="978" y="527" /> - <di:waypoint x="1036" y="527" /> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateNSIandNSSIV2"> + <bpmndi:BPMNShape id="StartEvent_1ym3sha_di" bpmnElement="StartEvent_1ym3sha"> + <dc:Bounds x="138" y="122" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="631" y="108" width="0" height="12" /> + <dc:Bounds x="144" y="165" width="25" height="14" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0xgfj7z_di" bpmnElement="SequenceFlow_0xgfj7z"> + <di:waypoint x="174" y="140" /> + <di:waypoint x="224" y="140" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln"> - <di:waypoint x="210" y="527" /> - <di:waypoint x="268" y="527" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="266" y="123" width="0" height="12" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNShape id="ScriptTask_0q0td74_di" bpmnElement="Task_027u6m6"> + <dc:Bounds x="224" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0qorxd9_di" bpmnElement="ScriptTask_0qorxd9"> + <dc:Bounds x="404" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_00aukg6_di" bpmnElement="SequenceFlow_00aukg6"> + <di:waypoint x="324" y="140" /> + <di:waypoint x="404" y="140" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova"> - <di:waypoint x="368" y="527" /> - <di:waypoint x="420" y="527" /> + <bpmndi:BPMNShape id="ExclusiveGateway_00pt1ek_di" bpmnElement="ExclusiveGateway_00pt1ek" isMarkerVisible="true"> + <dc:Bounds x="609" y="115" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="436" y="108" width="0" height="12" /> + <dc:Bounds x="604" y="78" width="59" height="27" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1ggo6s5_di" bpmnElement="SequenceFlow_1ggo6s5"> + <di:waypoint x="504" y="140" /> + <di:waypoint x="609" y="140" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0g5bwvl_di" bpmnElement="SequenceFlow_0g5bwvl"> - <di:waypoint x="1786" y="527" /> - <di:waypoint x="1871" y="527" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0hxky5e_di" bpmnElement="SequenceFlow_0hxky5e"> - <di:waypoint x="1300" y="527" /> - <di:waypoint x="1388" y="527" /> + <bpmndi:BPMNEdge id="SequenceFlow_0c986i9_di" bpmnElement="SequenceFlow_0c986i9"> + <di:waypoint x="659" y="140" /> + <di:waypoint x="800" y="140" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1dhpkhd_di" bpmnElement="SequenceFlow_1dhpkhd"> - <di:waypoint x="1136" y="527" /> - <di:waypoint x="1200" y="527" /> + <bpmndi:BPMNShape id="ScriptTask_1tizl6b_di" bpmnElement="ScriptTask_1tizl6b"> + <dc:Bounds x="800" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1k3cspv_di" bpmnElement="SequenceFlow_1k3cspv"> + <di:waypoint x="900" y="140" /> + <di:waypoint x="970" y="140" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_19jztxv_di" bpmnElement="SequenceFlow_19jztxv"> - <di:waypoint x="1488" y="527" /> - <di:waypoint x="1564" y="527" /> + <bpmndi:BPMNEdge id="SequenceFlow_03ye8m4_di" bpmnElement="SequenceFlow_03ye8m4"> + <di:waypoint x="634" y="165" /> + <di:waypoint x="634" y="260" /> + <di:waypoint x="930" y="260" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0u8fycy_di" bpmnElement="SequenceFlow_0u8fycy"> - <di:waypoint x="1896" y="502" /> - <di:waypoint x="1896" y="409" /> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0zuxkap_di" bpmnElement="IntermediateThrowEvent_0fx1nyj"> + <dc:Bounds x="1412" y="122" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1904" y="453" width="14" height="14" /> + <dc:Bounds x="1388" y="92" width="90" height="27" /> </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_16nvnxi_di" bpmnElement="SequenceFlow_16nvnxi"> - <di:waypoint x="1921" y="527" /> - <di:waypoint x="1991" y="527" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="IntermediateCatchEvent_1u7g80x_di" bpmnElement="IntermediateThrowEvent_0k54pph"> + <dc:Bounds x="138" y="502" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1942" y="500" width="19" height="14" /> + <dc:Bounds x="126" y="545" width="60" height="27" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ct8yh4_di" bpmnElement="SequenceFlow_0ct8yh4"> + <di:waypoint x="174" y="520" /> + <di:waypoint x="239" y="520" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0cq2q6g_di" bpmnElement="SequenceFlow_0cq2q6g"> - <di:waypoint x="2091" y="527" /> - <di:waypoint x="2197" y="527" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="556.5" y="574" width="90" height="12" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNShape id="ParallelGateway_0q9h79n_di" bpmnElement="ExclusiveGateway_00ufetn"> + <dc:Bounds x="239" y="495" width="50" height="50" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1m68yca_di" bpmnElement="SequenceFlow_1m68yca"> + <di:waypoint x="264" y="495" /> + <di:waypoint x="264" y="440" /> + <di:waypoint x="310" y="440" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1jaxstd_di" bpmnElement="SequenceFlow_1jaxstd"> - <di:waypoint x="1991" y="665" /> - <di:waypoint x="1896" y="665" /> - <di:waypoint x="1896" y="552" /> + <bpmndi:BPMNEdge id="SequenceFlow_0k5iu2n_di" bpmnElement="SequenceFlow_0k5iu2n"> + <di:waypoint x="264" y="545" /> + <di:waypoint x="264" y="630" /> + <di:waypoint x="310" y="630" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_00b8ryw_di" bpmnElement="SequenceFlow_00b8ryw"> - <di:waypoint x="2247" y="567" /> - <di:waypoint x="2247" y="665" /> - <di:waypoint x="2091" y="665" /> + <bpmndi:BPMNShape id="CallActivity_1yh9tiq_di" bpmnElement="CallActivity_1yh9tiq"> + <dc:Bounds x="930" y="400" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1hfjn79_di" bpmnElement="SequenceFlow_1hfjn79"> + <di:waypoint x="410" y="440" /> + <di:waypoint x="530" y="440" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_04yx9ii_di" bpmnElement="SequenceFlow_04yx9ii"> - <di:waypoint x="1614" y="527" /> - <di:waypoint x="1686" y="527" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1643" y="509" width="14" height="14" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNShape id="CallActivity_1ixah3o_di" bpmnElement="CallActivity_1ixah3o"> + <dc:Bounds x="930" y="590" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0f36cu2_di" bpmnElement="SequenceFlow_0f36cu2"> + <di:waypoint x="410" y="630" /> + <di:waypoint x="530" y="630" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ui528w_di" bpmnElement="SequenceFlow_1ui528w"> - <di:waypoint x="1589" y="552" /> - <di:waypoint x="1589" y="671" /> - <di:waypoint x="1086" y="671" /> - <di:waypoint x="1086" y="567" /> + <bpmndi:BPMNEdge id="SequenceFlow_1xb5nx1_di" bpmnElement="SequenceFlow_1xb5nx1"> + <di:waypoint x="1030" y="440" /> + <di:waypoint x="1140" y="440" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk"> - <dc:Bounds x="878" y="487" width="100" height="80" /> + <bpmndi:BPMNShape id="ParallelGateway_15vgf7c_di" bpmnElement="ExclusiveGateway_19ru3hp"> + <dc:Bounds x="1325" y="505" width="50" height="50" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_0b9d9l0_di" bpmnElement="ExclusiveGateway_0b9d9l0" isMarkerVisible="true"> - <dc:Bounds x="583" y="502" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="578" y="559" width="60" height="27" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNShape id="ScriptTask_07sgklo_di" bpmnElement="ScriptTask_07sgklo"> + <dc:Bounds x="930" y="220" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1ehyrsg_di" bpmnElement="ScriptTask_1ehyrsg"> - <dc:Bounds x="699" y="310" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_0t0wddg_di" bpmnElement="SequenceFlow_0t0wddg"> + <di:waypoint x="1030" y="260" /> + <di:waypoint x="1430" y="260" /> + <di:waypoint x="1430" y="158" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1r6kuwy_di" bpmnElement="ScriptTask_1r6kuwy"> + <dc:Bounds x="970" y="100" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_1s23hty_di" bpmnElement="CallActivity_1s23hty"> - <dc:Bounds x="699" y="487" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_05ovikm_di" bpmnElement="SequenceFlow_05ovikm"> + <di:waypoint x="1070" y="140" /> + <di:waypoint x="1412" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_17cq3xj_di" bpmnElement="Task_1tv7jy5"> + <dc:Bounds x="310" y="400" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1q3ftu4_di" bpmnElement="ScriptTask_1q3ftu4"> - <dc:Bounds x="878" y="310" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_1r2li91_di" bpmnElement="ScriptTask_1r2li91"> + <dc:Bounds x="530" y="400" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="allocateslice_StartEvent"> - <dc:Bounds x="174" y="509" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="152" y="545" width="82" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task"> - <dc:Bounds x="268" y="487" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_0zbd2tq_di" bpmnElement="SequenceFlow_0zbd2tq"> + <di:waypoint x="630" y="440" /> + <di:waypoint x="730" y="440" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_01n5nmt_di" bpmnElement="Task_1en3luv"> + <dc:Bounds x="310" y="590" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0o93dvp_di" bpmnElement="ScriptTask_0o93dvp"> - <dc:Bounds x="420" y="487" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0juh1xy_di" bpmnElement="Task_1g8n8iz"> + <dc:Bounds x="530" y="590" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_1k1oonn_di" bpmnElement="CallActivity_1k1oonn"> - <dc:Bounds x="1200" y="487" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_0ax2c4p_di" bpmnElement="SequenceFlow_0ax2c4p"> + <di:waypoint x="1375" y="530" /> + <di:waypoint x="1412" y="530" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0stnvp3_di" bpmnElement="ScriptTask_0stnvp3"> + <dc:Bounds x="310" y="840" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0gunols_di" bpmnElement="ScriptTask_0gunols"> - <dc:Bounds x="1036" y="487" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_1f4o46q_di" bpmnElement="ScriptTask_1f4o46q"> + <dc:Bounds x="530" y="840" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1lpgn98_di" bpmnElement="ScriptTask_1lpgn98"> - <dc:Bounds x="1388" y="487" width="100" height="80" /> + <bpmndi:BPMNShape id="CallActivity_0b28wlb_di" bpmnElement="CallActivity_0b28wlb"> + <dc:Bounds x="930" y="840" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c"> - <dc:Bounds x="1878" y="373" width="36" height="36" /> + <bpmndi:BPMNEdge id="SequenceFlow_1d48cil_di" bpmnElement="SequenceFlow_1d48cil"> + <di:waypoint x="410" y="880" /> + <di:waypoint x="530" y="880" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_00dexhy_di" bpmnElement="SequenceFlow_00dexhy"> + <di:waypoint x="630" y="880" /> + <di:waypoint x="730" y="880" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateCatchEvent_08wpvhs_di" bpmnElement="IntermediateCatchEvent_08wpvhs"> + <dc:Bounds x="138" y="862" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="412" y="617" width="90" height="12" /> + <dc:Bounds x="129" y="905" width="56" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0xxyfku_di" bpmnElement="finishNSCreate_Task"> - <dc:Bounds x="1991" y="487" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_07qkrrb_di" bpmnElement="ExclusiveGateway_07qkrrb" isMarkerVisible="true"> - <dc:Bounds x="1871" y="502" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1853" y="575" width="86" height="27" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNEdge id="SequenceFlow_0paqrtx_di" bpmnElement="SequenceFlow_0paqrtx"> + <di:waypoint x="174" y="880" /> + <di:waypoint x="310" y="880" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0sssiii_di" bpmnElement="ScriptTask_0sssiii"> + <dc:Bounds x="1140" y="840" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_130tuxn_di" bpmnElement="CallActivity_130tuxn"> - <dc:Bounds x="2197" y="487" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_150xio1_di" bpmnElement="SequenceFlow_150xio1"> + <di:waypoint x="1240" y="880" /> + <di:waypoint x="1412" y="880" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0mls87v_di" bpmnElement="ScriptTask_0mls87v"> + <dc:Bounds x="1140" y="400" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0anyn7v_di" bpmnElement="ScriptTask_0anyn7v"> - <dc:Bounds x="1991" y="625" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_0xx5bwa_di" bpmnElement="SequenceFlow_0xx5bwa"> + <di:waypoint x="1240" y="440" /> + <di:waypoint x="1350" y="440" /> + <di:waypoint x="1350" y="505" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0z9x5uh_di" bpmnElement="ScriptTask_0z9x5uh"> + <dc:Bounds x="1140" y="590" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="instantiate_NSTask"> - <dc:Bounds x="1686" y="487" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_1l74seh_di" bpmnElement="SequenceFlow_1l74seh"> + <di:waypoint x="1030" y="630" /> + <di:waypoint x="1140" y="630" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0jqxxjq_di" bpmnElement="SequenceFlow_0jqxxjq"> + <di:waypoint x="1240" y="630" /> + <di:waypoint x="1350" y="630" /> + <di:waypoint x="1350" y="555" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1omynpt_di" bpmnElement="SequenceFlow_1omynpt"> + <di:waypoint x="1030" y="880" /> + <di:waypoint x="1140" y="880" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="EndEvent_0elqlhv_di" bpmnElement="EndEvent_0elqlhv"> + <dc:Bounds x="1412" y="862" width="36" height="36" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_1jg3el3_di" bpmnElement="ExclusiveGateway_1jg3el3" isMarkerVisible="true"> - <dc:Bounds x="1564" y="502" width="50" height="50" /> + <bpmndi:BPMNShape id="IntermediateThrowEvent_0gz4vi6_di" bpmnElement="EndEvent_02c8wsp"> + <dc:Bounds x="1412" y="512" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1564" y="465" width="50" height="27" /> + <dc:Bounds x="1392" y="555" width="79" height="27" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0s8vhha_di" bpmnElement="ScriptTask_0s8vhha"> + <dc:Bounds x="730" y="400" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0npsyye_di" bpmnElement="SequenceFlow_0npsyye"> + <di:waypoint x="830" y="440" /> + <di:waypoint x="930" y="440" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0z0ec5b_di" bpmnElement="ScriptTask_0z0ec5b"> + <dc:Bounds x="730" y="590" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0cwbtmr_di" bpmnElement="SequenceFlow_0cwbtmr"> + <di:waypoint x="830" y="630" /> + <di:waypoint x="930" y="630" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1wffel4_di" bpmnElement="SequenceFlow_1wffel4"> + <di:waypoint x="630" y="630" /> + <di:waypoint x="730" y="630" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0ci5g6y_di" bpmnElement="ScriptTask_0ci5g6y"> + <dc:Bounds x="730" y="840" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_01isn2q_di" bpmnElement="SequenceFlow_01isn2q"> + <di:waypoint x="830" y="880" /> + <di:waypoint x="930" y="880" /> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSIV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSIV2.bpmn deleted file mode 100644 index 071960a972..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSIandNSSIV2.bpmn +++ /dev/null @@ -1,598 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> - <bpmn:process id="DoAllocateNSIandNSSIV2" name="DoAllocateNSIandNSSIV2" isExecutable="true"> - <bpmn:startEvent id="StartEvent_1ym3sha" name="Start"> - <bpmn:outgoing>SequenceFlow_0xgfj7z</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:sequenceFlow id="SequenceFlow_0xgfj7z" sourceRef="StartEvent_1ym3sha" targetRef="Task_027u6m6" /> - <bpmn:scriptTask id="Task_027u6m6" name="Preprocess Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0xgfj7z</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_00aukg6</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dansi = new DoAllocateNSIandNSSI() -dansi.preProcessRequest(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0qorxd9" name="Process NSI options" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_00aukg6</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ggo6s5</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dansi = new DoAllocateNSIandNSSI() -dansi.retriveSliceOption(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_00aukg6" sourceRef="Task_027u6m6" targetRef="ScriptTask_0qorxd9" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_00pt1ek" name="Is nsi option available?" default="SequenceFlow_0c986i9"> - <bpmn:incoming>SequenceFlow_1ggo6s5</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0c986i9</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_03ye8m4</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_1ggo6s5" sourceRef="ScriptTask_0qorxd9" targetRef="ExclusiveGateway_00pt1ek" /> - <bpmn:sequenceFlow id="SequenceFlow_0c986i9" sourceRef="ExclusiveGateway_00pt1ek" targetRef="ScriptTask_1tizl6b" /> - <bpmn:scriptTask id="ScriptTask_1tizl6b" name="create NSI in AAI and Update relationship" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0c986i9</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1k3cspv</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createNSIinAAI(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1k3cspv" sourceRef="ScriptTask_1tizl6b" targetRef="ScriptTask_1r6kuwy" /> - <bpmn:sequenceFlow id="SequenceFlow_03ye8m4" sourceRef="ExclusiveGateway_00pt1ek" targetRef="ScriptTask_07sgklo"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSIOptionAvailable" ) == true)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_0fx1nyj" name="GoTo Create Slice Profile"> - <bpmn:incoming>SequenceFlow_0t0wddg</bpmn:incoming> - <bpmn:incoming>SequenceFlow_05ovikm</bpmn:incoming> - <bpmn:linkEventDefinition name="CreateSliceProfile" /> - </bpmn:intermediateThrowEvent> - <bpmn:intermediateCatchEvent id="IntermediateThrowEvent_0k54pph" name="Create Slice Profile"> - <bpmn:outgoing>SequenceFlow_0ct8yh4</bpmn:outgoing> - <bpmn:linkEventDefinition name="CreateSliceProfile" /> - </bpmn:intermediateCatchEvent> - <bpmn:sequenceFlow id="SequenceFlow_0ct8yh4" sourceRef="IntermediateThrowEvent_0k54pph" targetRef="ExclusiveGateway_00ufetn" /> - <bpmn:parallelGateway id="ExclusiveGateway_00ufetn"> - <bpmn:incoming>SequenceFlow_0ct8yh4</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1m68yca</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0k5iu2n</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:sequenceFlow id="SequenceFlow_1m68yca" sourceRef="ExclusiveGateway_00ufetn" targetRef="Task_1tv7jy5" /> - <bpmn:sequenceFlow id="SequenceFlow_0k5iu2n" sourceRef="ExclusiveGateway_00ufetn" targetRef="Task_1en3luv" /> - <bpmn:callActivity id="CallActivity_1yh9tiq" name="Call DoAllocateNSSI(RAN)" calledElement="DoAllocateNSSI"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:in source="nsstInput" target="nsstInput" /> - <camunda:in source="serviceProfile" target="serviceProfile" /> - <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> - <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> - <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> - <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> - <camunda:in source="uuiRequest" target="uuiRequest" /> - <camunda:in source="nsiServiceInstanceId" target="nsiServiceInstanceId" /> - <camunda:in source="nsiServiceInstanceName" target="nsiServiceInstanceName" /> - <camunda:in source="nssiserviceModelInfo" target="nssiserviceModelInfo" /> - <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> - <camunda:in source="taskId" target="CSSOT_taskId" /> - <camunda:in source="taskName" target="CSSOT_name" /> - <camunda:in source="taskStatus" target="CSSOT_status" /> - <camunda:in source="isManual" target="CSSOT_isManual" /> - <camunda:in source="isNSIOptionAvailable" target="isNSIOptionAvailable" /> - <camunda:in source="anSliceTaskInfo" target="sliceTaskInfo" /> - <camunda:out source="nssiAllocateResult" target="nssiAllocateResult" /> - <camunda:in source="AnAllocateNssiNbiRequest" target="nbiRequest" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0npsyye</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1xb5nx1</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_1hfjn79" sourceRef="Task_1tv7jy5" targetRef="ScriptTask_1r2li91" /> - <bpmn:callActivity id="CallActivity_1ixah3o" name="Call DoAllocateNSSI(Core)" calledElement="DoAllocateNSSI"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:in source="nsstInput" target="nsstInput" /> - <camunda:in source="serviceProfile" target="serviceProfile" /> - <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> - <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> - <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> - <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> - <camunda:in source="uuiRequest" target="uuiRequest" /> - <camunda:in source="nsiServiceInstanceId" target="nsiServiceInstanceId" /> - <camunda:in source="nsiServiceInstanceName" target="nsiServiceInstanceName" /> - <camunda:in source="nssiserviceModelInfo" target="nssiserviceModelInfo" /> - <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> - <camunda:in source="taskId" target="CSSOT_taskId" /> - <camunda:in source="taskName" target="CSSOT_name" /> - <camunda:in source="taskStatus" target="CSSOT_status" /> - <camunda:in source="isManual" target="CSSOT_isManual" /> - <camunda:in source="isNSIOptionAvailable" target="isNSIOptionAvailable" /> - <camunda:in source="cnSliceTaskInfo" target="sliceTaskInfo" /> - <camunda:in source="domainType" target="domainType" /> - <camunda:out source="nssiAllocateResult" target="nssiAllocateResult" /> - <camunda:in source="CnAllocateNssiNbiRequest" target="nbiRequest" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0cwbtmr</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1l74seh</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0f36cu2" sourceRef="Task_1en3luv" targetRef="Task_1g8n8iz" /> - <bpmn:sequenceFlow id="SequenceFlow_1xb5nx1" sourceRef="CallActivity_1yh9tiq" targetRef="ScriptTask_0mls87v" /> - <bpmn:parallelGateway id="ExclusiveGateway_19ru3hp"> - <bpmn:incoming>SequenceFlow_1gkb7iy</bpmn:incoming> - <bpmn:incoming>SequenceFlow_03zglrh</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0ax2c4p</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:scriptTask id="ScriptTask_07sgklo" name="Update relationship between NSI and Service Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_03ye8m4</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0t0wddg</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.updateRelationship(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0t0wddg" sourceRef="ScriptTask_07sgklo" targetRef="IntermediateThrowEvent_0fx1nyj" /> - <bpmn:scriptTask id="ScriptTask_1r6kuwy" name="create relationship between nsi and SP" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1k3cspv</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_05ovikm</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createRelationship(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_05ovikm" sourceRef="ScriptTask_1r6kuwy" targetRef="IntermediateThrowEvent_0fx1nyj" /> - <bpmn:scriptTask id="Task_1tv7jy5" name="Create RAN Slice Profile Instance" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1m68yca</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1hfjn79</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createAnSliceProfileInstance(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1r2li91" name="Create RAN Slice Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1hfjn79</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0zbd2tq</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createAnSliceProfile(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0zbd2tq" sourceRef="ScriptTask_1r2li91" targetRef="ScriptTask_0s8vhha" /> - <bpmn:scriptTask id="Task_1en3luv" name="Create Core Slice Profile Instance" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0k5iu2n</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0f36cu2</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createCnSliceProfileInstance(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="Task_1g8n8iz" name="Create Core Slice Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0f36cu2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1wffel4</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createCnSliceProfile(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0ax2c4p" sourceRef="ExclusiveGateway_19ru3hp" targetRef="EndEvent_02c8wsp" /> - <bpmn:scriptTask id="ScriptTask_0stnvp3" name="Create TN (BH) Slice Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0paqrtx</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1d48cil</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createTnBHSliceProfileInstance(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1f4o46q" name="Create TN(BH) Slice Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1d48cil</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_00dexhy</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.createTnBHSliceProfile(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_0b28wlb" name="Call DoAllocateNSSI(TN)" calledElement="DoAllocateNSSI"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:in source="nsstInput" target="nsstInput" /> - <camunda:in source="serviceProfile" target="serviceProfile" /> - <camunda:in source="sliceProfileTn" target="sliceProfileTn" /> - <camunda:in source="sliceProfileCn" target="sliceProfileCn" /> - <camunda:in source="sliceProfileAn" target="sliceProfileAn" /> - <camunda:in source="globalSubscriberId" target="globalSubscriberId" /> - <camunda:in source="subscriptionServiceType" target="subscriptionServiceType" /> - <camunda:in source="uuiRequest" target="uuiRequest" /> - <camunda:in source="nsiServiceInstanceId" target="nsiServiceInstanceId" /> - <camunda:in source="nsiServiceInstanceName" target="nsiServiceInstanceName" /> - <camunda:in source="nssiserviceModelInfo" target="nssiserviceModelInfo" /> - <camunda:in source="sliceTaskParams" target="sliceTaskParams" /> - <camunda:in source="taskId" target="CSSOT_taskId" /> - <camunda:in source="taskName" target="CSSOT_name" /> - <camunda:in source="taskStatus" target="CSSOT_status" /> - <camunda:in source="isManual" target="CSSOT_isManual" /> - <camunda:in source="isNSIOptionAvailable" target="isNSIOptionAvailable" /> - <camunda:in source="tnBHSliceTaskInfo" target="sliceTaskInfo" /> - <camunda:out source="nssiAllocateResult" target="nssiAllocateResult" /> - <camunda:in source="TnBHAllocateNssiNbiRequest" target="nbiRequest" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_01isn2q</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1omynpt</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_1d48cil" sourceRef="ScriptTask_0stnvp3" targetRef="ScriptTask_1f4o46q" /> - <bpmn:sequenceFlow id="SequenceFlow_00dexhy" sourceRef="ScriptTask_1f4o46q" targetRef="ScriptTask_0ci5g6y" /> - <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_08wpvhs" name="Create Tn SliceProfile"> - <bpmn:outgoing>SequenceFlow_0paqrtx</bpmn:outgoing> - <bpmn:linkEventDefinition id="LinkEventDefinition_1beugxy" name="CreateTnSliceProfile" /> - </bpmn:intermediateCatchEvent> - <bpmn:sequenceFlow id="SequenceFlow_0paqrtx" sourceRef="IntermediateCatchEvent_08wpvhs" targetRef="ScriptTask_0stnvp3" /> - <bpmn:scriptTask id="ScriptTask_0sssiii" name="Update relationship between NSI and NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1omynpt</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_150xio1</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1me5mt6" name="Update relationship between Slice Profile and Service Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_150xio1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_040fu80</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0vrzjir" name="Update RelationShip between SliceProfile and NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_040fu80</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1uti8ls</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_150xio1" sourceRef="ScriptTask_0sssiii" targetRef="ScriptTask_1me5mt6" /> - <bpmn:sequenceFlow id="SequenceFlow_040fu80" sourceRef="ScriptTask_1me5mt6" targetRef="ScriptTask_0vrzjir" /> - <bpmn:scriptTask id="ScriptTask_0mls87v" name="Update relationship between NSI and NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1xb5nx1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0xx5bwa</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0xx5bwa" sourceRef="ScriptTask_0mls87v" targetRef="ScriptTask_0g8dgo6" /> - <bpmn:scriptTask id="ScriptTask_0g8dgo6" name="Update relationship between Slice Profile and Service Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0xx5bwa</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1sckufj</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1sckufj" sourceRef="ScriptTask_0g8dgo6" targetRef="ScriptTask_0blxroa" /> - <bpmn:scriptTask id="ScriptTask_0blxroa" name="Update RelationShip between SliceProfile and NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1sckufj</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1gkb7iy</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1gkb7iy" sourceRef="ScriptTask_0blxroa" targetRef="ExclusiveGateway_19ru3hp" /> - <bpmn:scriptTask id="ScriptTask_0z9x5uh" name="Update relationship between NSI and NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1l74seh</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0jqxxjq</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_09197ms" name="Update relationship between Slice Profile and Service Profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0jqxxjq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_02qun80</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_127nizg" name="Update RelationShip between SliceProfile and NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_02qun80</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_03zglrh</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1l74seh" sourceRef="CallActivity_1ixah3o" targetRef="ScriptTask_0z9x5uh" /> - <bpmn:sequenceFlow id="SequenceFlow_0jqxxjq" sourceRef="ScriptTask_0z9x5uh" targetRef="ScriptTask_09197ms" /> - <bpmn:sequenceFlow id="SequenceFlow_02qun80" sourceRef="ScriptTask_09197ms" targetRef="ScriptTask_127nizg" /> - <bpmn:sequenceFlow id="SequenceFlow_03zglrh" sourceRef="ScriptTask_127nizg" targetRef="ExclusiveGateway_19ru3hp" /> - <bpmn:sequenceFlow id="SequenceFlow_1omynpt" sourceRef="CallActivity_0b28wlb" targetRef="ScriptTask_0sssiii" /> - <bpmn:endEvent id="EndEvent_0elqlhv"> - <bpmn:incoming>SequenceFlow_1uti8ls</bpmn:incoming> - </bpmn:endEvent> - <bpmn:sequenceFlow id="SequenceFlow_1uti8ls" sourceRef="ScriptTask_0vrzjir" targetRef="EndEvent_0elqlhv" /> - <bpmn:intermediateThrowEvent id="EndEvent_02c8wsp" name="GoTo Create Tn SliceProfile"> - <bpmn:incoming>SequenceFlow_0ax2c4p</bpmn:incoming> - <bpmn:linkEventDefinition name="CreateTnSliceProfile" /> - </bpmn:intermediateThrowEvent> - <bpmn:scriptTask id="ScriptTask_0s8vhha" name="prepare Allocate An Nssi" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0zbd2tq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0npsyye</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateAnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0npsyye" sourceRef="ScriptTask_0s8vhha" targetRef="CallActivity_1yh9tiq" /> - <bpmn:scriptTask id="ScriptTask_0z0ec5b" name="prepare Allocate An Nssi" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1wffel4</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0cwbtmr</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateCnNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0cwbtmr" sourceRef="ScriptTask_0z0ec5b" targetRef="CallActivity_1ixah3o" /> - <bpmn:sequenceFlow id="SequenceFlow_1wffel4" sourceRef="Task_1g8n8iz" targetRef="ScriptTask_0z0ec5b" /> - <bpmn:scriptTask id="ScriptTask_0ci5g6y" name="prepare Allocate Tn-BH Nssi" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_00dexhy</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_01isn2q</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnsio = new DoAllocateNSIandNSSI() -dcnsio.prepareAllocateTnBHNssi(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_01isn2q" sourceRef="ScriptTask_0ci5g6y" targetRef="CallActivity_0b28wlb" /> - </bpmn:process> - <bpmn:message id="Message_1i10pf1" name="Message_2mc69tg" /> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateNSIandNSSIV2"> - <bpmndi:BPMNShape id="StartEvent_1ym3sha_di" bpmnElement="StartEvent_1ym3sha"> - <dc:Bounds x="138" y="122" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="144" y="165" width="25" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0xgfj7z_di" bpmnElement="SequenceFlow_0xgfj7z"> - <di:waypoint x="174" y="140" /> - <di:waypoint x="224" y="140" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0q0td74_di" bpmnElement="Task_027u6m6"> - <dc:Bounds x="224" y="100" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0qorxd9_di" bpmnElement="ScriptTask_0qorxd9"> - <dc:Bounds x="404" y="100" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_00aukg6_di" bpmnElement="SequenceFlow_00aukg6"> - <di:waypoint x="324" y="140" /> - <di:waypoint x="404" y="140" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_00pt1ek_di" bpmnElement="ExclusiveGateway_00pt1ek" isMarkerVisible="true"> - <dc:Bounds x="609" y="115" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="604" y="78" width="59" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1ggo6s5_di" bpmnElement="SequenceFlow_1ggo6s5"> - <di:waypoint x="504" y="140" /> - <di:waypoint x="609" y="140" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0c986i9_di" bpmnElement="SequenceFlow_0c986i9"> - <di:waypoint x="659" y="140" /> - <di:waypoint x="800" y="140" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1tizl6b_di" bpmnElement="ScriptTask_1tizl6b"> - <dc:Bounds x="800" y="100" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1k3cspv_di" bpmnElement="SequenceFlow_1k3cspv"> - <di:waypoint x="900" y="140" /> - <di:waypoint x="970" y="140" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_03ye8m4_di" bpmnElement="SequenceFlow_03ye8m4"> - <di:waypoint x="634" y="165" /> - <di:waypoint x="634" y="260" /> - <di:waypoint x="930" y="260" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="IntermediateThrowEvent_0zuxkap_di" bpmnElement="IntermediateThrowEvent_0fx1nyj"> - <dc:Bounds x="1412" y="122" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1388" y="92" width="90" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="IntermediateCatchEvent_1u7g80x_di" bpmnElement="IntermediateThrowEvent_0k54pph"> - <dc:Bounds x="138" y="502" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="126" y="545" width="60" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ct8yh4_di" bpmnElement="SequenceFlow_0ct8yh4"> - <di:waypoint x="174" y="520" /> - <di:waypoint x="239" y="520" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ParallelGateway_0q9h79n_di" bpmnElement="ExclusiveGateway_00ufetn"> - <dc:Bounds x="239" y="495" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1m68yca_di" bpmnElement="SequenceFlow_1m68yca"> - <di:waypoint x="264" y="495" /> - <di:waypoint x="264" y="440" /> - <di:waypoint x="310" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0k5iu2n_di" bpmnElement="SequenceFlow_0k5iu2n"> - <di:waypoint x="264" y="545" /> - <di:waypoint x="264" y="630" /> - <di:waypoint x="310" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_1yh9tiq_di" bpmnElement="CallActivity_1yh9tiq"> - <dc:Bounds x="730" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1hfjn79_di" bpmnElement="SequenceFlow_1hfjn79"> - <di:waypoint x="410" y="440" /> - <di:waypoint x="440" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_1ixah3o_di" bpmnElement="CallActivity_1ixah3o"> - <dc:Bounds x="730" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0f36cu2_di" bpmnElement="SequenceFlow_0f36cu2"> - <di:waypoint x="410" y="630" /> - <di:waypoint x="440" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1xb5nx1_di" bpmnElement="SequenceFlow_1xb5nx1"> - <di:waypoint x="830" y="440" /> - <di:waypoint x="880" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ParallelGateway_15vgf7c_di" bpmnElement="ExclusiveGateway_19ru3hp"> - <dc:Bounds x="1325" y="505" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_07sgklo_di" bpmnElement="ScriptTask_07sgklo"> - <dc:Bounds x="930" y="220" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0t0wddg_di" bpmnElement="SequenceFlow_0t0wddg"> - <di:waypoint x="1030" y="260" /> - <di:waypoint x="1430" y="260" /> - <di:waypoint x="1430" y="158" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1r6kuwy_di" bpmnElement="ScriptTask_1r6kuwy"> - <dc:Bounds x="970" y="100" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_05ovikm_di" bpmnElement="SequenceFlow_05ovikm"> - <di:waypoint x="1070" y="140" /> - <di:waypoint x="1412" y="140" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_17cq3xj_di" bpmnElement="Task_1tv7jy5"> - <dc:Bounds x="310" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1r2li91_di" bpmnElement="ScriptTask_1r2li91"> - <dc:Bounds x="440" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0zbd2tq_di" bpmnElement="SequenceFlow_0zbd2tq"> - <di:waypoint x="540" y="440" /> - <di:waypoint x="584" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_01n5nmt_di" bpmnElement="Task_1en3luv"> - <dc:Bounds x="310" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0juh1xy_di" bpmnElement="Task_1g8n8iz"> - <dc:Bounds x="440" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ax2c4p_di" bpmnElement="SequenceFlow_0ax2c4p"> - <di:waypoint x="1375" y="530" /> - <di:waypoint x="1412" y="530" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0stnvp3_di" bpmnElement="ScriptTask_0stnvp3"> - <dc:Bounds x="310" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1f4o46q_di" bpmnElement="ScriptTask_1f4o46q"> - <dc:Bounds x="440" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0b28wlb_di" bpmnElement="CallActivity_0b28wlb"> - <dc:Bounds x="730" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1d48cil_di" bpmnElement="SequenceFlow_1d48cil"> - <di:waypoint x="410" y="880" /> - <di:waypoint x="440" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_00dexhy_di" bpmnElement="SequenceFlow_00dexhy"> - <di:waypoint x="540" y="880" /> - <di:waypoint x="584" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="IntermediateCatchEvent_08wpvhs_di" bpmnElement="IntermediateCatchEvent_08wpvhs"> - <dc:Bounds x="138" y="862" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="129" y="905" width="56" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0paqrtx_di" bpmnElement="SequenceFlow_0paqrtx"> - <di:waypoint x="174" y="880" /> - <di:waypoint x="310" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0sssiii_di" bpmnElement="ScriptTask_0sssiii"> - <dc:Bounds x="880" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1me5mt6_di" bpmnElement="ScriptTask_1me5mt6"> - <dc:Bounds x="1050" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0vrzjir_di" bpmnElement="ScriptTask_0vrzjir"> - <dc:Bounds x="1210" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_150xio1_di" bpmnElement="SequenceFlow_150xio1"> - <di:waypoint x="980" y="880" /> - <di:waypoint x="1050" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_040fu80_di" bpmnElement="SequenceFlow_040fu80"> - <di:waypoint x="1150" y="880" /> - <di:waypoint x="1210" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0mls87v_di" bpmnElement="ScriptTask_0mls87v"> - <dc:Bounds x="880" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0xx5bwa_di" bpmnElement="SequenceFlow_0xx5bwa"> - <di:waypoint x="980" y="440" /> - <di:waypoint x="1040" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0g8dgo6_di" bpmnElement="ScriptTask_0g8dgo6"> - <dc:Bounds x="1040" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1sckufj_di" bpmnElement="SequenceFlow_1sckufj"> - <di:waypoint x="1140" y="440" /> - <di:waypoint x="1190" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0blxroa_di" bpmnElement="ScriptTask_0blxroa"> - <dc:Bounds x="1190" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1gkb7iy_di" bpmnElement="SequenceFlow_1gkb7iy"> - <di:waypoint x="1290" y="440" /> - <di:waypoint x="1350" y="440" /> - <di:waypoint x="1350" y="505" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0z9x5uh_di" bpmnElement="ScriptTask_0z9x5uh"> - <dc:Bounds x="880" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_09197ms_di" bpmnElement="ScriptTask_09197ms"> - <dc:Bounds x="1040" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_127nizg_di" bpmnElement="ScriptTask_127nizg"> - <dc:Bounds x="1190" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1l74seh_di" bpmnElement="SequenceFlow_1l74seh"> - <di:waypoint x="830" y="630" /> - <di:waypoint x="880" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0jqxxjq_di" bpmnElement="SequenceFlow_0jqxxjq"> - <di:waypoint x="980" y="630" /> - <di:waypoint x="1040" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_02qun80_di" bpmnElement="SequenceFlow_02qun80"> - <di:waypoint x="1140" y="630" /> - <di:waypoint x="1190" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_03zglrh_di" bpmnElement="SequenceFlow_03zglrh"> - <di:waypoint x="1290" y="630" /> - <di:waypoint x="1350" y="630" /> - <di:waypoint x="1350" y="555" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1omynpt_di" bpmnElement="SequenceFlow_1omynpt"> - <di:waypoint x="830" y="880" /> - <di:waypoint x="880" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="EndEvent_0elqlhv_di" bpmnElement="EndEvent_0elqlhv"> - <dc:Bounds x="1412" y="862" width="36" height="36" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1uti8ls_di" bpmnElement="SequenceFlow_1uti8ls"> - <di:waypoint x="1310" y="880" /> - <di:waypoint x="1412" y="880" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="IntermediateThrowEvent_0gz4vi6_di" bpmnElement="EndEvent_02c8wsp"> - <dc:Bounds x="1412" y="512" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1392" y="555" width="79" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0s8vhha_di" bpmnElement="ScriptTask_0s8vhha"> - <dc:Bounds x="584" y="400" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0npsyye_di" bpmnElement="SequenceFlow_0npsyye"> - <di:waypoint x="684" y="440" /> - <di:waypoint x="730" y="440" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0z0ec5b_di" bpmnElement="ScriptTask_0z0ec5b"> - <dc:Bounds x="584" y="590" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0cwbtmr_di" bpmnElement="SequenceFlow_0cwbtmr"> - <di:waypoint x="684" y="630" /> - <di:waypoint x="730" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1wffel4_di" bpmnElement="SequenceFlow_1wffel4"> - <di:waypoint x="540" y="630" /> - <di:waypoint x="584" y="630" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0ci5g6y_di" bpmnElement="ScriptTask_0ci5g6y"> - <dc:Bounds x="584" y="840" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_01isn2q_di" bpmnElement="SequenceFlow_01isn2q"> - <di:waypoint x="684" y="880" /> - <di:waypoint x="730" y="880" /> - </bpmndi:BPMNEdge> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSI.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSI.bpmn index 445c9378af..6e94538775 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSI.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSI.bpmn @@ -1,144 +1,42 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> <bpmn:process id="DoAllocateNSSI" name="DoAllocateNSSI" isExecutable="true"> - <bpmn:startEvent id="allocatenssi_StartEvent" name="allocatenssi_StartEvent"> - <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing> + <bpmn:startEvent id="StartEvent_0zs8ezi" name="Start"> + <bpmn:outgoing>SequenceFlow_07xkshs</bpmn:outgoing> </bpmn:startEvent> - <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="allocatenssi_StartEvent" targetRef="PreprocessIncomingRequest_task" /> - <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="CallActivity_09l7bhc" /> - <bpmn:scriptTask id="Task_09nzhwk" name="send create request to NSSMF adapter" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1h5bw41</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1uiz85h</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.sendCreateRequestNSSMF(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="Preprocess Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing> + <bpmn:scriptTask id="ScriptTask_0n2z0z7" name="Preprocess Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_07xkshs</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0h6mn7j</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnssi = new DoAllocateNSSI() dcnssi.preProcessRequest(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:scriptTask id="instantiate_NSTask" name="create slice profile" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0yie00u</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0kzlbeh</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1r8qkgf</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_09pv5lu</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_07xkshs" sourceRef="StartEvent_0zs8ezi" targetRef="ScriptTask_0n2z0z7" /> + <bpmn:scriptTask id="ScriptTask_15a7mua" name="send request to NSSMF adapter" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0h6mn7j</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wclf50</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnssi = new DoAllocateNSSI() -dcnssi.createSliceProfile(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:endEvent id="EndEvent_1x6k78c"> - <bpmn:incoming>SequenceFlow_09pv5lu</bpmn:incoming> - </bpmn:endEvent> - <bpmn:scriptTask id="finishNSCreate_Task" name="Get NSSI progress" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1smrx3b</bpmn:incoming> - <bpmn:incoming>SequenceFlow_08xcz0v</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1lpxjvi</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.getNSSMFProgresss(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1uiz85h" sourceRef="Task_09nzhwk" targetRef="ExclusiveGateway_0xz0xx2" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_0b9d9l0" name="Is NSSI sharable?" default="SequenceFlow_0ueeeca"> - <bpmn:incoming>SequenceFlow_0dj0jvq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1h5bw41</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0ueeeca</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_1h5bw41" name="No" sourceRef="ExclusiveGateway_0b9d9l0" targetRef="Task_09nzhwk"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "create")}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:scriptTask id="ScriptTask_1ehyrsg" name="send update request to NSSMF adapter" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0ueeeca</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0xfhbqw</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.sendUpdateRequestNSSMF(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0ueeeca" name="Yes" sourceRef="ExclusiveGateway_0b9d9l0" targetRef="ScriptTask_1ehyrsg" /> - <bpmn:scriptTask id="ScriptTask_0o93dvp" name="Get NSST from Catalog DB" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_03bz6dh</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0dj0jvq</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.getNSSTInfo(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0dj0jvq" sourceRef="ScriptTask_0o93dvp" targetRef="ExclusiveGateway_0b9d9l0" /> - <bpmn:sequenceFlow id="SequenceFlow_0xfhbqw" sourceRef="ScriptTask_1ehyrsg" targetRef="ExclusiveGateway_0xz0xx2" /> - <bpmn:scriptTask id="ScriptTask_1mv1npn" name="create NSSI and update relationship" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_07azk0i</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0yie00u</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.instantiateNSSIService(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1lpxjvi" sourceRef="finishNSCreate_Task" targetRef="ScriptTask_1fvkcir" /> - <bpmn:callActivity id="CallActivity_09l7bhc" name="Call Decompose Service" calledElement="DecomposeService"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_03bz6dh</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_03bz6dh" sourceRef="CallActivity_09l7bhc" targetRef="ScriptTask_0o93dvp" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_1cgffe3" name="Completed"> - <bpmn:incoming>SequenceFlow_1xzq95u</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1kxwt7k</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0stj4cv</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:scriptTask id="ScriptTask_1escji6" name="Time delay" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0stj4cv</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_08xcz0v</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.timeDelay(execution)</bpmn:script> +dcnssi.sendCreateRequestNSSMF(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_08xcz0v" sourceRef="ScriptTask_1escji6" targetRef="finishNSCreate_Task" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_0xz0xx2"> - <bpmn:incoming>SequenceFlow_0xfhbqw</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1uiz85h</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1smrx3b</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_1kxwt7k" name="true" sourceRef="ExclusiveGateway_1cgffe3" targetRef="ExclusiveGateway_09hoejm"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSSICreated" ) == true)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0stj4cv" name="false" sourceRef="ExclusiveGateway_1cgffe3" targetRef="ScriptTask_1escji6"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSSICreated" ) == false)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1smrx3b" sourceRef="ExclusiveGateway_0xz0xx2" targetRef="finishNSCreate_Task" /> - <bpmn:sequenceFlow id="SequenceFlow_0yie00u" sourceRef="ScriptTask_1mv1npn" targetRef="instantiate_NSTask" /> - <bpmn:sequenceFlow id="SequenceFlow_09pv5lu" sourceRef="instantiate_NSTask" targetRef="EndEvent_1x6k78c" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_09hoejm" name="Is NSSI sharable?" default="SequenceFlow_0c2o5zl2"> - <bpmn:incoming>SequenceFlow_1kxwt7k</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_07azk0i</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0c2o5zl2</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_07azk0i" sourceRef="ExclusiveGateway_09hoejm" targetRef="ScriptTask_1mv1npn"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "create")}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:scriptTask id="ScriptTask_0y2xmwi" name="Update relationship" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_14lzy4o</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0kzlbeh</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1wclf50" sourceRef="ScriptTask_15a7mua" targetRef="Task_1ym947s" /> + <bpmn:sequenceFlow id="SequenceFlow_0h6mn7j" sourceRef="ScriptTask_0n2z0z7" targetRef="ScriptTask_15a7mua" /> + <bpmn:scriptTask id="Task_1ym947s" name="Query NSSI progress from adapter" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0gpgxw4</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1wclf50</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0p9gd2n</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnssi = new DoAllocateNSSI() -dcnssi.updateRelationship(execution)</bpmn:script> +dcnssi.queryNSSIStatus(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0c2o5zl2" sourceRef="ExclusiveGateway_09hoejm" targetRef="ScriptTask_0y2xmwi" /> - <bpmn:sequenceFlow id="SequenceFlow_0kzlbeh" sourceRef="ScriptTask_0y2xmwi" targetRef="instantiate_NSTask" /> - <bpmn:scriptTask id="ScriptTask_1fvkcir" name="Prepare Update Orchestration Task" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1lpxjvi</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0jjbci8</bpmn:outgoing> + <bpmn:scriptTask id="ScriptTask_0ki1c4k" name="Prepare Update Orchestration Task" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0p9gd2n</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ozi7ed</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcnssi = new DoAllocateNSSI() dcnssi.prepareUpdateOrchestrationTask(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_11d0poc" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> + <bpmn:callActivity id="CallActivity_0knipxf" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> <bpmn:extensionElements> <camunda:out source="statusCode" target="CSSOT_dbResponseCode" /> <camunda:out source="response" target="CSSOT_dbResponse" /> @@ -150,215 +48,111 @@ dcnssi.prepareUpdateOrchestrationTask(execution)</bpmn:script> <camunda:in source="CSSOT_paramJson" target="paramJson" /> <camunda:in source="CSSOT_requestMethod" target="method" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0jjbci8</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1xzq95u</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_1ozi7ed</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0hgv9c5</bpmn:outgoing> </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0jjbci8" sourceRef="ScriptTask_1fvkcir" targetRef="CallActivity_11d0poc" /> - <bpmn:sequenceFlow id="SequenceFlow_1xzq95u" sourceRef="CallActivity_11d0poc" targetRef="ExclusiveGateway_1cgffe3" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_19tascw" name="Is NSI option available?" default="SequenceFlow_14lzy4o"> - <bpmn:incoming>SequenceFlow_0c2o5zl2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_14lzy4o</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1r8qkgf</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1ozi7ed" sourceRef="ScriptTask_0ki1c4k" targetRef="CallActivity_0knipxf" /> + <bpmn:sequenceFlow id="SequenceFlow_0p9gd2n" sourceRef="Task_1ym947s" targetRef="ScriptTask_0ki1c4k" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_11gv703" name="Completed" default="SequenceFlow_0y5jr25"> + <bpmn:incoming>SequenceFlow_0hgv9c5</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0y5jr25</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_170frn3</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_14lzy4o" sourceRef="ExclusiveGateway_19tascw" targetRef="ScriptTask_0y2xmwi" /> - <bpmn:sequenceFlow id="SequenceFlow_1r8qkgf" sourceRef="ExclusiveGateway_19tascw" targetRef="instantiate_NSTask"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSIOptionAvailable" ) == true)}</bpmn:conditionExpression> + <bpmn:sequenceFlow id="SequenceFlow_0hgv9c5" sourceRef="CallActivity_0knipxf" targetRef="ExclusiveGateway_11gv703" /> + <bpmn:scriptTask id="ScriptTask_1s7bt3s" name="Time delay" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0y5jr25</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0gpgxw4</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcnssi = new DoAllocateNSSI() +dcnssi.timeDelay(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0y5jr25" name="false" sourceRef="ExclusiveGateway_11gv703" targetRef="ScriptTask_1s7bt3s" /> + <bpmn:sequenceFlow id="SequenceFlow_0gpgxw4" sourceRef="ScriptTask_1s7bt3s" targetRef="Task_1ym947s" /> + <bpmn:sequenceFlow id="SequenceFlow_170frn3" name="yes" sourceRef="ExclusiveGateway_11gv703" targetRef="IntermediateThrowEvent_10xe1qh"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("jobFinished" ) == true)}</bpmn:conditionExpression> </bpmn:sequenceFlow> + <bpmn:endEvent id="IntermediateThrowEvent_10xe1qh"> + <bpmn:incoming>SequenceFlow_170frn3</bpmn:incoming> + </bpmn:endEvent> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateNSSI"> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="allocatenssi_StartEvent"> - <dc:Bounds x="175" y="509" width="36" height="36" /> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateNSSIV2"> + <bpmndi:BPMNShape id="StartEvent_0zs8ezi_di" bpmnElement="StartEvent_0zs8ezi"> + <dc:Bounds x="147" y="112" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="152" y="545" width="85" height="27" /> + <dc:Bounds x="152" y="153" width="25" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln"> - <di:waypoint x="211" y="527" /> - <di:waypoint x="269" y="527" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="266" y="123" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova"> - <di:waypoint x="369" y="527" /> - <di:waypoint x="444" y="527" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="436" y="108" width="0" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk"> - <dc:Bounds x="887" y="659" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task"> - <dc:Bounds x="269" y="487" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="instantiate_NSTask"> - <dc:Bounds x="2286" y="467" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0n2z0z7_di" bpmnElement="ScriptTask_0n2z0z7"> + <dc:Bounds x="270" y="90" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c"> - <dc:Bounds x="2482" y="489" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="412" y="617" width="90" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0xxyfku_di" bpmnElement="finishNSCreate_Task"> - <dc:Bounds x="1238" y="467" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1uiz85h_di" bpmnElement="SequenceFlow_1uiz85h"> - <di:waypoint x="987" y="699" /> - <di:waypoint x="1103" y="699" /> - <di:waypoint x="1103" y="532" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="631" y="108" width="0" height="12" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNEdge id="SequenceFlow_07xkshs_di" bpmnElement="SequenceFlow_07xkshs"> + <di:waypoint x="183" y="130" /> + <di:waypoint x="270" y="130" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_0b9d9l0_di" bpmnElement="ExclusiveGateway_0b9d9l0" isMarkerVisible="true"> - <dc:Bounds x="778" y="502" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="838" y="520" width="90" height="14" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNShape id="ScriptTask_15a7mua_di" bpmnElement="ScriptTask_15a7mua"> + <dc:Bounds x="460" y="90" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1h5bw41_di" bpmnElement="SequenceFlow_1h5bw41"> - <di:waypoint x="803" y="552" /> - <di:waypoint x="803" y="699" /> - <di:waypoint x="883" y="699" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="836" y="681" width="14" height="14" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNEdge id="SequenceFlow_1wclf50_di" bpmnElement="SequenceFlow_1wclf50"> + <di:waypoint x="560" y="130" /> + <di:waypoint x="670" y="130" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1ehyrsg_di" bpmnElement="ScriptTask_1ehyrsg"> - <dc:Bounds x="894" y="310" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ueeeca_di" bpmnElement="SequenceFlow_0ueeeca"> - <di:waypoint x="803" y="502" /> - <di:waypoint x="803" y="350" /> - <di:waypoint x="894" y="350" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="831" y="358" width="19" height="14" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNEdge id="SequenceFlow_0h6mn7j_di" bpmnElement="SequenceFlow_0h6mn7j"> + <di:waypoint x="370" y="130" /> + <di:waypoint x="460" y="130" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0o93dvp_di" bpmnElement="ScriptTask_0o93dvp"> - <dc:Bounds x="618" y="487" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0bt5d96_di" bpmnElement="Task_1ym947s"> + <dc:Bounds x="670" y="90" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0dj0jvq_di" bpmnElement="SequenceFlow_0dj0jvq"> - <di:waypoint x="718" y="527" /> - <di:waypoint x="778" y="527" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0xfhbqw_di" bpmnElement="SequenceFlow_0xfhbqw"> - <di:waypoint x="994" y="350" /> - <di:waypoint x="1103" y="350" /> - <di:waypoint x="1103" y="482" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1mv1npn_di" bpmnElement="ScriptTask_1mv1npn"> - <dc:Bounds x="2089" y="467" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0ki1c4k_di" bpmnElement="ScriptTask_0ki1c4k"> + <dc:Bounds x="840" y="90" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1lpxjvi_di" bpmnElement="SequenceFlow_1lpxjvi"> - <di:waypoint x="1338" y="507" /> - <di:waypoint x="1411" y="507" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_09l7bhc_di" bpmnElement="CallActivity_09l7bhc"> - <dc:Bounds x="444" y="487" width="100" height="80" /> + <bpmndi:BPMNShape id="CallActivity_0knipxf_di" bpmnElement="CallActivity_0knipxf"> + <dc:Bounds x="1040" y="90" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_03bz6dh_di" bpmnElement="SequenceFlow_03bz6dh"> - <di:waypoint x="544" y="527" /> - <di:waypoint x="618" y="527" /> + <bpmndi:BPMNEdge id="SequenceFlow_1ozi7ed_di" bpmnElement="SequenceFlow_1ozi7ed"> + <di:waypoint x="940" y="130" /> + <di:waypoint x="1040" y="130" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0p9gd2n_di" bpmnElement="SequenceFlow_0p9gd2n"> + <di:waypoint x="770" y="130" /> + <di:waypoint x="840" y="130" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_1cgffe3_di" bpmnElement="ExclusiveGateway_1cgffe3" isMarkerVisible="true"> - <dc:Bounds x="1773" y="482" width="50" height="50" /> + <bpmndi:BPMNShape id="ExclusiveGateway_11gv703_di" bpmnElement="ExclusiveGateway_11gv703" isMarkerVisible="true"> + <dc:Bounds x="1245" y="105" width="50" height="50" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1771" y="458" width="54" height="14" /> + <dc:Bounds x="1243" y="81" width="54" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1escji6_di" bpmnElement="ScriptTask_1escji6"> - <dc:Bounds x="1748" y="624" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_08xcz0v_di" bpmnElement="SequenceFlow_08xcz0v"> - <di:waypoint x="1748" y="664" /> - <di:waypoint x="1288" y="664" /> - <di:waypoint x="1288" y="547" /> + <bpmndi:BPMNEdge id="SequenceFlow_0hgv9c5_di" bpmnElement="SequenceFlow_0hgv9c5"> + <di:waypoint x="1140" y="130" /> + <di:waypoint x="1245" y="130" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_0xz0xx2_di" bpmnElement="ExclusiveGateway_0xz0xx2" isMarkerVisible="true"> - <dc:Bounds x="1078" y="482" width="50" height="50" /> + <bpmndi:BPMNShape id="ScriptTask_1s7bt3s_di" bpmnElement="ScriptTask_1s7bt3s"> + <dc:Bounds x="1220" y="230" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1kxwt7k_di" bpmnElement="SequenceFlow_1kxwt7k"> - <di:waypoint x="1823" y="507" /> - <di:waypoint x="1928" y="507" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1866" y="489" width="19" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0stj4cv_di" bpmnElement="SequenceFlow_0stj4cv"> - <di:waypoint x="1798" y="532" /> - <di:waypoint x="1798" y="624" /> + <bpmndi:BPMNEdge id="SequenceFlow_0y5jr25_di" bpmnElement="SequenceFlow_0y5jr25"> + <di:waypoint x="1270" y="155" /> + <di:waypoint x="1270" y="230" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1801" y="575" width="24" height="14" /> + <dc:Bounds x="1251" y="195" width="23" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1smrx3b_di" bpmnElement="SequenceFlow_1smrx3b"> - <di:waypoint x="1128" y="507" /> - <di:waypoint x="1238" y="507" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0yie00u_di" bpmnElement="SequenceFlow_0yie00u"> - <di:waypoint x="2189" y="507" /> - <di:waypoint x="2286" y="507" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_09pv5lu_di" bpmnElement="SequenceFlow_09pv5lu"> - <di:waypoint x="2386" y="507" /> - <di:waypoint x="2482" y="507" /> + <bpmndi:BPMNEdge id="SequenceFlow_0gpgxw4_di" bpmnElement="SequenceFlow_0gpgxw4"> + <di:waypoint x="1220" y="270" /> + <di:waypoint x="720" y="270" /> + <di:waypoint x="720" y="170" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_09hoejm_di" bpmnElement="ExclusiveGateway_09hoejm" isMarkerVisible="true"> - <dc:Bounds x="1928" y="482" width="50" height="50" /> + <bpmndi:BPMNEdge id="SequenceFlow_170frn3_di" bpmnElement="SequenceFlow_170frn3"> + <di:waypoint x="1295" y="130" /> + <di:waypoint x="1372" y="130" /> <bpmndi:BPMNLabel> - <dc:Bounds x="1908" y="542" width="90" height="14" /> + <dc:Bounds x="1325" y="112" width="17" height="14" /> </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_07azk0i_di" bpmnElement="SequenceFlow_07azk0i"> - <di:waypoint x="1978" y="507" /> - <di:waypoint x="2089" y="507" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0y2xmwi_di" bpmnElement="ScriptTask_0y2xmwi"> - <dc:Bounds x="2089" y="310" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0kzlbeh_di" bpmnElement="SequenceFlow_0kzlbeh"> - <di:waypoint x="2189" y="350" /> - <di:waypoint x="2336" y="350" /> - <di:waypoint x="2336" y="467" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1fvkcir_di" bpmnElement="ScriptTask_1fvkcir"> - <dc:Bounds x="1411" y="467" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_11d0poc_di" bpmnElement="CallActivity_11d0poc"> - <dc:Bounds x="1587" y="467" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0jjbci8_di" bpmnElement="SequenceFlow_0jjbci8"> - <di:waypoint x="1511" y="507" /> - <di:waypoint x="1587" y="507" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1xzq95u_di" bpmnElement="SequenceFlow_1xzq95u"> - <di:waypoint x="1687" y="507" /> - <di:waypoint x="1773" y="507" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_19tascw_di" bpmnElement="ExclusiveGateway_19tascw" isMarkerVisible="true"> - <dc:Bounds x="1928" y="325" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1854" y="337" width="64" height="27" /> - </bpmndi:BPMNLabel> + <bpmndi:BPMNShape id="EndEvent_1q1vntz_di" bpmnElement="IntermediateThrowEvent_10xe1qh"> + <dc:Bounds x="1372" y="112" width="36" height="36" /> </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0c2o5zl_di" bpmnElement="SequenceFlow_0c2o5zl2"> - <di:waypoint x="1953" y="482" /> - <di:waypoint x="1953" y="375" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_14lzy4o_di" bpmnElement="SequenceFlow_14lzy4o"> - <di:waypoint x="1978" y="350" /> - <di:waypoint x="2089" y="350" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1r8qkgf_di" bpmnElement="SequenceFlow_1r8qkgf"> - <di:waypoint x="1953" y="325" /> - <di:waypoint x="1953" y="205" /> - <di:waypoint x="2336" y="205" /> - <di:waypoint x="2336" y="465" /> - </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSIV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSIV2.bpmn deleted file mode 100644 index bcb48a60e6..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoAllocateNSSIV2.bpmn +++ /dev/null @@ -1,233 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> - <bpmn:process id="DoAllocateNSSIV2" name="DoAllocateNSSIV2" isExecutable="true"> - <bpmn:startEvent id="StartEvent_0zs8ezi" name="Start"> - <bpmn:outgoing>SequenceFlow_07xkshs</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:scriptTask id="ScriptTask_0n2z0z7" name="Preprocess Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_07xkshs</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0h6mn7j</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.preProcessRequest(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_07xkshs" sourceRef="StartEvent_0zs8ezi" targetRef="ScriptTask_0n2z0z7" /> - <bpmn:scriptTask id="ScriptTask_15a7mua" name="send allocate request to NSSMF adapter" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1iw5oad</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1wclf50</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.sendCreateRequestNSSMF(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_11w6bb3" name="Is NSSI sharable?"> - <bpmn:incoming>SequenceFlow_0ib27f2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1iw5oad</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0haiyzv</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:scriptTask id="ScriptTask_16zhp9e" name="send modify request to NSSMF adapter" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0haiyzv</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ellzst</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.sendUpdateRequestNSSMF(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_0jx00mv"> - <bpmn:incoming>SequenceFlow_1wclf50</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1ellzst</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0ejdefw</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_1iw5oad" name="No" sourceRef="ExclusiveGateway_11w6bb3" targetRef="ScriptTask_15a7mua"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "create")}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1wclf50" sourceRef="ScriptTask_15a7mua" targetRef="ExclusiveGateway_0jx00mv" /> - <bpmn:sequenceFlow id="SequenceFlow_0haiyzv" name="yes" sourceRef="ExclusiveGateway_11w6bb3" targetRef="ScriptTask_16zhp9e"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "update")}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1ellzst" sourceRef="ScriptTask_16zhp9e" targetRef="ExclusiveGateway_0jx00mv" /> - <bpmn:sequenceFlow id="SequenceFlow_0h6mn7j" sourceRef="ScriptTask_0n2z0z7" targetRef="ScriptTask_1e7tchy" /> - <bpmn:scriptTask id="ScriptTask_1e7tchy" name="Prepare NSSI Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0h6mn7j</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0ib27f2</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.getNSSTInfo(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0ib27f2" sourceRef="ScriptTask_1e7tchy" targetRef="ExclusiveGateway_11w6bb3" /> - <bpmn:sequenceFlow id="SequenceFlow_0ejdefw" sourceRef="ExclusiveGateway_0jx00mv" targetRef="Task_1ym947s" /> - <bpmn:scriptTask id="Task_1ym947s" name="Query NSSI progress from adapter" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0ejdefw</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0gpgxw4</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0p9gd2n</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.queryNSSIStatus(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0ki1c4k" name="Prepare Update Orchestration Task" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0p9gd2n</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ozi7ed</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.prepareUpdateOrchestrationTask(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_0knipxf" name="Call HandleOrchestrationTask" calledElement="HandleOrchestrationTask"> - <bpmn:extensionElements> - <camunda:out source="statusCode" target="CSSOT_dbResponseCode" /> - <camunda:out source="response" target="CSSOT_dbResponse" /> - <camunda:in source="CSSOT_taskId" target="taskId" /> - <camunda:in source="msoRequestId" target="requestId" /> - <camunda:in source="CSSOT_name" target="taskName" /> - <camunda:in source="CSSOT_status" target="taskStatus" /> - <camunda:in source="CSSOT_isManual" target="isManual" /> - <camunda:in source="CSSOT_paramJson" target="paramJson" /> - <camunda:in source="CSSOT_requestMethod" target="method" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1ozi7ed</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0hgv9c5</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_1ozi7ed" sourceRef="ScriptTask_0ki1c4k" targetRef="CallActivity_0knipxf" /> - <bpmn:sequenceFlow id="SequenceFlow_0p9gd2n" sourceRef="Task_1ym947s" targetRef="ScriptTask_0ki1c4k" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_11gv703" name="Completed"> - <bpmn:incoming>SequenceFlow_0hgv9c5</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0y5jr25</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_170frn3</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_0hgv9c5" sourceRef="CallActivity_0knipxf" targetRef="ExclusiveGateway_11gv703" /> - <bpmn:scriptTask id="ScriptTask_1s7bt3s" name="Time delay" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0y5jr25</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0gpgxw4</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcnssi = new DoAllocateNSSI() -dcnssi.timeDelay(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0y5jr25" name="false" sourceRef="ExclusiveGateway_11gv703" targetRef="ScriptTask_1s7bt3s" /> - <bpmn:sequenceFlow id="SequenceFlow_0gpgxw4" sourceRef="ScriptTask_1s7bt3s" targetRef="Task_1ym947s" /> - <bpmn:sequenceFlow id="SequenceFlow_170frn3" sourceRef="ExclusiveGateway_11gv703" targetRef="IntermediateThrowEvent_10xe1qh"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "update")}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:endEvent id="IntermediateThrowEvent_10xe1qh"> - <bpmn:incoming>SequenceFlow_170frn3</bpmn:incoming> - </bpmn:endEvent> - </bpmn:process> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoAllocateNSSIV2"> - <bpmndi:BPMNShape id="StartEvent_0zs8ezi_di" bpmnElement="StartEvent_0zs8ezi"> - <dc:Bounds x="147" y="272" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="152" y="313" width="25" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0n2z0z7_di" bpmnElement="ScriptTask_0n2z0z7"> - <dc:Bounds x="235" y="250" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_07xkshs_di" bpmnElement="SequenceFlow_07xkshs"> - <di:waypoint x="183" y="290" /> - <di:waypoint x="235" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_15a7mua_di" bpmnElement="ScriptTask_15a7mua"> - <dc:Bounds x="660" y="430" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_11w6bb3_di" bpmnElement="ExclusiveGateway_11w6bb3" isMarkerVisible="true"> - <dc:Bounds x="591" y="265" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="645" y="283" width="89" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_16zhp9e_di" bpmnElement="ScriptTask_16zhp9e"> - <dc:Bounds x="660" y="81" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_0jx00mv_di" bpmnElement="ExclusiveGateway_0jx00mv" isMarkerVisible="true"> - <dc:Bounds x="785" y="265" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1iw5oad_di" bpmnElement="SequenceFlow_1iw5oad"> - <di:waypoint x="616" y="315" /> - <di:waypoint x="616" y="470" /> - <di:waypoint x="660" y="470" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="631" y="393" width="15" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1wclf50_di" bpmnElement="SequenceFlow_1wclf50"> - <di:waypoint x="760" y="470" /> - <di:waypoint x="810" y="470" /> - <di:waypoint x="810" y="315" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0haiyzv_di" bpmnElement="SequenceFlow_0haiyzv"> - <di:waypoint x="616" y="265" /> - <di:waypoint x="616" y="121" /> - <di:waypoint x="660" y="121" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="635" y="173" width="17" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ellzst_di" bpmnElement="SequenceFlow_1ellzst"> - <di:waypoint x="760" y="121" /> - <di:waypoint x="810" y="121" /> - <di:waypoint x="810" y="265" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0h6mn7j_di" bpmnElement="SequenceFlow_0h6mn7j"> - <di:waypoint x="335" y="290" /> - <di:waypoint x="410" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1e7tchy_di" bpmnElement="ScriptTask_1e7tchy"> - <dc:Bounds x="410" y="250" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0ib27f2_di" bpmnElement="SequenceFlow_0ib27f2"> - <di:waypoint x="510" y="290" /> - <di:waypoint x="591" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0ejdefw_di" bpmnElement="SequenceFlow_0ejdefw"> - <di:waypoint x="835" y="290" /> - <di:waypoint x="910" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0bt5d96_di" bpmnElement="Task_1ym947s"> - <dc:Bounds x="910" y="250" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0ki1c4k_di" bpmnElement="ScriptTask_0ki1c4k"> - <dc:Bounds x="1090" y="250" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0knipxf_di" bpmnElement="CallActivity_0knipxf"> - <dc:Bounds x="1238" y="250" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1ozi7ed_di" bpmnElement="SequenceFlow_1ozi7ed"> - <di:waypoint x="1190" y="290" /> - <di:waypoint x="1238" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0p9gd2n_di" bpmnElement="SequenceFlow_0p9gd2n"> - <di:waypoint x="1010" y="290" /> - <di:waypoint x="1090" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ExclusiveGateway_11gv703_di" bpmnElement="ExclusiveGateway_11gv703" isMarkerVisible="true"> - <dc:Bounds x="1395" y="265" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1393" y="241" width="54" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0hgv9c5_di" bpmnElement="SequenceFlow_0hgv9c5"> - <di:waypoint x="1338" y="290" /> - <di:waypoint x="1395" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1s7bt3s_di" bpmnElement="ScriptTask_1s7bt3s"> - <dc:Bounds x="1370" y="390" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_0y5jr25_di" bpmnElement="SequenceFlow_0y5jr25"> - <di:waypoint x="1420" y="315" /> - <di:waypoint x="1420" y="390" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1401" y="355" width="23" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0gpgxw4_di" bpmnElement="SequenceFlow_0gpgxw4"> - <di:waypoint x="1370" y="430" /> - <di:waypoint x="960" y="430" /> - <di:waypoint x="960" y="330" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_170frn3_di" bpmnElement="SequenceFlow_170frn3"> - <di:waypoint x="1445" y="290" /> - <di:waypoint x="1522" y="290" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="EndEvent_1q1vntz_di" bpmnElement="IntermediateThrowEvent_10xe1qh"> - <dc:Bounds x="1522" y="272" width="36" height="36" /> - </bpmndi:BPMNShape> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceInstance.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceInstance.bpmn index 894f7d39dc..0345ea7a9f 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceInstance.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceInstance.bpmn @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.3"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> <bpmn:process id="DoCreateSliceServiceInstance" name="DoCreateSliceServiceInstance" isExecutable="true"> <bpmn:startEvent id="createNS_StartEvent" name="createNS_StartEvent"> <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing> </bpmn:startEvent> <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="PreprocessIncomingRequest_task" /> - <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="instantiate_NSTask" /> + <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="ScriptTask_1g378se" /> <bpmn:scriptTask id="Task_09nzhwk" name="Create service profile" scriptFormat="groovy"> <bpmn:incoming>SequenceFlow_17u69c4</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1uiz85h</bpmn:outgoing> @@ -21,7 +21,7 @@ def dcsi = new DoCreateSliceServiceInstance() dcsi.preProcessRequest(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:scriptTask id="instantiate_NSTask" name="create Slice Service in AAI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming> + <bpmn:incoming>SequenceFlow_11gmz7e</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0g5bwvl</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcsi = new DoCreateSliceServiceInstance() @@ -40,6 +40,27 @@ def dcsi = new DoCreateSliceServiceInstance() dcsi.createAllottedResource(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:sequenceFlow id="SequenceFlow_17u69c4" sourceRef="ScriptTask_18rzwzb" targetRef="Task_09nzhwk" /> + <bpmn:scriptTask id="ScriptTask_1g378se" name="Prepare ServiceProfile Decompose Service " scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1wafqwa</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcsi= new CreateSliceService() +dcsi.prepareDecomposeService(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:callActivity id="CallActivity_0svmkxh" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="serviceDecomposition" target="serviceProfileDecomposition" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1wafqwa</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_11gmz7e</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_1wafqwa" sourceRef="ScriptTask_1g378se" targetRef="CallActivity_0svmkxh" /> + <bpmn:sequenceFlow id="SequenceFlow_11gmz7e" sourceRef="CallActivity_0svmkxh" targetRef="instantiate_NSTask" /> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateSliceServiceInstance"> @@ -60,43 +81,57 @@ dcsi.createAllottedResource(execution)</bpmn:script> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova"> <di:waypoint x="393" y="129" /> - <di:waypoint x="474" y="129" /> + <di:waypoint x="440" y="129" /> <bpmndi:BPMNLabel> <dc:Bounds x="436" y="108" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk"> - <dc:Bounds x="851" y="89" width="100" height="80" /> + <dc:Bounds x="1120" y="89" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task"> <dc:Bounds x="293" y="89" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="ScriptTask_1qmmew8_di" bpmnElement="instantiate_NSTask"> - <dc:Bounds x="474" y="89" width="100" height="80" /> + <dc:Bounds x="790" y="89" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c"> - <dc:Bounds x="1049" y="111" width="36" height="36" /> + <dc:Bounds x="1292" y="111" width="36" height="36" /> <bpmndi:BPMNLabel> <dc:Bounds x="412" y="617" width="90" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_1uiz85h_di" bpmnElement="SequenceFlow_1uiz85h"> - <di:waypoint x="951" y="129" /> - <di:waypoint x="1049" y="129" /> + <di:waypoint x="1220" y="129" /> + <di:waypoint x="1292" y="129" /> <bpmndi:BPMNLabel> <dc:Bounds x="631" y="108" width="0" height="12" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> <bpmndi:BPMNEdge id="SequenceFlow_0g5bwvl_di" bpmnElement="SequenceFlow_0g5bwvl"> - <di:waypoint x="574" y="129" /> - <di:waypoint x="658" y="129" /> + <di:waypoint x="890" y="129" /> + <di:waypoint x="960" y="129" /> </bpmndi:BPMNEdge> <bpmndi:BPMNShape id="ScriptTask_18rzwzb_di" bpmnElement="ScriptTask_18rzwzb"> - <dc:Bounds x="658" y="89" width="100" height="80" /> + <dc:Bounds x="960" y="89" width="100" height="80" /> </bpmndi:BPMNShape> <bpmndi:BPMNEdge id="SequenceFlow_17u69c4_di" bpmnElement="SequenceFlow_17u69c4"> - <di:waypoint x="758" y="129" /> - <di:waypoint x="851" y="129" /> + <di:waypoint x="1060" y="129" /> + <di:waypoint x="1120" y="129" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1g378se_di" bpmnElement="ScriptTask_1g378se"> + <dc:Bounds x="440" y="89" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0svmkxh_di" bpmnElement="CallActivity_0svmkxh"> + <dc:Bounds x="610" y="89" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1wafqwa_di" bpmnElement="SequenceFlow_1wafqwa"> + <di:waypoint x="540" y="129" /> + <di:waypoint x="610" y="129" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_11gmz7e_di" bpmnElement="SequenceFlow_11gmz7e"> + <di:waypoint x="710" y="129" /> + <di:waypoint x="790" y="129" /> </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn index 3ed1999d9a..045d88daa9 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOption.bpmn @@ -1,117 +1,187 @@ <?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.1.1"> +<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> <bpmn:process id="DoCreateSliceServiceOption" name="DoCreateSliceServiceOption" isExecutable="true"> - <bpmn:startEvent id="createNS_StartEvent" name="createOption_StartEvent"> - <bpmn:outgoing>SequenceFlow_1qo2pln</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:sequenceFlow id="SequenceFlow_1qo2pln" sourceRef="createNS_StartEvent" targetRef="PreprocessIncomingRequest_task" /> - <bpmn:sequenceFlow id="SequenceFlow_0khtova" sourceRef="PreprocessIncomingRequest_task" targetRef="Task_09nzhwk" /> - <bpmn:scriptTask id="Task_09nzhwk" name="Prepare OOF Select NSI options request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0khtova</bpmn:incoming> - <bpmn:outgoing>Flow_15c2jcx</bpmn:outgoing> + <bpmn:scriptTask id="ScriptTask_11rb2ju" name="prepare NST decomposition" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_067xdx1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1kzy63m</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.prepareSelectNSIRequest(execution)</bpmn:script> +dcso.prepareDecomposeNST(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:scriptTask id="PreprocessIncomingRequest_task" name="Preprocess Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1qo2pln</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0khtova</bpmn:outgoing> + <bpmn:callActivity id="CallActivity_0c567r4" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn:extensionElements> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:in source="nstServiceModelInfo" target="serviceModelInfo" /> + <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> + <camunda:out source="serviceDecomposition" target="nstServiceDecomposition" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_1kzy63m</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1t317y2</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:scriptTask id="ScriptTask_0z0dwk2" name="Process Decomposition NST" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1t317y2</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0t4gmix</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.preProcessRequest(execution)</bpmn:script> +dcso.processDecompositionNST(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:endEvent id="EndEvent_1x6k78c"> - <bpmn:incoming>SequenceFlow_1ap8kar</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0hnsycl</bpmn:incoming> + <bpmn:sequenceFlow id="SequenceFlow_1kzy63m" sourceRef="ScriptTask_11rb2ju" targetRef="CallActivity_0c567r4" /> + <bpmn:sequenceFlow id="SequenceFlow_1t317y2" sourceRef="CallActivity_0c567r4" targetRef="ScriptTask_0z0dwk2" /> + <bpmn:parallelGateway id="ParallelGateway_05zg916"> + <bpmn:incoming>SequenceFlow_1h3kdce</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_05250mp</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0euwvgf</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0il5j01</bpmn:outgoing> + </bpmn:parallelGateway> + <bpmn:parallelGateway id="ParallelGateway_06a2n9u"> + <bpmn:incoming>SequenceFlow_14rhmx9</bpmn:incoming> + <bpmn:incoming>SequenceFlow_103oxyw</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0aasemn</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1tr3i9d</bpmn:outgoing> + </bpmn:parallelGateway> + <bpmn:callActivity id="CallActivity_0tzazs0" name="Handle NSST Selection OOF request" calledElement="DoHandleOofRequest"> + <bpmn:extensionElements> + <camunda:in source="nstSelectionUrl" target="apiPath" /> + <camunda:in source="nstSelection_correlator" target="correlator" /> + <camunda:in source="nstSelection_messageType" target="messageType" /> + <camunda:in source="nstSelection_timeout" target="timeout" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + <camunda:out source="asyncCallbackResponse" target="nstSelection_oofResponse" /> + <camunda:in source="nstSelection_oofRequest" target="oofRequest" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0abqxa1</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1tqg26p</bpmn:outgoing> + </bpmn:callActivity> + <bpmn:sequenceFlow id="SequenceFlow_05250mp" sourceRef="ParallelGateway_05zg916" targetRef="CallActivity_1vzxvna" /> + <bpmn:sequenceFlow id="SequenceFlow_14rhmx9" sourceRef="CallActivity_1vzxvna" targetRef="ParallelGateway_06a2n9u" /> + <bpmn:sequenceFlow id="SequenceFlow_0euwvgf" sourceRef="ParallelGateway_05zg916" targetRef="CallActivity_0melx8d" /> + <bpmn:sequenceFlow id="SequenceFlow_103oxyw" sourceRef="CallActivity_0melx8d" targetRef="ParallelGateway_06a2n9u" /> + <bpmn:sequenceFlow id="SequenceFlow_0il5j01" sourceRef="ParallelGateway_05zg916" targetRef="CallActivity_0otry7e" /> + <bpmn:sequenceFlow id="SequenceFlow_0aasemn" sourceRef="CallActivity_0otry7e" targetRef="ParallelGateway_06a2n9u" /> + <bpmn:sequenceFlow id="SequenceFlow_1tr3i9d" sourceRef="ParallelGateway_06a2n9u" targetRef="Task_1jyj2vs" /> + <bpmn:sequenceFlow id="SequenceFlow_0abqxa1" sourceRef="Task_1m9qoo3" targetRef="CallActivity_0tzazs0" /> + <bpmn:sequenceFlow id="SequenceFlow_1tqg26p" sourceRef="CallActivity_0tzazs0" targetRef="Task_00nfg5x" /> + <bpmn:endEvent id="EndEvent_0p0cjhl"> + <bpmn:incoming>SequenceFlow_1nrfy6i</bpmn:incoming> </bpmn:endEvent> - <bpmn:scriptTask id="ScriptTask_0kecvrc" name="prepare list of NSST associated with NST" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0wy6oag</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0lt2cdo</bpmn:outgoing> + <bpmn:startEvent id="StartEvent_0mwlirs" name="Start"> + <bpmn:outgoing>SequenceFlow_1fuwy35</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:scriptTask id="ScriptTask_0w34e57" name="Preprocess Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1fuwy35</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_067xdx1</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.prepareNSSTlistfromNST(execution)</bpmn:script> +dcso.preProcessRequest(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1mlytov" name="send request to OOF for NSSI options" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0a5f5y6</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1r9n9ef</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1fuwy35" sourceRef="StartEvent_0mwlirs" targetRef="ScriptTask_0w34e57" /> + <bpmn:scriptTask id="CallActivity_1vzxvna" name="TN NSSMF supports NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_05250mp</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14rhmx9</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.getNSSTOption(execution)</bpmn:script> +dcso.getNSSISelectionCap4TN(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_1y1wzs9"> - <bpmn:incoming>SequenceFlow_0lt2cdo</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1r9n9ef</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1ap8kar</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0m2mr0o</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_1ap8kar" sourceRef="ExclusiveGateway_1y1wzs9" targetRef="EndEvent_1x6k78c"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isMoreNSSTtoProcess" ) == false)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_0lt2cdo" sourceRef="ScriptTask_0kecvrc" targetRef="ExclusiveGateway_1y1wzs9" /> - <bpmn:sequenceFlow id="SequenceFlow_0m2mr0o" sourceRef="ExclusiveGateway_1y1wzs9" targetRef="ScriptTask_1e5ysya"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isMoreNSSTtoProcess" ) == true)}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1r9n9ef" sourceRef="ScriptTask_1mlytov" targetRef="ExclusiveGateway_1y1wzs9" /> - <bpmn:scriptTask id="ScriptTask_1e5ysya" name="prepare NSST decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0m2mr0o</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_016vi3s</bpmn:outgoing> + <bpmn:scriptTask id="CallActivity_0melx8d" name="CN NSSMF supports NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0euwvgf</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_103oxyw</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.prepareNSSTDecompose(execution)</bpmn:script> +dcso.getNSSISelectionCap4CN(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_016vi3s" sourceRef="ScriptTask_1e5ysya" targetRef="CallActivity_1rfnoe2" /> - <bpmn:callActivity id="CallActivity_1rfnoe2" name="Call Decompose Service" calledElement="DecomposeService"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_016vi3s</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0a5f5y6</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_0a5f5y6" sourceRef="CallActivity_1rfnoe2" targetRef="ScriptTask_1mlytov" /> - <bpmn:exclusiveGateway id="ExclusiveGateway_1skfk7w" default="SequenceFlow_0wy6oag"> - <bpmn:incoming>SequenceFlow_0d774n5</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0wy6oag</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0hnsycl</bpmn:outgoing> + <bpmn:scriptTask id="CallActivity_0otry7e" name="AN NSSMF supports NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0il5j01</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0aasemn</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcso = new DoCreateSliceServiceOption() +dcso.getNSSISelectionCap4AN(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_1m9qoo3" name="Prepare NSSI Selection" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_126j77n</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0abqxa1</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcso = new DoCreateSliceServiceOption() +dcso.preNSSIRequest(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_00nfg5x" name="Process NSST Solutions" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1tqg26p</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1i3j8c3</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcso = new DoCreateSliceServiceOption() +dcso.processNSSIResp(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:exclusiveGateway id="ExclusiveGateway_0b52m39" name="need select nssi?" default="SequenceFlow_1nrfy6i"> + <bpmn:incoming>SequenceFlow_1tey3hz</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_126j77n</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_1nrfy6i</bpmn:outgoing> </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_0wy6oag" sourceRef="ExclusiveGateway_1skfk7w" targetRef="ScriptTask_0kecvrc" /> - <bpmn:sequenceFlow id="SequenceFlow_0hnsycl" sourceRef="ExclusiveGateway_1skfk7w" targetRef="EndEvent_1x6k78c"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isNSISuggested" ) == true)}</bpmn:conditionExpression> + <bpmn:sequenceFlow id="SequenceFlow_126j77n" name="yes" sourceRef="ExclusiveGateway_0b52m39" targetRef="Task_1m9qoo3"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "update")}</bpmn:conditionExpression> </bpmn:sequenceFlow> - <bpmn:scriptTask id="ScriptTask_1umbyel" name="prepare NST decomposition" scriptFormat="groovy"> - <bpmn:incoming>Flow_07ustqm</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0piifl1</bpmn:outgoing> + <bpmn:sequenceFlow id="SequenceFlow_1nrfy6i" sourceRef="ExclusiveGateway_0b52m39" targetRef="EndEvent_0p0cjhl" /> + <bpmn:sequenceFlow id="SequenceFlow_1i3j8c3" sourceRef="Task_00nfg5x" targetRef="Task_1jyj2vs" /> + <bpmn:sequenceFlow id="SequenceFlow_1tey3hz" sourceRef="Task_1jyj2vs" targetRef="ExclusiveGateway_0b52m39" /> + <bpmn:scriptTask id="Task_1jyj2vs" name="handle Nssi select " scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1tr3i9d</bpmn:incoming> + <bpmn:incoming>SequenceFlow_1i3j8c3</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1tey3hz</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcso = new DoCreateSliceServiceOption() +dcso.handleNssiSelect(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_12sydez" name="prepare NSST decomposition" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0zglfyw</bpmn:incoming> + <bpmn:incoming>SequenceFlow_0t4gmix</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_12pvazb</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.prepareNSTDecompose(execution)</bpmn:script> +dcso.prepareDecomposeNSST(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_0piifl1" sourceRef="ScriptTask_1umbyel" targetRef="CallActivity_0ly8xiw" /> - <bpmn:callActivity id="CallActivity_0ly8xiw" name="Call Decompose Service" calledElement="DecomposeService"> + <bpmn:callActivity id="CallActivity_0hfiogq" name="Call Decompose Service" calledElement="DecomposeService"> <bpmn:extensionElements> <camunda:in source="msoRequestId" target="msoRequestId" /> <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="nsstServiceModelInfo" target="serviceModelInfo" /> <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="serviceDecomposition" target="serviceDecomposition" /> + <camunda:out source="serviceDecomposition" target="nsstServiceDecomposition" /> <camunda:out source="WorkflowException" target="WorkflowException" /> </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0piifl1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_086yszq</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_12pvazb</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1inonqp</bpmn:outgoing> </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_086yszq" sourceRef="CallActivity_0ly8xiw" targetRef="Task_1k2ypj0" /> - <bpmn:sequenceFlow id="SequenceFlow_0d774n5" sourceRef="Task_1k2ypj0" targetRef="ExclusiveGateway_1skfk7w" /> - <bpmn:scriptTask id="Task_1k2ypj0" name="Process Decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_086yszq</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0d774n5</bpmn:outgoing> + <bpmn:scriptTask id="ScriptTask_14j28c2" name="Process NSST Decomposition" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1inonqp</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_049glzl</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0zglfyw</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcso = new DoCreateSliceServiceOption() +dcso.processDecompositionNSST(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_12pvazb" sourceRef="ScriptTask_12sydez" targetRef="CallActivity_0hfiogq" /> + <bpmn:sequenceFlow id="SequenceFlow_1inonqp" sourceRef="CallActivity_0hfiogq" targetRef="ScriptTask_14j28c2" /> + <bpmn:intermediateThrowEvent id="IntermediateThrowEvent_1bxdugq" name="Goto Select NSSI "> + <bpmn:incoming>SequenceFlow_16akt81</bpmn:incoming> + <bpmn:linkEventDefinition id="LinkEventDefinition_1id21k7" name="SelectNSSI" /> + </bpmn:intermediateThrowEvent> + <bpmn:sequenceFlow id="SequenceFlow_067xdx1" sourceRef="ScriptTask_0w34e57" targetRef="ScriptTask_11rb2ju" /> + <bpmn:sequenceFlow id="SequenceFlow_049glzl" sourceRef="ScriptTask_14j28c2" targetRef="Task_1xqjkqx"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nsstHandleContinue" ) == "false")}</bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0zglfyw" sourceRef="ScriptTask_14j28c2" targetRef="ScriptTask_12sydez"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nsstHandleContinue" ) == "true")}</bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_0t4gmix" sourceRef="ScriptTask_0z0dwk2" targetRef="ScriptTask_12sydez" /> + <bpmn:scriptTask id="Task_1xqjkqx" name="handle Nsst By Type " scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_049glzl</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_16akt81</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.processDecomposition(execution)</bpmn:script> +dcso.handleNsstByType(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:callActivity id="Activity_0dlr4ra" name="Handle NSI Selection OOF request" calledElement="DoHandleOofRequest"> + <bpmn:sequenceFlow id="SequenceFlow_16akt81" sourceRef="Task_1xqjkqx" targetRef="IntermediateThrowEvent_1bxdugq" /> + <bpmn:callActivity id="CallActivity_0vs5jgq" name="Handle NSI Selection OOF request" calledElement="DoHandleOofRequest"> <bpmn:extensionElements> <camunda:in source="nsiSelectionUrl" target="apiPath" /> <camunda:in source="nsiSelection_correlator" target="correlator" /> @@ -121,149 +191,239 @@ dcso.processDecomposition(execution)</bpmn:script> <camunda:out source="asyncCallbackResponse" target="nsiSelection_oofResponse" /> <camunda:in source="nsiSelection_oofRequest" target="oofRequest" /> </bpmn:extensionElements> - <bpmn:incoming>Flow_15c2jcx</bpmn:incoming> - <bpmn:outgoing>Flow_1mcx2ja</bpmn:outgoing> + <bpmn:incoming>SequenceFlow_14o0fxe</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0nwt0ci</bpmn:outgoing> </bpmn:callActivity> - <bpmn:scriptTask id="Activity_049mjag" name="Process OOF response " scriptFormat="groovy"> - <bpmn:incoming>Flow_1mcx2ja</bpmn:incoming> - <bpmn:outgoing>Flow_07ustqm</bpmn:outgoing> + <bpmn:scriptTask id="ScriptTask_12t6v71" name="Process OOF response " scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0nwt0ci</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1h3kdce</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def dcso = new DoCreateSliceServiceOption() +dcso.processNSIResp(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_0bgvphs" name="Prepare OOF Select NSI options request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1iawj3m</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_14o0fxe</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* def dcso = new DoCreateSliceServiceOption() -dcso.processOOFResponse(execution)</bpmn:script> +dcso.preNSIRequest(execution)</bpmn:script> </bpmn:scriptTask> - <bpmn:sequenceFlow id="Flow_1mcx2ja" sourceRef="Activity_0dlr4ra" targetRef="Activity_049mjag" /> - <bpmn:sequenceFlow id="Flow_15c2jcx" sourceRef="Task_09nzhwk" targetRef="Activity_0dlr4ra" /> - <bpmn:sequenceFlow id="Flow_07ustqm" sourceRef="Activity_049mjag" targetRef="ScriptTask_1umbyel" /> + <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_00uke3g" name=" Select NSSI "> + <bpmn:outgoing>SequenceFlow_1iawj3m</bpmn:outgoing> + <bpmn:linkEventDefinition id="LinkEventDefinition_0czx4vp" name="SelectNSSI" /> + </bpmn:intermediateCatchEvent> + <bpmn:sequenceFlow id="SequenceFlow_14o0fxe" sourceRef="ScriptTask_0bgvphs" targetRef="CallActivity_0vs5jgq" /> + <bpmn:sequenceFlow id="SequenceFlow_0nwt0ci" sourceRef="CallActivity_0vs5jgq" targetRef="ScriptTask_12t6v71" /> + <bpmn:sequenceFlow id="SequenceFlow_1iawj3m" sourceRef="IntermediateCatchEvent_00uke3g" targetRef="ScriptTask_0bgvphs" /> + <bpmn:sequenceFlow id="SequenceFlow_1h3kdce" sourceRef="ScriptTask_12t6v71" targetRef="ParallelGateway_05zg916" /> </bpmn:process> <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateSliceServiceOption"> - <bpmndi:BPMNEdge id="SequenceFlow_0d774n5_di" bpmnElement="SequenceFlow_0d774n5"> - <di:waypoint x="1220" y="125" /> - <di:waypoint x="1275" y="125" /> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateSliceServiceOptionV2"> + <bpmndi:BPMNShape id="ScriptTask_11rb2ju_di" bpmnElement="ScriptTask_11rb2ju"> + <dc:Bounds x="400" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0c567r4_di" bpmnElement="CallActivity_0c567r4"> + <dc:Bounds x="560" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0z0dwk2_di" bpmnElement="ScriptTask_0z0dwk2"> + <dc:Bounds x="710" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1kzy63m_di" bpmnElement="SequenceFlow_1kzy63m"> + <di:waypoint x="500" y="180" /> + <di:waypoint x="560" y="180" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_086yszq_di" bpmnElement="SequenceFlow_086yszq"> - <di:waypoint x="1060" y="125" /> - <di:waypoint x="1120" y="125" /> + <bpmndi:BPMNEdge id="SequenceFlow_1t317y2_di" bpmnElement="SequenceFlow_1t317y2"> + <di:waypoint x="660" y="180" /> + <di:waypoint x="710" y="180" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0piifl1_di" bpmnElement="SequenceFlow_0piifl1"> - <di:waypoint x="920" y="125" /> - <di:waypoint x="960" y="125" /> + <bpmndi:BPMNShape id="ParallelGateway_05zg916_di" bpmnElement="ParallelGateway_05zg916"> + <dc:Bounds x="635" y="475" width="50" height="50" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ParallelGateway_06a2n9u_di" bpmnElement="ParallelGateway_06a2n9u"> + <dc:Bounds x="905" y="475" width="50" height="50" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_0tzazs0_di" bpmnElement="CallActivity_0tzazs0"> + <dc:Bounds x="1410" y="320" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05250mp_di" bpmnElement="SequenceFlow_05250mp"> + <di:waypoint x="660" y="475" /> + <di:waypoint x="660" y="360" /> + <di:waypoint x="740" y="360" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0hnsycl_di" bpmnElement="SequenceFlow_0hnsycl"> - <di:waypoint x="1325" y="125" /> - <di:waypoint x="1993" y="125" /> + <bpmndi:BPMNEdge id="SequenceFlow_14rhmx9_di" bpmnElement="SequenceFlow_14rhmx9"> + <di:waypoint x="840" y="360" /> + <di:waypoint x="930" y="360" /> + <di:waypoint x="930" y="475" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0wy6oag_di" bpmnElement="SequenceFlow_0wy6oag"> - <di:waypoint x="1300" y="150" /> - <di:waypoint x="1300" y="351" /> - <di:waypoint x="1430" y="351" /> + <bpmndi:BPMNEdge id="SequenceFlow_0euwvgf_di" bpmnElement="SequenceFlow_0euwvgf"> + <di:waypoint x="685" y="500" /> + <di:waypoint x="740" y="500" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0a5f5y6_di" bpmnElement="SequenceFlow_0a5f5y6"> - <di:waypoint x="2061" y="351" /> - <di:waypoint x="2148" y="351" /> - <di:waypoint x="2148" y="493" /> - <di:waypoint x="1960" y="493" /> + <bpmndi:BPMNEdge id="SequenceFlow_103oxyw_di" bpmnElement="SequenceFlow_103oxyw"> + <di:waypoint x="840" y="500" /> + <di:waypoint x="905" y="500" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_016vi3s_di" bpmnElement="SequenceFlow_016vi3s"> - <di:waypoint x="1872" y="351" /> - <di:waypoint x="1961" y="351" /> + <bpmndi:BPMNEdge id="SequenceFlow_0il5j01_di" bpmnElement="SequenceFlow_0il5j01"> + <di:waypoint x="660" y="525" /> + <di:waypoint x="660" y="620" /> + <di:waypoint x="740" y="620" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1r9n9ef_di" bpmnElement="SequenceFlow_1r9n9ef"> - <di:waypoint x="1860" y="493" /> - <di:waypoint x="1666" y="493" /> - <di:waypoint x="1666" y="376" /> + <bpmndi:BPMNEdge id="SequenceFlow_0aasemn_di" bpmnElement="SequenceFlow_0aasemn"> + <di:waypoint x="840" y="620" /> + <di:waypoint x="930" y="620" /> + <di:waypoint x="930" y="525" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0m2mr0o_di" bpmnElement="SequenceFlow_0m2mr0o"> - <di:waypoint x="1691" y="351" /> - <di:waypoint x="1772" y="351" /> + <bpmndi:BPMNEdge id="SequenceFlow_1tr3i9d_di" bpmnElement="SequenceFlow_1tr3i9d"> + <di:waypoint x="955" y="500" /> + <di:waypoint x="1010" y="500" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0lt2cdo_di" bpmnElement="SequenceFlow_0lt2cdo"> - <di:waypoint x="1530" y="351" /> - <di:waypoint x="1641" y="351" /> + <bpmndi:BPMNEdge id="SequenceFlow_0abqxa1_di" bpmnElement="SequenceFlow_0abqxa1"> + <di:waypoint x="1460" y="460" /> + <di:waypoint x="1460" y="400" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1ap8kar_di" bpmnElement="SequenceFlow_1ap8kar"> - <di:waypoint x="1666" y="326" /> - <di:waypoint x="1666" y="235" /> - <di:waypoint x="2011" y="235" /> - <di:waypoint x="2011" y="143" /> + <bpmndi:BPMNEdge id="SequenceFlow_1tqg26p_di" bpmnElement="SequenceFlow_1tqg26p"> + <di:waypoint x="1410" y="360" /> + <di:waypoint x="1110" y="360" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0khtova_di" bpmnElement="SequenceFlow_0khtova"> - <di:waypoint x="350" y="125" /> - <di:waypoint x="390" y="125" /> + <bpmndi:BPMNShape id="EndEvent_0p0cjhl_di" bpmnElement="EndEvent_0p0cjhl"> + <dc:Bounds x="1442" y="602" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_0mwlirs_di" bpmnElement="StartEvent_0mwlirs"> + <dc:Bounds x="162" y="162" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="436" y="108" width="0" height="12" /> + <dc:Bounds x="169" y="198" width="25" height="14" /> </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0w34e57_di" bpmnElement="ScriptTask_0w34e57"> + <dc:Bounds x="230" y="140" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1fuwy35_di" bpmnElement="SequenceFlow_1fuwy35"> + <di:waypoint x="198" y="180" /> + <di:waypoint x="230" y="180" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1qo2pln_di" bpmnElement="SequenceFlow_1qo2pln"> - <di:waypoint x="218" y="125" /> - <di:waypoint x="250" y="125" /> + <bpmndi:BPMNShape id="ScriptTask_1anc3ln_di" bpmnElement="CallActivity_1vzxvna"> + <dc:Bounds x="740" y="320" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1xgkaqi_di" bpmnElement="CallActivity_0melx8d"> + <dc:Bounds x="740" y="460" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_11y7ba5_di" bpmnElement="CallActivity_0otry7e"> + <dc:Bounds x="740" y="580" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_1icyh1a_di" bpmnElement="Task_1m9qoo3"> + <dc:Bounds x="1410" y="460" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0aqbm7t_di" bpmnElement="Task_00nfg5x"> + <dc:Bounds x="1010" y="320" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ExclusiveGateway_0b52m39_di" bpmnElement="ExclusiveGateway_0b52m39" isMarkerVisible="true"> + <dc:Bounds x="1235" y="475" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1218" y="463" width="85" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_126j77n_di" bpmnElement="SequenceFlow_126j77n"> + <di:waypoint x="1285" y="500" /> + <di:waypoint x="1410" y="500" /> <bpmndi:BPMNLabel> - <dc:Bounds x="266" y="123" width="0" height="12" /> + <dc:Bounds x="1339" y="482" width="17" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_1mcx2ja_di" bpmnElement="Flow_1mcx2ja"> - <di:waypoint x="640" y="125" /> - <di:waypoint x="680" y="125" /> + <bpmndi:BPMNEdge id="SequenceFlow_1nrfy6i_di" bpmnElement="SequenceFlow_1nrfy6i"> + <di:waypoint x="1260" y="525" /> + <di:waypoint x="1260" y="620" /> + <di:waypoint x="1442" y="620" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_15c2jcx_di" bpmnElement="Flow_15c2jcx"> - <di:waypoint x="490" y="122" /> - <di:waypoint x="540" y="120" /> + <bpmndi:BPMNEdge id="SequenceFlow_1i3j8c3_di" bpmnElement="SequenceFlow_1i3j8c3"> + <di:waypoint x="1060" y="400" /> + <di:waypoint x="1060" y="460" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="Flow_07ustqm_di" bpmnElement="Flow_07ustqm"> - <di:waypoint x="780" y="125" /> - <di:waypoint x="820" y="125" /> + <bpmndi:BPMNEdge id="SequenceFlow_1tey3hz_di" bpmnElement="SequenceFlow_1tey3hz"> + <di:waypoint x="1110" y="500" /> + <di:waypoint x="1235" y="500" /> </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="EndEvent_15pcuuc_di" bpmnElement="EndEvent_1x6k78c"> - <dc:Bounds x="1993" y="107" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="412" y="617" width="90" height="12" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0kecvrc_di" bpmnElement="ScriptTask_0kecvrc"> - <dc:Bounds x="1430" y="311" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1mlytov_di" bpmnElement="ScriptTask_1mlytov"> - <dc:Bounds x="1860" y="453" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_1y1wzs9_di" bpmnElement="ExclusiveGateway_1y1wzs9" isMarkerVisible="true"> - <dc:Bounds x="1641" y="326" width="50" height="50" /> + <bpmndi:BPMNShape id="ScriptTask_0h3fsja_di" bpmnElement="Task_1jyj2vs"> + <dc:Bounds x="1010" y="460" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1e5ysya_di" bpmnElement="ScriptTask_1e5ysya"> - <dc:Bounds x="1772" y="311" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_12sydez_di" bpmnElement="ScriptTask_12sydez"> + <dc:Bounds x="860" y="140" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_1rfnoe2_di" bpmnElement="CallActivity_1rfnoe2"> - <dc:Bounds x="1961" y="311" width="100" height="80" /> + <bpmndi:BPMNShape id="CallActivity_0hfiogq_di" bpmnElement="CallActivity_0hfiogq"> + <dc:Bounds x="1010" y="140" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_1skfk7w_di" bpmnElement="ExclusiveGateway_1skfk7w" isMarkerVisible="true"> - <dc:Bounds x="1275" y="100" width="50" height="50" /> + <bpmndi:BPMNShape id="ScriptTask_14j28c2_di" bpmnElement="ScriptTask_14j28c2"> + <dc:Bounds x="1170" y="140" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0ly8xiw_di" bpmnElement="CallActivity_0ly8xiw"> - <dc:Bounds x="960" y="85" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1895p18_di" bpmnElement="Task_1k2ypj0"> - <dc:Bounds x="1120" y="85" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="createNS_StartEvent"> - <dc:Bounds x="182" y="107" width="36" height="36" /> + <bpmndi:BPMNEdge id="SequenceFlow_12pvazb_di" bpmnElement="SequenceFlow_12pvazb"> + <di:waypoint x="960" y="180" /> + <di:waypoint x="1010" y="180" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1inonqp_di" bpmnElement="SequenceFlow_1inonqp"> + <di:waypoint x="1110" y="180" /> + <di:waypoint x="1170" y="180" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="IntermediateThrowEvent_1bxdugq_di" bpmnElement="IntermediateThrowEvent_1bxdugq"> + <dc:Bounds x="1482" y="162" width="36" height="36" /> <bpmndi:BPMNLabel> - <dc:Bounds x="158" y="143" width="86" height="27" /> + <dc:Bounds x="1459" y="205" width="87" height="14" /> </bpmndi:BPMNLabel> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_03j6ogo_di" bpmnElement="PreprocessIncomingRequest_task"> - <dc:Bounds x="250" y="85" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_067xdx1_di" bpmnElement="SequenceFlow_067xdx1"> + <di:waypoint x="330" y="180" /> + <di:waypoint x="400" y="180" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_049glzl_di" bpmnElement="SequenceFlow_049glzl"> + <di:waypoint x="1270" y="180" /> + <di:waypoint x="1320" y="180" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0zglfyw_di" bpmnElement="SequenceFlow_0zglfyw"> + <di:waypoint x="1230" y="140" /> + <di:waypoint x="1230" y="80" /> + <di:waypoint x="910" y="80" /> + <di:waypoint x="910" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0t4gmix_di" bpmnElement="SequenceFlow_0t4gmix"> + <di:waypoint x="810" y="180" /> + <di:waypoint x="860" y="180" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1tx9eou_di" bpmnElement="Task_1xqjkqx"> + <dc:Bounds x="1320" y="140" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1dw39hg_di" bpmnElement="Task_09nzhwk"> - <dc:Bounds x="390" y="85" width="100" height="80" /> + <bpmndi:BPMNEdge id="SequenceFlow_16akt81_di" bpmnElement="SequenceFlow_16akt81"> + <di:waypoint x="1420" y="180" /> + <di:waypoint x="1482" y="180" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="CallActivity_0vs5jgq_di" bpmnElement="CallActivity_0vs5jgq"> + <dc:Bounds x="360" y="460" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_049mjag_di" bpmnElement="Activity_049mjag"> - <dc:Bounds x="680" y="85" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_12t6v71_di" bpmnElement="ScriptTask_12t6v71"> + <dc:Bounds x="490" y="460" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Activity_0dlr4ra_di" bpmnElement="Activity_0dlr4ra"> - <dc:Bounds x="540" y="85" width="100" height="80" /> + <bpmndi:BPMNShape id="ScriptTask_0bgvphs_di" bpmnElement="ScriptTask_0bgvphs"> + <dc:Bounds x="210" y="460" width="100" height="80" /> </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1umbyel_di" bpmnElement="ScriptTask_1umbyel"> - <dc:Bounds x="820" y="85" width="100" height="80" /> + <bpmndi:BPMNShape id="IntermediateCatchEvent_00uke3g_di" bpmnElement="IntermediateCatchEvent_00uke3g"> + <dc:Bounds x="142" y="482" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="135" y="525" width="60" height="14" /> + </bpmndi:BPMNLabel> </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_14o0fxe_di" bpmnElement="SequenceFlow_14o0fxe"> + <di:waypoint x="310" y="500" /> + <di:waypoint x="360" y="500" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0nwt0ci_di" bpmnElement="SequenceFlow_0nwt0ci"> + <di:waypoint x="460" y="500" /> + <di:waypoint x="490" y="500" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1iawj3m_di" bpmnElement="SequenceFlow_1iawj3m"> + <di:waypoint x="178" y="500" /> + <di:waypoint x="210" y="500" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1h3kdce_di" bpmnElement="SequenceFlow_1h3kdce"> + <di:waypoint x="590" y="500" /> + <di:waypoint x="635" y="500" /> + </bpmndi:BPMNEdge> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOptionV2.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOptionV2.bpmn deleted file mode 100644 index 5d9e53ac18..0000000000 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateSliceServiceOptionV2.bpmn +++ /dev/null @@ -1,563 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> - <bpmn:process id="DoCreateSliceServiceOptionV2" name="DoCreateSliceServiceOptionV2" isExecutable="true"> - <bpmn:parallelGateway id="ParallelGateway_0f11kcw"> - <bpmn:incoming>SequenceFlow_17otbuu</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_00t0340</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_06uu0eh</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_09see8v</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_14s7fck</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1c374y2</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:parallelGateway id="ParallelGateway_05o7mbp"> - <bpmn:incoming>SequenceFlow_04avf98</bpmn:incoming> - <bpmn:incoming>SequenceFlow_00xa5wa</bpmn:incoming> - <bpmn:incoming>SequenceFlow_064p1n6</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1a699ly</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:scriptTask id="ScriptTask_0sznvim" name="Prepare OOF Select NSI options request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_16qt6r2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_175xozh</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.preNSIRequest(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1sik00k" name="Query TN Sub-net capability" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_09see8v</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_04avf98</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.queryTNSubnetCapability(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_1sukxzw" name="Query CN Sub-net capability" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_14s7fck</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_00xa5wa</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.queryCNSubnetCapability(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_02u3dmq" name="Query AN Sub-net capability" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1c374y2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_064p1n6</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.queryANSubnetCapability(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_04avf98" sourceRef="ScriptTask_1sik00k" targetRef="ParallelGateway_05o7mbp" /> - <bpmn:sequenceFlow id="SequenceFlow_00xa5wa" sourceRef="ScriptTask_1sukxzw" targetRef="ParallelGateway_05o7mbp" /> - <bpmn:sequenceFlow id="SequenceFlow_064p1n6" sourceRef="ScriptTask_02u3dmq" targetRef="ParallelGateway_05o7mbp" /> - <bpmn:sequenceFlow id="SequenceFlow_1a699ly" sourceRef="ParallelGateway_05o7mbp" targetRef="Task_1kqbsvd" /> - <bpmn:scriptTask id="ScriptTask_11rb2ju" name="prepare NST decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_00t0340</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1kzy63m</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.prepareDecomposeNST(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_0c567r4" name="Call Decompose Service" calledElement="DecomposeService"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="nstServiceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="serviceDecomposition" target="nstServiceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1kzy63m</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1t317y2</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_0z0dwk2" name="Process Decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1t317y2</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1rwl882</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.processDecomposition(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="ScriptTask_0f0rh4w" name="prepare NSST decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_06uu0eh</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1dtfpqp</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.prepareNSTDecompose(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:callActivity id="CallActivity_1tmbgfs" name="Call Decompose Service" calledElement="DecomposeService"> - <bpmn:extensionElements> - <camunda:in source="msoRequestId" target="msoRequestId" /> - <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> - <camunda:in source="nsstServiceModelInfo" target="serviceModelInfo" /> - <camunda:in source="isDebugLogEnabled" target="isDebugLogEnabled" /> - <camunda:out source="serviceDecomposition" target="nsstServiceDecomposition" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_1dtfpqp</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0fdqj9b</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:scriptTask id="ScriptTask_0m6v98c" name="Process Decomposition" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0fdqj9b</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0d2lpv3</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.processDecomposition(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1kzy63m" sourceRef="ScriptTask_11rb2ju" targetRef="CallActivity_0c567r4" /> - <bpmn:sequenceFlow id="SequenceFlow_1t317y2" sourceRef="CallActivity_0c567r4" targetRef="ScriptTask_0z0dwk2" /> - <bpmn:sequenceFlow id="SequenceFlow_1dtfpqp" sourceRef="ScriptTask_0f0rh4w" targetRef="CallActivity_1tmbgfs" /> - <bpmn:sequenceFlow id="SequenceFlow_0fdqj9b" sourceRef="CallActivity_1tmbgfs" targetRef="ScriptTask_0m6v98c" /> - <bpmn:sequenceFlow id="SequenceFlow_1rwl882" sourceRef="ScriptTask_0z0dwk2" targetRef="ParallelGateway_1v1unh1" /> - <bpmn:sequenceFlow id="SequenceFlow_0d2lpv3" sourceRef="ScriptTask_0m6v98c" targetRef="ParallelGateway_1v1unh1" /> - <bpmn:callActivity id="CallActivity_15kmmuf" name="Handle NSI Selection OOF request" calledElement="DoHandleOofRequest"> - <bpmn:extensionElements> - <camunda:in source="nsiSelectionUrl" target="apiPath" /> - <camunda:in source="nsiSelection_correlator" target="correlator" /> - <camunda:in source="nsiSelection_messageType" target="messageType" /> - <camunda:in source="nsiSelection_timeout" target="timeout" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:out source="asyncCallbackResponse" target="nsiSelection_oofResponse" /> - <camunda:in source="nsiSelection_oofRequest" target="oofRequest" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_175xozh</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_188g03z</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_175xozh" sourceRef="ScriptTask_0sznvim" targetRef="CallActivity_15kmmuf" /> - <bpmn:scriptTask id="ScriptTask_0woac2j" name="Process OOF response " scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_188g03z</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_17emrud</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.processNSIResp(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_188g03z" sourceRef="CallActivity_15kmmuf" targetRef="ScriptTask_0woac2j" /> - <bpmn:sequenceFlow id="SequenceFlow_17emrud" sourceRef="ScriptTask_0woac2j" targetRef="EndEvent_15dimzx" /> - <bpmn:intermediateCatchEvent id="IntermediateCatchEvent_0pstvd4" name=" Select NSSI "> - <bpmn:outgoing>SequenceFlow_1sg6mqd</bpmn:outgoing> - <bpmn:linkEventDefinition id="LinkEventDefinition_1slqdh4" name="SelectNSSI" /> - </bpmn:intermediateCatchEvent> - <bpmn:parallelGateway id="ParallelGateway_05zg916"> - <bpmn:incoming>SequenceFlow_1sg6mqd</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_05250mp</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0euwvgf</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_0il5j01</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:parallelGateway id="ParallelGateway_06a2n9u"> - <bpmn:incoming>SequenceFlow_14rhmx9</bpmn:incoming> - <bpmn:incoming>SequenceFlow_103oxyw</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0aasemn</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1tr3i9d</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:callActivity id="CallActivity_0tzazs0" name="Handle NSST Selection OOF request" calledElement="DoHandleOofRequest"> - <bpmn:extensionElements> - <camunda:in source="nstSelectionUrl" target="apiPath" /> - <camunda:in source="nstSelection_correlator" target="correlator" /> - <camunda:in source="nstSelection_messageType" target="messageType" /> - <camunda:in source="nstSelection_timeout" target="timeout" /> - <camunda:out source="WorkflowException" target="WorkflowException" /> - <camunda:out source="asyncCallbackResponse" target="nstSelection_oofResponse" /> - <camunda:in source="nstSelection_oofRequest" target="oofRequest" /> - </bpmn:extensionElements> - <bpmn:incoming>SequenceFlow_0abqxa1</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1tqg26p</bpmn:outgoing> - </bpmn:callActivity> - <bpmn:sequenceFlow id="SequenceFlow_1sg6mqd" sourceRef="IntermediateCatchEvent_0pstvd4" targetRef="ParallelGateway_05zg916" /> - <bpmn:sequenceFlow id="SequenceFlow_05250mp" sourceRef="ParallelGateway_05zg916" targetRef="CallActivity_1vzxvna" /> - <bpmn:sequenceFlow id="SequenceFlow_14rhmx9" sourceRef="CallActivity_1vzxvna" targetRef="ParallelGateway_06a2n9u" /> - <bpmn:sequenceFlow id="SequenceFlow_0euwvgf" sourceRef="ParallelGateway_05zg916" targetRef="CallActivity_0melx8d" /> - <bpmn:sequenceFlow id="SequenceFlow_103oxyw" sourceRef="CallActivity_0melx8d" targetRef="ParallelGateway_06a2n9u" /> - <bpmn:sequenceFlow id="SequenceFlow_0il5j01" sourceRef="ParallelGateway_05zg916" targetRef="CallActivity_0otry7e" /> - <bpmn:sequenceFlow id="SequenceFlow_0aasemn" sourceRef="CallActivity_0otry7e" targetRef="ParallelGateway_06a2n9u" /> - <bpmn:sequenceFlow id="SequenceFlow_1tr3i9d" sourceRef="ParallelGateway_06a2n9u" targetRef="Task_1jyj2vs" /> - <bpmn:sequenceFlow id="SequenceFlow_0abqxa1" sourceRef="Task_1m9qoo3" targetRef="CallActivity_0tzazs0" /> - <bpmn:sequenceFlow id="SequenceFlow_1tqg26p" sourceRef="CallActivity_0tzazs0" targetRef="Task_00nfg5x" /> - <bpmn:intermediateThrowEvent id="EndEvent_15dimzx" name="Goto Select NSSI "> - <bpmn:incoming>SequenceFlow_17emrud</bpmn:incoming> - <bpmn:linkEventDefinition name="SelectNSSI" /> - </bpmn:intermediateThrowEvent> - <bpmn:endEvent id="EndEvent_0p0cjhl"> - <bpmn:incoming>SequenceFlow_1nrfy6i</bpmn:incoming> - </bpmn:endEvent> - <bpmn:parallelGateway id="ParallelGateway_1v1unh1"> - <bpmn:incoming>SequenceFlow_1rwl882</bpmn:incoming> - <bpmn:incoming>SequenceFlow_0d2lpv3</bpmn:incoming> - <bpmn:incoming>SequenceFlow_06t1dq5</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_16qt6r2</bpmn:outgoing> - </bpmn:parallelGateway> - <bpmn:sequenceFlow id="SequenceFlow_16qt6r2" sourceRef="ParallelGateway_1v1unh1" targetRef="ScriptTask_0sznvim" /> - <bpmn:startEvent id="StartEvent_0mwlirs" name="Start"> - <bpmn:outgoing>SequenceFlow_1fuwy35</bpmn:outgoing> - </bpmn:startEvent> - <bpmn:scriptTask id="ScriptTask_0w34e57" name="Preprocess Request" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1fuwy35</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_17otbuu</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.preProcessRequest(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_1fuwy35" sourceRef="StartEvent_0mwlirs" targetRef="ScriptTask_0w34e57" /> - <bpmn:sequenceFlow id="SequenceFlow_17otbuu" sourceRef="ScriptTask_0w34e57" targetRef="ParallelGateway_0f11kcw" /> - <bpmn:sequenceFlow id="SequenceFlow_00t0340" sourceRef="ParallelGateway_0f11kcw" targetRef="ScriptTask_11rb2ju" /> - <bpmn:sequenceFlow id="SequenceFlow_06uu0eh" sourceRef="ParallelGateway_0f11kcw" targetRef="ScriptTask_0f0rh4w" /> - <bpmn:sequenceFlow id="SequenceFlow_09see8v" sourceRef="ParallelGateway_0f11kcw" targetRef="ScriptTask_1sik00k" /> - <bpmn:sequenceFlow id="SequenceFlow_14s7fck" sourceRef="ParallelGateway_0f11kcw" targetRef="ScriptTask_1sukxzw" /> - <bpmn:sequenceFlow id="SequenceFlow_1c374y2" sourceRef="ParallelGateway_0f11kcw" targetRef="ScriptTask_02u3dmq" /> - <bpmn:scriptTask id="CallActivity_1vzxvna" name="TN NSSMF supports NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_05250mp</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_14rhmx9</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.getNSSISelectionCap4TN(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="CallActivity_0melx8d" name="CN NSSMF supports NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0euwvgf</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_103oxyw</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.getNSSISelectionCap4CN(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="CallActivity_0otry7e" name="AN NSSMF supports NSSI" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_0il5j01</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0aasemn</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.getNSSISelectionCap4AN(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:sequenceFlow id="SequenceFlow_06t1dq5" sourceRef="Task_1kqbsvd" targetRef="ParallelGateway_1v1unh1" /> - <bpmn:scriptTask id="Task_1kqbsvd" name="handle sub-net capability info" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1a699ly</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_06t1dq5</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.handleSubnetCapabilityResp(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="Task_1m9qoo3" name="Prepare NSSI Selection" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_126j77n</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_0abqxa1</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.preNSSIRequest(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:scriptTask id="Task_00nfg5x" name="Process NSST Solutions" scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1tqg26p</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1i3j8c3</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.processNSSIResp(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:exclusiveGateway id="ExclusiveGateway_0b52m39" name="need select nssi?" default="SequenceFlow_1nrfy6i"> - <bpmn:incoming>SequenceFlow_1tey3hz</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_126j77n</bpmn:outgoing> - <bpmn:outgoing>SequenceFlow_1nrfy6i</bpmn:outgoing> - </bpmn:exclusiveGateway> - <bpmn:sequenceFlow id="SequenceFlow_126j77n" name="yes" sourceRef="ExclusiveGateway_0b52m39" targetRef="Task_1m9qoo3"> - <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("nssmfOperation" ) == "update")}</bpmn:conditionExpression> - </bpmn:sequenceFlow> - <bpmn:sequenceFlow id="SequenceFlow_1nrfy6i" sourceRef="ExclusiveGateway_0b52m39" targetRef="EndEvent_0p0cjhl" /> - <bpmn:sequenceFlow id="SequenceFlow_1i3j8c3" sourceRef="Task_00nfg5x" targetRef="Task_1jyj2vs" /> - <bpmn:sequenceFlow id="SequenceFlow_1tey3hz" sourceRef="Task_1jyj2vs" targetRef="ExclusiveGateway_0b52m39" /> - <bpmn:scriptTask id="Task_1jyj2vs" name="handle Nssi select " scriptFormat="groovy"> - <bpmn:incoming>SequenceFlow_1tr3i9d</bpmn:incoming> - <bpmn:incoming>SequenceFlow_1i3j8c3</bpmn:incoming> - <bpmn:outgoing>SequenceFlow_1tey3hz</bpmn:outgoing> - <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* -def dcso = new DoCreateSliceServiceOption() -dcso.handleNssiSelect(execution)</bpmn:script> - </bpmn:scriptTask> - <bpmn:group id="Group_1k2kt9q" categoryValueRef="CategoryValue_1eh1etw" /> - <bpmn:group id="Group_19fk2vp" categoryValueRef="CategoryValue_1x9qkyq" /> - <bpmn:group id="Group_01yft6a" categoryValueRef="CategoryValue_1nwi9c3" /> - </bpmn:process> - <bpmn:category id="Category_0s5hs8l"> - <bpmn:categoryValue id="CategoryValue_1eh1etw" value="subnetCapabilities" /> - </bpmn:category> - <bpmn:category id="Category_1ahkzyt"> - <bpmn:categoryValue id="CategoryValue_1x9qkyq" value="nst -> NSTInfo" /> - </bpmn:category> - <bpmn:category id="Category_0ne04nd"> - <bpmn:categoryValue id="CategoryValue_1nwi9c3" value="nsst -> NSSTInfo" /> - </bpmn:category> - <bpmndi:BPMNDiagram id="BPMNDiagram_1"> - <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateSliceServiceOptionV2"> - <bpmndi:BPMNShape id="ParallelGateway_0f11kcw_di" bpmnElement="ParallelGateway_0f11kcw"> - <dc:Bounds x="355" y="525" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ParallelGateway_05o7mbp_di" bpmnElement="ParallelGateway_05o7mbp"> - <dc:Bounds x="697" y="215" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0sznvim_di" bpmnElement="ScriptTask_0sznvim"> - <dc:Bounds x="1110" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1sik00k_di" bpmnElement="ScriptTask_1sik00k"> - <dc:Bounds x="520" y="90" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1sukxzw_di" bpmnElement="ScriptTask_1sukxzw"> - <dc:Bounds x="520" y="200" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_02u3dmq_di" bpmnElement="ScriptTask_02u3dmq"> - <dc:Bounds x="520" y="310" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_04avf98_di" bpmnElement="SequenceFlow_04avf98"> - <di:waypoint x="620" y="130" /> - <di:waypoint x="722" y="130" /> - <di:waypoint x="722" y="215" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_00xa5wa_di" bpmnElement="SequenceFlow_00xa5wa"> - <di:waypoint x="620" y="240" /> - <di:waypoint x="697" y="240" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_064p1n6_di" bpmnElement="SequenceFlow_064p1n6"> - <di:waypoint x="620" y="350" /> - <di:waypoint x="722" y="350" /> - <di:waypoint x="722" y="265" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1a699ly_di" bpmnElement="SequenceFlow_1a699ly"> - <di:waypoint x="747" y="240" /> - <di:waypoint x="820" y="240" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="Group_1k2kt9q_di" bpmnElement="Group_1k2kt9q"> - <dc:Bounds x="487" y="77" width="485" height="325" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="739" y="78" width="85" height="27" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_11rb2ju_di" bpmnElement="ScriptTask_11rb2ju"> - <dc:Bounds x="520" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0c567r4_di" bpmnElement="CallActivity_0c567r4"> - <dc:Bounds x="660" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0z0dwk2_di" bpmnElement="ScriptTask_0z0dwk2"> - <dc:Bounds x="820" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0f0rh4w_di" bpmnElement="ScriptTask_0f0rh4w"> - <dc:Bounds x="520" y="740" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_1tmbgfs_di" bpmnElement="CallActivity_1tmbgfs"> - <dc:Bounds x="660" y="740" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0m6v98c_di" bpmnElement="ScriptTask_0m6v98c"> - <dc:Bounds x="820" y="740" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1kzy63m_di" bpmnElement="SequenceFlow_1kzy63m"> - <di:waypoint x="620" y="550" /> - <di:waypoint x="660" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1t317y2_di" bpmnElement="SequenceFlow_1t317y2"> - <di:waypoint x="760" y="550" /> - <di:waypoint x="820" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1dtfpqp_di" bpmnElement="SequenceFlow_1dtfpqp"> - <di:waypoint x="620" y="780" /> - <di:waypoint x="660" y="780" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0fdqj9b_di" bpmnElement="SequenceFlow_0fdqj9b"> - <di:waypoint x="760" y="780" /> - <di:waypoint x="820" y="780" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1rwl882_di" bpmnElement="SequenceFlow_1rwl882"> - <di:waypoint x="920" y="550" /> - <di:waypoint x="995" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0d2lpv3_di" bpmnElement="SequenceFlow_0d2lpv3"> - <di:waypoint x="920" y="780" /> - <di:waypoint x="1020" y="780" /> - <di:waypoint x="1020" y="575" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="CallActivity_15kmmuf_di" bpmnElement="CallActivity_15kmmuf"> - <dc:Bounds x="1280" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_175xozh_di" bpmnElement="SequenceFlow_175xozh"> - <di:waypoint x="1210" y="550" /> - <di:waypoint x="1280" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0woac2j_di" bpmnElement="ScriptTask_0woac2j"> - <dc:Bounds x="1420" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_188g03z_di" bpmnElement="SequenceFlow_188g03z"> - <di:waypoint x="1380" y="550" /> - <di:waypoint x="1420" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="Group_19fk2vp_di" bpmnElement="Group_19fk2vp"> - <dc:Bounds x="495" y="450" width="453" height="180" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="686" y="457" width="72" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_17emrud_di" bpmnElement="SequenceFlow_17emrud"> - <di:waypoint x="1520" y="550" /> - <di:waypoint x="1562" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="IntermediateCatchEvent_0pstvd4_di" bpmnElement="IntermediateCatchEvent_0pstvd4"> - <dc:Bounds x="198" y="1202" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="191" y="1245" width="60" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ParallelGateway_05zg916_di" bpmnElement="ParallelGateway_05zg916"> - <dc:Bounds x="335" y="1195" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ParallelGateway_06a2n9u_di" bpmnElement="ParallelGateway_06a2n9u"> - <dc:Bounds x="675" y="1195" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="CallActivity_0tzazs0_di" bpmnElement="CallActivity_0tzazs0"> - <dc:Bounds x="1200" y="1040" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1sg6mqd_di" bpmnElement="SequenceFlow_1sg6mqd"> - <di:waypoint x="234" y="1220" /> - <di:waypoint x="335" y="1220" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_05250mp_di" bpmnElement="SequenceFlow_05250mp"> - <di:waypoint x="360" y="1195" /> - <di:waypoint x="360" y="1080" /> - <di:waypoint x="500" y="1080" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_14rhmx9_di" bpmnElement="SequenceFlow_14rhmx9"> - <di:waypoint x="600" y="1080" /> - <di:waypoint x="700" y="1080" /> - <di:waypoint x="700" y="1195" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0euwvgf_di" bpmnElement="SequenceFlow_0euwvgf"> - <di:waypoint x="385" y="1220" /> - <di:waypoint x="500" y="1220" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_103oxyw_di" bpmnElement="SequenceFlow_103oxyw"> - <di:waypoint x="600" y="1220" /> - <di:waypoint x="675" y="1220" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0il5j01_di" bpmnElement="SequenceFlow_0il5j01"> - <di:waypoint x="360" y="1245" /> - <di:waypoint x="360" y="1340" /> - <di:waypoint x="500" y="1340" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0aasemn_di" bpmnElement="SequenceFlow_0aasemn"> - <di:waypoint x="600" y="1340" /> - <di:waypoint x="700" y="1340" /> - <di:waypoint x="700" y="1245" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1tr3i9d_di" bpmnElement="SequenceFlow_1tr3i9d"> - <di:waypoint x="725" y="1220" /> - <di:waypoint x="800" y="1220" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_0abqxa1_di" bpmnElement="SequenceFlow_0abqxa1"> - <di:waypoint x="1250" y="1180" /> - <di:waypoint x="1250" y="1120" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1tqg26p_di" bpmnElement="SequenceFlow_1tqg26p"> - <di:waypoint x="1200" y="1080" /> - <di:waypoint x="900" y="1080" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="IntermediateThrowEvent_0ubqlvg_di" bpmnElement="EndEvent_15dimzx"> - <dc:Bounds x="1562" y="532" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1539" y="575" width="87" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="EndEvent_0p0cjhl_di" bpmnElement="EndEvent_0p0cjhl"> - <dc:Bounds x="1232" y="1322" width="36" height="36" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="Group_01yft6a_di" bpmnElement="Group_01yft6a"> - <dc:Bounds x="495" y="690" width="453" height="180" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="680" y="697" width="85" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ParallelGateway_1v1unh1_di" bpmnElement="ParallelGateway_1v1unh1"> - <dc:Bounds x="995" y="525" width="50" height="50" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_16qt6r2_di" bpmnElement="SequenceFlow_16qt6r2"> - <di:waypoint x="1045" y="550" /> - <di:waypoint x="1110" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="StartEvent_0mwlirs_di" bpmnElement="StartEvent_0mwlirs"> - <dc:Bounds x="162" y="532" width="36" height="36" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="169" y="568" width="25" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0w34e57_di" bpmnElement="ScriptTask_0w34e57"> - <dc:Bounds x="230" y="510" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_1fuwy35_di" bpmnElement="SequenceFlow_1fuwy35"> - <di:waypoint x="198" y="550" /> - <di:waypoint x="230" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_17otbuu_di" bpmnElement="SequenceFlow_17otbuu"> - <di:waypoint x="330" y="550" /> - <di:waypoint x="355" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_00t0340_di" bpmnElement="SequenceFlow_00t0340"> - <di:waypoint x="405" y="550" /> - <di:waypoint x="520" y="550" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_06uu0eh_di" bpmnElement="SequenceFlow_06uu0eh"> - <di:waypoint x="380" y="575" /> - <di:waypoint x="380" y="780" /> - <di:waypoint x="520" y="780" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_09see8v_di" bpmnElement="SequenceFlow_09see8v"> - <di:waypoint x="380" y="525" /> - <di:waypoint x="380" y="130" /> - <di:waypoint x="520" y="130" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_14s7fck_di" bpmnElement="SequenceFlow_14s7fck"> - <di:waypoint x="380" y="525" /> - <di:waypoint x="380" y="240" /> - <di:waypoint x="520" y="240" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1c374y2_di" bpmnElement="SequenceFlow_1c374y2"> - <di:waypoint x="380" y="525" /> - <di:waypoint x="380" y="350" /> - <di:waypoint x="520" y="350" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1anc3ln_di" bpmnElement="CallActivity_1vzxvna"> - <dc:Bounds x="500" y="1040" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1xgkaqi_di" bpmnElement="CallActivity_0melx8d"> - <dc:Bounds x="500" y="1180" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_11y7ba5_di" bpmnElement="CallActivity_0otry7e"> - <dc:Bounds x="500" y="1300" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_06t1dq5_di" bpmnElement="SequenceFlow_06t1dq5"> - <di:waypoint x="920" y="240" /> - <di:waypoint x="1020" y="240" /> - <di:waypoint x="1020" y="525" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_1xkxr0x_di" bpmnElement="Task_1kqbsvd"> - <dc:Bounds x="820" y="200" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_1icyh1a_di" bpmnElement="Task_1m9qoo3"> - <dc:Bounds x="1200" y="1180" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ScriptTask_0aqbm7t_di" bpmnElement="Task_00nfg5x"> - <dc:Bounds x="800" y="1040" width="100" height="80" /> - </bpmndi:BPMNShape> - <bpmndi:BPMNShape id="ExclusiveGateway_0b52m39_di" bpmnElement="ExclusiveGateway_0b52m39" isMarkerVisible="true"> - <dc:Bounds x="1025" y="1195" width="50" height="50" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1008" y="1183" width="85" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNShape> - <bpmndi:BPMNEdge id="SequenceFlow_126j77n_di" bpmnElement="SequenceFlow_126j77n"> - <di:waypoint x="1075" y="1220" /> - <di:waypoint x="1200" y="1220" /> - <bpmndi:BPMNLabel> - <dc:Bounds x="1129" y="1202" width="17" height="14" /> - </bpmndi:BPMNLabel> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1nrfy6i_di" bpmnElement="SequenceFlow_1nrfy6i"> - <di:waypoint x="1050" y="1245" /> - <di:waypoint x="1050" y="1340" /> - <di:waypoint x="1232" y="1340" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1i3j8c3_di" bpmnElement="SequenceFlow_1i3j8c3"> - <di:waypoint x="850" y="1120" /> - <di:waypoint x="850" y="1180" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNEdge id="SequenceFlow_1tey3hz_di" bpmnElement="SequenceFlow_1tey3hz"> - <di:waypoint x="900" y="1220" /> - <di:waypoint x="1025" y="1220" /> - </bpmndi:BPMNEdge> - <bpmndi:BPMNShape id="ScriptTask_0h3fsja_di" bpmnElement="Task_1jyj2vs"> - <dc:Bounds x="800" y="1180" width="100" height="80" /> - </bpmndi:BPMNShape> - </bpmndi:BPMNPlane> - </bpmndi:BPMNDiagram> -</bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoHandleOofRequest.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoHandleOofRequest.bpmn index d6b251649f..ed4561c757 100644 --- a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoHandleOofRequest.bpmn +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoHandleOofRequest.bpmn @@ -18,7 +18,7 @@ oofHandler.callOofAdapter(execution)</bpmn:script> <bpmn:outgoing>Flow_1fbzzqg</bpmn:outgoing> <bpmn:script>import org.onap.so.bpmn.common.scripts.* def oofHandler = new DoHandleOofRequest() -oofHandler .preProcessRequest(execution)</bpmn:script> +oofHandler.preProcessRequest(execution)</bpmn:script> </bpmn:scriptTask> <bpmn:subProcess id="Activity_02ru8n9" name="Sub-process for FalloutHandler and Rollback" triggeredByEvent="true"> <bpmn:startEvent id="Event_1r00tca"> diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java index 156f999773..27c5cf8e26 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateAnNssi.java @@ -21,8 +21,11 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; +import java.util.Map; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class AllocateAnNssi { @Deprecated @@ -42,59 +45,5 @@ public class AllocateAnNssi { private NsiInfo nsiInfo; - public String getNsstId() { - return nsstId; - } - - public void setNsstId(String nsstId) { - this.nsstId = nsstId; - } - - public String getNssiId() { - return nssiId; - } - - public void setNssiId(String nssiId) { - this.nssiId = nssiId; - } - - public String getNssiName() { - return nssiName; - } - - public void setNssiName(String nssiName) { - this.nssiName = nssiName; - } - - public AnSliceProfile getSliceProfile() { - return sliceProfile; - } - - public void setSliceProfile(AnSliceProfile sliceProfile) { - this.sliceProfile = sliceProfile; - } - - public String getScriptName() { - return scriptName; - } - - public void setScriptName(String scriptName) { - this.scriptName = scriptName; - } - - public Object getExtension() { - return extension; - } - - public void setExtension(Object extension) { - this.extension = extension; - } - - public NsiInfo getNsiInfo() { - return nsiInfo; - } - - public void setNsiInfo(NsiInfo nsiInfo) { - this.nsiInfo = nsiInfo; - } + private Map<String, Object> endPoint; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java b/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java index bdc2c608e2..f5b926f627 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/AllocateCnNssi.java @@ -21,9 +21,12 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; import java.io.Serializable; +import java.util.Map; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class AllocateCnNssi implements Serializable { @Deprecated @@ -46,67 +49,5 @@ public class AllocateCnNssi implements Serializable { private NsiInfo nsiInfo; - public NsiInfo getNsiInfo() { - return nsiInfo; - } - - public void setNsiInfo(NsiInfo nsiInfo) { - this.nsiInfo = nsiInfo; - } - - public String getNsstId() { - return nsstId; - } - - public void setNsstId(String nsstId) { - this.nsstId = nsstId; - } - - public String getScriptName() { - return scriptName; - } - - public void setScriptName(String scriptName) { - this.scriptName = scriptName; - } - - public CnSliceProfile getSliceProfile() { - return sliceProfile; - } - - public void setSliceProfile(CnSliceProfile sliceProfile) { - this.sliceProfile = sliceProfile; - } - - public String getFlavorId() { - return flavorId; - } - - public void setFlavorId(String flavorId) { - this.flavorId = flavorId; - } - - public String getNssiId() { - return nssiId; - } - - public void setNssiId(String nssiId) { - this.nssiId = nssiId; - } - - public String getNssiName() { - return nssiName; - } - - public void setNssiName(String nssiName) { - this.nssiName = nssiName; - } - - public void setExtension(Object extension) { - this.extension = extension; - } - - public Object getExtension() { - return extension; - } + private Map<String, Object> endPoint; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java index 469d212ef9..146032c6fd 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ResponseDescriptor.java @@ -21,9 +21,11 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; import java.util.List; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class ResponseDescriptor { @JsonInclude(JsonInclude.Include.NON_DEFAULT) @@ -43,43 +45,7 @@ public class ResponseDescriptor { private List<ResponseHistory> responseHistoryList; - public int getProgress() { - return progress; - } + private String nssiId; - public void setProgress(int progress) { - this.progress = progress; - } - - public String getStatus() { - return status; - } - - public void setStatus(String status) { - this.status = status; - } - - public String getStatusDescription() { - return statusDescription; - } - - public void setStatusDescription(String statusDescription) { - this.statusDescription = statusDescription; - } - - public String getResponseId() { - return responseId; - } - - public void setResponseId(String responseId) { - this.responseId = responseId; - } - - public List<ResponseHistory> getResponseHistoryList() { - return responseHistoryList; - } - - public void setResponseHistoryList(List<ResponseHistory> responseHistoryList) { - this.responseHistoryList = responseHistoryList; - } + private String endPointId; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java index 7a52cc85cb..19e8b46314 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/ServiceInfo.java @@ -47,4 +47,6 @@ public class ServiceInfo implements Serializable { private String nssiName; private String pLMNIdList; + + private String actionType; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java index dd1292e7e5..71c50c1684 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskInfo.java @@ -1,6 +1,26 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf; import lombok.Data; +import org.onap.so.beans.nsmf.oof.SubnetType; import org.onap.so.beans.nsmf.oof.TemplateInfo; import java.io.Serializable; @@ -22,7 +42,7 @@ public class SliceTaskInfo<T> implements Serializable { private TemplateInfo NSSTInfo; - private String serviceInstanceId; + private String sliceInstanceId; private String scriptName; @@ -30,4 +50,6 @@ public class SliceTaskInfo<T> implements Serializable { private NetworkType networkType; + private SubnetType subnetType; + } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java index cab209ebd1..87de04a6ee 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/SliceTaskParamsAdapter.java @@ -1,7 +1,27 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf; import lombok.Data; import org.onap.so.beans.nsmf.oof.TemplateInfo; +import java.util.Map; @Data @@ -16,7 +36,7 @@ public class SliceTaskParamsAdapter { private String nstName; - private ServiceProfile serviceProfile; + private Map<String, Object> serviceProfile; private String suggestNsiId; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java index be530bfb9c..ccd6001957 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/TnSliceProfile.java @@ -21,8 +21,10 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import lombok.Data; @JsonInclude(JsonInclude.Include.NON_NULL) +@Data public class TnSliceProfile { private String sliceProfileId; @@ -31,28 +33,4 @@ public class TnSliceProfile { @JsonInclude(JsonInclude.Include.NON_DEFAULT) private int latency; - - public String getSliceProfileId() { - return sliceProfileId; - } - - public void setSliceProfileId(String sliceProfileId) { - this.sliceProfileId = sliceProfileId; - } - - public String getBandwidth() { - return bandwidth; - } - - public void setBandwidth(String bandwidth) { - this.bandwidth = bandwidth; - } - - public int getLatency() { - return latency; - } - - public void setLatency(int latency) { - this.latency = latency; - } } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java deleted file mode 100644 index 4af60cf492..0000000000 --- a/common/src/main/java/org/onap/so/beans/nsmf/oof/DomainType.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.onap.so.beans.nsmf.oof; - -import lombok.Getter; -import org.onap.so.beans.nsmf.NetworkType; - -@Getter -public enum DomainType { - - AN_NF("AN-NF", NetworkType.ACCESS), - - CN("CN", NetworkType.CORE), - - TN_FH("TN-FH", NetworkType.TRANSPORT), - - TN_MH("TN-MH", NetworkType.TRANSPORT), - - TN_BH("TN-BH", NetworkType.TRANSPORT),; - - private NetworkType networkType; - - private String domainType; - - DomainType(String domainType, NetworkType networkType) { - this.domainType = domainType; - this.networkType = networkType; - } -} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java index e1829eb2c3..d228d37976 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NsiReqBody.java @@ -1,15 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf.oof; import lombok.Data; import org.onap.so.beans.nsmf.ServiceProfile; import java.io.Serializable; import java.util.List; +import java.util.Map; @Data public class NsiReqBody implements Serializable { private static final long serialVersionUID = -1383112063216226985L; - private ServiceProfile serviceProfile; + private Map<String, Object> serviceProfile; private RequestInfo requestInfo; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java index 0632ab78e9..7cfb60c113 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/NssiReqBody.java @@ -1,15 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf.oof; import lombok.Data; import org.onap.so.beans.nsmf.ServiceProfile; import java.io.Serializable; +import java.util.Map; @Data public class NssiReqBody implements Serializable { private static final long serialVersionUID = -76327522074333341L; - private ServiceProfile serviceProfile; + private Map<String, Object> serviceProfile; private RequestInfo requestInfo; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java index f900c3599d..292a0d5ae4 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/RequestInfo.java @@ -1,3 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf.oof; import lombok.Data; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java index f21c1c379e..bc52d4e0d4 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetCapability.java @@ -1,8 +1,26 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf.oof; import lombok.Data; import java.io.Serializable; -import java.util.Map; @Data public class SubnetCapability implements Serializable { @@ -11,5 +29,5 @@ public class SubnetCapability implements Serializable { private String domainType; - private Map<?, ?> capabilityDetails; + private Object capabilityDetails; } diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java new file mode 100644 index 0000000000..4b0136a798 --- /dev/null +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/SubnetType.java @@ -0,0 +1,56 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf.oof; + +import lombok.Getter; +import org.onap.so.beans.nsmf.NetworkType; + +@Getter +public enum SubnetType { + AN("AN", NetworkType.ACCESS), + + AN_NF("AN-NF", NetworkType.ACCESS), + + CN("CN", NetworkType.CORE), + + TN_FH("TN-FH", NetworkType.TRANSPORT), + + TN_MH("TN-MH", NetworkType.TRANSPORT), + + TN_BH("TN-BH", NetworkType.TRANSPORT),; + + private NetworkType networkType; + + private String subnetType; + + SubnetType(String subnetType, NetworkType networkType) { + this.subnetType = subnetType; + this.networkType = networkType; + } + + public static NetworkType getNetworkType(String subnetType) { + for (SubnetType type : SubnetType.values()) { + if (type.subnetType.equalsIgnoreCase(subnetType)) { + return type.networkType; + } + } + return null; + } +} diff --git a/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java index 3713bc7186..3d1ec9ce80 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/oof/TemplateInfo.java @@ -1,3 +1,22 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + # Copyright (c) 2020, CMCC Technologies Co., Ltd. + # + # 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.beans.nsmf.oof; import lombok.Data; diff --git a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java index 33958a7850..c601b88ae5 100644 --- a/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java +++ b/common/src/main/java/org/onap/so/utils/ExternalTaskServiceUtils.java @@ -78,13 +78,9 @@ public class ExternalTaskServiceUtils { @Scheduled(fixedDelay = 30000) public void checkAllClientsActive() { try { - logger.debug("Executing scheduled task to check and restart external task clients"); // TODO remove - // eventually List<ExternalTaskClient> inactiveClients = getClients().stream().filter(client -> !client.isActive()).collect(Collectors.toList()); - inactiveClients.forEach(c -> { - logger.debug("External Task Client found to be inactive. Restarting Client."); c.start(); }); } catch (Exception e) { diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java index 78f8350eff..998aea9065 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectPlurals.java @@ -76,6 +76,8 @@ public class AAIObjectPlurals implements AAIObjectBase, GraphInventoryObjectPlur new AAIObjectPlurals(AAIObjectType.PNF, AAINamespaceConstants.NETWORK, "/pnfs"); public static final AAIObjectPlurals PROJECT = new AAIObjectPlurals(AAIObjectType.PROJECT, AAINamespaceConstants.BUSINESS, "/projects"); + public static final AAIObjectPlurals VSERVER = + new AAIObjectPlurals(AAIObjectType.VSERVER, AAIObjectType.TENANT.uriTemplate(), "/vservers"); private final String uriTemplate; private final String partialUri; diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java index 2335a48d43..dae5c62dd3 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIObjectType.java @@ -20,7 +20,12 @@ package org.onap.aaiclient.client.aai; -import com.google.common.base.CaseFormat; +import java.io.Serializable; +import java.net.URL; +import java.util.HashMap; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; import org.onap.aai.annotations.Metadata; import org.onap.aai.domain.yang.AggregateRoute; import org.onap.aai.domain.yang.AllottedResource; @@ -41,6 +46,7 @@ import org.onap.aai.domain.yang.Image; import org.onap.aai.domain.yang.InstanceGroup; import org.onap.aai.domain.yang.L3Network; import org.onap.aai.domain.yang.LInterface; +import org.onap.aai.domain.yang.LagInterface; import org.onap.aai.domain.yang.LineOfBusiness; import org.onap.aai.domain.yang.LogicalLink; import org.onap.aai.domain.yang.ModelVer; @@ -69,6 +75,7 @@ import org.onap.aai.domain.yang.Tenant; import org.onap.aai.domain.yang.TunnelXconnect; import org.onap.aai.domain.yang.Vce; import org.onap.aai.domain.yang.VfModule; +import org.onap.aai.domain.yang.VlanRange; import org.onap.aai.domain.yang.VlanTag; import org.onap.aai.domain.yang.Vnfc; import org.onap.aai.domain.yang.VolumeGroup; @@ -82,12 +89,7 @@ import org.reflections.Reflections; import org.reflections.scanners.SubTypesScanner; import org.reflections.util.ClasspathHelper; import org.reflections.util.ConfigurationBuilder; -import java.io.Serializable; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; -import java.util.regex.Pattern; +import com.google.common.base.CaseFormat; public class AAIObjectType implements AAIObjectBase, GraphInventoryObjectType, Serializable { @@ -192,6 +194,8 @@ public class AAIObjectType implements AAIObjectBase, GraphInventoryObjectType, S public static final AAIObjectType IMAGE = new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), Image.class); public static final AAIObjectType FLAVOR = new AAIObjectType(AAIObjectType.CLOUD_REGION.uriTemplate(), Flavor.class); + + public static final AAIObjectType VLAN_RANGE = new AAIObjectType(CLOUD_REGION.uriTemplate(), VlanRange.class); public static final AAIObjectType UNKNOWN = new AAIObjectType("", "", "unknown") { private static final long serialVersionUID = 9208984071038447607L; @@ -234,6 +238,11 @@ public class AAIObjectType implements AAIObjectBase, GraphInventoryObjectType, S public static final AAIObjectType QUERY_ALLOTTED_RESOURCE = new AAIObjectType(AAIObjectType.SERVICE_INSTANCE.uriTemplate(), "?depth=2", "service-Instance"); + public static final AAIObjectType LAG_INTERFACE = + new AAIObjectType(AAIObjectType.PSERVER.uriTemplate(), LagInterface.class); + + + private final String uriTemplate; private final String parentUri; private final String partialUri; diff --git a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIVersion.java b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIVersion.java index ef43717b4f..4cdf5219f1 100644 --- a/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIVersion.java +++ b/graph-inventory/aai-client/src/main/java/org/onap/aaiclient/client/aai/AAIVersion.java @@ -33,7 +33,9 @@ public enum AAIVersion implements GraphInventoryVersion { V17("v17"), V18("v18"), V19("v19"), - V20("v20"); + V20("v20"), + V21("v21"), + V22("v22"); public static final AAIVersion LATEST = AAIVersion.values()[AAIVersion.values().length - 1]; private final String value; @@ -962,7 +962,7 @@ <dependency> <groupId>org.onap.aai.schema-service</groupId> <artifactId>aai-schema</artifactId> - <version>1.7.8</version> + <version>1.7.10-SNAPSHOT</version> </dependency> </dependencies> </dependencyManagement> diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/CamundaDatabaseConfiguration.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/CamundaDatabaseConfiguration.java index 946bd38cbe..c803808df1 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/CamundaDatabaseConfiguration.java +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-bpmn-flows/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/bpmn/flows/CamundaDatabaseConfiguration.java @@ -27,8 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.annotation.Primary; -import org.springframework.context.annotation.Profile; +import org.springframework.data.jpa.repository.config.EnableJpaRepositories; import org.springframework.jmx.export.MBeanExporter; import org.springframework.transaction.annotation.EnableTransactionManagement; import com.zaxxer.hikari.HikariConfig; @@ -40,9 +39,11 @@ import com.zaxxer.hikari.HikariDataSource; */ @Configuration @EnableTransactionManagement -@Profile({"!test"}) +@EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactory", transactionManagerRef = "transactionManager") public class CamundaDatabaseConfiguration { + private static final String CAMUNDA_DATA_SOURCE_BEAN_NAME = "camundaBpmDataSource"; + private static final Logger logger = getLogger(CamundaDatabaseConfiguration.class); @Autowired(required = false) @@ -51,17 +52,16 @@ public class CamundaDatabaseConfiguration { @Bean @ConfigurationProperties(prefix = "spring.datasource.hikari.camunda") public HikariConfig camundaDbConfig() { - logger.debug("Creating HikariConfig bean ... "); + logger.debug("Creating Camunda HikariConfig bean ... "); return new HikariConfig(); } - @Primary - @Bean(name = "dataSource") - public DataSource dataSource() { + @Bean(name = CAMUNDA_DATA_SOURCE_BEAN_NAME) + public DataSource camundaDataSource() { if (mBeanExporter != null) { - mBeanExporter.addExcludedBean("dataSource"); + mBeanExporter.addExcludedBean(CAMUNDA_DATA_SOURCE_BEAN_NAME); } - logger.debug("Creating HikariDataSource bean ... "); + logger.debug("Creating Camunda HikariDataSource bean ... "); final HikariConfig hikariConfig = this.camundaDbConfig(); return new HikariDataSource(hikariConfig); } diff --git a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/database/config/NfvoDatabaseConfiguration.java b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/database/config/NfvoDatabaseConfiguration.java index 8f146e5378..1b4e40985a 100644 --- a/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/database/config/NfvoDatabaseConfiguration.java +++ b/so-etsi-nfvo/so-etsi-nfvo-ns-lcm/so-etsi-nfvo-ns-lcm-database-service/src/main/java/org/onap/so/etsi/nfvo/ns/lcm/database/config/NfvoDatabaseConfiguration.java @@ -19,11 +19,14 @@ */ package org.onap.so.etsi.nfvo.ns.lcm.database.config; +import static org.slf4j.LoggerFactory.getLogger; import javax.persistence.EntityManagerFactory; import javax.sql.DataSource; import org.onap.so.etsi.nfvo.ns.lcm.database.beans.NfvoJob; +import org.slf4j.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.flyway.FlywayDataSource; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.boot.orm.jpa.EntityManagerFactoryBuilder; import org.springframework.context.annotation.Bean; @@ -47,6 +50,7 @@ import com.zaxxer.hikari.HikariDataSource; @EnableJpaRepositories(entityManagerFactoryRef = "entityManagerFactory", basePackages = {"org.onap.so.etsi.nfvo.ns.lcm.database.repository"}) public class NfvoDatabaseConfiguration { + private static final Logger logger = getLogger(NfvoDatabaseConfiguration.class); private static final String PERSISTENCE_UNIT = "nfvo"; private static final String NFVO_DATA_SOURCE_QUALIFIER = "nfvoDataSource"; @@ -57,14 +61,18 @@ public class NfvoDatabaseConfiguration { @Bean @ConfigurationProperties(prefix = "spring.datasource.hikari.nfvo") public HikariConfig nfvoDbConfig() { + logger.debug("Creating NFVO HikariConfig bean ... "); return new HikariConfig(); } + @Primary + @FlywayDataSource @Bean(name = NFVO_DATA_SOURCE_QUALIFIER) public DataSource dataSource() { if (mBeanExporter != null) { mBeanExporter.addExcludedBean(NFVO_DATA_SOURCE_QUALIFIER); } + logger.debug("Creating NFVO HikariDataSource bean ... "); final HikariConfig hikariConfig = this.nfvoDbConfig(); return new HikariDataSource(hikariConfig); } diff --git a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java index 954ebdd013..d53de914a3 100644 --- a/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java +++ b/so-simulator/src/main/java/org/onap/so/simulator/actions/aai/ProcessVnfc.java @@ -35,11 +35,12 @@ public class ProcessVnfc extends AbstractTestAction { AAIResourcesClient aaiResourceClient = new AAIResourcesClient(); if (context.getVariable("requestAction").equals("CreateVfModuleInstance") - && context.getVariable("serviceAction").equals("assign")) { + && context.getVariable("serviceAction").equals("assign") + && context.getVariable("vfModuleName").equals("nc_dummy_id")) { - AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, "zauk51bfrwl09oam001"); + AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, "ssc_server_1"); Vnfc vnfc = new Vnfc(); - vnfc.setVnfcName("zauk51bfrwl09oam001"); + vnfc.setVnfcName("ssc_server_1"); vnfc.setNfcNamingCode("oamfw"); vnfc.setNfcFunction("EPC-OAM-FIREWALL"); vnfc.setProvStatus("PREPROV"); @@ -51,38 +52,20 @@ public class ProcessVnfc extends AbstractTestAction { vnfc.setModelVersionId("9e314c37-2258-4572-a399-c0dd7d5f1aec"); vnfc.setModelCustomizationId("2bd95cd4-d7ff-4af0-985d-2adea0339921"); - if (!aaiResourceClient.exists(vnfcURI)) + if (!aaiResourceClient.exists(vnfcURI)) { + logger.debug("creating VNFC"); aaiResourceClient.create(vnfcURI, vnfc); + + + } else { + aaiResourceClient.get(vnfcURI); + } AAIResourceUri vfModuleURI = AAIUriFactory.createResourceUri(AAIObjectType.VF_MODULE, context.getVariable("vnfId"), context.getVariable("vfModuleId")); - AAIResourceUri pserverURI = AAIUriFactory.createResourceUri(AAIObjectType.PSERVER, "test"); - AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, - context.getVariable("cloudOwner"), context.getVariable("cloudRegion"), - context.getVariable("tenant"), "d29f3151-592d-4011-9356-ad047794e236"); - aaiResourceClient.connect(vnfcURI, vserverURI); - aaiResourceClient.connect(vserverURI, pserverURI); + logger.debug("creating VNFC edge to vf module"); aaiResourceClient.connect(vfModuleURI, vnfcURI); - } else if (context.getVariable("requestAction").equals("CreateVfModuleInstance") - && context.getVariable("serviceAction").equals("activate")) { - // For recreate after soft delete - AAIResourceUri vnfcURI = AAIUriFactory.createResourceUri(AAIObjectType.VNFC, "zauk51bfrwl09oam001"); - AAIResourceUri vserverURI = AAIUriFactory.createResourceUri(AAIObjectType.VSERVER, - context.getVariable("cloudOwner"), context.getVariable("cloudRegion"), - context.getVariable("tenant"), "d29f3151-592d-4011-9356-ad047794e236"); - - Relationships relationships = aaiResourceClient.get(vnfcURI).getRelationships().get(); - List<AAIResourceUri> uris = relationships.getRelatedUris(AAIObjectType.VSERVER); - if (uris.isEmpty() || uris.size() == 0) { - if (!aaiResourceClient.exists(vserverURI)) { - AAICommonObjectMapperProvider aaiMapper = new AAICommonObjectMapperProvider(); - InputStream vserverFile = - new ClassPathResource("openstack/gr_api/CreateVserver.json").getInputStream(); - Vserver vserver = aaiMapper.getMapper().readValue(vserverFile, Vserver.class); - aaiResourceClient.create(vserverURI, vserver); - } - aaiResourceClient.connect(vnfcURI, vserverURI); - } } + } catch (Exception e) { logger.debug("Exception in ProcessVnfc.doExecute", e); } diff --git a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json index 725c896b8d..773400e8f6 100644 --- a/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json +++ b/so-simulator/src/main/resources/openstack/gr_api/GetNeutronNetwork2.json @@ -24,7 +24,8 @@ ], "physical_network": "sriovnet1", "pci_slot": "0000:5e:05.6", - "pci_vendor_info": "8086:154c" + "pci_vendor_info": "8086:154c", + "host_id": "50197c55fc934e7b3947e17db762f0839320f94983df774d84991ad2" }, "fixed_ips": [ { |