summaryrefslogtreecommitdiffstats
path: root/appc-sequence-generator/appc-sequence-generator-bundle/src/test
diff options
context:
space:
mode:
authorKalpesh Chaniyara <kalpeshkumar.chaniyara@amdocs.com>2017-08-15 23:40:34 +0530
committerPatrick Brady <pb071s@att.com>2017-08-18 10:47:29 -0700
commit5b7590935559fe9e286a703dc662a60b47b7ed1a (patch)
treea6047f527074406f30d0ba769a5c53a823e9c987 /appc-sequence-generator/appc-sequence-generator-bundle/src/test
parenta76f088b28738b03d3b3f01c71f11429b135ee2c (diff)
Initial commit for Sequence Generator
Added sequence generator for start and stop action with dependency model Removed java check style from json files from license maven plugin JIRA Issues : APPC-33,APPC-106 Issue-Id : APPC-106 Change-Id: I7f12d39b705d77d559790a10b914b8108f5faa5e Signed-off-by: Kalpesh Chaniyara <kalpeshkumar.chaniyara@amdocs.com>
Diffstat (limited to 'appc-sequence-generator/appc-sequence-generator-bundle/src/test')
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/openecomp/appc/seqgen/TestSequenceGeneratorPlugin.java256
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/cyclic.json198
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/mandatory-vnfc.json177
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json186
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json195
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc-data.json196
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc.json176
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-duplicate.json92
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-per-vnfc.json93
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm.json84
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-without-dependency.json156
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json196
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-action-level-val.json196
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm-per-vnfc.json92
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm.json84
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-without-dep.json197
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json197
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json196
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongnumber.json196
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc-with-data.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm-per-vnfc.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-without-dependency.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm-per-vnfc.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-without-dep.json3
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop.json3
29 files changed, 3193 insertions, 0 deletions
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/openecomp/appc/seqgen/TestSequenceGeneratorPlugin.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/openecomp/appc/seqgen/TestSequenceGeneratorPlugin.java
new file mode 100644
index 000000000..2bb9cd6e2
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/openecomp/appc/seqgen/TestSequenceGeneratorPlugin.java
@@ -0,0 +1,256 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APP-C
+ * ================================================================================
+ * 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.openecomp.appc.seqgen;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
+import org.junit.Assert;
+import org.junit.Test;
+import org.openecomp.appc.seqgen.dgplugin.SequenceGeneratorPlugin;
+import org.openecomp.appc.seqgen.dgplugin.impl.SequenceGeneratorPluginImpl;
+import org.openecomp.sdnc.sli.SvcLogicContext;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.util.HashMap;
+import java.util.Map;
+
+public class TestSequenceGeneratorPlugin {
+
+ private static final EELFLogger logger = EELFManager.getInstance().getLogger(TestSequenceGeneratorPlugin.class);
+
+ @Test
+ public void testGenerateSequenceStart() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/start.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/start.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+
+
+ @Test
+ public void testGenerateSequenceSingleVM()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/start-single-vm.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/start-single-vm.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceNoStrategy() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/no-strategy.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/start.json");
+
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceStop() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/stop.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/stop.json");
+
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceWrongNumber() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/wrongnumber.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String errorCode = context.getAttribute("error-code");
+ String errorMessage = context.getAttribute("error-message");
+ logger.debug("errorCode = " + errorCode);
+ Assert.assertEquals(errorCode,"401");
+ Assert.assertEquals(errorMessage,"Error generating sequence Invalid Number for Wait Time 6a");
+ }
+
+
+ @Test
+ public void testGenerateSequenceCyclic() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/cyclic.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String errorCode = context.getAttribute("error-code");
+ String errorMessage = context.getAttribute("error-message");
+ logger.debug("errorCode = " + errorCode);
+ Assert.assertEquals(errorCode,"401");
+ Assert.assertEquals(errorMessage,"Error generating sequence There seems to be no Root/Independent node for Vnfc dependencies");
+ }
+
+
+ @Test
+ public void testGenerateSequenceWrongAction() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/wrongaction.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String errorCode = context.getAttribute("error-code");
+ String errorMessage = context.getAttribute("error-message");
+ logger.debug("errorCode = " + errorCode);
+ Assert.assertEquals(errorCode,"401");
+ Assert.assertEquals(errorMessage,"Error generating sequence Invalid Action start");
+ }
+
+
+ @Test
+ public void testGenerateSequenceMissingRequestInfo() throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/missingrequestinfo.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String errorCode = context.getAttribute("error-code");
+ String errorMessage = context.getAttribute("error-message");
+ logger.debug("errorCode = " + errorCode);
+ Assert.assertEquals(errorCode,"401");
+ Assert.assertEquals(errorMessage,"Error generating sequence Request info is not provided in the input");
+ }
+
+ @Test
+ public void testGenerateSequenceStopSingleVM() throws URISyntaxException, IOException{
+ String inputJSON = readInput("/input/stop-single-vm.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/stop-single-vm.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceStopSingleVmPerVnfc() throws URISyntaxException, IOException{
+ String inputJSON = readInput("/input/stop-single-vm-per-vnfc.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/stop-single-vm-per-vnfc.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceStartSingleVmPerVnfc() throws URISyntaxException, IOException{
+ String inputJSON = readInput("/input/start-single-vm-per-vnfc.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/start-single-vm-per-vnfc.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ private String readInput(String inputFile) throws URISyntaxException, IOException {
+ File file = new File(this.getClass().getResource(inputFile).toURI());
+
+ byte[] bFile = new byte[(int) file.length()];
+ FileInputStream fileInputStream = new FileInputStream(file);
+ fileInputStream.read(bFile);
+ fileInputStream.close();
+ return new String(bFile);
+ }
+ private String readOutput(String outputFile) throws IOException,URISyntaxException {
+ File file = new File(this.getClass().getResource(outputFile).toURI());
+
+ byte[] bFile = new byte[(int) file.length()];
+ FileInputStream fileInputStream = new FileInputStream(file);
+ fileInputStream.read(bFile);
+ fileInputStream.close();
+
+ String output=new String(bFile);
+ int start=output.indexOf("[");
+ int last=output.length()-1;
+ return output.substring(start,last);
+
+ }
+}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/cyclic.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/cyclic.json
new file mode 100644
index 000000000..522b99692
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/cyclic.json
@@ -0,0 +1,198 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm": [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info" :
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" :
+ [
+ "VNFC3"
+ ]
+ }
+ ]
+ },
+ "tunable-parameters" :
+ {
+ "strategy" : "FORWARD",
+ "wait-time" : "120",
+ "retry-count" : "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/mandatory-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/mandatory-vnfc.json
new file mode 100644
index 000000000..3e96b5654
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/mandatory-vnfc.json
@@ -0,0 +1,177 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm": [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json
new file mode 100644
index 000000000..c5bc7ead2
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json
@@ -0,0 +1,186 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json
new file mode 100644
index 000000000..1371d2273
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json
@@ -0,0 +1,195 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm": [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc-data.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc-data.json
new file mode 100644
index 000000000..cc5d3a0c4
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc-data.json
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "false",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc.json
new file mode 100644
index 000000000..a3067697d
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/optional-vnfc.json
@@ -0,0 +1,176 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "false",
+ "resilience": "Active-Active",
+ "parents" : [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" : {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-duplicate.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-duplicate.json
new file mode 100644
index 000000000..3f22fd669
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-duplicate.json
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+
+ },
+ "tunable-parameters":
+ {
+
+ },
+ "capabilities" :
+ {
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-per-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-per-vnfc.json
new file mode 100644
index 000000000..dac5028b9
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm-per-vnfc.json
@@ -0,0 +1,93 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+
+ },
+ "tunable-parameters":
+ {
+
+ },
+ "capabilities" :
+ {
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm.json
new file mode 100644
index 000000000..ef76ec240
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-single-vm.json
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+
+ },
+ "tunable-parameters":
+ {
+
+ },
+ "capabilities" :
+ {
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-without-dependency.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-without-dependency.json
new file mode 100644
index 000000000..ec6a2b7ba
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-without-dependency.json
@@ -0,0 +1,156 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+
+ },
+ "tunable-parameters":
+ {
+
+ },
+ "capabilities" :
+ {
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json
new file mode 100644
index 000000000..143b41d23
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info" :
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters" :
+ {
+ "strategy" : "FORWARD",
+ "wait-time" : "120",
+ "retry-count" : "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-action-level-val.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-action-level-val.json
new file mode 100644
index 000000000..f089748f6
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-action-level-val.json
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Stop",
+ "action-level": "heel ",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm-per-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm-per-vnfc.json
new file mode 100644
index 000000000..210f9ac0e
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm-per-vnfc.json
@@ -0,0 +1,92 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Stop",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ }
+ ]
+ }},
+ "dependency-info":
+ {
+
+ },
+ "tunable-parameters":
+ {
+
+ },
+ "capabilities" :
+ {
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm.json
new file mode 100644
index 000000000..9679c9ba9
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-single-vm.json
@@ -0,0 +1,84 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Stop",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+
+ },
+ "tunable-parameters":
+ {
+
+ },
+ "capabilities" :
+ {
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-without-dep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-without-dep.json
new file mode 100644
index 000000000..6f70cca23
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-without-dep.json
@@ -0,0 +1,197 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Stop",
+ "action-level": "vm",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": " {\"vnf-host-ip-address\": \"10.147.124.163\" }"
+
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json
new file mode 100644
index 000000000..9131a652b
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json
@@ -0,0 +1,197 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Stop",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": " {\"vnf-host-ip-address\": \"10.147.124.163\" }"
+
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json
new file mode 100644
index 000000000..72f6ed87f
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongnumber.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongnumber.json
new file mode 100644
index 000000000..958df0379
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongnumber.json
@@ -0,0 +1,196 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * ONAP : APPC
+ * ================================================================================
+ * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
+ * ================================================================================
+ * Copyright (C) 2017 Amdocs
+ * =============================================================================
+ * 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.
+ *
+ * ECOMP is a trademark and service mark of AT&T Intellectual Property.
+ * ============LICENSE_END=========================================================
+ */
+
+
+
+
+{
+ "request-info":
+ {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
+ {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
+ {
+ "vnf-info":
+ {
+ "vnf-id" : "abc",
+ "vnf-name": "vVNF",
+ "vnf-type": "vVNF",
+ "vnf-version" : "1.0",
+ "vm":
+ [
+ {
+ "vserver-id" : "vnfc2_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc3_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC3",
+ "vnfc-name": "VNFC3 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc1_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC1",
+ "vnfc-name": "VNFC1 - Name"
+ }
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "vnfc2_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "VNFC2",
+ "vnfc-name": "VNFC2 - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info":
+ {
+ "vnfcs" :
+ [
+ {
+ "vnfc-type" : "VNFC2",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC1"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC3",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" :
+ [
+ "VNFC2"
+ ]
+ },
+ {
+ "vnfc-type" : "VNFC1",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters":
+ {
+ "strategy" : "FORWARD",
+ "wait-time": "6a",
+ "retry-count": "5"
+ },
+ "capabilities" :
+ {
+ "vnf":
+ [
+ "Stop",
+ "Start",
+ "StartApplication",
+ "StopApplication"
+ ],
+ "vf-module":
+ [
+ "Stop",
+ "Start"
+ ],
+ "vm" :
+ [
+ "Stop",
+ "Start"
+ ],
+ "vnfc":
+ [
+ "StopApplication",
+ "StartApplication",
+ "HealthCheck"
+ ]
+ }
+}
+
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc-with-data.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc-with-data.json
new file mode 100644
index 000000000..15e7faa7e
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc-with-data.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":1,"param-name":"status","param-value":"success"},{"pre-transactionID":2,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":4,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":5,"param-name":"status","param-value":"success"},{"pre-transactionID":6,"param-name":"status","param-value":"success"},{"pre-transactionID":7,"param-name":"status","param-value":"success"},{"pre-transactionID":8,"param-name":"status","param-value":"success"},{"pre-transactionID":9,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":11,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":12,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":13,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":14,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC3 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":12,"param-name":"status","param-value":"success"},{"pre-transactionID":13,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":15,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC3 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc.json
new file mode 100644
index 000000000..1981427d3
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/optional-vnfc.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":1,"param-name":"status","param-value":"success"},{"pre-transactionID":2,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":4,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy", "response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":5,"param-name":"status","param-value":"success"},{"pre-transactionID":6,"param-name":"status","param-value":"success"},{"pre-transactionID":7,"param-name":"status","param-value":"success"},{"pre-transactionID":8,"param-name":"status","param-value":"success"},{"pre-transactionID":9,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":11,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm-per-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm-per-vnfc.json
new file mode 100644
index 000000000..600e315b2
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm-per-vnfc.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm.json
new file mode 100644
index 000000000..be4dc57b8
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-single-vm.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-without-dependency.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-without-dependency.json
new file mode 100644
index 000000000..2bb344598
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-without-dependency.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start.json
new file mode 100644
index 000000000..15e7faa7e
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":1,"param-name":"status","param-value":"success"},{"pre-transactionID":2,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":4,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":5,"param-name":"status","param-value":"success"},{"pre-transactionID":6,"param-name":"status","param-value":"success"},{"pre-transactionID":7,"param-name":"status","param-value":"success"},{"pre-transactionID":8,"param-name":"status","param-value":"success"},{"pre-transactionID":9,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":11,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":12,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":13,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":14,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC3 - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"pre-transactionID":12,"param-name":"status","param-value":"success"},{"pre-transactionID":13,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":15,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC3 - Name"},"payload":"ABC","responses":[{"response-message":"unhealthy","response-action":{"wait":"120","retry":"5"}},{"response-message":"healthy","response-action":{"continue":"true"}},{"response-message":"failure","response-action":{"stop":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm-per-vnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm-per-vnfc.json
new file mode 100644
index 000000000..97d2d1be5
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm-per-vnfc.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm.json
new file mode 100644
index 000000000..b237fe6f7
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-single-vm.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":"ABC","responses":[]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-without-dep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-without-dep.json
new file mode 100644
index 000000000..85f3b9650
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-without-dep.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":4,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid3"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid4"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid5"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop.json
new file mode 100644
index 000000000..c401ed6a2
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop.json
@@ -0,0 +1,3 @@
+
+
+[{"transactionId":1,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC1 - Name"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc1_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":4,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC2 - Name"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid3"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid4"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc2_vserverid5"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":10,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"VNFC3 - Name"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":11,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":12,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"vnfc3_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]