diff options
Diffstat (limited to 'bpmn')
2 files changed, 48 insertions, 24 deletions
diff --git a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn index 13bd107fdb..38bbdc1134 100644 --- a/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn +++ b/bpmn/so-bpmn-building-blocks/src/main/resources/subprocess/BuildingBlock/EtsiVnfInstantiateBB.bpmn @@ -1,5 +1,5 @@ <?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:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0x13ohc" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.2.4"> +<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:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_0x13ohc" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="2.0.3"> <bpmn:process id="EtsiVnfInstantiateBB" name=" EtsiVnfInstantiateBB" isExecutable="true"> <bpmn:serviceTask id="ServiceTask_02e82t2" name="Create CreateVnfRequest " camunda:expression="${VnfmAdapterCreateVnfTask.buildCreateVnfRequest(InjectExecution.execute(execution, execution.getVariable("gBuildingBlockExecution")))}"> <bpmn:incoming>SequenceFlow_18fsqzd</bpmn:incoming> @@ -25,16 +25,22 @@ <bpmn:sequenceFlow id="SequenceFlow_0hp0ka1" sourceRef="ServiceTask_06ao4xu" targetRef="CallActivity_0fuqfru" /> <bpmn:callActivity id="CallActivity_0fuqfru" name="Monitor Instantiation Job" calledElement="MonitorVnfmCreateJob"> <bpmn:extensionElements> - <camunda:in source="SDNCRequest" target="SDNCRequest" /> - <camunda:out source="SDNCResponse" target="SDNCResponse" /> <camunda:out source="WorkflowException" target="WorkflowException" /> <camunda:in source="mso-request-id" target="mso-request-id" /> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:in source="createVnfResponse" target="createVnfResponse" /> + <camunda:out source="WorkflowExceptionErrorMessage" target="WorkflowExceptionErrorMessage" /> </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_0hp0ka1</bpmn:incoming> <bpmn:outgoing>SequenceFlow_1owx4yu</bpmn:outgoing> </bpmn:callActivity> <bpmn:sequenceFlow id="SequenceFlow_1owx4yu" sourceRef="CallActivity_0fuqfru" targetRef="CallActivity_0agszsb" /> <bpmn:callActivity id="CallActivity_0agszsb" name="Monitor Create Node Status" calledElement="MonitorVnfmCreateNodeStatus"> + <bpmn:extensionElements> + <camunda:in source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + <camunda:out source="gBuildingBlockExecution" target="gBuildingBlockExecution" /> + </bpmn:extensionElements> <bpmn:incoming>SequenceFlow_1owx4yu</bpmn:incoming> <bpmn:outgoing>SequenceFlow_0n57z81</bpmn:outgoing> </bpmn:callActivity> diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy index 3f9d10eaa4..b0749ded86 100644 --- a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/CreateSDNCNetworkResource.groovy @@ -232,24 +232,27 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { String incomingRequest = resourceInputObj.getRequestsInputs() String serviceParameters = JsonUtils.getJsonValue(incomingRequest, "service.parameters") String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs") - String cvlan = "10" - String svlan = "100" - String accessId = "AC9.0234.0337" + String cvlan = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.cvlan") + String svlan = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.svlan") + String remoteId = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.edgeinternetprofile_ip_remote_id") String manufacturer = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_manufacturer") String ontsn = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_serial_num") - String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.CVLAN", cvlan) - uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.SVLAN", svlan) - uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.accessID", accessId) + String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.c_vlan", cvlan) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.s_vlan", svlan) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.remote_id", remoteId) uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.manufacturer", manufacturer) uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ONTSN", ontsn) - msoLogger.debug("old resource input:" + resourceInputObj.toString()) + logger.debug("old resource input:" + resourceInputObj.toString()) resourceInputObj.setResourceParameters(uResourceInput) execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString()) - msoLogger.debug("new resource Input :" + resourceInputObj.toString()) + logger.debug("new resource Input :" + resourceInputObj.toString()) break case ~/[\w\s\W]*InternetProfile[\w\s\W]*/ : @@ -260,23 +263,38 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { String requestInputs = JsonUtils.getJsonValue(serviceParameters, "requestInputs") JSONObject inputParameters = new JSONObject(requestInputs) - String cvlan = "100" - String svlan = "1000" + String cvlan = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.cvlan") + String svlan = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.svlan") String manufacturer = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_manufacturer") - String accessId = "AC9.0234.0337" + String remoteId = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.edgeinternetprofile_ip_remote_id") String ontsn = jsonUtil.getJsonValue(serInput, "service.parameters.requestInputs.ont_ont_serial_num") + String serviceType = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.edgeinternetprofile_ip_service_type") + String macAddr = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.edgeinternetprofile_ip_rg_mac_addr") + String upStream = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.edgeinternetprofile_ip_upstream_speed") + String downStream = jsonUtil.getJsonValue(serInput, + "service.parameters.requestInputs.edgeinternetprofile_ip_downstream_speed") String uResourceInput = jsonUtil.addJsonValue(resourceInput, "requestInputs.c_vlan", cvlan) uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.s_vlan", svlan) uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.manufacturer", manufacturer) - uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_access_id", accessId) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_remote_id", remoteId) uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ont_sn", ontsn) - msoLogger.debug("old resource input:" + resourceInputObj.toString()) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_service_type", serviceType) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_rg_mac_addr", macAddr) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_upstream_speed", upStream) + uResourceInput = jsonUtil.addJsonValue(uResourceInput, "requestInputs.ip_downstream_speed", downStream) + logger.debug("old resource input:" + resourceInputObj.toString()) resourceInputObj.setResourceParameters(uResourceInput) execution.setVariable(Prefix + "resourceInput", resourceInputObj.toString()) - msoLogger.debug("new resource Input :" + resourceInputObj.toString()) + logger.debug("new resource Input :" + resourceInputObj.toString()) break @@ -308,13 +326,13 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { def vpnName = StringUtils.containsIgnoreCase(modelName, "sotnvpnattachment") ? "sotnvpnattachmentvf_sotncondition_sotnVpnName" : "sdwanvpnattachmentvf_sdwancondition_sdwanVpnName" String parentServiceName = jsonUtil.getJsonValueForKey(resourceInputObj.getRequestsInputs(), vpnName) - AAIResourcesClient client = new AAIResourcesClient() - AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer, serviceType).queryParam("service-instance-name", parentServiceName) - ServiceInstances sis = client.get(uri).asBean(ServiceInstances.class).get() - ServiceInstance si = sis.getServiceInstance().get(0) + AAIResourcesClient client = new AAIResourcesClient() + AAIResourceUri uri = AAIUriFactory.createResourceUri(AAIObjectPlurals.SERVICE_INSTANCE, customer, serviceType).queryParam("service-instance-name", parentServiceName) + ServiceInstances sis = client.get(uri).asBean(ServiceInstances.class).get() + ServiceInstance si = sis.getServiceInstance().get(0) - def parentServiceInstanceId = si.getServiceInstanceId() - execution.setVariable("parentServiceInstanceId", parentServiceInstanceId) + def parentServiceInstanceId = si.getServiceInstanceId() + execution.setVariable("parentServiceInstanceId", parentServiceInstanceId) break default: @@ -646,7 +664,7 @@ public class CreateSDNCNetworkResource extends AbstractServiceTaskProcessor { val = response."response-data"."RequestData"."output"."connection-attachment-response-information"."instance-id" break - // for SDWANConnectivity and SOTNConnectivity and default: + // for SDWANConnectivity and SOTNConnectivity and default: default: val = response."response-data"."RequestData"."output"."network-response-information"."instance-id" break |