diff options
12 files changed, 775 insertions, 36 deletions
diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java index d0fd4c9e7c..6d566c07ad 100644 --- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java +++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/main/java/org/onap/so/adapters/vnfmadapter/converters/sol003/etsicatalog/PkgmSubscriptionRequestConverter.java @@ -50,7 +50,7 @@ public class PkgmSubscriptionRequestConverter implements @Override public org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest convert( - PkgmSubscriptionRequest pkgmSubscriptionRequest) { + final PkgmSubscriptionRequest pkgmSubscriptionRequest) { final org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest etsiCatalogManagerSubscriptionRequest = new org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest(); @@ -86,8 +86,10 @@ public class PkgmSubscriptionRequestConverter implements return etsiCatalogManagerFilters; } - // TODO 'operationalState' in the Sol003 Swagger is type 'OperationalStateEnum'. The ETSI Catalog Manager Swagger - // 'operationalState' is type 'List<OperationalStateEnum>'. This method needs to be updated once swagger is updated. + // TODO 'operationalState' in the Sol003 Swagger is type 'OperationalStateEnum'. The ETSI + // Catalog Manager Swagger + // 'operationalState' is type 'List<OperationalStateEnum>'. This method needs to be updated once + // swagger is updated. private List<org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmNotificationsFilter.OperationalStateEnum> getOperationalState( final OperationalStateEnum operationalState) { if (operationalState != null) { @@ -104,6 +106,7 @@ public class PkgmSubscriptionRequestConverter implements vnfPkgId.forEach(type -> { etsiCatalogManagerVnfPkgId.add(type); }); + return etsiCatalogManagerVnfPkgId; } return Collections.emptyList(); } @@ -114,6 +117,7 @@ public class PkgmSubscriptionRequestConverter implements vnfdId.forEach(type -> { etsiCatalogManagerVnfdId.add(type); }); + return etsiCatalogManagerVnfdId; } return Collections.emptyList(); } @@ -147,7 +151,7 @@ public class PkgmSubscriptionRequestConverter implements private List<Version> getVersion(final List<SubscriptionsFilterVersions> sol003FilterVersions) { if (sol003FilterVersions != null && !sol003FilterVersions.isEmpty()) { - List<Version> etsiCatalogVersionList = new ArrayList<>(); + final List<Version> etsiCatalogVersionList = new ArrayList<>(); sol003FilterVersions.forEach(vnfFilterVersion -> { etsiCatalogVersionList.add(new Version().vnfSoftwareVersion(vnfFilterVersion.getVnfSoftwareVersion()) .vnfdVersions(vnfFilterVersion.getVnfdVersions())); @@ -166,6 +170,7 @@ public class PkgmSubscriptionRequestConverter implements notificationTypes.forEach(type -> etsiCatalogManagerNotificationTypes.add( org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmNotificationsFilter.NotificationTypesEnum .fromValue(type.getValue()))); + return etsiCatalogManagerNotificationTypes; } return Collections.emptyList(); } diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java index ba1bf71936..7466895d97 100644 --- a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java +++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/java/org/onap/so/adapters/vnfmadapter/rest/Sol003PackageManagementSubscriptionControllerTest.java @@ -26,28 +26,38 @@ import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; import static org.onap.so.adapters.vnfmadapter.Constants.PACKAGE_MANAGEMENT_BASE_URL; import static org.onap.so.client.RestTemplateConfig.CONFIGURABLE_REST_TEMPLATE; import static org.springframework.test.web.client.match.MockRestRequestMatchers.method; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.response.MockRestResponseCreators.withStatus; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; +import java.io.File; import java.net.URI; import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Paths; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.List; import java.util.Objects; import java.util.UUID; +import org.junit.After; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.onap.so.adapters.vnfmadapter.Constants; import org.onap.so.adapters.vnfmadapter.VnfmAdapterApplication; +import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.BasicAuth; import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.LinkSelf; import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.NsdmSubscription; import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmNotificationsFilter; import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscription; +import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.SubscriptionAuthentication; +import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.Version; +import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.VnfProducts; +import org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.VnfProductsProviders; import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.InlineResponse2002; import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.PkgmSubscriptionRequest; import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model.SubscriptionsAuthentication; @@ -59,6 +69,8 @@ import org.onap.so.adapters.vnfmadapter.extclients.vnfm.packagemanagement.model. import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.boot.test.web.client.TestRestTemplate; +import org.springframework.boot.web.server.LocalServerPort; import org.springframework.cache.Cache; import org.springframework.cache.CacheManager; import org.springframework.http.HttpHeaders; @@ -69,6 +81,7 @@ import org.springframework.http.ResponseEntity; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.client.MockRestServiceServer; +import org.springframework.test.web.client.match.MockRestRequestMatchers; import org.springframework.web.client.RestTemplate; import com.google.gson.Gson; @@ -83,6 +96,10 @@ public class Sol003PackageManagementSubscriptionControllerTest { private final Gson gson = new Gson(); private final URI msbEndpoint = URI.create("http://msb-iag.onap:80/api/vnfpkgm/v1/subscriptions"); + private static final String _NOTIFICATION_CALLBACK_URI = + "https://so-vnfm-adapter.onap:30406" + Constants.ETSI_SUBSCRIPTION_NOTIFICATION_BASE_URL; + private static final String LOCALHOST_URL = "http://localhost:"; + @Autowired @Qualifier(CONFIGURABLE_REST_TEMPLATE) private RestTemplate restTemplate; @@ -92,6 +109,12 @@ public class Sol003PackageManagementSubscriptionControllerTest { @Autowired private Sol003PackageManagementSubscriptionController sol003PackageManagementSubscriptionController; + @Autowired + private TestRestTemplate testRestTemplate; + + @LocalServerPort + private int port; + private static final String ID = UUID.randomUUID().toString(); @Before @@ -101,6 +124,11 @@ public class Sol003PackageManagementSubscriptionControllerTest { cache.clear(); } + @After + public void after() { + mockRestServiceServer.reset(); + } + @Test public void testSuccessPostSubscription() throws GeneralSecurityException, URISyntaxException { final PkgmSubscriptionRequest pkgmSubscriptionRequest = postSubscriptionForTest(); @@ -269,6 +297,47 @@ public class Sol003PackageManagementSubscriptionControllerTest { assertEquals(HttpStatus.NOT_FOUND, responseDelete.getStatusCode()); } + + @Test + public void testSuccessPostSubscriptionWithValidNotificationTypes() throws Exception { + + final String file = getAbsolutePath("src/test/resources/requests/SubscriptionRequest.json"); + final String json = new String(Files.readAllBytes(Paths.get(file))); + final PkgmSubscriptionRequest request = gson.fromJson(json, PkgmSubscriptionRequest.class); + + mockRestServiceServer.expect(requestTo(msbEndpoint)).andExpect(method(HttpMethod.POST)) + .andExpect(MockRestRequestMatchers.content().json(gson.toJson(getEtsiCatalogPkgmSubscriptionRequest()))) + .andRespond(withSuccess(gson.toJson(buildPkgmSubscription()), MediaType.APPLICATION_JSON)); + + + final ResponseEntity<InlineResponse2002> responseEntity = testRestTemplate.postForEntity( + LOCALHOST_URL + port + Constants.PACKAGE_MANAGEMENT_BASE_URL + "/subscriptions", request, + InlineResponse2002.class); + + assertEquals(HttpStatus.CREATED, responseEntity.getStatusCode()); + assertTrue(responseEntity.hasBody()); + final InlineResponse2002 actual = responseEntity.getBody(); + assertEquals(ID, actual.getId()); + + + } + + private org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest getEtsiCatalogPkgmSubscriptionRequest() { + return new org.onap.so.adapters.vnfmadapter.extclients.etsicatalog.model.PkgmSubscriptionRequest() + .filters(new PkgmNotificationsFilter() + .addNotificationTypesItem( + PkgmNotificationsFilter.NotificationTypesEnum.VNFPACKAGEONBOARDINGNOTIFICATION) + .addVnfdIdItem("VNFDID").addVnfPkgIdItem("VNFPKGID") + .addOperationalStateItem(PkgmNotificationsFilter.OperationalStateEnum.ENABLED) + .addVnfProductsFromProvidersItem(new VnfProductsProviders().vnfProvider("EST") + .addVnfProductsItem(new VnfProducts().vnfProductName("VnfProducts") + .addVersionsItem(new Version().vnfSoftwareVersion("vnfSoftwareVersion") + .addVnfdVersionsItem("version1"))))) + .callbackUri(_NOTIFICATION_CALLBACK_URI).authentication( + new SubscriptionAuthentication().addAuthTypeItem(SubscriptionAuthentication.AuthTypeEnum.BASIC) + .paramsBasic(new BasicAuth().userName("vnfm").password("password1$"))); + } + private PkgmSubscriptionRequest buildPkgmSubscriptionRequest() { final PkgmSubscriptionRequest pkgmSubscriptionRequest = new PkgmSubscriptionRequest(); final SubscriptionsFilter sub = buildSubscriptionsFilter(); @@ -281,8 +350,8 @@ public class Sol003PackageManagementSubscriptionControllerTest { private SubscriptionsFilter buildSubscriptionsFilter() { final SubscriptionsFilter sub = new SubscriptionsFilter(); - final List<String> vnfdIdList = new ArrayList(); - final List<String> vnfPkgIdList = new ArrayList(); + final List<String> vnfdIdList = new ArrayList<>(); + final List<String> vnfPkgIdList = new ArrayList<>(); final List<NotificationTypesEnum> notificationTypes = new ArrayList<>(); final SubscriptionsFilterVnfProductsFromProviders subscriptionsFilterVnfProductsFromProviders = new SubscriptionsFilterVnfProductsFromProviders(); @@ -324,4 +393,9 @@ public class Sol003PackageManagementSubscriptionControllerTest { return headers; } + private String getAbsolutePath(final String path) { + final File file = new File(path); + return file.getAbsolutePath(); + } + } diff --git a/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json new file mode 100644 index 0000000000..85ffb99d8d --- /dev/null +++ b/adapters/mso-vnfm-adapter/mso-vnfm-etsi-adapter/src/test/resources/requests/SubscriptionRequest.json @@ -0,0 +1,45 @@ +{ + "filter": + { + "notificationTypes": [ + "VnfPackageOnboardingNotification" + ], + "vnfProductsFromProviders": [ + { + "vnfProvider": "EST", + "vnfProducts": [ + { + "vnfProductName": "VnfProducts", + "versions": [ + { + "vnfSoftwareVersion": "vnfSoftwareVersion", + "vnfdVersions": [ + "version1" + ] + } + ] + } + ] + } + ], + "vnfdId": [ + "VNFDID" + ], + "vnfPkgId": [ + "VNFPKGID" + ], + "operationalState": "ENABLED" + }, + "callbackUri": "http://so-vnfm-adapter:9093/api/vnfpkgm/v1/subscriptions", + "authentication": + { + "authType": [ + "BASIC" + ], + "paramsBasic": + { + "userName": "vnfm", + "password": "vnfm" + } + } +} diff --git a/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy new file mode 100644 index 0000000000..7c2a2be6ac --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-common/src/main/groovy/org/onap/so/bpmn/infrastructure/scripts/DoDeleteSliceService.groovy @@ -0,0 +1,322 @@ +/*- + * ============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 org.camunda.bpm.engine.delegate.BpmnError +import org.camunda.bpm.engine.delegate.DelegateExecution +import org.onap.aai.domain.yang.AllottedResource +import org.onap.aai.domain.yang.AllottedResources +import org.onap.aai.domain.yang.Relationship +import org.onap.aai.domain.yang.ServiceInstance +import org.onap.aai.domain.yang.SliceProfiles +import org.onap.so.bpmn.common.scripts.AbstractServiceTaskProcessor +import org.onap.so.bpmn.common.scripts.ExceptionUtil +import org.onap.so.client.aai.AAIObjectType +import org.onap.so.client.aai.AAIResourcesClient +import org.onap.so.client.aai.entities.AAIResultWrapper +import org.onap.so.client.aai.entities.uri.AAIResourceUri +import org.onap.so.client.aai.entities.uri.AAIUriFactory +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +import javax.ws.rs.NotFoundException + +import static org.apache.commons.lang3.StringUtils.isBlank + +/** + * This groovy class supports the <class>DoDeleteSliceService.bpmn</class> process. + * + * Inputs: + * @param - msoRequestId + * @param - globalSubscriberId - O + * @param - subscriptionServiceType - O + * @param - serviceInstanceId + * + */ +class DoDeleteSliceService extends AbstractServiceTaskProcessor { + private final String PREFIX ="DoDeleteSliceService" + ExceptionUtil exceptionUtil = new ExceptionUtil() + private static final Logger LOGGER = LoggerFactory.getLogger( DoDeleteSliceService.class) + + @Override + void preProcessRequest(DelegateExecution execution) { + LOGGER.debug(" *****${PREFIX} preProcessRequest *****") + String msg = "" + + try { + //String requestId = execution.getVariable("msoRequestId") + execution.setVariable("prefix",PREFIX) + + //Inputs + //requestDetails.subscriberInfo. for AAI GET & PUT + execution.getVariable("globalSubscriberId") ?: execution.setVariable("globalSubscriberId", "") + + //requestDetails.requestParameters. for AAI PUT + execution.getVariable("serviceType") ?: execution.setVariable("serviceType", "") + + //Generated in parent for AAI PUT + String serviceInstanceId = execution.getVariable("serviceInstanceId") + if (isBlank(serviceInstanceId)){ + msg = "Input serviceInstanceId is null" + LOGGER.info(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 500, msg) + } + } catch (BpmnError e) { + throw e + } catch (Exception ex){ + msg = "Exception in preProcessRequest " + ex.getMessage() + LOGGER.error(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + LOGGER.debug("*****${PREFIX} Exit preProcessRequest *****") + } + + /** + * query E2ESliceService from AAI + * save snssai + * @param execution + */ + void queryE2ESliceSeriveFromAAI(DelegateExecution execution) + { + LOGGER.trace(" *****${PREFIX} Start queryE2ESliceSeriveFromAAI *****") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + + String errorMsg = "query e2e slice service from aai failed" + AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, serviceInstanceId, errorMsg) + Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class) + if(si.isPresent()) + { + String snssai = si.get()?.getEnvironmentContext() + execution.setVariable("snssai", snssai ?: "") + LOGGER.info("serviceInstanceId: ${serviceInstanceId}, snssai: ${snssai}") + } + LOGGER.trace(" *****${PREFIX} Exit queryE2ESliceSeriveFromAAI *****") + } + + /** + * get allotted resource from AAI + * save nsi id + * @param execution + */ + void getAllottedResFromAAI(DelegateExecution execution) + { + LOGGER.trace(" *****${PREFIX} Start getAllottedResFromAAI *****") + String serviceInstanceId = execution.getVariable("serviceInstanceId") + try + { + String errorMsg = "query allotted resource from aai failed." + AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.ALLOTTED_RESOURCE_ALL, serviceInstanceId, errorMsg) + Optional<AllottedResources> ars = wrapper?.asBean(AllottedResources.class) + if(ars.isPresent() && ars.get().getAllottedResource()) + { + List<AllottedResource> allottedResourceList = ars.get().getAllottedResource() + AllottedResource ar = allottedResourceList.first() + String relatedLink = ar?.getRelationshipList()?.getRelationship()?.first()?.getRelatedLink() + String nsiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : "" + execution.setVariable("nsiId", nsiId) + LOGGER.info("serviceInstanceId: ${serviceInstanceId}, nsiId:${nsiId}") + } + } + catch(BpmnError e){ + throw e + } + catch (Exception ex){ + String msg = "Exception in getAllottedResFromAAI " + ex.getMessage() + LOGGER.error(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + LOGGER.trace(" *****${PREFIX} Exit getAllottedResFromAAI *****") + } + + /** + * get nsi service instance from aai + * save nssi id + * @param execution + */ + void getNSIFromAAI(DelegateExecution execution) + { + LOGGER.trace(" *****${PREFIX} Start getNSIFromAAI *****") + String nsiId = execution.getVariable("nsiId") + try + { + String errorMsg = "query nsi from aai failed." + AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nsiId, errorMsg) + Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class) + List<String> nssiIdList = [] + String msg = "nsiId:${nsiId},nssiIdList:" + if(si.isPresent()) + { + List<Relationship> relationshipList = si.get().getRelationshipList()?.getRelationship() + for (Relationship relationship : relationshipList) + { + String relatedTo = relationship.getRelatedTo() + if (relatedTo == "service-instance") + { + String relatedLink = relationship.getRelatedLink()?:"" + String nssiId = relatedLink ? relatedLink.substring(relatedLink.lastIndexOf("/") + 1,relatedLink.length()) : "" + nssiIdList.add(nssiId) + msg+="${nssiId}, " + } + } + } + LOGGER.info(msg) + execution.setVariable("nssiIdList", nssiIdList) + } + catch(BpmnError e){ + throw e + } + catch (Exception ex){ + String msg = "Exception in getNSIFromAAI " + ex.getMessage() + LOGGER.error(msg) + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, msg) + } + LOGGER.trace(" *****${PREFIX} Exit getNSIFromAAI *****") + } + + /** + * get nssi service from AAI + * prepare list + * @param execution + */ + void getNSSIListFromAAI(DelegateExecution execution) + { + LOGGER.trace("*****${PREFIX} Start getNSSIListFromAAI *****") + List<String> nssiIdList = execution.getVariable("nssiIdList") + List<ServiceInstance> nssiInstanceList = [] + String errorMsg = "query nssi list from aai failed" + for(String nssiId : nssiIdList) + { + AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SERVICE_INSTANCE, nssiId, errorMsg) + Optional<ServiceInstance> si =wrapper.asBean(ServiceInstance.class) + if(si.isPresent()) + { + nssiInstanceList.add(si.get()) + } + } + int size = nssiInstanceList.size() + int proportion = size >0 ?((90/size) as int) : 90 + execution.setVariable("nssiInstanceList", nssiInstanceList) + execution.setVariable("currentNSSIIndex", 0) + execution.setVariable("proportion", proportion) + String msg ="nssiInstanceList size: ${nssiInstanceList.size()}, proportion:${proportion}" + LOGGER.info(msg) + LOGGER.trace(" *****${PREFIX} Exit getNSSIListFromAAI *****") + } + + /** + * get current NSSI + * @param execution + */ + void getCurrentNSSI(DelegateExecution execution) + { + LOGGER.trace(" *****${PREFIX} Start getCurrentNSSI *****") + List<ServiceInstance> nssiInstanceList = execution.getVariable("nssiInstanceList") + int currentIndex = execution.getVariable("currentNSSIIndex") as int + ServiceInstance nssi = nssiInstanceList?.get(currentIndex) + def currentNSSI = [:] + currentNSSI['nssiServiceInstanceId'] = nssi?.getServiceInstanceId() + currentNSSI['modelInvariantId'] = nssi?.getModelInvariantId() + currentNSSI['modelVersionId'] = nssi?.getModelVersionId() + currentNSSI['snssai'] = execution.getVariable("snssai") ?: "" + currentNSSI['nsiServiceInstanceId'] = execution.getVariable("nsiId") ?: "" + currentNSSI['operationId'] = execution.getVariable("operationId") ?: "" + currentNSSI['e2eServiceInstanceId'] = execution.getVariable("serviceInstanceId") ?: "" + currentNSSI['msoRequestId'] = execution.getVariable("msoRequestId") ?: "" + currentNSSI['globalSubscriberId'] = execution.getVariable("globalSubscriberId") ?: "" + currentNSSI['serviceType'] = execution.getVariable("serviceType") ?: "" + currentNSSI['serviceModelInfo'] = execution.getVariable("serviceModelInfo") ?: "" + currentNSSI['proportion'] = (execution.getVariable("proportion") as int)*(currentIndex+1) + execution.setVariable("currentNSSI", currentNSSI) + String msg = "Now we deal with nssiServiceInstanceId: ${currentNSSI['nssiServiceInstanceId']}, current Index: ${currentIndex}, current proportion:${currentNSSI['proportion']}" + LOGGER.info(msg) + LOGGER.trace(" *****${PREFIX} Exit getCurrentNSSI *****") + } + + /** + * parse next nssi + * @param execution + */ + void parseNextNSSI(DelegateExecution execution) + { + LOGGER.trace(" *****${PREFIX} Start parseNextNSSI *****") + if(execution.getVariable("WorkflowException") != null){ + exceptionUtil.buildAndThrowWorkflowException(execution, 7000, "current job failure!") + } + def currentIndex = execution.getVariable("currentNSSIIndex") + List<ServiceInstance> nssiInstanceList = execution.getVariable("nssiInstanceList") + def nextIndex = ++currentIndex + LOGGER.info("nextIndex: ${nextIndex}") + if(nextIndex >= nssiInstanceList.size()){ + execution.setVariable("isAllNSSIFinished", "true") + }else{ + execution.setVariable("isAllNSSIFinished", "false") + execution.setVariable("currentNSSIIndex", nextIndex) + } + LOGGER.trace(" *****${PREFIX} Exit parseNextNSSI *****") + } + + + /** + * query sliceProfile from AAI + * save profileId + * @param execution + */ + void querySliceProfileFromAAI(DelegateExecution execution) + { + LOGGER.trace(" *****${PREFIX} Start querySliceProfileFromAAI *****") + def currentNSSI = execution.getVariable("currentNSSI") + String nssiId = currentNSSI['nssiServiceInstanceId'] + String errorMsg = "query slice profile failed" + AAIResultWrapper wrapper = queryAAI(execution, AAIObjectType.SLICE_PROFILE_ALL, nssiId, errorMsg) + Optional<SliceProfiles> sliceProfiles =wrapper.asBean(SliceProfiles.class) + if(sliceProfiles.isPresent()) + { + String profileId = sliceProfiles.get().getSliceProfile()?.get(0)?.getProfileId() + currentNSSI['profileId'] = profileId ?: "" + LOGGER.info("nssiId: ${nssiId}, profileId: ${profileId}") + } + execution.setVariable("currentNSSI", currentNSSI) + LOGGER.trace(" *****${PREFIX} Exit querySliceProfileFromAAI *****") + } + + /** + * query AAI + * @param execution + * @param aaiObjectType + * @param instanceId + * @return AAIResultWrapper + */ + private AAIResultWrapper queryAAI(DelegateExecution execution, AAIObjectType aaiObjectType, String instanceId, String errorMsg) + { + LOGGER.trace(" *****${PREFIX} Start queryAAI *****") + String globalSubscriberId = execution.getVariable("globalSubscriberId") + String serviceType = execution.getVariable("serviceType") + + AAIResourcesClient resourceClient = new AAIResourcesClient() + AAIResourceUri resourceUri = AAIUriFactory.createResourceUri(aaiObjectType, globalSubscriberId, serviceType, instanceId) + if (!resourceClient.exists(resourceUri)) { + exceptionUtil.buildAndThrowWorkflowException(execution, 2500, errorMsg) + } + AAIResultWrapper wrapper = resourceClient.get(resourceUri, NotFoundException.class) + LOGGER.trace(" *****${PREFIX} Exit queryAAI *****") + return wrapper + } + +} diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn new file mode 100644 index 0000000000..1f0e10b1c1 --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoCreateCommunicationService.bpmn @@ -0,0 +1,115 @@ +<?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:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_152rp63" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> + <bpmn:process id="DoCreateCommunicationService" name="DoCreateCommunicationService" isExecutable="true"> + <bpmn:startEvent id="StartEvent_1" name="start"> + <bpmn:outgoing>SequenceFlow_0r43nhn</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0r43nhn" sourceRef="StartEvent_1" targetRef="Task_1n00ul2" /> + <bpmn:scriptTask id="Task_1n00ul2" name="Pre Process Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0r43nhn</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1ojuala</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def csi= new DoCreateCommunicationService() +csi.preProcessRequest(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_13cimkc" name="Create Communication Service Profile" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0mxvw9q</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_15e8qrt</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def csi= new DoCreateCommunicationService() +csi.createCommunicationServiceProfile(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_02h3nyo" name="Create Communication Service" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1ojuala</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0mxvw9q</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def csi= new DoCreateCommunicationService() +csi.createCommunicationService(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:endEvent id="EndEvent_0tx74b8" name="end"> + <bpmn:incoming>SequenceFlow_15e8qrt</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_0mxvw9q" sourceRef="Task_02h3nyo" targetRef="Task_13cimkc" /> + <bpmn:sequenceFlow id="SequenceFlow_15e8qrt" sourceRef="Task_13cimkc" targetRef="EndEvent_0tx74b8" /> + <bpmn:sequenceFlow id="SequenceFlow_1ojuala" sourceRef="Task_1n00ul2" targetRef="Task_02h3nyo" /> + <bpmn:subProcess id="SubProcess_0hvqoiu" name="Java Exception Handling Sub Process" triggeredByEvent="true"> + <bpmn:startEvent id="StartEvent_06faevu"> + <bpmn:outgoing>SequenceFlow_1jckdn4</bpmn:outgoing> + <bpmn:errorEventDefinition id="ErrorEventDefinition_1idslt4" /> + </bpmn:startEvent> + <bpmn:endEvent id="EndEvent_1xkvl7n"> + <bpmn:incoming>SequenceFlow_0ixyf17</bpmn:incoming> + </bpmn:endEvent> + <bpmn:scriptTask id="ScriptTask_15u2oe2" name="Process Error" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1jckdn4</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0ixyf17</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.common.scripts.* +ExceptionUtil exceptionUtil = new ExceptionUtil() +exceptionUtil.processJavaException(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0ixyf17" sourceRef="ScriptTask_15u2oe2" targetRef="EndEvent_1xkvl7n" /> + <bpmn:sequenceFlow id="SequenceFlow_1jckdn4" sourceRef="StartEvent_06faevu" targetRef="ScriptTask_15u2oe2" /> + </bpmn:subProcess> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoCreateCommunicationService"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> + <dc:Bounds x="179" y="99" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="186" y="142" width="23" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0r43nhn_di" bpmnElement="SequenceFlow_0r43nhn"> + <di:waypoint x="215" y="117" /> + <di:waypoint x="290" y="117" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1ilqwj5_di" bpmnElement="Task_1n00ul2"> + <dc:Bounds x="290" y="77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0vpnfpe_di" bpmnElement="Task_13cimkc"> + <dc:Bounds x="660" y="77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_03bitgg_di" bpmnElement="Task_02h3nyo"> + <dc:Bounds x="480" y="77" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0tx74b8_di" bpmnElement="EndEvent_0tx74b8"> + <dc:Bounds x="912" y="99" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="921" y="142" width="19" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0mxvw9q_di" bpmnElement="SequenceFlow_0mxvw9q"> + <di:waypoint x="580" y="117" /> + <di:waypoint x="660" y="117" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_15e8qrt_di" bpmnElement="SequenceFlow_15e8qrt"> + <di:waypoint x="760" y="117" /> + <di:waypoint x="912" y="117" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1ojuala_di" bpmnElement="SequenceFlow_1ojuala"> + <di:waypoint x="390" y="117" /> + <di:waypoint x="480" y="117" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="SubProcess_0hvqoiu_di" bpmnElement="SubProcess_0hvqoiu" isExpanded="true"> + <dc:Bounds x="290" y="250" width="417" height="161" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="StartEvent_06faevu_di" bpmnElement="StartEvent_06faevu"> + <dc:Bounds x="327" y="317" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_1xkvl7n_di" bpmnElement="EndEvent_1xkvl7n"> + <dc:Bounds x="613" y="317" width="36" height="36" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_15u2oe2_di" bpmnElement="ScriptTask_15u2oe2"> + <dc:Bounds x="438" y="295" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ixyf17_di" bpmnElement="SequenceFlow_0ixyf17"> + <di:waypoint x="538" y="335" /> + <di:waypoint x="613" y="335" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1jckdn4_di" bpmnElement="SequenceFlow_1jckdn4"> + <di:waypoint x="363" y="335" /> + <di:waypoint x="438" y="335" /> + </bpmndi:BPMNEdge> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn new file mode 100644 index 0000000000..5f4816e78f --- /dev/null +++ b/bpmn/so-bpmn-infrastructure-flows/src/main/resources/subprocess/DoDeleteSliceService.bpmn @@ -0,0 +1,205 @@ +<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" id="Definitions_1p1suc9" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.4.1"> + <bpmn:process id="DoDeleteSliceServiceV1" name="DoDeleteSliceServiceV1" isExecutable="true"> + <bpmn:startEvent id="StartEvent_1" name="start"> + <bpmn:outgoing>SequenceFlow_0ep5het</bpmn:outgoing> + </bpmn:startEvent> + <bpmn:sequenceFlow id="SequenceFlow_0ep5het" sourceRef="StartEvent_1" targetRef="Task_0etki1p" /> + <bpmn:sequenceFlow id="SequenceFlow_1qkgvvu" sourceRef="Task_1ujnqtj" targetRef="Task_1fqiyb4" /> + <bpmn:sequenceFlow id="SequenceFlow_1rgfzzy" sourceRef="Task_1fqiyb4" targetRef="Task_1u755sr" /> + <bpmn:scriptTask id="Task_1ujnqtj" name="Query Allotted Resource From AAI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_029u1wr</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1qkgvvu</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.getAllottedResFromAAI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_1fqiyb4" name="Query NSI From AAI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1qkgvvu</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1rgfzzy</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.getNSIFromAAI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="Task_1u755sr" name="Query NSSI List From AAI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_1rgfzzy</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_05si1me</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.getNSSIListFromAAI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_05si1me" sourceRef="Task_1u755sr" targetRef="Task_1iomfas" /> + <bpmn:exclusiveGateway id="ExclusiveGateway_1ogbunu" name="Is all NSSI finished?"> + <bpmn:incoming>SequenceFlow_15z9iio</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_1c4fjbv</bpmn:outgoing> + <bpmn:outgoing>SequenceFlow_0926ghe</bpmn:outgoing> + </bpmn:exclusiveGateway> + <bpmn:endEvent id="EndEvent_0jaitqv" name="End"> + <bpmn:incoming>SequenceFlow_1c4fjbv</bpmn:incoming> + </bpmn:endEvent> + <bpmn:sequenceFlow id="SequenceFlow_1c4fjbv" name="yes" sourceRef="ExclusiveGateway_1ogbunu" targetRef="EndEvent_0jaitqv"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isAllNSSIFinished" ) == true)}</bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:sequenceFlow id="SequenceFlow_01o2qpv" sourceRef="Task_1iomfas" targetRef="Task_1qqljvu" /> + <bpmn:sequenceFlow id="SequenceFlow_0c58sw3" sourceRef="Task_1rc7mcw" targetRef="ScriptTask_159855t" /> + <bpmn:sequenceFlow id="SequenceFlow_0926ghe" name="no" sourceRef="ExclusiveGateway_1ogbunu" targetRef="Task_1iomfas"> + <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">#{(execution.getVariable("isAllNSSIFinished" ) == false)}</bpmn:conditionExpression> + </bpmn:sequenceFlow> + <bpmn:scriptTask id="Task_0etki1p" name="PreProcess Incoming Request" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0ep5het</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0npmman</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.preProcessRequest(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_0npmman" sourceRef="Task_0etki1p" targetRef="Task_13k9usx" /> + <bpmn:scriptTask id="Task_1iomfas" name="Get Current NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0926ghe</bpmn:incoming> + <bpmn:incoming>SequenceFlow_05si1me</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_01o2qpv</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.getCurrentNSSI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:scriptTask id="ScriptTask_159855t" name="Parse Next NSSI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0c58sw3</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_15z9iio</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.parseNextNSSI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_15z9iio" sourceRef="ScriptTask_159855t" targetRef="ExclusiveGateway_1ogbunu" /> + <bpmn:sequenceFlow id="SequenceFlow_0q83qg3" sourceRef="Task_1qqljvu" targetRef="Task_1rc7mcw" /> + <bpmn:scriptTask id="Task_1qqljvu" name="Query Slice Profile From AAI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_01o2qpv</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0q83qg3</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.querySliceProfileFromAAI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:sequenceFlow id="SequenceFlow_029u1wr" sourceRef="Task_13k9usx" targetRef="Task_1ujnqtj" /> + <bpmn:scriptTask id="Task_13k9usx" name="Query E2ESlice Serive From AAI" scriptFormat="groovy"> + <bpmn:incoming>SequenceFlow_0npmman</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_029u1wr</bpmn:outgoing> + <bpmn:script>import org.onap.so.bpmn.infrastructure.scripts.* +def ddss= new DoDeleteSliceService() +ddss.queryE2ESliceSeriveFromAAI(execution)</bpmn:script> + </bpmn:scriptTask> + <bpmn:callActivity id="Task_1rc7mcw" name="Do Deallocate NSSI " calledElement="DoDeallocateNSSIV1"> + <bpmn:extensionElements> + <camunda:in source="currentNSSI" target="currentNSSI" /> + <camunda:in source="msoRequestId" target="msoRequestId" /> + <camunda:in source="serviceModelInfo" target="serviceModelInfo" /> + <camunda:in source="serviceInstanceId" target="serviceInstanceId" /> + <camunda:out source="WorkflowException" target="WorkflowException" /> + </bpmn:extensionElements> + <bpmn:incoming>SequenceFlow_0q83qg3</bpmn:incoming> + <bpmn:outgoing>SequenceFlow_0c58sw3</bpmn:outgoing> + </bpmn:callActivity> + </bpmn:process> + <bpmndi:BPMNDiagram id="BPMNDiagram_1"> + <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="DoDeleteSliceServiceV1"> + <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"> + <dc:Bounds x="152" y="122" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="159" y="165" width="22" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0ep5het_di" bpmnElement="SequenceFlow_0ep5het"> + <di:waypoint x="188" y="140" /> + <di:waypoint x="270" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1qkgvvu_di" bpmnElement="SequenceFlow_1qkgvvu"> + <di:waypoint x="700" y="140" /> + <di:waypoint x="750" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_1rgfzzy_di" bpmnElement="SequenceFlow_1rgfzzy"> + <di:waypoint x="850" y="140" /> + <di:waypoint x="900" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1bj6tw4_di" bpmnElement="Task_1ujnqtj"> + <dc:Bounds x="600" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_0xgmbqj_di" bpmnElement="Task_1fqiyb4"> + <dc:Bounds x="750" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_01fp1vt_di" bpmnElement="Task_1u755sr"> + <dc:Bounds x="900" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_05si1me_di" bpmnElement="SequenceFlow_05si1me"> + <di:waypoint x="1000" y="140" /> + <di:waypoint x="1040" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ExclusiveGateway_1ogbunu_di" bpmnElement="ExclusiveGateway_1ogbunu" isMarkerVisible="true"> + <dc:Bounds x="1555" y="115" width="50" height="50" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1560" y="85" width="52" height="27" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="EndEvent_0jaitqv_di" bpmnElement="EndEvent_0jaitqv"> + <dc:Bounds x="1692" y="122" width="36" height="36" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1700" y="168" width="20" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_1c4fjbv_di" bpmnElement="SequenceFlow_1c4fjbv"> + <di:waypoint x="1605" y="140" /> + <di:waypoint x="1692" y="140" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1630" y="118" width="17" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_01o2qpv_di" bpmnElement="SequenceFlow_01o2qpv"> + <di:waypoint x="1140" y="140" /> + <di:waypoint x="1170" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0c58sw3_di" bpmnElement="SequenceFlow_0c58sw3"> + <di:waypoint x="1400" y="140" /> + <di:waypoint x="1420" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0926ghe_di" bpmnElement="SequenceFlow_0926ghe"> + <di:waypoint x="1580" y="165" /> + <di:waypoint x="1580" y="260" /> + <di:waypoint x="1090" y="260" /> + <di:waypoint x="1090" y="180" /> + <bpmndi:BPMNLabel> + <dc:Bounds x="1329" y="242" width="13" height="14" /> + </bpmndi:BPMNLabel> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0icszw6_di" bpmnElement="Task_0etki1p"> + <dc:Bounds x="270" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_0npmman_di" bpmnElement="SequenceFlow_0npmman"> + <di:waypoint x="370" y="140" /> + <di:waypoint x="430" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_1obnwrr_di" bpmnElement="Task_1iomfas"> + <dc:Bounds x="1040" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="ScriptTask_159855t_di" bpmnElement="ScriptTask_159855t"> + <dc:Bounds x="1420" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_15z9iio_di" bpmnElement="SequenceFlow_15z9iio"> + <di:waypoint x="1520" y="140" /> + <di:waypoint x="1555" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNEdge id="SequenceFlow_0q83qg3_di" bpmnElement="SequenceFlow_0q83qg3"> + <di:waypoint x="1270" y="140" /> + <di:waypoint x="1300" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0y9ppnc_di" bpmnElement="Task_1qqljvu"> + <dc:Bounds x="1170" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNEdge id="SequenceFlow_029u1wr_di" bpmnElement="SequenceFlow_029u1wr"> + <di:waypoint x="530" y="140" /> + <di:waypoint x="600" y="140" /> + </bpmndi:BPMNEdge> + <bpmndi:BPMNShape id="ScriptTask_0f9rjq4_di" bpmnElement="Task_13k9usx"> + <dc:Bounds x="430" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + <bpmndi:BPMNShape id="CallActivity_18qkiat_di" bpmnElement="Task_1rc7mcw"> + <dc:Bounds x="1300" y="100" width="100" height="80" /> + </bpmndi:BPMNShape> + </bpmndi:BPMNPlane> + </bpmndi:BPMNDiagram> +</bpmn:definitions> diff --git a/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java b/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java index c124bfa944..d720399293 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/EsrInfo.java @@ -21,9 +21,10 @@ package org.onap.so.beans.nsmf; import com.fasterxml.jackson.annotation.JsonInclude; +import java.io.Serializable; @JsonInclude(JsonInclude.Include.NON_NULL) -public class EsrInfo { +public class EsrInfo implements Serializable { private String vendor; diff --git a/common/src/main/java/org/onap/so/beans/nsmf/NewNsst.java b/common/src/main/java/org/onap/so/beans/nsmf/NewNsst.java index e13aa5000a..68aebf2df2 100644 --- a/common/src/main/java/org/onap/so/beans/nsmf/NewNsst.java +++ b/common/src/main/java/org/onap/so/beans/nsmf/NewNsst.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP - SO * ================================================================================ - * Copyright (C) 2019 Huawei Technologies Co., Ltd. All rights reserved. + * Copyright (C) 2020 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. diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app index 90f0a6627d..e8f02f12c6 100644 --- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-app +++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-app @@ -14,7 +14,6 @@ COPY configs/logging/logback-spring.xml /app COPY scripts/start-app.sh /app COPY scripts/wait-for.sh /app COPY ca-certificates/onap-ca.crt /app/ca-certificates/onap-ca.crt -COPY certs/* /app/ RUN chown -R so:so /app && chmod 700 /app/*.sh diff --git a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.jks b/packages/docker/src/main/docker/docker-files/certs/org.onap.so.jks Binary files differdeleted file mode 100644 index 1e849afb5e..0000000000 --- a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.jks +++ /dev/null diff --git a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile b/packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile deleted file mode 100644 index 9000ed29fb..0000000000 --- a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.keyfile +++ /dev/null @@ -1,27 +0,0 @@ -xVdhDotWIx2RB3f8RxAFQb9mkHVVdIzv8eiij9cDjg_5ea5HWPS7OzLR5lv4NA0vStrAMfSAaS2e -j4rzvrlserM9bTRco3JHb-i6ZGYMoTL6kuFJ9JMveSqg-fkwvrm7VcYQJBs1FIE3hRLNqiGJ34ud -hDRp-cGUvNRLIImksKT2fmUyEawLLuE0Lo5aX46y0ibjIMe7clMxLHIS5-WggvkgIOPkVDcxqLT2 -OteGptqW1cjrm1ydbTkLYN6dd7ZmRsT3ULPYLEtPTlZ2vCh7bFBBvP_tjp2cZf4uSPM6EClYAikn -dnTqivOfCZn25r0xeXuectoXbq12fws_jaCH05ZK1wJwAF_cQNfpvaiM457rE672YV3Ev4yhXCyM -1jVL2P9Chl1sSBkZujCftvaj1rlippP9P_eohcLv84mtApEyV49rBFRMtkX9ZVdPyb8shFSoXJxk -M6DentRzY1g37mVJ1B1YMKPNQj95nOD4gLvjbUZ7dATuroENsG7oUWkfaV6dokfTmh504ZbyeqGh -xa7yfr3326fMQBhQMpsyqD2o_Obe5wN57p-vb469w65pUmK7iJDa0Fgxaxy8XNNnw6gCurbbsvyU -nB8UdfhTvL5mJew_tKUvtq_KH9ajnA8giSxuFd9KM6YHJWiFMXIROEQT7hKjTJka1ghERBjcH_pY -hbKtHdvbrS7T2hGwY_MQEUXYQBirtjaEwAvI960hXQt1K-MC8PNLRYtdLKE2Aq3amMt7ZKtrHSeN -33I1MjXc3wRUeOi5A6qImge1Q_Wmn1SURAn9KbEv9eoMUbQUkN1z2iyw4x94BZpBk5GjDypKKOyg -guec0UY3y9wqm5gGW7XvT3v1lZqo5180VgK49iFgA4IhWZ7dnDFQmq6IHTr1pM4kuvJ9dka9saIh -9xCk_KINPp5_dqJ2Lhak2IeRg_Zm3belm1jvYGCyRRqfoi9WGrDh3LLZeK8MHrrfzLI4Toy_n6DG -UNXPrXqrZPREfW2lhYLRfrivOBYWPq9JidQXn1UctSmWdNoMH7XuikBpAwmlInNA_5j9J-L-gf9D -cw2zoby3_wvcm5vxndnocEdhqVVdo7uMmXasQqphuyJP8rgCJf_I1v0Qe5F-JXsj6xDvarOUPOTj -Z93a64EO0KI0OznolRyBqHpIXffbGh7e1EpAE0LMESKJC3Mjmsgz1ld3s7WfdeDK-IxUEHJLHlhY -IjBlY6q3OJDrgvPLkwoWPbI48tmRUJX1BCafvDU6W8crl4VQKhL_l5ANAX5oaKwh-0ZJAZ15tna5 -6fjWcWrtQSdNQxj0jXV7uEcBtRtyPyOk2uw4HJDBLQyyOglUUxcQZJFCFp2fCHmNyttmUJQ5U9cu -yw9lKhsyBJ5TB4psbp64_0EalITeAGrpuH1I1N2m1O5ZY8pmrpPtA1Mb5rQ4IJqiVbZgHTcvSiN5 -Z2SilurhI1vq4_aN_UZJQvEnw9U5WU3ysphsQk8RZKbFH4W9GDtmEGbAkRkTy17KrDIuMpe--XJF -SQHUd4tzxbiYVYHKdF6Ce1kfQ-DEFXEf7RddwuKbc7tw2pSjy1MVH4HSRoTOQQpewZRTfG-4d3MX -B99-QgufEk1OBkfemuDhdnPty5qkOLUEG_uQKPpD0QDVf-t4OxZqk_8G_dCJcXbmY4VT3V7pdN_I -qp2xP98wGcIPuLGlEB8px94jKdUolkqeV_UTmmkTGz-szLzgK_YhnnVJn8VeyNsPTwAFUlqiPTyT -n_7rCb_6nNKlriadaHu6IuJWehv03ZR9jS0P1Y3YLM286deCLFu93lN3nY4yf-SEguASdHJNCBFJ -RQViYm8Tfuim5F0KQGafheGcdZxTvBFihnDduQWNBR_bDB9zfD6OtvvkseyyWHt3gHkJm5QeCjWK -RzRvbjLpUnA31cJeEXmnmhB5qMAvjn8yORKcotn3u4MXdHEk-s8vR_SKykS6IcaYE1xxbowtg-UG -d1iaky1NFYa2VZ4pGx9lD93GDTDynmOSfzVeVsxhTu_5rAanpDkUYVuxOzajmRh55I8a6dRk
\ No newline at end of file diff --git a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jks b/packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jks Binary files differdeleted file mode 100644 index 71c6e776a3..0000000000 --- a/packages/docker/src/main/docker/docker-files/certs/org.onap.so.trust.jks +++ /dev/null |