From b414a59f203104a9557a1f2d19727fae538f18f7 Mon Sep 17 00:00:00 2001 From: Elena Kuleshov Date: Thu, 20 Sep 2018 11:07:23 -0400 Subject: Runtime BPMN Deployment Capability Added license header to BpmnInstaller.java ASDC Controller integration with BPMN Installer Correct a test file name in a JUnit. BPMN deployment mechanism for WorkflowDesigner Change-Id: I670406dd09b8789c86ab0b85ef122b35ea057698 Issue-ID: SO-826 Signed-off-by: Elena Kuleshov --- .../org/onap/so/asdc/client/ASDCConfiguration.java | 1 + .../org/onap/so/asdc/client/ASDCController.java | 31 ++ .../onap/so/asdc/installer/bpmn/BpmnInstaller.java | 165 ++++++++ .../so/asdc/installer/bpmn/BpmnInstallerTest.java | 80 ++++ .../src/test/resources/ASDC/TestBB.bpmn | 53 +++ .../src/test/resources/mime-multipart-body.txt | 84 ++++ .../WorkflowBpmn/Notification_MultipleModules.txt | 302 ++++++++++++++ .../WorkflowBpmn/ServiceResponse.json | 458 +++++++++++++++++++++ .../WorkflowBpmn/WorkflowBpmn.json | 20 + .../WorkflowBpmn/service-CxSvc-csar.csar | Bin 0 -> 86187 bytes .../service-VfZrdm5bpxmc02092017Service-csar.csar | Bin 0 -> 97867 bytes .../WorkflowBpmn/testStructure.json | 20 + 12 files changed, 1214 insertions(+) create mode 100644 asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java create mode 100644 asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java create mode 100644 asdc-controller/src/test/resources/ASDC/TestBB.bpmn create mode 100644 asdc-controller/src/test/resources/mime-multipart-body.txt create mode 100644 asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/Notification_MultipleModules.txt create mode 100644 asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/ServiceResponse.json create mode 100644 asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/WorkflowBpmn.json create mode 100644 asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar create mode 100644 asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-VfZrdm5bpxmc02092017Service-csar.csar create mode 100644 asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/testStructure.json (limited to 'asdc-controller') diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java index 85e3e9e747..8276826456 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCConfiguration.java @@ -70,6 +70,7 @@ public class ASDCConfiguration implements IConfiguration { public static final String HEAT_VOL="HEAT_VOL"; public static final String OTHER="OTHER"; public static final String TOSCA_CSAR="TOSCA_CSAR"; + public static final String WORKFLOWS="Workflows"; public static final String VF_MODULES_METADATA="VF_MODULES_METADATA"; private static MsoLogger msoLogger = MsoLogger.getMsoLogger(MsoLogger.Catalog.ASDC,ASDCConfiguration.class); diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java index ee329ced3c..7ead6cbb7f 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/client/ASDCController.java @@ -48,6 +48,7 @@ import org.onap.so.asdc.installer.IVfResourceInstaller; import org.onap.so.asdc.installer.ToscaResourceStructure; import org.onap.so.asdc.installer.VfModuleStructure; import org.onap.so.asdc.installer.VfResourceStructure; +import org.onap.so.asdc.installer.bpmn.BpmnInstaller; import org.onap.so.asdc.installer.heat.ToscaResourceInstaller; import org.onap.so.asdc.tenantIsolation.DistributionStatus; import org.onap.so.asdc.tenantIsolation.WatchdogDistribution; @@ -78,6 +79,9 @@ public class ASDCController { @Autowired private ToscaResourceInstaller toscaInstaller; + @Autowired + private BpmnInstaller bpmnInstaller; + @Autowired private WatchdogDistributionStatusRepository wdsRepo; @@ -684,6 +688,13 @@ public class ASDCController { this.processCsarServiceArtifacts(iNotif, toscaResourceStructure); + if (toscaResourceStructure.getServiceVersion() == null) { + LOGGER.debug("Deploy the workflow"); + IArtifactInfo iArtifact = toscaResourceStructure.getToscaArtifact(); + String csarFilePath = System.getProperty("mso.config.path") + "/ASDC" + "/" + iArtifact.getArtifactName(); + bpmnInstaller.installBpmn(csarFilePath); + } + // Install a service with no resources, only the service itself if (iNotif.getResources() == null || iNotif.getResources().size() < 1) { @@ -772,6 +783,26 @@ public class ASDCController { "Exception caught during processCsarServiceArtifacts", "ASDC", "processCsarServiceArtifacts", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in processCsarServiceArtifacts", e); } } + else if(artifact.getArtifactType().equals(ASDCConfiguration.WORKFLOWS)){ + + try{ + + IDistributionClientDownloadResult resultArtifact = this.downloadTheArtifact(artifact,iNotif.getDistributionID()); + + writeArtifactToFile(artifact, resultArtifact); + + toscaResourceStructure.setToscaArtifact(artifact); + + LOGGER.debug(ASDCNotificationLogging.dumpASDCNotification(iNotif)); + + + } catch(Exception e){ + System.out.println("Whats the error " + e.getMessage()); + LOGGER.error(MessageEnum.ASDC_GENERAL_EXCEPTION_ARG, + "Exception caught during processCsarServiceArtifacts", "ASDC", "processCsarServiceArtifacts", MsoLogger.ErrorCode.BusinessProcesssError, "Exception in processCsarServiceArtifacts", e); + } + } + } } diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java new file mode 100644 index 0000000000..f131b73175 --- /dev/null +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/bpmn/BpmnInstaller.java @@ -0,0 +1,165 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. 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.asdc.installer.bpmn; + +import java.io.*; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.zip.*; + +import org.apache.commons.io.IOUtils; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.entity.ContentType; +import org.apache.http.impl.client.HttpClientBuilder; + +import org.onap.so.logger.MessageEnum; +import org.onap.so.logger.MsoLogger; +import org.apache.http.entity.mime.MultipartEntityBuilder; +import org.apache.http.entity.mime.content.ByteArrayBody; +import org.apache.http.entity.mime.content.StringBody; +import org.apache.http.entity.mime.FormBodyPartBuilder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.env.Environment; +import org.springframework.stereotype.Component; + +@Component +public class BpmnInstaller { + protected static final MsoLogger LOGGER = MsoLogger.getMsoLogger (MsoLogger.Catalog.ASDC,BpmnInstaller.class); + private static final String BPMN_SUFFIX = ".bpmn"; + private static final String CAMUNDA_URL = "mso.camundaURL"; + private static final String CREATE_DEPLOYMENT_PATH = "/sobpmnengine/deployment/create"; + + @Autowired + private Environment env; + + public void installBpmn(String csarFilePath) { + LOGGER.info("Deploying BPMN files from " + csarFilePath); + try { + ZipInputStream csarFile = new ZipInputStream(new FileInputStream(csarFilePath)); + ZipEntry entry = csarFile.getNextEntry(); + + while (entry != null) { + String name = entry.getName(); + if (name.endsWith(BPMN_SUFFIX)) { + LOGGER.debug("Attempting to deploy BPMN file: " + name); + try { + Path p = Paths.get(name); + String fileName = p.getFileName().toString(); + extractBpmnFileFromCsar(csarFile, fileName); + HttpResponse response = sendDeploymentRequest(fileName); + LOGGER.debug("Response status line: " + response.getStatusLine()); + LOGGER.debug("Response entity: " + response.getEntity().toString()); + if (response.getStatusLine().getStatusCode() != 200) { + LOGGER.debug("Failed deploying BPMN " + name); + LOGGER.error(MessageEnum.ASDC_ARTIFACT_NOT_DEPLOYED_DETAIL, + name, + fileName, + "", + Integer.toString(response.getStatusLine().getStatusCode()), "", "", MsoLogger.ErrorCode.DataError, "ASDC BPMN deploy failed"); + } + else { + LOGGER.debug("Successfully deployed to Camunda: " + name); + } + } + catch (Exception e) { + LOGGER.debug("Exception :",e); + LOGGER.error(MessageEnum.ASDC_ARTIFACT_NOT_DEPLOYED_DETAIL, + name, + "", + "", + e.getMessage(), "", "", MsoLogger.ErrorCode.DataError, "ASDC BPMN deploy failed"); + } + } + entry = csarFile.getNextEntry(); + } + csarFile.close(); + } catch (IOException ex) { + LOGGER.debug("Exception :",ex); + LOGGER.error(MessageEnum.ASDC_ARTIFACT_NOT_DEPLOYED_DETAIL, + csarFilePath, + "", + "", + ex.getMessage(), "", "", MsoLogger.ErrorCode.DataError, "ASDC reading CSAR with workflows failed"); + } + return; + } + + protected HttpResponse sendDeploymentRequest(String bpmnFileName) throws Exception { + HttpClient client = HttpClientBuilder.create().build(); + String deploymentUri = this.env.getProperty(CAMUNDA_URL) + CREATE_DEPLOYMENT_PATH; + HttpPost post = new HttpPost(deploymentUri); + RequestConfig requestConfig = + RequestConfig.custom().setSocketTimeout(1000000).setConnectTimeout(1000).setConnectionRequestTimeout(1000).build(); + post.setConfig(requestConfig); + HttpEntity requestEntity = buildMimeMultipart(bpmnFileName); + post.setEntity(requestEntity); + return client.execute(post); + } + + protected HttpEntity buildMimeMultipart(String bpmnFileName) throws Exception { + FileInputStream bpmnFileStream = new FileInputStream (System.getProperty("mso.config.path") + "/ASDC" + "/" + bpmnFileName); + + byte[] bytesToSend = IOUtils.toByteArray(bpmnFileStream); + HttpEntity requestEntity = MultipartEntityBuilder.create() + .addPart(FormBodyPartBuilder.create() + .setName("deployment-name") + .setBody(new StringBody("MSO Sample 1", ContentType.TEXT_PLAIN)) + .setField("Content-Disposition", String.format("form-data; name=\"%s\"", "deployment-name")) + .build()) + .addPart(FormBodyPartBuilder.create() + .setName("enable-duplicate-filtering") + .setBody(new StringBody("false", ContentType.TEXT_PLAIN)) + .setField("Content-Disposition", String.format("form-data; name=\"%s\"", "enable-duplicate-filtering")) + .build()) + .addPart(FormBodyPartBuilder.create() + .setName("deplpy-changed-only") + .setBody(new StringBody("false", ContentType.TEXT_PLAIN)) + .setField("Content-Disposition", String.format("form-data; name=\"%s\"", "deploy-changed-only")) + .build()) + .addPart(FormBodyPartBuilder.create() + .setName("deployment-source") + .setBody(new StringBody("local", ContentType.TEXT_PLAIN)) + .setField("Content-Disposition", String.format("form-data; name=\"%s\"", "deployment-source")) + .build()) + .addPart(FormBodyPartBuilder.create() + .setName(bpmnFileName) + .setBody(new ByteArrayBody(bytesToSend, ContentType.create("octet"), bpmnFileName)) + .setField("Content-Disposition", String.format("form-data; name=\"%s\"; filename=\"%s\"; size=%d", bpmnFileName, bpmnFileName, bytesToSend.length)) + .build()) + .build(); + return requestEntity; + } + + protected void extractBpmnFileFromCsar(ZipInputStream zipIn, String fileName) throws IOException { + String filePath = System.getProperty("mso.config.path") + "/ASDC" + "/" + fileName; + BufferedOutputStream outputStream = new BufferedOutputStream(new FileOutputStream(filePath)); + byte[] bytesIn = new byte[4096]; + int read = 0; + while ((read = zipIn.read(bytesIn)) != -1) { + outputStream.write(bytesIn, 0, read); + } + outputStream.close(); + } +} diff --git a/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java b/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java new file mode 100644 index 0000000000..535434db32 --- /dev/null +++ b/asdc-controller/src/test/java/org/onap/so/asdc/installer/bpmn/BpmnInstallerTest.java @@ -0,0 +1,80 @@ +/*- + * ============LICENSE_START======================================================= + * ONAP - SO + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. 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.asdc.installer.bpmn; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.mock; + +import java.io.File; +import java.io.FileInputStream; +import java.io.InputStream; + +import javax.transaction.Transactional; + +import org.apache.commons.io.IOUtils; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.ProtocolVersion; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.message.BasicHttpResponse; +import org.apache.http.message.BasicStatusLine; +import org.junit.Before; +import org.junit.Test; +import org.onap.so.asdc.BaseTest; +import org.onap.so.asdc.installer.bpmn.BpmnInstaller; +import org.springframework.beans.factory.annotation.Autowired; + +@Transactional +public class BpmnInstallerTest extends BaseTest { + + @Autowired + private BpmnInstaller bpmnInstaller; + + @Before + public void init() throws Exception { + System.setProperty("mso.config.path", "src/test/resources"); + } + + @Test + public void buildMimeMultiPart_Test() throws Exception { + + HttpEntity entity = bpmnInstaller.buildMimeMultipart("TestBB.bpmn"); + String mimeMultipartBodyFilePath = System.getProperty("mso.config.path") + "/mime-multipart-body.txt"; + + File mimeMultipartBody = new File(mimeMultipartBodyFilePath); + InputStream expectedContent = new FileInputStream(mimeMultipartBody); + + assertThat(IOUtils.contentEquals(expectedContent, entity.getContent())); + } + + @Test + public void installBpmn_Test() throws Exception { + HttpResponse response = new BasicHttpResponse(new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 200, "")); + HttpClient httpClient = mock(HttpClient.class); + String csarPath = System.getProperty("mso.config.path") + "/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar"; + doReturn(response).when(httpClient).execute(any(HttpPost.class)); + bpmnInstaller.installBpmn(csarPath); + } + +} diff --git a/asdc-controller/src/test/resources/ASDC/TestBB.bpmn b/asdc-controller/src/test/resources/ASDC/TestBB.bpmn new file mode 100644 index 0000000000..47d1f6e649 --- /dev/null +++ b/asdc-controller/src/test/resources/ASDC/TestBB.bpmn @@ -0,0 +1,53 @@ + + + + + SequenceFlow_1owu825 + + + SequenceFlow_1gwcdup + + + + + SequenceFlow_1owu825 + SequenceFlow_1gwcdup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/asdc-controller/src/test/resources/mime-multipart-body.txt b/asdc-controller/src/test/resources/mime-multipart-body.txt new file mode 100644 index 0000000000..09d3aa7696 --- /dev/null +++ b/asdc-controller/src/test/resources/mime-multipart-body.txt @@ -0,0 +1,84 @@ +--Oz34MbsoUcF5cyWT62NuPjcHb9SU_GIfNHI +Content-Disposition: form-data; name="deployment-name" +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit + +MSO Sample 1 +--Oz34MbsoUcF5cyWT62NuPjcHb9SU_GIfNHI +Content-Disposition: form-data; name="enable-duplicate-filtering" +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit + +false +--Oz34MbsoUcF5cyWT62NuPjcHb9SU_GIfNHI +Content-Disposition: form-data; name="deploy-changed-only" +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit + +false +--Oz34MbsoUcF5cyWT62NuPjcHb9SU_GIfNHI +Content-Disposition: form-data; name="deployment-source" +Content-Type: text/plain; charset=ISO-8859-1 +Content-Transfer-Encoding: 8bit + +local +--Oz34MbsoUcF5cyWT62NuPjcHb9SU_GIfNHI +Content-Disposition: form-data; name="testBB.bpmn"; filename="testBB.bpmn"; size=2990 +Content-Type: octet +Content-Transfer-Encoding: binary + + + + + + SequenceFlow_1owu825 + + + SequenceFlow_1gwcdup + + + + + SequenceFlow_1owu825 + SequenceFlow_1gwcdup + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +--Oz34MbsoUcF5cyWT62NuPjcHb9SU_GIfNHI-- diff --git a/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/Notification_MultipleModules.txt b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/Notification_MultipleModules.txt new file mode 100644 index 0000000000..5b6d9e4eaf --- /dev/null +++ b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/Notification_MultipleModules.txt @@ -0,0 +1,302 @@ +DistributionID:a2872f55-8628-4486-8548-7b132c9a47db +ServiceName:Vf zrdm5bpxmc02092017-Service +ServiceVersion:1.0 +ServiceUUID:bad955c3-29b2-4a27-932e-28e942cc6480 +ServiceInvariantUUID:b16a9398-ffa3-4041-b78c-2956b8ad9c7b +ServiceDescription:Demo + + + +Service Artifacts List: +{ +Service Artifacts Info: +ArtifactName:service-VfZrdm5bpxmc02092017Service-csar.csar +ArtifactVersion:1 +ArtifactType:TOSCA_CSAR +ArtifactDescription:TOSCA definition package of the asset +ArtifactTimeout:0 +ArtifactURL:service-VfZrdm5bpxmc02092017Service-csar.csar +ArtifactUUID:396cfd49-0f4b-4fec-9f33-0fd7e90d5a22 +ArtifactChecksum:MWQ3Y2FmMWExNDQyYWI2N2YwNjEwZGUzN2IzMzI3NjE= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + + +} + +Resource Instances List: +{ +Resource Instance Info: +ResourceInstanceName:Vf zrdm5bpxmc02092017-VF 0 +ResourceCustomizationUUID:96c23a4a-6887-4b2c-9cce-1e4ea35eaade +ResourceInvariantUUID:23122c9b-dd7f-483f-bf0a-e069303db2f7 +ResourceName:Vf zrdm5bpxmc02092017-VF +ResourceType:VF +ResourceUUID:14ba5d1e-3862-407c-a236-1cbaebccce77 +ResourceVersion:1.0 +Category:Generic +SubCategory:Network Elements +Resource Artifacts List: +{ +Service Artifacts Info: +ArtifactName:pxmc_mmn_volume.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_mmn_volume.env +ArtifactUUID:c1ae6284-48d9-4437-a195-b2cf2ba23070 +ArtifactChecksum:NmEyZjc1Y2UwZDMwYjFhNGRlMTMzN2JhNzdiMThjMGU= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} +, +Service Artifacts Info: +ArtifactName:pxmc_base.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_base.env +ArtifactUUID:6dd99c31-c52e-4c45-b99b-d223c877a296 +ArtifactChecksum:OGM2MWIzZTA2OTc5YjQwNTM1NGVhODA0YTFkNzM4ZTg= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +, +Service Artifacts Info: +ArtifactName:vfzrdm5bpxmc02092017vf0_modules.json +ArtifactVersion:1 +ArtifactType:VF_MODULES_METADATA +ArtifactDescription:Auto-generated VF Modules information artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/vfzrdm5bpxmc02092017vf0_modules.json +ArtifactUUID:e3b82cd6-485e-4d56-8d2c-17ccf6a59533 +ArtifactChecksum:MjY0NzcxMjJkZGI4YzQ1MDU2NjhkNWYyM2IwNmYzYmU= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +, +Service Artifacts Info: +ArtifactName:pxmc_vmt.yaml +ArtifactVersion:1 +ArtifactType:HEAT +ArtifactDescription:created from csar +ArtifactTimeout:120 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_vmt.yaml +ArtifactUUID:ad12ab80-5419-4346-a5d7-dac2fc15575f +ArtifactChecksum:ODE0YTRiYzc2YzkxOTliZjJhNjc0M2RhMWU4M2VlZmE= +GeneratedArtifact:{Service Artifacts Info: +ArtifactName:pxmc_vmt.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_vmt.env +ArtifactUUID:bc1640f1-69f0-4760-8fc3-3318ec2ff129 +ArtifactChecksum:MjdkYzY5ZGU0ZTlkZDlhNzI2ZGVhMjk1ODVhZTg1NTY= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} +} +RelatedArtifacts:{ +Service Artifacts Info: +ArtifactName:user_data_zrdm5bpxmc02vmt001.txt +ArtifactVersion:1 +ArtifactType:HEAT_ARTIFACT +ArtifactDescription:created from csar +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/user_data_zrdm5bpxmc02vmt001.txt +ArtifactUUID:53acdabe-689f-45e5-8578-f1514d3529da +ArtifactChecksum:MzJmZjgyZWYwOTBjMTg5M2ExNWZhMmMwNzc1NWY1YjQ= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + + +} + + +, +Service Artifacts Info: +ArtifactName:pxmc_mmn.yaml +ArtifactVersion:1 +ArtifactType:HEAT +ArtifactDescription:created from csar +ArtifactTimeout:120 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_mmn.yaml +ArtifactUUID:b8bca13b-811f-44ab-9d27-45b842c664d8 +ArtifactChecksum:YmNiYTU5YTM4ODVhYTlhODc5NGMwNWZkZjI5MTRmNTE= +GeneratedArtifact:{Service Artifacts Info: +ArtifactName:pxmc_mmn.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_mmn.env +ArtifactUUID:e88ce0b9-1496-4d03-ab1d-6d8d79bfc737 +ArtifactChecksum:ZGI1NzI2Y2FmYjFhOTM2ZDYwNzg1YWRhZjBmMTk2OTQ= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} +} +RelatedArtifacts:{ +Service Artifacts Info: +ArtifactName:user_data_zrdm5bpxmc02mmn001.txt +ArtifactVersion:1 +ArtifactType:HEAT_ARTIFACT +ArtifactDescription:created from csar +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/user_data_zrdm5bpxmc02mmn001.txt +ArtifactUUID:5bc62c72-5f7a-40bc-a167-1a4fed9afdef +ArtifactChecksum:OTMxMjk5Mzc1YmIxMzRlYmRlZWJhMjg0MWQ4YTI1NWU= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + + +} + + +, +Service Artifacts Info: +ArtifactName:pxmc_mmn.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_mmn.env +ArtifactUUID:e88ce0b9-1496-4d03-ab1d-6d8d79bfc737 +ArtifactChecksum:ZGI1NzI2Y2FmYjFhOTM2ZDYwNzg1YWRhZjBmMTk2OTQ= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +, +Service Artifacts Info: +ArtifactName:pxmc_vmt.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_vmt.env +ArtifactUUID:bc1640f1-69f0-4760-8fc3-3318ec2ff129 +ArtifactChecksum:MjdkYzY5ZGU0ZTlkZDlhNzI2ZGVhMjk1ODVhZTg1NTY= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} +, +Service Artifacts Info: +ArtifactName:user_data_zrdm5bpxmc02mmn001.txt +ArtifactVersion:1 +ArtifactType:HEAT_ARTIFACT +ArtifactDescription:created from csar +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/user_data_zrdm5bpxmc02mmn001.txt +ArtifactUUID:5bc62c72-5f7a-40bc-a167-1a4fed9afdef +ArtifactChecksum:OTMxMjk5Mzc1YmIxMzRlYmRlZWJhMjg0MWQ4YTI1NWU= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +, +Service Artifacts Info: +ArtifactName:pxmc_base.yaml +ArtifactVersion:1 +ArtifactType:HEAT +ArtifactDescription:created from csar +ArtifactTimeout:120 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_base.yaml +ArtifactUUID:7e7f7356-11bd-4f2f-bbbc-5c10954e3189 +ArtifactChecksum:YThkNGFhZjAwNmM4NzMzODc0YzNhYTUxOTljNGQwNmM= +GeneratedArtifact:{Service Artifacts Info: +ArtifactName:pxmc_base.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_base.env +ArtifactUUID:6dd99c31-c52e-4c45-b99b-d223c877a296 +ArtifactChecksum:OGM2MWIzZTA2OTc5YjQwNTM1NGVhODA0YTFkNzM4ZTg= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +} +RelatedArtifacts:{ +} +, +Service Artifacts Info: +ArtifactName:user_data_zrdm5bpxmc02vmt001.txt +ArtifactVersion:1 +ArtifactType:HEAT_ARTIFACT +ArtifactDescription:created from csar +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/user_data_zrdm5bpxmc02vmt001.txt +ArtifactUUID:53acdabe-689f-45e5-8578-f1514d3529da +ArtifactChecksum:MzJmZjgyZWYwOTBjMTg5M2ExNWZhMmMwNzc1NWY1YjQ= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +, +Service Artifacts Info: +ArtifactName:pxmc_mmn_volume.yaml +ArtifactVersion:2 +ArtifactType:HEAT_VOL +ArtifactDescription:created from csar +ArtifactTimeout:120 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_mmn_volume.yaml +ArtifactUUID:2f372a02-df1b-46ca-b81e-822e3f406965 +ArtifactChecksum:MzA5MGY5ODQ0NDY5MDhiMDM3YjFlNGIwNzJkNjFhOTI= +GeneratedArtifact:{Service Artifacts Info: +ArtifactName:pxmc_mmn_volume.env +ArtifactVersion:2 +ArtifactType:HEAT_ENV +ArtifactDescription:Auto-generated HEAT Environment deployment artifact +ArtifactTimeout:0 +ArtifactURL:/sdc/v1/catalog/services/VfZrdm5bpxmc02092017Service/1.0/resourceInstances/vfzrdm5bpxmc02092017vf0/artifacts/pxmc_mmn_volume.env +ArtifactUUID:c1ae6284-48d9-4437-a195-b2cf2ba23070 +ArtifactChecksum:NmEyZjc1Y2UwZDMwYjFhNGRlMTMzN2JhNzdiMThjMGU= +GeneratedArtifact:{NULL +} +RelatedArtifacts:{ +} + + +} +RelatedArtifacts:{ +} + + + +} + + + +} diff --git a/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/ServiceResponse.json b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/ServiceResponse.json new file mode 100644 index 0000000000..37b7987f46 --- /dev/null +++ b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/ServiceResponse.json @@ -0,0 +1,458 @@ +{ + "modelName": "Vf zrdm5bpxmc02092017-Service", + "description": "Demo", + "modelUUID": "bad955c3-29b2-4a27-932e-28e942cc6480", + "modelInvariantUUID": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b", + "serviceType": "", + "serviceRole": "", + "environmentContext": "General_Revenue-Bearing", + "networkCustomizations": [], + "vnfCustomizations": [ + { + "modelCustomizationUuid": "96c23a4a-6887-4b2c-9cce-1e4ea35eaade", + "modelInstanceName": "Vf zrdm5bpxmc02092017-VF 0", + "multiStageDesign": "false", + "vnfResources": { + "modelUuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5", + "modelInvariantUuid": "23122c9b-dd7f-483f-bf0a-e069303db2f7", + "modelName": "Vf zrdm5bpxmc02092017-VF", + "toscaNodeType": "org.openecomp.resource.vf.VfZrdm5bpxmc02092017Vf", + "description": "Demo", + "orchestrationMode": "HEAT", + "modelVersion": "1.0", + "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7" + }, + "vfModuleCustomizations": [ + { + "modelCustomizationUuid": "074c64d0-7e13-4bcc-8bdb-ea922331102d", + "label": "pxmc_base", + "minInstances": 1, + "maxInstances": 1, + "initialCount": 1, + "heatEnvironment": { + "artifactUuid": "6dd99c31-c52e-4c45-b99b-d223c877a296", + "name": "pxmc_base.env", + "description": "Auto-generated HEAT Environment deployment artifact", + "environment": "parameters:\n vnf_name: \n", + "artifactChecksum": "OGM2MWIzZTA2OTc5YjQwNTM1NGVhODA0YTFkNzM4ZTg=", + "version": "2" + }, + "vfModule": { + "modelUUID": "eb5de6fb-9ecf-4009-b922-fae3a9ae7d46", + "modelInvariantUUID": "f7a867f2-596b-4f4a-a128-421e825a6190", + "modelName": "VfZrdm5bpxmc02092017Vf..pxmc_base..module-0", + "modelVersion": "1", + "isBase": 1, + "moduleHeatTemplate": { + "artifactUuid": "7e7f7356-11bd-4f2f-bbbc-5c10954e3189", + "templateName": "pxmc_base.yaml", + "templateBody": "heat_template_version: 2015-04-30\n\nparameters:\n\n## GLOBAL//Basic Parameters\n vnf_name:\n type: string\n description: Unique name for this VF instance\n# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC\n\nresources:\n\n## MSP RSG//Resource:SecurityGroup\n sec_grp_msp_0:\n type: OS::Neutron::SecurityGroup\n properties:\n description: Security Group for PXMC\n name:\n str_replace:\n template: VF_NAME_sec_grp_msp\n params:\n VF_NAME: { get_param: vnf_name }\n rules:\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"132\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"icmp\", \"ethertype\": \"IPv4\"}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"132\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"58\", \"ethertype\": \"IPv6\"}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"132\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"icmp\", \"ethertype\": \"IPv4\"}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"132\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"58\", \"ethertype\": \"IPv6\"}\n\noutputs:\n\n sec_grp_msp_id:\n description: uuid of the security group\n value: {get_resource: sec_grp_msp_0 }\n", + "timeoutMinutes": 120, + "version": "1", + "description": "created from csar", + "artifactChecksum": "YThkNGFhZjAwNmM4NzMzODc0YzNhYTUxOTljNGQwNmM=", + "parameters": [ + { + "heatTemplateArtifactUuid": "7e7f7356-11bd-4f2f-bbbc-5c10954e3189", + "paramName": "vnf_name", + "required": true, + "paramType": "string" + } + ], + "childTemplates": [], + "heatTemplate": "heat_template_version: 2015-04-30\n\nparameters:\n\n## GLOBAL//Basic Parameters\n vnf_name:\n type: string\n description: Unique name for this VF instance\n# For manual spinups, value must be in the ENV file. Must be removed from ENV before uploading to ASDC\n\nresources:\n\n## MSP RSG//Resource:SecurityGroup\n sec_grp_msp_0:\n type: OS::Neutron::SecurityGroup\n properties:\n description: Security Group for PXMC\n name:\n str_replace:\n template: VF_NAME_sec_grp_msp\n params:\n VF_NAME: { get_param: vnf_name }\n rules:\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"132\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"icmp\", \"ethertype\": \"IPv4\"}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"132\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"egress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"58\", \"ethertype\": \"IPv6\"}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"132\", \"ethertype\": \"IPv4\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"0.0.0.0/0\", \"protocol\": \"icmp\", \"ethertype\": \"IPv4\"}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"tcp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"udp\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"132\", \"ethertype\": \"IPv6\", \"port_range_max\": 65535, \"port_range_min\": 0}\n - {\"direction\": \"ingress\", \"remote_ip_prefix\": \"::/0\", \"protocol\": \"58\", \"ethertype\": \"IPv6\"}\n\noutputs:\n\n sec_grp_msp_id:\n description: uuid of the security group\n value: {get_resource: sec_grp_msp_0 }\n" + }, + "heatFiles": [], + "vnfResources": { + "modelUuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5", + "modelInvariantUuid": "23122c9b-dd7f-483f-bf0a-e069303db2f7", + "modelName": "Vf zrdm5bpxmc02092017-VF", + "toscaNodeType": "org.openecomp.resource.vf.VfZrdm5bpxmc02092017Vf", + "description": "Demo", + "orchestrationMode": "HEAT", + "modelVersion": "1.0", + "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7" + }, + "modelInvariantUuid": "f7a867f2-596b-4f4a-a128-421e825a6190", + "base": true + } + }, + { + "modelCustomizationUuid": "5336a98e-0966-4e59-b6e6-c8162804a024", + "label": "pxmc_vmt", + "minInstances": 0, + "initialCount": 0, + "heatEnvironment": { + "artifactUuid": "bc1640f1-69f0-4760-8fc3-3318ec2ff129", + "name": "pxmc_vmt.env", + "description": "Auto-generated HEAT Environment deployment artifact", + "environment": "parameters:\n cinder_delete_on_termination_false: \n cinder_delete_on_termination_true: \n oam_protected_net_name: \n sec_grp_msp_id: \n vf_module_id: \n vmt_block_device_names: \n vmt_flavor_name: \n vmt_name_0: \n vmt_oam_protected_ip_0: \n vmt_volume_image_name_0: \n vmt_volume_image_name_1: \n vmt_volume_name_0: \n vmt_volume_name_1: \n vmt_volume_size_0: \n vmt_volume_size_1: \n vnf_id: \n", + "artifactChecksum": "MjdkYzY5ZGU0ZTlkZDlhNzI2ZGVhMjk1ODVhZTg1NTY=", + "version": "2" + }, + "vfModule": { + "modelUUID": "4d4423e2-17e8-455a-b9ae-7e4ab71b9cdc", + "modelInvariantUUID": "1e099992-6222-41a9-acde-5a8abb690775", + "modelName": "VfZrdm5bpxmc02092017Vf..pxmc_vmt..module-1", + "modelVersion": "1", + "isBase": 0, + "moduleHeatTemplate": { + "artifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "templateName": "pxmc_vmt.yaml", + "templateBody": "heat_template_version: 2015-04-30\n\ndescription: HOT creates Nimbus MSP VMT stack under MobiSupport Tenant\n\nparameters:\n vmt_name_0:\n type: string\n label: MSP VMT server names\n description: name of the MSP VMT instances\n# vmt_image_name:\n# type: string\n# label: MSP VMT image name\n# description: MSP VMT image name\n vmt_flavor_name:\n type: string\n label: MSP VMT flavor name\n description: MSP VMT flavor name\n# availability_zone_0:\n# type: string\n# label: MSP VMT availability zones\n# description: MSP VMT availability zones\n sec_grp_msp_id:\n type: string\n label: security group id\n description: the id of security group\n vmt_oam_protected_ip_0:\n type: string\n label: MSP VMT OAM IP Addresses\n description: MSP VMT OAM IP Addresses\n oam_protected_net_name:\n type: string\n label: MSP VMT OAM net name\n description: MSP VMT OAM net name\n vmt_block_device_names:\n type: comma_delimited_list\n label: MSP VMT Block Device Names\n description: MSP VMT Block Device Names\n vmt_volume_name_0:\n type: string\n label: Mobisupport MSP VMT Cinder Volume names\n description: Mobisupport MSP VMT Cinder Volume names\n vmt_volume_name_1:\n type: string\n label: Mobisupport MSP VMT Cinder Volume names\n description: Mobisupport MSP VMT Cinder Volume names\n vmt_volume_size_0:\n type: number\n label: Mobisupport MSP VMT Cinder Volume sizes\n description: Mobisupport MSP VMT Cinder Volume sizes\n vmt_volume_size_1:\n type: number\n label: Mobisupport MSP VMT Cinder Volume sizes\n description: Mobisupport MSP VMT Cinder Volume sizes\n vmt_volume_image_name_0:\n type: string\n label: Mobisupport MSP VMT VDA Cinder Volume image name\n description: Mobisupport MSP VMT VDA Cinder Volume image name\n vmt_volume_image_name_1:\n type: string\n label: Mobisupport MSP VMT VDB Cinder Volume image name\n description: Mobisupport MSP VMT VDB Cinder Volume image name\n cinder_delete_on_termination_true:\n type: boolean\n description: delete cinder volume upon instances termination\n cinder_delete_on_termination_false:\n type: boolean\n description: keep cinder volume upon instances termination\n vnf_id:\n type: string\n label: MSP VMT VNF ID\n description: MSP VMT VNF ID\n vf_module_id:\n type: string\n description: Unique ID for this VF Module instance\n\nresources:\n################ Cinder Volumes ##############################\n vmt_volume_0:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: vmt_volume_name_0}\n size: {get_param: vmt_volume_size_0}\n image: {get_param: vmt_volume_image_name_0}\n\n vmt_volume_1:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: vmt_volume_name_1}\n size: {get_param: vmt_volume_size_1}\n image: {get_param: vmt_volume_image_name_1}\n\n################ Ports ##############################\n vmt_oam_protected_0_port:\n type: OS::Neutron::Port\n properties:\n network: {get_param: oam_protected_net_name}\n fixed_ips: [{\"ip_address\": {get_param: vmt_oam_protected_ip_0}}]\n security_groups: [{get_param: sec_grp_msp_id}]\n replacement_policy: AUTO\n\n################### Servers #########################\n vmt_zrdm5bpxmc02vmt_0:\n type: OS::Nova::Server\n properties:\n name: {get_param: vmt_name_0}\n# image: {get_param: vmt_image_name}\n flavor: {get_param: vmt_flavor_name}\n# availability_zone: {get_param: availability_zone_0}\n block_device_mapping_v2: \n - device_name: {get_param: [vmt_block_device_names, 0]}\n volume_id: {get_resource: vmt_volume_0}\n delete_on_termination: {get_param: cinder_delete_on_termination_true}\n boot_index: 0\n - device_name: {get_param: [vmt_block_device_names, 1]}\n volume_id: {get_resource: vmt_volume_1}\n delete_on_termination: {get_param: cinder_delete_on_termination_true}\n boot_index: -1\n networks:\n - port: {get_resource: vmt_oam_protected_0_port}\n config_drive: \"True\"\n user_data_format: RAW\n user_data:\n get_file: user_data_zrdm5bpxmc02vmt001.txt\n\n metadata:\n vnf_id: {get_param: vnf_id}\n vf_module_id {get_param: vf_module_id}\n \"evacuation_policy\": \"Evacuation\"\n", + "timeoutMinutes": 120, + "version": "1", + "description": "created from csar", + "artifactChecksum": "ODE0YTRiYzc2YzkxOTliZjJhNjc0M2RhMWU4M2VlZmE=", + "parameters": [ + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_name_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vf_module_id", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "sec_grp_msp_id", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_volume_name_1", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_volume_name_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_block_device_names", + "required": true, + "paramType": "comma_delimited_list" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_flavor_name", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vnf_id", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "oam_protected_net_name", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_volume_image_name_1", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_volume_image_name_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_oam_protected_ip_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_volume_size_0", + "required": true, + "paramType": "number" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "cinder_delete_on_termination_false", + "required": true, + "paramType": "boolean" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "vmt_volume_size_1", + "required": true, + "paramType": "number" + }, + { + "heatTemplateArtifactUuid": "ad12ab80-5419-4346-a5d7-dac2fc15575f", + "paramName": "cinder_delete_on_termination_true", + "required": true, + "paramType": "boolean" + } + ], + "childTemplates": [], + "heatTemplate": "heat_template_version: 2015-04-30\n\ndescription: HOT creates Nimbus MSP VMT stack under MobiSupport Tenant\n\nparameters:\n vmt_name_0:\n type: string\n label: MSP VMT server names\n description: name of the MSP VMT instances\n# vmt_image_name:\n# type: string\n# label: MSP VMT image name\n# description: MSP VMT image name\n vmt_flavor_name:\n type: string\n label: MSP VMT flavor name\n description: MSP VMT flavor name\n# availability_zone_0:\n# type: string\n# label: MSP VMT availability zones\n# description: MSP VMT availability zones\n sec_grp_msp_id:\n type: string\n label: security group id\n description: the id of security group\n vmt_oam_protected_ip_0:\n type: string\n label: MSP VMT OAM IP Addresses\n description: MSP VMT OAM IP Addresses\n oam_protected_net_name:\n type: string\n label: MSP VMT OAM net name\n description: MSP VMT OAM net name\n vmt_block_device_names:\n type: comma_delimited_list\n label: MSP VMT Block Device Names\n description: MSP VMT Block Device Names\n vmt_volume_name_0:\n type: string\n label: Mobisupport MSP VMT Cinder Volume names\n description: Mobisupport MSP VMT Cinder Volume names\n vmt_volume_name_1:\n type: string\n label: Mobisupport MSP VMT Cinder Volume names\n description: Mobisupport MSP VMT Cinder Volume names\n vmt_volume_size_0:\n type: number\n label: Mobisupport MSP VMT Cinder Volume sizes\n description: Mobisupport MSP VMT Cinder Volume sizes\n vmt_volume_size_1:\n type: number\n label: Mobisupport MSP VMT Cinder Volume sizes\n description: Mobisupport MSP VMT Cinder Volume sizes\n vmt_volume_image_name_0:\n type: string\n label: Mobisupport MSP VMT VDA Cinder Volume image name\n description: Mobisupport MSP VMT VDA Cinder Volume image name\n vmt_volume_image_name_1:\n type: string\n label: Mobisupport MSP VMT VDB Cinder Volume image name\n description: Mobisupport MSP VMT VDB Cinder Volume image name\n cinder_delete_on_termination_true:\n type: boolean\n description: delete cinder volume upon instances termination\n cinder_delete_on_termination_false:\n type: boolean\n description: keep cinder volume upon instances termination\n vnf_id:\n type: string\n label: MSP VMT VNF ID\n description: MSP VMT VNF ID\n vf_module_id:\n type: string\n description: Unique ID for this VF Module instance\n\nresources:\n################ Cinder Volumes ##############################\n vmt_volume_0:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: vmt_volume_name_0}\n size: {get_param: vmt_volume_size_0}\n image: {get_param: vmt_volume_image_name_0}\n\n vmt_volume_1:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: vmt_volume_name_1}\n size: {get_param: vmt_volume_size_1}\n image: {get_param: vmt_volume_image_name_1}\n\n################ Ports ##############################\n vmt_oam_protected_0_port:\n type: OS::Neutron::Port\n properties:\n network: {get_param: oam_protected_net_name}\n fixed_ips: [{\"ip_address\": {get_param: vmt_oam_protected_ip_0}}]\n security_groups: [{get_param: sec_grp_msp_id}]\n replacement_policy: AUTO\n\n################### Servers #########################\n vmt_zrdm5bpxmc02vmt_0:\n type: OS::Nova::Server\n properties:\n name: {get_param: vmt_name_0}\n# image: {get_param: vmt_image_name}\n flavor: {get_param: vmt_flavor_name}\n# availability_zone: {get_param: availability_zone_0}\n block_device_mapping_v2: \n - device_name: {get_param: [vmt_block_device_names, 0]}\n volume_id: {get_resource: vmt_volume_0}\n delete_on_termination: {get_param: cinder_delete_on_termination_true}\n boot_index: 0\n - device_name: {get_param: [vmt_block_device_names, 1]}\n volume_id: {get_resource: vmt_volume_1}\n delete_on_termination: {get_param: cinder_delete_on_termination_true}\n boot_index: -1\n networks:\n - port: {get_resource: vmt_oam_protected_0_port}\n config_drive: \"True\"\n user_data_format: RAW\n user_data:\n get_file: user_data_zrdm5bpxmc02vmt001.txt\n\n metadata:\n vnf_id: {get_param: vnf_id}\n vf_module_id {get_param: vf_module_id}\n \"evacuation_policy\": \"Evacuation\"\n" + }, + "heatFiles": [], + "vnfResources": { + "modelUuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5", + "modelInvariantUuid": "23122c9b-dd7f-483f-bf0a-e069303db2f7", + "modelName": "Vf zrdm5bpxmc02092017-VF", + "toscaNodeType": "org.openecomp.resource.vf.VfZrdm5bpxmc02092017Vf", + "description": "Demo", + "orchestrationMode": "HEAT", + "modelVersion": "1.0", + "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7" + }, + "modelInvariantUuid": "1e099992-6222-41a9-acde-5a8abb690775", + "base": false + } + }, + { + "modelCustomizationUuid": "e38906fa-717c-49b0-b391-e6ec12b50c4a", + "label": "pxmc_mmn", + "minInstances": 0, + "initialCount": 0, + "heatEnvironment": { + "artifactUuid": "e88ce0b9-1496-4d03-ab1d-6d8d79bfc737", + "name": "pxmc_mmn.env", + "description": "Auto-generated HEAT Environment deployment artifact", + "environment": "parameters:\n cinder_delete_on_termination_false: \n cinder_delete_on_termination_true: \n mmn_arch_volume_id_2: \n mmn_backup_volume_id_3: \n mmn_block_device_names: \n mmn_data_volume_id_1: \n mmn_flavor_name: \n mmn_misc_volume_id_4: \n mmn_name_0: \n mmn_oam_protected_ip_0: \n mmn_volume_image_name_0: \n mmn_volume_name_0: \n mmn_volume_size_0: \n oam_protected_net_name: \n sec_grp_msp_id: \n vf_module_id: \n vnf_id: \n", + "artifactChecksum": "ZGI1NzI2Y2FmYjFhOTM2ZDYwNzg1YWRhZjBmMTk2OTQ=", + "version": "2" + }, + "vfModule": { + "modelUUID": "a8cb1182-9b6d-46f8-b06b-ded4fe69e10d", + "modelInvariantUUID": "8e53c069-b2f0-437a-9c00-21cbc5c8f081", + "modelName": "VfZrdm5bpxmc02092017Vf..pxmc_mmn..module-2", + "modelVersion": "1", + "isBase": 0, + "volumeHeatTemplate": { + "artifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "templateName": "pxmc_mmn_volume.yaml", + "templateBody": "heat_template_version: 2015-04-30\n\ndescription: HOT creates MSP MMN Cinder Volumes under MobiSupport Tenant\n\nparameters:\n mmn_volume_name_1:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_name_2:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_name_3:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_name_4:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_size_1:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\n mmn_volume_size_2:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\n mmn_volume_size_3:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\n mmn_volume_size_4:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\nresources:\n mmn_data_volume_1:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_1}\n size: {get_param: mmn_volume_size_1}\n \n mmn_arch_volume_2:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_2}\n size: {get_param: mmn_volume_size_2}\n \n mmn_backup_volume_3:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_3}\n size: {get_param: mmn_volume_size_3}\n \n mmn_misc_volume_4:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_4}\n size: {get_param: mmn_volume_size_4}\n\noutputs:\n mmn_data_volume_id_1:\n description: msp mmn data volume 1\n value: {get_resource: mmn_data_volume_1}\n \n mmn_arch_volume_id_2:\n description: msp mn arch volume 2\n value: {get_resource: mmn_arch_volume_2}\n \n mmn_backup_volume_id_3:\n description: msp mn backup volume 3\n value: {get_resource: mmn_backup_volume_3}\n \n mmn_misc_volume_id_4:\n description: msp mn volume 4\n value: {get_resource: mmn_misc_volume_4}\n", + "timeoutMinutes": 120, + "version": "2", + "description": "created from csar", + "artifactChecksum": "MzA5MGY5ODQ0NDY5MDhiMDM3YjFlNGIwNzJkNjFhOTI=", + "parameters": [ + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_name_2", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_size_2", + "required": true, + "paramType": "number" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_name_1", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_size_1", + "required": true, + "paramType": "number" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_name_4", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_name_3", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_size_4", + "required": true, + "paramType": "number" + }, + { + "heatTemplateArtifactUuid": "2f372a02-df1b-46ca-b81e-822e3f406965", + "paramName": "mmn_volume_size_3", + "required": true, + "paramType": "number" + } + ], + "childTemplates": [], + "heatTemplate": "heat_template_version: 2015-04-30\n\ndescription: HOT creates MSP MMN Cinder Volumes under MobiSupport Tenant\n\nparameters:\n mmn_volume_name_1:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_name_2:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_name_3:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_name_4:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n\n mmn_volume_size_1:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\n mmn_volume_size_2:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\n mmn_volume_size_3:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\n mmn_volume_size_4:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n\nresources:\n mmn_data_volume_1:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_1}\n size: {get_param: mmn_volume_size_1}\n \n mmn_arch_volume_2:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_2}\n size: {get_param: mmn_volume_size_2}\n \n mmn_backup_volume_3:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_3}\n size: {get_param: mmn_volume_size_3}\n \n mmn_misc_volume_4:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_4}\n size: {get_param: mmn_volume_size_4}\n\noutputs:\n mmn_data_volume_id_1:\n description: msp mmn data volume 1\n value: {get_resource: mmn_data_volume_1}\n \n mmn_arch_volume_id_2:\n description: msp mn arch volume 2\n value: {get_resource: mmn_arch_volume_2}\n \n mmn_backup_volume_id_3:\n description: msp mn backup volume 3\n value: {get_resource: mmn_backup_volume_3}\n \n mmn_misc_volume_id_4:\n description: msp mn volume 4\n value: {get_resource: mmn_misc_volume_4}\n" + }, + "moduleHeatTemplate": { + "artifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "templateName": "pxmc_mmn.yaml", + "templateBody": "heat_template_version: 2015-04-30\n\ndescription: HOT creates Nimbus vMSP MMN stack.\n\nparameters:\n mmn_name_0:\n type: string\n label: MSP MMN server names\n description: name of the MSP MMN instances\n mmn_flavor_name:\n type: string\n label: MSP MMN flavor name\n description: MSP MMN flavor name\n# mmn_image_name:\n# type: string\n# label: MSP MMN image name\n# description: MSP MMN image name\n# availability_zone_0:\n# type: string\n# label: MSP MMN availability zones\n# description: MSP MMN availability zones\n sec_grp_msp_id:\n type: string\n label: security group id\n description: the id of security group\n mmn_oam_protected_ip_0:\n type: string\n label: MSP MMN OAM IP Addresses\n description: MSP MMN OAM IP Addresses\n oam_protected_net_name:\n type: string\n label: MSP MMN OAM net name\n description: MSP MMN OAM net name\n mmn_volume_name_0:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n mmn_volume_size_0:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n mmn_volume_image_name_0:\n type: string\n label: Mobisupport MSP MMN Cinder Volume image name\n description: Mobisupport MSP MMN Cinder Volume image name\n mmn_data_volume_id_1:\n type: string\n label: MSP MMN Volume id 1\n description: MSP MMN Volume id 1\n mmn_arch_volume_id_2:\n type: string\n label: MSP MMN Volume id 2\n description: MSP MMN Volume id 2\n mmn_backup_volume_id_3:\n type: string\n label: MSP MMN Volume id 3\n description: MSP MMN Volume id 3\n mmn_misc_volume_id_4:\n type: string\n label: MSP MMN Volume id 4\n description: MSP MMN Volume id 4\n mmn_block_device_names:\n type: comma_delimited_list\n label: MSP MMN Block Device Names\n description: MSP MMN Block Device Names\n cinder_delete_on_termination_true:\n type: boolean\n description: delete cinder volume upon instances termination\n cinder_delete_on_termination_false:\n type: boolean\n description: keep cinder volume upon instances termination\n vnf_id:\n type: string\n label: MSP MMN VNF ID\n description: MSP MMN VNF ID\n vf_module_id:\n type: string\n description: Unique ID for this VF module instance\n\nresources:\n################ Cinder Volume ########################\n mmn_volume_0:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_0}\n size: {get_param: mmn_volume_size_0}\n image: {get_param: mmn_volume_image_name_0}\n\n################ Server ##############################\n mmn_zrdm5bpxmc02mmn_0:\n type: OS::Nova::Server\n properties:\n name: {get_param: mmn_name_0}\n# image: {get_param: mmn_image_name}\n flavor: {get_param: mmn_flavor_name}\n# availability_zone: {get_param: availability_zone_0}\n block_device_mapping_v2:\n - device_name: { get_param: [mmn_block_device_names, 0] }\n volume_id: { get_resource: mmn_volume_0 }\n delete_on_termination: {get_param: cinder_delete_on_termination_true}\n networks:\n - port: { get_resource: mmn_oam_protected_0_port }\n config_drive: \"True\"\n user_data_format: RAW\n user_data:\n get_file: user_data_zrdm5bpxmc02mmn001.txt\n metadata:\n vnf_id: {get_param: vnf_id}\n vf_module_id {get_param: vf_module_id}\n \"evacuation_policy\": \"Evacuation\"\n\n################ Ports ##############################\n mmn_oam_protected_0_port:\n type: OS::Neutron::Port\n properties:\n network: {get_param: oam_protected_net_name}\n fixed_ips: [{\"ip_address\": {get_param: mmn_oam_protected_ip_0}}]\n security_groups: [{ get_param: sec_grp_msp_id }]\n replacement_policy: AUTO\n\n################ Volume Attachment ##############################\n volume_attachment_vdb:\n type: OS::Cinder::VolumeAttachment\n depends_on: mmn_zrdm5bpxmc02mmn_0\n properties:\n volume_id: { get_param: mmn_data_volume_id_1 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vdb\n\n volume_attachment_vdc:\n type: OS::Cinder::VolumeAttachment\n depends_on: volume_attachment_vdb\n properties:\n volume_id: { get_param: mmn_arch_volume_id_2 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vdc\n\n volume_attachment_vdd:\n type: OS::Cinder::VolumeAttachment\n depends_on: volume_attachment_vdc\n properties:\n volume_id: { get_param: mmn_backup_volume_id_3 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vdd\n\n volume_attachment_vde:\n type: OS::Cinder::VolumeAttachment\n depends_on: volume_attachment_vdd\n properties:\n volume_id: { get_param: mmn_misc_volume_id_4 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vde\n", + "timeoutMinutes": 120, + "version": "1", + "description": "created from csar", + "artifactChecksum": "YmNiYTU5YTM4ODVhYTlhODc5NGMwNWZkZjI5MTRmNTE=", + "parameters": [ + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "vnf_id", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_block_device_names", + "required": true, + "paramType": "comma_delimited_list" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_name_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_arch_volume_id_2", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_volume_image_name_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "cinder_delete_on_termination_false", + "required": true, + "paramType": "boolean" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_oam_protected_ip_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_data_volume_id_1", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_backup_volume_id_3", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "vf_module_id", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "sec_grp_msp_id", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_volume_size_0", + "required": true, + "paramType": "number" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "cinder_delete_on_termination_true", + "required": true, + "paramType": "boolean" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_volume_name_0", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "oam_protected_net_name", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_misc_volume_id_4", + "required": true, + "paramType": "string" + }, + { + "heatTemplateArtifactUuid": "b8bca13b-811f-44ab-9d27-45b842c664d8", + "paramName": "mmn_flavor_name", + "required": true, + "paramType": "string" + } + ], + "childTemplates": [], + "heatTemplate": "heat_template_version: 2015-04-30\n\ndescription: HOT creates Nimbus vMSP MMN stack.\n\nparameters:\n mmn_name_0:\n type: string\n label: MSP MMN server names\n description: name of the MSP MMN instances\n mmn_flavor_name:\n type: string\n label: MSP MMN flavor name\n description: MSP MMN flavor name\n# mmn_image_name:\n# type: string\n# label: MSP MMN image name\n# description: MSP MMN image name\n# availability_zone_0:\n# type: string\n# label: MSP MMN availability zones\n# description: MSP MMN availability zones\n sec_grp_msp_id:\n type: string\n label: security group id\n description: the id of security group\n mmn_oam_protected_ip_0:\n type: string\n label: MSP MMN OAM IP Addresses\n description: MSP MMN OAM IP Addresses\n oam_protected_net_name:\n type: string\n label: MSP MMN OAM net name\n description: MSP MMN OAM net name\n mmn_volume_name_0:\n type: string\n label: Mobisupport MSP MMN Cinder Volume names\n description: Mobisupport MSP MMN Cinder Volume names\n mmn_volume_size_0:\n type: number\n label: Mobisupport MSP MMN Cinder Volume sizes\n description: Mobisupport MSP MMN Cinder Volume sizes\n mmn_volume_image_name_0:\n type: string\n label: Mobisupport MSP MMN Cinder Volume image name\n description: Mobisupport MSP MMN Cinder Volume image name\n mmn_data_volume_id_1:\n type: string\n label: MSP MMN Volume id 1\n description: MSP MMN Volume id 1\n mmn_arch_volume_id_2:\n type: string\n label: MSP MMN Volume id 2\n description: MSP MMN Volume id 2\n mmn_backup_volume_id_3:\n type: string\n label: MSP MMN Volume id 3\n description: MSP MMN Volume id 3\n mmn_misc_volume_id_4:\n type: string\n label: MSP MMN Volume id 4\n description: MSP MMN Volume id 4\n mmn_block_device_names:\n type: comma_delimited_list\n label: MSP MMN Block Device Names\n description: MSP MMN Block Device Names\n cinder_delete_on_termination_true:\n type: boolean\n description: delete cinder volume upon instances termination\n cinder_delete_on_termination_false:\n type: boolean\n description: keep cinder volume upon instances termination\n vnf_id:\n type: string\n label: MSP MMN VNF ID\n description: MSP MMN VNF ID\n vf_module_id:\n type: string\n description: Unique ID for this VF module instance\n\nresources:\n################ Cinder Volume ########################\n mmn_volume_0:\n type: OS::Cinder::Volume\n properties:\n name: {get_param: mmn_volume_name_0}\n size: {get_param: mmn_volume_size_0}\n image: {get_param: mmn_volume_image_name_0}\n\n################ Server ##############################\n mmn_zrdm5bpxmc02mmn_0:\n type: OS::Nova::Server\n properties:\n name: {get_param: mmn_name_0}\n# image: {get_param: mmn_image_name}\n flavor: {get_param: mmn_flavor_name}\n# availability_zone: {get_param: availability_zone_0}\n block_device_mapping_v2:\n - device_name: { get_param: [mmn_block_device_names, 0] }\n volume_id: { get_resource: mmn_volume_0 }\n delete_on_termination: {get_param: cinder_delete_on_termination_true}\n networks:\n - port: { get_resource: mmn_oam_protected_0_port }\n config_drive: \"True\"\n user_data_format: RAW\n user_data:\n get_file: user_data_zrdm5bpxmc02mmn001.txt\n metadata:\n vnf_id: {get_param: vnf_id}\n vf_module_id {get_param: vf_module_id}\n \"evacuation_policy\": \"Evacuation\"\n\n################ Ports ##############################\n mmn_oam_protected_0_port:\n type: OS::Neutron::Port\n properties:\n network: {get_param: oam_protected_net_name}\n fixed_ips: [{\"ip_address\": {get_param: mmn_oam_protected_ip_0}}]\n security_groups: [{ get_param: sec_grp_msp_id }]\n replacement_policy: AUTO\n\n################ Volume Attachment ##############################\n volume_attachment_vdb:\n type: OS::Cinder::VolumeAttachment\n depends_on: mmn_zrdm5bpxmc02mmn_0\n properties:\n volume_id: { get_param: mmn_data_volume_id_1 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vdb\n\n volume_attachment_vdc:\n type: OS::Cinder::VolumeAttachment\n depends_on: volume_attachment_vdb\n properties:\n volume_id: { get_param: mmn_arch_volume_id_2 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vdc\n\n volume_attachment_vdd:\n type: OS::Cinder::VolumeAttachment\n depends_on: volume_attachment_vdc\n properties:\n volume_id: { get_param: mmn_backup_volume_id_3 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vdd\n\n volume_attachment_vde:\n type: OS::Cinder::VolumeAttachment\n depends_on: volume_attachment_vdd\n properties:\n volume_id: { get_param: mmn_misc_volume_id_4 }\n instance_uuid: { get_resource: mmn_zrdm5bpxmc02mmn_0}\n mountpoint: /dev/vde\n" + }, + "heatFiles": [], + "vnfResources": { + "modelUuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5", + "modelInvariantUuid": "23122c9b-dd7f-483f-bf0a-e069303db2f7", + "modelName": "Vf zrdm5bpxmc02092017-VF", + "toscaNodeType": "org.openecomp.resource.vf.VfZrdm5bpxmc02092017Vf", + "description": "Demo", + "orchestrationMode": "HEAT", + "modelVersion": "1.0", + "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7" + }, + "modelInvariantUuid": "8e53c069-b2f0-437a-9c00-21cbc5c8f081", + "base": false + } + } + ], + "vnfResource": { + "modelUuid": "d326f424-2312-4dd6-b7fe-364fadbd1ef5", + "modelInvariantUuid": "23122c9b-dd7f-483f-bf0a-e069303db2f7", + "modelName": "Vf zrdm5bpxmc02092017-VF", + "toscaNodeType": "org.openecomp.resource.vf.VfZrdm5bpxmc02092017Vf", + "description": "Demo", + "orchestrationMode": "HEAT", + "modelVersion": "1.0", + "modelInvariantId": "23122c9b-dd7f-483f-bf0a-e069303db2f7" + } + } + ], + "allotedCustomizations": [], + "recipes": { + + }, + "csar": { + "artifactUUID": "396cfd49-0f4b-4fec-9f33-0fd7e90d5a22", + "name": "service-VfZrdm5bpxmc02092017Service-csar.csar", + "artifactChecksum": "MWQ3Y2FmMWExNDQyYWI2N2YwNjEwZGUzN2IzMzI3NjE=", + "url": "service-VfZrdm5bpxmc02092017Service-csar.csar", + "description": "TOSCA definition package of the asset", + "version": "1" + } +} diff --git a/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/WorkflowBpmn.json b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/WorkflowBpmn.json new file mode 100644 index 0000000000..68204ac350 --- /dev/null +++ b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/WorkflowBpmn.json @@ -0,0 +1,20 @@ +{ + "serviceName": "Vf zrdm5bpxmc02092017-Service", + "serviceInvariantUUID": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b", + "serviceUUID": "bad955c3-29b2-4a27-932e-28e942cc6480", + "serviceVersion": "1.0", + "serviceArtifacts": + [{ + "artifactName": "service-CxSvc-csar.csar", + "artifactType": "Workflow", + "artifactURL": "service-CxSvc-csar.csar", + "artifactChecksum": "MWQ3Y2FmMWExNDQyYWI2N2YwNjEwZGUzN2IzMzI3NjE=", + "artifactDescription": "TOSCA definition package of the asset", + "artifactTimeout": 0, + "artifactUUID": "396cfd49-0f4b-4fec-9f33-0fd7e90d5a22", + "artifactVersion": "1" + }] + , + "serviceDescription": "Demo", + "distributionID": "a2872f55-8628-4486-8548-7b132c9a47db" +} \ No newline at end of file diff --git a/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar new file mode 100644 index 0000000000..9add57f1dd Binary files /dev/null and b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-CxSvc-csar.csar differ diff --git a/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-VfZrdm5bpxmc02092017Service-csar.csar b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-VfZrdm5bpxmc02092017Service-csar.csar new file mode 100644 index 0000000000..69b1c23404 Binary files /dev/null and b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/service-VfZrdm5bpxmc02092017Service-csar.csar differ diff --git a/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/testStructure.json b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/testStructure.json new file mode 100644 index 0000000000..db95690064 --- /dev/null +++ b/asdc-controller/src/test/resources/resource-examples/WorkflowBpmn/testStructure.json @@ -0,0 +1,20 @@ +{ + "distributionID": "a2872f55-8628-4486-8548-7b132c9a47db", + "serviceName": "Service-CxSvc", + "serviceVersion": "1.0", + "serviceUUID": "bad955c3-29b2-4a27-932e-28e942cc6480", + "serviceInvariantUUID": "b16a9398-ffa3-4041-b78c-2956b8ad9c7b", + "serviceDescription": "Demo", + "serviceArtifacts": [ + { + "artifactName": "service-CxSvc-csar.csar", + "artifactVersion": "1", + "artifactType": "Workflows", + "artifactDescription": "Workflows Container", + "artifactTimeout": "0", + "artifactURL": "service-CxSvc-csar.csar", + "artifactUUID": "396cfd49-0f4b-4fec-9f33-0fd7e90d5a22", + "artifactChecksum": "MWQ3Y2FmMWExNDQyYWI2N2YwNjEwZGUzN2IzMzI3NjE=" + } + ] +} -- cgit 1.2.3-korg