summaryrefslogtreecommitdiffstats
path: root/appc-sequence-generator/appc-sequence-generator-bundle
diff options
context:
space:
mode:
Diffstat (limited to 'appc-sequence-generator/appc-sequence-generator-bundle')
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/dgplugin/impl/SequenceGeneratorPluginImpl.java84
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/RestartSequenceGenerator.java64
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StartSequenceGenerator.java87
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StopSequenceGenerator.java65
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/CapabilityModel.java45
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/Constants.java14
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInput.java14
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilder.java18
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/provider/SequenceGeneratorProvider.java62
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/TestSequenceGeneratorPlugin.java193
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilderTest.java5
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json256
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json250
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json13
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json11
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithVmRestartCaps.json78
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutAnyCaps.json72
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutVmRestartCaps.json102
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithVmStartCaps.json134
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutAnyCaps.json126
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutVmStartCaps.json134
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithVmStopCaps.json136
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutAnyCaps.json128
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutVmStopCaps.json134
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json10
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/cyclic.json297
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json281
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json285
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json6
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json74
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json93
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json228
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json286
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json3
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json6
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json6
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json12
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json296
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongnumber.json296
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json2
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Output-stop.json2
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithVmRestartCaps.json1
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithoutAnyCaps.json1
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Start2.json2
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithVmStartCaps.json1
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithoutAnyCaps.json1
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithVmStopCaps.json1
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithoutAnyCaps.json1
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-NoDep.json2
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-Nodep-SingleVM.json1
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-singleVmPerVnfc.json2
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-withoutDependency.json2
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start.json1
-rwxr-xr-xappc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-singleVmPerVnfc.json2
54 files changed, 3010 insertions, 1416 deletions
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/dgplugin/impl/SequenceGeneratorPluginImpl.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/dgplugin/impl/SequenceGeneratorPluginImpl.java
index a53c408e8..111085e18 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/dgplugin/impl/SequenceGeneratorPluginImpl.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/dgplugin/impl/SequenceGeneratorPluginImpl.java
@@ -42,7 +42,9 @@ import org.onap.appc.exceptions.APPCException;
import org.onap.appc.seqgen.SequenceGenerator;
import org.onap.appc.seqgen.dgplugin.SequenceGeneratorPlugin;
import org.onap.appc.seqgen.impl.SequenceGeneratorFactory;
+import org.onap.appc.seqgen.objects.CapabilityModel;
import org.onap.appc.seqgen.objects.Constants;
+import org.onap.appc.seqgen.objects.Constants.ActionLevel;
import org.onap.appc.seqgen.objects.SequenceGeneratorInput;
import org.onap.appc.seqgen.objects.Transaction;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
@@ -51,7 +53,9 @@ import java.io.IOException;
import java.util.Map;
import java.util.List;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
@@ -67,10 +71,15 @@ public class SequenceGeneratorPluginImpl implements SequenceGeneratorPlugin {
try {
SequenceGeneratorInput sequenceGeneratorInput = buildSequenceGeneratorInput(inputJSON);
List<Transaction> sequence = generateSequence(sequenceGeneratorInput);
- String output = objectMapper.writeValueAsString(sequence);
- logger.debug("Sequence Generator Output " + output);
-
- context.setAttribute("output", output);
+ if (sequence.isEmpty()) {
+ logger.error("Error generating sequence");
+ context.setAttribute("error-code", "450");
+ context.setAttribute("error-message", "Request is not supported");
+ } else {
+ String output = objectMapper.writeValueAsString(sequence);
+ logger.debug("Sequence Generator Output " + output);
+ context.setAttribute("output", output);
+ }
} catch (Exception e) {
logger.error("Error generating sequence", e);
context.setAttribute("error-code", "401");
@@ -89,13 +98,16 @@ public class SequenceGeneratorPluginImpl implements SequenceGeneratorPlugin {
sequenceGeneratorInput.setInventoryModel(inventoryModel);
VnfcDependencyModel dependencyModel = buildDependencyModel(inputJson);
- if(dependencyModel!=null){
+ if(dependencyModel != null){
validateInventoryModelWithDependencyModel(dependencyModel,inventoryModel);
}
sequenceGeneratorInput.setDependencyModel(dependencyModel);
+ CapabilityModel capModel = buildCapabilitiesModel(inputJson);
+ sequenceGeneratorInput.setCapabilityModel(capModel);
return sequenceGeneratorInput;
}
+
private List<Transaction> generateSequence(SequenceGeneratorInput sequenceGeneratorInput) throws Exception {
if (sequenceGeneratorInput.getRequestInfo() == null) {
throw new APPCException("Request info is not provided in the input");
@@ -286,6 +298,7 @@ public class SequenceGeneratorPluginImpl implements SequenceGeneratorPlugin {
Vnfc vfc = new Vnfc();
vfc.setVnfcType(vm.get("vnfc").get("vnfc-type").asText());
vfc.setVnfcName(vm.get("vnfc").get("vnfc-name").asText());
+ vfc.setVnfcFunctionCode(vm.get("vnfc").get("vnfc-function-code").asText());
vserver.setVnfc(vfc);
List<Vserver> vServers = vfcs.get(vfc);
if (vServers == null) {
@@ -305,4 +318,65 @@ public class SequenceGeneratorPluginImpl implements SequenceGeneratorPlugin {
return new InventoryModel(vnf);
}
+ private CapabilityModel buildCapabilitiesModel(String inputJson) throws IOException, APPCException {
+ logger.info("Entering buildCapabilitiesModel");
+
+ ObjectMapper objectMapper = new ObjectMapper();
+ JsonNode jsonNode = objectMapper.readTree(inputJson);
+ JsonNode capabilitiesNode = jsonNode.get("capabilities");
+ if (capabilitiesNode == null) {
+ return null;
+ }
+
+ List<String> vnfCapabilities = new ArrayList<>();
+ List<String> vfModuleCapabilities = new ArrayList<>();
+ Map<String, List<String>> vmCapabilities = new HashMap<>();
+ List<String> vnfcCapabilities = new ArrayList<>();
+
+ JsonNode vnfNode = capabilitiesNode.get(ActionLevel.VNF.getAction());
+ JsonNode vfModuleNode = capabilitiesNode.get(ActionLevel.VF_MODULE.getAction());
+ JsonNode vmNode = capabilitiesNode.get(ActionLevel.VM.getAction());
+ JsonNode vnfcNode = capabilitiesNode.get(ActionLevel.VNFC.getAction());
+
+ if (vnfNode != null && vnfNode.isArray() ) {
+ for (JsonNode nodes : vnfNode) {
+ vnfCapabilities.add(nodes.asText());
+ }
+ }
+ if (vfModuleNode != null && vfModuleNode.isArray() ){
+ for (JsonNode nodes : vfModuleNode) {
+ vfModuleCapabilities.add(nodes.asText());
+ }
+ }
+ if (vmNode != null && vmNode.isArray() ){
+ for (JsonNode jNode : vmNode) {
+ logger.debug("jNode=" + jNode);
+ Iterator<Map.Entry<String,JsonNode>> fldIter = jNode.fields();
+ while (fldIter.hasNext()) {
+ Map.Entry<String,JsonNode> currentEntry = fldIter.next();
+ logger.debug("currentEntry.getKey()=" + currentEntry.getKey());
+ logger.debug("currentEntry.getValue()=" + currentEntry.getValue());
+ if (currentEntry.getValue().isArray()) {
+ logger.debug("currentEntry.getValue().isArray() is true");
+ List<String> ls = new ArrayList<String>();
+ for (JsonNode node: currentEntry.getValue()) {
+ ls.add(node.asText());
+ }
+ vmCapabilities.put(currentEntry.getKey(), ls);
+ }
+ }
+ }
+ }
+ if (vnfcNode != null && vnfcNode.isArray() ){
+ for (JsonNode nodes : vnfcNode) {
+ vnfcCapabilities.add(nodes.asText());
+ }
+ }
+ logger.info("vnfCapabilities=" + vnfCapabilities);
+ logger.info("vfModuleCapabilities=" + vfModuleCapabilities);
+ logger.info("vmCapabilities=" + vmCapabilities);
+ logger.info("vnfcCapabilities=" + vnfcCapabilities);
+
+ return new CapabilityModel(vnfCapabilities, vfModuleCapabilities, vmCapabilities, vnfcCapabilities);
+ }
}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/RestartSequenceGenerator.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/RestartSequenceGenerator.java
index 5ab0b5408..2f5080d0b 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/RestartSequenceGenerator.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/RestartSequenceGenerator.java
@@ -31,6 +31,7 @@ import org.onap.appc.domainmodel.Vserver;
import org.onap.appc.seqgen.SequenceGenerator;
import org.onap.appc.seqgen.objects.ActionIdentifier;
import org.onap.appc.seqgen.objects.Constants;
+import org.onap.appc.seqgen.objects.Constants.Action;
import org.onap.appc.seqgen.objects.Response;
import org.onap.appc.seqgen.objects.SequenceGeneratorInput;
import org.onap.appc.seqgen.objects.Transaction;
@@ -57,6 +58,11 @@ public class RestartSequenceGenerator implements SequenceGenerator{
List<Integer> transactionIds = new LinkedList<>();
PayloadGenerator payloadGenerator = new PayloadGenerator();
for (Vserver vm : vservers) {
+ // check vm-Restart-capabilities for this vm's vnfc-function-code (before incrementing transactionId)
+ String vmVnfcFunctionCode = vm.getVnfc().getVnfcFunctionCode();
+ if (!vmSupportsRestart(input, vmVnfcFunctionCode)) {
+ continue;
+ }
Transaction transactionStop = new Transaction();
transactionStop.setTransactionId(transactionId);
transactionIds.add(transactionId++);
@@ -73,12 +79,12 @@ public class RestartSequenceGenerator implements SequenceGenerator{
Response failureResponse = new Response();
failureResponse.setResponseMessage(Constants.ResponseMessage.FAILURE.getResponse());
Map<String,String> failureAction = new HashMap<>();
- if(!checkLastVM(vservers,vm.getId()))
- {
- failureAction.put(Constants.ResponseAction.JUMP.getAction(), String.valueOf(transactionId+1));
+ //if(!checkLastVM(vservers,vm.getId()))
+ //{
+ failureAction.put(Constants.ResponseAction.STOP.getAction(), String.valueOf(transactionId+1));
failureResponse.setResponseAction(failureAction);
transactionStop.addResponse(failureResponse);
- }
+ //}
}
transactionList.add(transactionStop);
Transaction transactionStart = new Transaction();
@@ -95,20 +101,58 @@ public class RestartSequenceGenerator implements SequenceGenerator{
Response failureResponse = new Response();
failureResponse.setResponseMessage(Constants.ResponseMessage.FAILURE.getResponse());
Map<String,String> failureAction = new HashMap<>();
- if(!checkLastVM(vservers,vm.getId()))
- {
- failureAction.put(Constants.ResponseAction.JUMP.getAction(),transactionId.toString());
+ //if(!checkLastVM(vservers,vm.getId()))
+ //{
+ //failureAction.put(Constants.ResponseAction.JUMP.getAction(),transactionId.toString());
+ failureAction.put(Constants.ResponseAction.STOP.getAction(),transactionId.toString());
failureResponse.setResponseAction(failureAction);
transactionStart.addResponse(failureResponse);
- }
+ //}
}
transactionList.add(transactionStart);
}
return transactionList;
}
+
+ private boolean vmSupportsRestart(SequenceGeneratorInput input, String vnfcFunctionCode) {
+ boolean vmSupported = true;
+ if (input.getCapability() == null) {
+ logger.info("vmSupportsRestart: " + "Capabilities model is null, returning vmSupported=" + vmSupported);
+ return vmSupported;
+ }
+ Map<String, List<String>> vmCapabilities = input.getCapability().getVmCapabilities();
+ logger.info("vmSupportsRestart: vnfcFunctionCode=" + vnfcFunctionCode + ", vmCapabilities=" + vmCapabilities);
+ if (vmCapabilities != null) {
+ if (!vmCapabilities.isEmpty()) {
+ vmSupported = false;
+ if (vmCapabilities.get(Action.RESTART.getActionType()) != null) {
+ if (vnfcFunctionCode != null && !vnfcFunctionCode.isEmpty()) {
+ for (String enabledFuncCode : vmCapabilities.get(Action.RESTART.getActionType()) ) {
+ if (enabledFuncCode.equalsIgnoreCase(vnfcFunctionCode)) {
+ vmSupported = true;
+ logger.info("vmSupportsRestart: vnfcFunctionCode=" + vnfcFunctionCode + " found in vmCapabilties");
+ break;
+ }
+ }
+ } else {
+ logger.info("vmSupportsRestart: " + "Inventory vnfcFunctionCode is null or empty");
+ }
+ } else {
+ logger.info("vmSupportsRestart: " + "Given action in vm entry in Capabilities model is null");
+ }
+ } else {
+ logger.info("vmSupportsRestart: " + "Vm entry in Capabilities model is empty");
+ }
+ } else {
+ logger.info("vmSupportsRestart: " + "Vm entry in Capabilities model is null");
+ }
+
+ logger.info("vmSupportsRestart: " + "returning vmSupported=" + vmSupported);
+ return vmSupported;
+ }
- private boolean checkLastVM(List<Vserver> vservers, String vmId){
+ private boolean checkLastVM(List<Vserver> vservers, String vmId){
Vserver vm= vservers.get(vservers.size()-1);
return vm.getId().equals(vmId);
}
-}
+} \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StartSequenceGenerator.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StartSequenceGenerator.java
index 8c24fe24c..105173f33 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StartSequenceGenerator.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StartSequenceGenerator.java
@@ -39,6 +39,7 @@ import org.onap.appc.domainmodel.Vserver;
import org.onap.appc.exceptions.APPCException;
import org.onap.appc.seqgen.SequenceGenerator;
import org.onap.appc.seqgen.objects.ActionIdentifier;
+import org.onap.appc.seqgen.objects.CapabilityModel;
import org.onap.appc.seqgen.objects.Constants;
import org.onap.appc.seqgen.objects.PreCheckOption;
import org.onap.appc.seqgen.objects.Response;
@@ -76,6 +77,11 @@ public class StartSequenceGenerator implements SequenceGenerator {
List<Vserver> vservers = input.getInventoryModel().getVnf().getVservers();
List<Integer> transactionIds = new LinkedList<>();
for (Vserver vm : vservers) {
+ // check vm-Start-capabilities for this vm's vnfc-function-code (before incrementing transactionId)
+ String vmVnfcFunctionCode = vm.getVnfc().getVnfcFunctionCode();
+ if (!vmSupportsStart(input, vmVnfcFunctionCode)) {
+ continue;
+ }
Transaction transaction = new Transaction();
transaction.setTransactionId(transactionId);
transactionIds.add(transactionId++);
@@ -92,7 +98,7 @@ public class StartSequenceGenerator implements SequenceGenerator {
Response ignoreResponse = new Response();
ignoreResponse.setResponseMessage(ResponseMessage.FAILURE.getResponse());
Map<String, String> ignoreAction = new HashMap<>();
- ignoreAction.put(ResponseAction.IGNORE.getAction(), Boolean.TRUE.toString());
+ ignoreAction.put(ResponseAction.STOP.getAction(), Boolean.TRUE.toString());
ignoreResponse.setResponseAction(ignoreAction);
transaction.addResponse(ignoreResponse);
}
@@ -114,7 +120,7 @@ public class StartSequenceGenerator implements SequenceGenerator {
Response ignoreResponse = new Response();
ignoreResponse.setResponseMessage(ResponseMessage.FAILURE.getResponse());
Map<String, String> ignoreAction = new HashMap<>();
- ignoreAction.put(ResponseAction.IGNORE.getAction(), Boolean.TRUE.toString());
+ ignoreAction.put(ResponseAction.STOP.getAction(), Boolean.TRUE.toString());
ignoreResponse.setResponseAction(ignoreAction);
transaction.addResponse(ignoreResponse);
}
@@ -132,6 +138,11 @@ public class StartSequenceGenerator implements SequenceGenerator {
List<Integer> transactionIds = new LinkedList<>();
if(!vms.isEmpty()) {
for (Vserver vm : vms) {
+ // check vm-Start-capabilities for this vm's vnfc-function-code (before incrementing transactionId)
+ String vmVnfcFunctionCode = vm.getVnfc().getVnfcFunctionCode();
+ if (!vmSupportsStart(input, vmVnfcFunctionCode)) {
+ continue;
+ }
Transaction transaction = new Transaction();
transaction.setTransactionId(transactionId);
transactionIds.add(transactionId++);
@@ -144,7 +155,7 @@ public class StartSequenceGenerator implements SequenceGenerator {
Response ignoreResponse = new Response();
ignoreResponse.setResponseMessage(ResponseMessage.FAILURE.getResponse());
Map<String, String> ignoreAction = new HashMap<>();
- ignoreAction.put(ResponseAction.IGNORE.getAction(), Boolean.TRUE.toString());
+ ignoreAction.put(ResponseAction.STOP.getAction(), Boolean.TRUE.toString());
ignoreResponse.setResponseAction(ignoreAction);
transaction.addResponse(ignoreResponse);
transactionList.add(transaction);
@@ -261,23 +272,27 @@ public class StartSequenceGenerator implements SequenceGenerator {
return strategy;
}
- private boolean readHealthCheckCapabilites(Map<String, List<String>> capabilities) {
- if (capabilities != null) {
- List<String> vnfcCapabilities = capabilities.get(CapabilityLevel.VNFC.getLevel());
- if (vnfcCapabilities != null)
- return vnfcCapabilities.stream()
- .anyMatch(p -> Capabilties.HEALTH_CHECK.getCapability().equalsIgnoreCase(p));
+ private boolean readHealthCheckCapabilites(CapabilityModel capabilities) {
+ if (capabilities == null) {
+ return true;
}
+ List<String> vnfcCapabilities = capabilities.getVnfcCapabilities();
+ if (vnfcCapabilities != null)
+ return vnfcCapabilities.stream()
+ .anyMatch(p -> Capabilties.HEALTH_CHECK.getCapability().equalsIgnoreCase(p));
+
return false;
}
private boolean readApplicationStartCapability(SequenceGeneratorInput input) {
- Map<String, List<String>> capability = input.getCapability();
- if (capability != null) {
- List<String> vnfcCapabilities = capability.get(CapabilityLevel.VNFC.getLevel());
- if (vnfcCapabilities != null)
- return vnfcCapabilities.stream().anyMatch(p -> Capabilties.START_APPLICATION.getCapability().equalsIgnoreCase(p));
- }
+ CapabilityModel capability = input.getCapability();
+ if (capability == null)
+ return true;
+ List<String> vnfcCapabilities = capability.getVnfcCapabilities();
+ if (vnfcCapabilities != null)
+ return vnfcCapabilities.stream()
+ .anyMatch(p -> Capabilties.START_APPLICATION.getCapability().equalsIgnoreCase(p));
+
return false;
}
@@ -300,7 +315,8 @@ public class StartSequenceGenerator implements SequenceGenerator {
List<Vserver> vservers = input.getInventoryModel().getVnf().getVservers();
for (Vserver vm : vservers) {
if(!(vm.getVnfc()!=null&& vm.getVnfc().getVnfcType()!=null&& vm.getVnfc().getVnfcName()!=null)){
- vnfcPresent=false;break;
+ vnfcPresent=false;
+ break;
}
}
return vnfcPresent;
@@ -319,4 +335,41 @@ public class StartSequenceGenerator implements SequenceGenerator {
throw new APPCException(message);
}
}
-}
+
+ private boolean vmSupportsStart(SequenceGeneratorInput input, String vnfcFunctionCode) {
+ boolean vmSupported = true;
+ if (input.getCapability() == null) {
+ logger.info("vmSupportsStart: " + "Capabilities model is null, returning vmSupported=" + vmSupported);
+ return vmSupported;
+ }
+ Map<String, List<String>> vmCapabilities = input.getCapability().getVmCapabilities();
+ logger.info("vmSupportsStart: vnfcFunctionCode=" + vnfcFunctionCode + ", vmCapabilities=" + vmCapabilities);
+ if (vmCapabilities != null) {
+ if (!vmCapabilities.isEmpty()) {
+ vmSupported = false;
+ if (vmCapabilities.get(Action.START.getActionType()) != null) {
+ if (vnfcFunctionCode != null && !vnfcFunctionCode.isEmpty()) {
+ for (String enabledFuncCode : vmCapabilities.get(Action.START.getActionType()) ) {
+ if (enabledFuncCode.equalsIgnoreCase(vnfcFunctionCode)) {
+ vmSupported = true;
+ logger.info("vmSupportsStart: vnfcFunctionCode=" + vnfcFunctionCode + " found in vmCapabilties");
+ break;
+ }
+ }
+ } else {
+ logger.info("vmSupportsStart: " + "Inventory vnfcFunctionCode is null or empty");
+ }
+ } else {
+ logger.info("vmSupportsStart: " + "Given action in vm entry in Capabilities model is null");
+ }
+ } else {
+ logger.info("vmSupportsStart: " + "Vm entry in Capabilities model is empty");
+ }
+ } else {
+ logger.info("vmSupportsStart: " + "Vm entry in Capabilities model is null");
+ }
+
+ logger.info("vmSupportsStart: " + "returning vmSupported=" + vmSupported);
+ return vmSupported;
+ }
+} \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StopSequenceGenerator.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StopSequenceGenerator.java
index 9b73b0848..8b60dede4 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StopSequenceGenerator.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/impl/StopSequenceGenerator.java
@@ -39,6 +39,7 @@ import org.onap.appc.seqgen.SequenceGenerator;
import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
import org.onap.appc.seqgen.objects.ActionIdentifier;
+import org.onap.appc.seqgen.objects.CapabilityModel;
import org.onap.appc.seqgen.objects.Constants;
import org.onap.appc.seqgen.objects.Response;
import org.onap.appc.seqgen.objects.SequenceGeneratorInput;
@@ -90,6 +91,11 @@ public class StopSequenceGenerator implements SequenceGenerator {
List<Vserver> vservers = input.getInventoryModel().getVnf().getVservers();
List<Integer> transactionIds = new LinkedList<>();
for (Vserver vm : vservers) {
+ // check vm-Stop-capabilities for this vm's vnfc-function-code (before incrementing transactionId)
+ String vmVnfcFunctionCode = vm.getVnfc().getVnfcFunctionCode();
+ if (!vmSupportsStop(input, vmVnfcFunctionCode)) {
+ continue;
+ }
Transaction transaction = new Transaction();
transaction.setTransactionId(transactionId);
transactionIds.add(transactionId++);
@@ -106,7 +112,7 @@ public class StopSequenceGenerator implements SequenceGenerator {
Response failureResponse = new Response();
failureResponse.setResponseMessage(ResponseMessage.FAILURE.getResponse());
Map<String,String> failureAction = new HashMap<>();
- failureAction.put(ResponseAction.IGNORE.getAction(),Boolean.TRUE.toString());
+ failureAction.put(ResponseAction.STOP.getAction(),Boolean.TRUE.toString());
failureResponse.setResponseAction(failureAction);
transaction.addResponse(failureResponse);
}
@@ -136,13 +142,17 @@ public class StopSequenceGenerator implements SequenceGenerator {
Response failureResponse = new Response();
failureResponse.setResponseMessage(ResponseMessage.FAILURE.getResponse());
Map<String,String> failureAction = new HashMap<>();
- failureAction.put(ResponseAction.IGNORE.getAction(),Boolean.TRUE.toString());
+ failureAction.put(ResponseAction.STOP.getAction(),Boolean.TRUE.toString());
failureResponse.setResponseAction(failureAction);
stopAppTransaction.addResponse(failureResponse);
transactionList.add(stopAppTransaction);
}
List<Vserver> vms = vnfc.getVserverList();
for(Vserver vm:vms){
+ String vmVnfcFunctionCode = vm.getVnfc().getVnfcFunctionCode();
+ if (!vmSupportsStop(input, vmVnfcFunctionCode)) {
+ continue;
+ }
Transaction transaction = new Transaction();
transaction.setTransactionId(transactionId);
transactionIds.add(transactionId++);
@@ -155,7 +165,7 @@ public class StopSequenceGenerator implements SequenceGenerator {
Response failureResponse = new Response();
failureResponse.setResponseMessage(ResponseMessage.FAILURE.getResponse());
Map<String,String> failureAction = new HashMap<>();
- failureAction.put(ResponseAction.IGNORE.getAction(),Boolean.TRUE.toString());
+ failureAction.put(ResponseAction.STOP.getAction(),Boolean.TRUE.toString());
failureResponse.setResponseAction(failureAction);
transaction.addResponse(failureResponse);
transactionList.add(transaction);
@@ -198,14 +208,51 @@ public class StopSequenceGenerator implements SequenceGenerator {
}
private boolean readApplicationStopCapability(SequenceGeneratorInput input) {
- Map<String,List<String>> capability = input.getCapability();
- if(capability!= null){
- List<String> vnfcCapabilities = capability.get(Constants.CapabilityLevel.VNFC.getLevel());
- if(vnfcCapabilities!=null)
- return vnfcCapabilities.stream().anyMatch(p -> Capabilties.STOP_APPLICATION.getCapability().equalsIgnoreCase(p));
+ CapabilityModel capability = input.getCapability();
+ if (capability == null) {
+ return true;
}
+ List<String> vnfcCapabilities = capability.getVnfcCapabilities();
+ if(vnfcCapabilities!=null)
+ return vnfcCapabilities.stream().anyMatch(p -> Capabilties.STOP_APPLICATION.getCapability().equalsIgnoreCase(p));
+
return false;
}
+ private boolean vmSupportsStop(SequenceGeneratorInput input, String vnfcFunctionCode) {
+ boolean vmSupported = true;
+ if (input.getCapability() == null) {
+ logger.info("vmSupportsStop: " + "Capabilities model is null, returning vmSupported=" + vmSupported);
+ return vmSupported;
+ }
+ Map<String, List<String>> vmCapabilities = input.getCapability().getVmCapabilities();
+ logger.info("vmSupportsStop: vnfcFunctionCode=" + vnfcFunctionCode + ", vmCapabilities=" + vmCapabilities);
+ if (vmCapabilities != null) {
+ if (!vmCapabilities.isEmpty()) {
+ vmSupported = false;
+ if (vmCapabilities.get(Action.STOP.getActionType()) != null) {
+ if (vnfcFunctionCode != null && !vnfcFunctionCode.isEmpty()) {
+ for (String enabledFuncCode : vmCapabilities.get(Action.STOP.getActionType()) ) {
+ if (enabledFuncCode.equalsIgnoreCase(vnfcFunctionCode)) {
+ vmSupported = true;
+ logger.info("vmSupportsStop: vnfcFunctionCode=" + vnfcFunctionCode + " found in vmCapabilties");
+ break;
+ }
+ }
+ } else {
+ logger.info("vmSupportsStop: " + "Inventory vnfcFunctionCode is null or empty");
+ }
+ } else {
+ logger.info("vmSupportsStop: " + "Given action in vm entry in Capabilities model is null");
+ }
+ } else {
+ logger.info("vmSupportsStop: " + "Vm entry in Capabilities model is empty");
+ }
+ } else {
+ logger.info("vmSupportsStop: " + "Vm entry in Capabilities model is null");
+ }
-}
+ logger.info("vmSupportsStop: " + "returning vmSupported=" + vmSupported);
+ return vmSupported;
+ }
+} \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/CapabilityModel.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/CapabilityModel.java
new file mode 100644
index 000000000..9b0478754
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/CapabilityModel.java
@@ -0,0 +1,45 @@
+package org.onap.appc.seqgen.objects;
+
+import java.util.List;
+import java.util.Map;
+
+public class CapabilityModel {
+
+ private List<String> vnfCapabilities;
+ private List<String> vfModuleCapabilities;
+ private Map<String, List<String>> vmCapabilities;
+ private List<String> vnfcCapabilities;
+
+ public CapabilityModel() {
+ }
+
+ public CapabilityModel( List<String> vnfCapabilities,
+ List<String> vfModuleCapabilities,
+ Map<String, List<String>> vmCapabilities,
+ List<String> vnfcCapabilities) {
+
+ this.vnfCapabilities = vnfCapabilities;
+ this.vfModuleCapabilities = vfModuleCapabilities;
+ this.vmCapabilities = vmCapabilities;
+ this.vnfcCapabilities = vnfcCapabilities;
+ }
+ public List<String> getVnfCapabilities() {
+ return vnfCapabilities;
+ }
+ public List<String> getVfModuleCapabilities() {
+ return vfModuleCapabilities;
+ }
+ public Map<String,List<String>> getVmCapabilities() {
+ return vmCapabilities;
+ }
+ public List<String> getVnfcCapabilities() {
+ return vnfcCapabilities;
+ }
+ @Override
+ public String toString() {
+ return "CapabilitiesModel = " + "vnf=" + getVnfCapabilities() +
+ "vfModule=" + getVfModuleCapabilities() +
+ "vm=" + getVmCapabilities() +
+ "vnfc=" + getVnfcCapabilities();
+ }
+}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/Constants.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/Constants.java
index 025c7698d..5b82b9e8e 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/Constants.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/Constants.java
@@ -85,7 +85,19 @@ public class Constants {
}
public enum Action{
- START("Start"),START_APPLICATION("StartApplication"),HEALTH_CHECK("HealthCheck"),STOP_APPLICATION("StopApplication"),STOP("Stop");
+ ATTACH_VOLUME("AttachVolume"),
+ DETACH_VOLUME("DetachVolume"),
+ EVACUATE("Evacuate"),
+ MIGRATE("Migrate"),
+ REBOOT("Reboot"),
+ REBUILD("Rebuild"),
+ RESTART("Restart"),
+ SNAPSHOT("Snapshot"),
+ START("Start"),
+ STOP("Stop"),
+ START_APPLICATION("StartApplication"),
+ HEALTH_CHECK("HealthCheck"),
+ STOP_APPLICATION("StopApplication");
Action(String actionType) {
this.actionType=actionType;
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInput.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInput.java
index d847b690b..c6778a8fc 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInput.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInput.java
@@ -31,7 +31,6 @@ import org.onap.appc.dg.objects.InventoryModel;
import org.onap.appc.dg.objects.VnfcDependencyModel;
import javax.validation.constraints.NotNull;
-import java.util.List;
import java.util.Map;
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
@@ -42,17 +41,14 @@ public class SequenceGeneratorInput {
@JsonProperty("request-info")
private RequestInfo requestInfo;
- @JsonIgnore
private InventoryModel inventoryModel;
- @JsonIgnore
private VnfcDependencyModel dependencyModel;
@JsonProperty("tunable-parameters")
private Map<String,String> tunableParams;
- @JsonProperty("capabilities")
- private Map<String,List<String>> capability;
+ private CapabilityModel capabilityModel;
public RequestInfo getRequestInfo() {
return requestInfo;
@@ -86,11 +82,11 @@ public class SequenceGeneratorInput {
this.tunableParams = tunableParams;
}
- public Map<String, List<String>> getCapability() {
- return capability;
+ public CapabilityModel getCapability() {
+ return capabilityModel;
}
- public void setCapability(Map<String, List<String>> capability) {
- this.capability = capability;
+ public void setCapabilityModel(CapabilityModel capabilityModel) {
+ this.capabilityModel = capabilityModel;
}
}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilder.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilder.java
index 21b8f7b55..6066a9af1 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilder.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilder.java
@@ -40,21 +40,13 @@ public class SequenceGeneratorInputBuilder {
private Map<String,String> tunableParams;
- private Map<String,List<String>> capability;
-
+ private CapabilityModel capabilityModel;
+
public SequenceGeneratorInputBuilder requestInfo(RequestInfo requestInfo){
this.requestInfo = requestInfo;
return this;
}
- public SequenceGeneratorInputBuilder capability(String level,List<String> capabilities){
- if(this.capability ==null){
- this.capability = new HashMap<>();
- }
- this.capability.put(level,capabilities);
- return this;
- }
-
public SequenceGeneratorInputBuilder tunableParameter(String key,String value){
if(this.tunableParams ==null){
this.tunableParams = new HashMap<>();
@@ -73,10 +65,14 @@ public class SequenceGeneratorInputBuilder {
return this;
}
+ public SequenceGeneratorInputBuilder capabilityModel(CapabilityModel model) {
+ this.capabilityModel = model;
+ return this;
+ }
public SequenceGeneratorInput build(){
SequenceGeneratorInput input = new SequenceGeneratorInput();
input.setRequestInfo(this.requestInfo);
- input.setCapability(this.capability);
+ input.setCapabilityModel(this.capabilityModel);
input.setInventoryModel(this.inventoryModel);
input.setDependencyModel(this.dependencyModel);
input.setTunableParams(this.tunableParams);
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/provider/SequenceGeneratorProvider.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/provider/SequenceGeneratorProvider.java
index 940cc2ab7..86d51e393 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/provider/SequenceGeneratorProvider.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/main/java/org/onap/appc/seqgen/provider/SequenceGeneratorProvider.java
@@ -45,7 +45,9 @@ import org.onap.appc.domainmodel.lcm.VNFOperation;
import org.onap.appc.exceptions.APPCException;
import org.onap.appc.seqgen.SequenceGenerator;
import org.onap.appc.seqgen.impl.SequenceGeneratorFactory;
+import org.onap.appc.seqgen.objects.CapabilityModel;
import org.onap.appc.seqgen.objects.Constants;
+import org.onap.appc.seqgen.objects.Constants.Action;
import org.onap.appc.seqgen.objects.PreCheckOption;
import org.onap.appc.seqgen.objects.RequestInfo;
import org.onap.appc.seqgen.objects.RequestInfoBuilder;
@@ -128,10 +130,14 @@ public class SequenceGeneratorProvider implements AutoCloseable,SequenceGenerato
.createSequenceGenerator(VNFOperation.findByString(input.getRequestInfo().getAction().name()));
SequenceGeneratorInput seqGenInput = buildSeqGenInput(input);
List<Transaction> transactions = seqGenerator.generateSequence(seqGenInput);
- rpcResult = buildSuccessResponse(transactions);
+ if (transactions.isEmpty()) {
+ rpcResult = buildFailureResponse("Request is not supported", 450);
+ } else {
+ rpcResult = buildSuccessResponse(transactions);
+ }
} catch (Exception e) {
log.error("Error Generating Sequence",e);
- rpcResult = buildFailureResponse(e.getMessage());
+ rpcResult = buildFailureResponse(e.getMessage(), 0);
}
return Futures.immediateFuture(rpcResult);
}
@@ -195,6 +201,7 @@ public class SequenceGeneratorProvider implements AutoCloseable,SequenceGenerato
return precheckOptions;
}
private List<Responses> getResponses(Transaction transaction) {
+ log.info("Building response from the Transaction");
List<Responses> responseList = new LinkedList<>();
for(Response resp : transaction.getResponses()){
Map<String,String> responseActions = resp.getResponseAction();
@@ -240,12 +247,13 @@ public class SequenceGeneratorProvider implements AutoCloseable,SequenceGenerato
validateInventoryModelWithDependencyModel(dependencyModel, inventoryModel);
}
+ CapabilityModel capModel = buildCapabilitiesForSeqGenInput(input);
+
SequenceGeneratorInputBuilder builder = new SequenceGeneratorInputBuilder()
.requestInfo(requestInfo)
.inventoryModel(inventoryModel)
- .dependendcyModel(dependencyModel);
-
- builder = buildCapabilitiesForSeqGenInput(input, builder);
+ .dependendcyModel(dependencyModel)
+ .capabilityModel(capModel);
builder = buildTunableParamsForSeqGenInput(input, builder);
@@ -264,24 +272,39 @@ public class SequenceGeneratorProvider implements AutoCloseable,SequenceGenerato
return builder;
}
- private SequenceGeneratorInputBuilder buildCapabilitiesForSeqGenInput(GenerateSequenceInput input, SequenceGeneratorInputBuilder builder) {
+ public CapabilityModel buildCapabilitiesForSeqGenInput(GenerateSequenceInput input) {
log.info("Initializing capabilities based on YANG object.");
- if(input.getCapabilities() != null){
- if(input.getCapabilities().getVnf() != null){
- builder = builder.capability("vnf", input.getCapabilities().getVnf());
+
+ List<String> vnfCapabilities = null;
+ List<String> vfModuleCapabilities = null;
+ Map<String, List<String>> vmCapabilities = null;
+ List<String> vnfcCapabilities = null;
+
+ if(input.getCapabilities()!=null){
+ if(input.getCapabilities().getVnf()!=null){
+ vnfCapabilities = input.getCapabilities().getVnf();
}
- if(input.getCapabilities().getVnfc() != null){
- builder = builder.capability("vnfc", input.getCapabilities().getVnfc());
+ if(input.getCapabilities().getVnfc()!=null){
+ vfModuleCapabilities = input.getCapabilities().getVnfc();
}
- if(input.getCapabilities().getVm() != null){
- builder = builder.capability("vm", input.getCapabilities().getVm());
+ if(input.getCapabilities().getVm()!=null){
+ vmCapabilities = new HashMap<String, List<String>>();
+ vmCapabilities.put(Action.ATTACH_VOLUME.getActionType(), input.getCapabilities().getVm().getAttachVolume());
+ vmCapabilities.put(Action.DETACH_VOLUME.getActionType(), input.getCapabilities().getVm().getDetachVolume());
+ vmCapabilities.put(Action.EVACUATE.getActionType(), input.getCapabilities().getVm().getEvacuate());
+ vmCapabilities.put(Action.MIGRATE.getActionType(), input.getCapabilities().getVm().getMigrate());
+ vmCapabilities.put(Action.REBOOT.getActionType(), input.getCapabilities().getVm().getReboot());
+ vmCapabilities.put(Action.REBUILD.getActionType(), input.getCapabilities().getVm().getRebuild());
+ vmCapabilities.put(Action.RESTART.getActionType(), input.getCapabilities().getVm().getRestart());
+ vmCapabilities.put(Action.SNAPSHOT.getActionType(), input.getCapabilities().getVm().getSnapshot());
+ vmCapabilities.put(Action.START.getActionType(), input.getCapabilities().getVm().getStart());
+ vmCapabilities.put(Action.STOP.getActionType(), input.getCapabilities().getVm().getStop());
}
- if(input.getCapabilities().getVfModule() != null){
- builder = builder.capability("vf-module", input.getCapabilities().getVfModule());
+ if(input.getCapabilities().getVfModule()!=null){
+ vnfcCapabilities = input.getCapabilities().getVfModule();
}
}
-
- return builder;
+ return new CapabilityModel(vnfCapabilities, vfModuleCapabilities, vmCapabilities, vnfcCapabilities);
}
private void validateInventoryModelWithDependencyModel(VnfcDependencyModel dependencyModel, InventoryModel inventoryModel) throws APPCException {
@@ -460,6 +483,7 @@ public class SequenceGeneratorProvider implements AutoCloseable,SequenceGenerato
Vnfc vfc = new Vnfc();
vfc.setVnfcName(vm.getVnfc().getVnfcName());
vfc.setVnfcType(vm.getVnfc().getVnfcType());
+ vfc.setVnfcFunctionCode(vm.getVnfc().getVnfcFunctionCode());
vserver.setVnfc(vfc);
List<Vserver> vms = map.get(vfc);
if(vms ==null) {
@@ -481,10 +505,10 @@ public class SequenceGeneratorProvider implements AutoCloseable,SequenceGenerato
return vnf;
}
- private RpcResult<GenerateSequenceOutput> buildFailureResponse(String errorMessage){
+ private RpcResult<GenerateSequenceOutput> buildFailureResponse(String errorMessage, int errorCode){
GenerateSequenceOutputBuilder sequenceGeneratorOutputBuilder=new GenerateSequenceOutputBuilder();
StatusBuilder statusBuilder = new StatusBuilder();
- statusBuilder.setCode(401);
+ statusBuilder.setCode((errorCode != 0)? errorCode : 401);
statusBuilder.setMessage(errorMessage);
sequenceGeneratorOutputBuilder.setStatus(statusBuilder.build());
return RpcResultBuilder
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/TestSequenceGeneratorPlugin.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/TestSequenceGeneratorPlugin.java
index addd81a4b..5fddce12b 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/TestSequenceGeneratorPlugin.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/TestSequenceGeneratorPlugin.java
@@ -21,22 +21,21 @@
package org.onap.appc.seqgen;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.util.HashMap;
+import java.util.Map;
+
import org.junit.Assert;
-import org.junit.Before;
import org.junit.Test;
-import org.onap.appc.seqgen.dbservices.SequenceGeneratorDBServices;
import org.onap.appc.seqgen.dgplugin.SequenceGeneratorPlugin;
import org.onap.appc.seqgen.dgplugin.impl.SequenceGeneratorPluginImpl;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
-import static org.mockito.Mockito.mock;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.net.URISyntaxException;
-import java.util.HashMap;
-import java.util.Map;
+
+import com.att.eelf.configuration.EELFLogger;
+import com.att.eelf.configuration.EELFManager;
public class TestSequenceGeneratorPlugin {
@@ -243,7 +242,7 @@ public class TestSequenceGeneratorPlugin {
plugin.generateSequence(params,context);
String outputJSON = context.getAttribute("output");
- String actualOutput = readInput("/output/restart-NoDep.json");
+ String actualOutput = readOutput("/output/restart-NoDep.json");
outputJSON.trim();
Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
}
@@ -260,7 +259,7 @@ public class TestSequenceGeneratorPlugin {
plugin.generateSequence(params,context);
String outputJSON = context.getAttribute("output");
- String actualOutput = readInput("/output/restart-Nodep-SingleVM.json");
+ String actualOutput = readOutput("/output/restart-Nodep-SingleVM.json");
Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
}
@@ -350,26 +349,162 @@ public class TestSequenceGeneratorPlugin {
Assert.assertEquals(errorMessage,"Error generating sequence Dependency model missing vnfc type SMP");
}
- private String readInput(String inputFile) throws URISyntaxException, IOException {
- File file = new File(this.getClass().getResource(inputFile).toURI());
+ @Test
+ public void testGenerateSequenceStartWithVmStartCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/StartWithVmStartCaps.json");
- byte[] bFile = new byte[(int) file.length()];
- FileInputStream fileInputStream = new FileInputStream(file);
- fileInputStream.read(bFile);
- fileInputStream.close();
- return new String(bFile);
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String actualOutput = context.getAttribute("output");
+ String outputJSON = readOutput("/output/StartWithVmStartCaps.json");
+ Assert.assertEquals(outputJSON.trim(), actualOutput.trim());
}
- private String readOutput(String outputFile) throws IOException,URISyntaxException {
- File file = new File(this.getClass().getResource(outputFile).toURI());
+
+ @Test
+ public void testGenerateSequenceRestartWithVmRestartCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/RestartWithVmRestartCaps.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
- byte[] bFile = new byte[(int) file.length()];
- FileInputStream fileInputStream = new FileInputStream(file);
- fileInputStream.read(bFile);
- fileInputStream.close();
- String output=new String(bFile);
+ String outputJSON = context.getAttribute("output");
+ String actualOutput = readOutput("/output/RestartWithVmRestartCaps.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceStopWithVmStopCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/StopWithVmStopCaps.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String actualOutput = context.getAttribute("output");
+ String outputJSON = readOutput("/output/StopWithVmStopCaps.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceStartWithoutAnyCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/StartWithoutAnyCaps.json");
+
+ Map<String,String> params = new HashMap<>();
+ SvcLogicContext context = new SvcLogicContext();
+ context.setAttribute("inputJSON",inputJSON);
+
+ SequenceGeneratorPlugin plugin = new SequenceGeneratorPluginImpl();
+ plugin.generateSequence(params,context);
+
+ String actualOutput = context.getAttribute("output");
+ String outputJSON = readOutput("/output/StartWithoutAnyCaps.json");
+ Assert.assertEquals(outputJSON.trim(), actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceRestartWithoutAnyCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/RestartWithoutAnyCaps.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/RestartWithoutAnyCaps.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+
+ @Test
+ public void testGenerateSequenceStopWithoutAnyCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/StopWithoutAnyCaps.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/StopWithoutAnyCaps.json");
+ Assert.assertEquals(outputJSON.trim(),actualOutput.trim());
+ }
+ @Test
+ public void testGenerateSequenceStartWithoutVmStartCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/StartWithoutVmStartCaps.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("450", errorCode);
+ Assert.assertEquals("Request is not supported", errorMessage);
+ }
+
+ @Test
+ public void testGenerateSequenceRestartWithoutVmRestartCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/RestartWithoutVmRestartCaps.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("450", errorCode);
+ Assert.assertEquals("Request is not supported", errorMessage);
+ }
+
+ @Test
+ public void testGenerateSequenceStopWithoutVmStopCaps()throws URISyntaxException, IOException {
+ String inputJSON = readInput("/input/StopWithoutVmStopCaps.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("450", errorCode);
+ Assert.assertEquals("Request is not supported", errorMessage);
+ }
+
+ private String readInput(String inputFile) throws URISyntaxException, IOException {
+ return new String(Files.readAllBytes(Paths.get(this.getClass().getResource(inputFile).toURI())), "UTF-8");
+ }
+
+ private String readOutput(String outputFile) throws IOException,URISyntaxException {
+ String output = new String(Files.readAllBytes(Paths.get(this.getClass().getResource(outputFile).toURI())), "UTF-8");
int start=output.indexOf("[");
return output.substring(start,output.length());
-
}
}
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilderTest.java b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilderTest.java
index 0809930ca..8719125d8 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilderTest.java
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/java/org/onap/appc/seqgen/objects/SequenceGeneratorInputBuilderTest.java
@@ -54,9 +54,8 @@ public class SequenceGeneratorInputBuilderTest {
@Test
public void testCapability()
{
- String level= "testLevel";
- List<String> capabilities= new ArrayList<>();
- assertTrue(sequenceGeneratorInputBuilder.capability(level, capabilities) instanceof SequenceGeneratorInputBuilder);
+ CapabilityModel capabilities= new CapabilityModel();
+ assertTrue(sequenceGeneratorInputBuilder.capabilityModel(capabilities) instanceof SequenceGeneratorInputBuilder);
}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json
index 0a4f5fce5..4d5bb0b6d 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json
@@ -1,130 +1,138 @@
{
-"request-info": {
- "action": "Start",
- "action-level": "vnf",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
},
- "inventory-info": {
- "vnf-info": {
- "vnf-id": "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version": "1.0",
- "identity-url": "test-url",
- "vm": [
- {
- "vserver-id": "be_vserverid1",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- },
- {
- "vserver-id": "fe_vserverid1",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
- },
- {
- "vserver-id": "fe_vserverid2",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
- },
- {
- "vserver-id": "be_vserverid2",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- },
- {
- "vserver-id": "be_vserverid3",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- },
- {
- "vserver-id": "be_vserverid4",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- },
- {
- "vserver-id": "be_vserverid5",
- "vm-id": "vm-id",
- "vnfc": {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- }
- ]
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test-url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm-id",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
}
- },
- "dependency-info": {
- "vnfcs": [
- {
- "vnfc-type": "BE",
- "mandatory": "true",
- "resilience": "Active-Active",
- "parents": [
- "SMP"
- ]
- },
- {
- "vnfc-type": "FE",
- "mandatory": "true",
- "resilience": "Active-Active",
- "parents": [
- "BE"
- ]
- },
- {
- "vnfc-type": "SMP",
- "mandatory": "true",
- "resilience": "Active-Passive",
- "parents": []
- }
+ ]
+ }
+ },
+ "dependency-info": {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
]
- },
- "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"
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
]
- }
-}
+ },
+ {
+ "vnfc-type" : "SMP",
+ "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" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json
index 8a4d22622..45cfccf59 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json
@@ -1,136 +1,142 @@
{
-"request-info":
+ "request-info":
{
- "action": "Start",
- "action-level": "vnf",
- "action-identifier":
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier":
{
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info":
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info":
{
- "vnf-info":
+ "vnf-info":
{
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info" :
- {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "mandatory" : "false",
- "resilience": "Active-Passive",
- "parents" : []
- }
- ]
- },
- "tunable-parameters" :
+ }
+ ]
+ }
+ },
+ "dependency-info" :
{
- "strategy" : "FORWARD",
- "wait-time" : "120",
- "retry-count" : "5"
- },
- "capabilities" :
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "mandatory" : "false",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters" :
{
- "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
- "vf-module": ["Stop", "Start"],
- "vm" : ["Stop", "Start"],
- "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
- }
-}
-
+ "strategy" : "FORWARD",
+ "wait-time" : "120",
+ "retry-count" : "5"
+ },
+ "capabilities" :
+ {
+ "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
+ "vf-module": ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+} \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json
index 372445f15..66c97c188 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json
@@ -1,5 +1,5 @@
{
-"request-info": {
+ "request-info": {
"action": "Start",
"action-level": "vnf",
"action-identifier": {
@@ -21,6 +21,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -31,6 +32,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -41,6 +43,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -51,6 +54,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -61,6 +65,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -71,6 +76,7 @@
"vnfc":
{
"vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
"vnfc-name": "SMP - Name"
}
@@ -81,6 +87,7 @@
"vnfc":
{
"vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
"vnfc-name": "SMP - Name"
}
@@ -91,6 +98,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -101,6 +109,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -137,7 +146,7 @@
"capabilities" : {
"vnf": ["Stop", "Start", "StartApplication","StopApplication"],
"vf-module": ["Stop", "Start"],
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"vnfc": ["StopApplication", "StartApplication","HealthCheck"]
}
}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json
index 826603849..d780316f5 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json
@@ -17,7 +17,13 @@
"vm": [
{
"vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1"
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
}
]
}
@@ -29,8 +35,7 @@
},
"capabilities" : {
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"vnfc": ["StopApplication", "StartApplication","HealthCheck"]
}
}
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithVmRestartCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithVmRestartCaps.json
new file mode 100644
index 000000000..759d63f81
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithVmRestartCaps.json
@@ -0,0 +1,78 @@
+{
+ "request-info": {
+ "action": "Restart",
+ "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": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info" : {
+ },
+ "tunable-parameters" : {
+ "strategy" : "FORWARD",
+ "waitTime" : "120",
+ "retryCount" : "5"
+ },
+ "capabilities" : {
+ "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
+ "vf-module": ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutAnyCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutAnyCaps.json
new file mode 100644
index 000000000..23b1a55ac
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutAnyCaps.json
@@ -0,0 +1,72 @@
+{
+ "request-info": {
+ "action": "Restart",
+ "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": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info" : {
+ },
+ "tunable-parameters" : {
+ "strategy" : "FORWARD",
+ "waitTime" : "120",
+ "retryCount" : "5"
+ }
+}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutVmRestartCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutVmRestartCaps.json
new file mode 100644
index 000000000..b29482378
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/RestartWithoutVmRestartCaps.json
@@ -0,0 +1,102 @@
+{
+ "request-info": {
+ "action": "Restart",
+ "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": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info" : {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : []
+ }
+ ]
+ },
+ "tunable-parameters" : {
+ "strategy" : "FORWARD",
+ "waitTime" : "120",
+ "retryCount" : "5"
+ },
+ "capabilities" : {
+ "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
+ "vf-module": ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :[]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithVmStartCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithVmStartCaps.json
new file mode 100644
index 000000000..7299af382
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithVmStartCaps.json
@@ -0,0 +1,134 @@
+
+
+{
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+
+ },
+ "tunable-parameters": {
+
+ },
+ "capabilities" : {
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc" : ["A", "B","C"],
+ "vf-module" : ["StopApplication", "StartApplication","HealthCheck"],
+ "vnf" : ["Stop", "Start","HealthCheck"]
+ }
+}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutAnyCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutAnyCaps.json
new file mode 100644
index 000000000..e4236a45b
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutAnyCaps.json
@@ -0,0 +1,126 @@
+{
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+
+ },
+ "tunable-parameters": {
+
+ }
+}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutVmStartCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutVmStartCaps.json
new file mode 100644
index 000000000..f9136a729
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StartWithoutVmStartCaps.json
@@ -0,0 +1,134 @@
+
+
+{
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+
+ },
+ "tunable-parameters": {
+
+ },
+ "capabilities" : {
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :[]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc" : ["A", "B","C"],
+ "vf-module" : ["StopApplication", "StartApplication","HealthCheck"],
+ "vnf" : ["Stop", "Start","HealthCheck"]
+ }
+}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithVmStopCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithVmStopCaps.json
new file mode 100644
index 000000000..24502876e
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithVmStopCaps.json
@@ -0,0 +1,136 @@
+
+
+{
+ "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": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm-id2",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm-id3",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm-id4",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ },
+ "tunable-parameters": {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" : {
+ "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
+ "vf-module": ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutAnyCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutAnyCaps.json
new file mode 100644
index 000000000..10750615c
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutAnyCaps.json
@@ -0,0 +1,128 @@
+{
+ "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": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm-id2",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm-id3",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm-id4",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ },
+ "tunable-parameters": {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ }
+}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutVmStopCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutVmStopCaps.json
new file mode 100644
index 000000000..ca77762f4
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/StopWithoutVmStopCaps.json
@@ -0,0 +1,134 @@
+{
+ "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": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm-id2",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm-id3",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm-id4",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ },
+ "tunable-parameters": {
+ "strategy" : "FORWARD",
+ "wait-time": "120",
+ "retry-count": "5"
+ },
+ "capabilities" : {
+ "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
+ "vf-module": ["Stop", "Start"],
+ "vm" : [{"Stop" :[]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json
index 07a389f9d..b4e10943c 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json
@@ -21,6 +21,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -31,6 +32,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -41,6 +43,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -51,6 +54,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -61,6 +65,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -72,6 +77,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -82,6 +88,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -118,8 +125,7 @@
"capabilities" : {
"vnf": ["Stop", "Start", "StartApplication","StopApplication"],
"vf-module": ["Stop", "Start"],
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"vnfc": ["StopApplication", "StartApplication","HealthCheck"]
}
}
-
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
index 9053c16ba..fcb3672f7 100644
--- 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
@@ -1,147 +1,158 @@
+
+
{
-"request-info": {
- "action": "Start",
- "action-level": "vnf",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info" : {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "mandatory" : "true",
- "resilience": "Active-Passive",
- "parents" : ["FE"]
- }
- ]
- },
- "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"]
- }
+ }
+ ]
+ }
+ },
+ "dependency-info" : {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "mandatory" : "true",
+ "resilience": "Active-Passive",
+ "parents" : ["FE"]
+ }
+ ]
+ },
+ "tunable-parameters" : {
+ "strategy" : "FORWARD",
+ "wait-time" : "120",
+ "retry-count" : "5"
+ },
+ "capabilities" : {
+ "vnf": ["Stop", "Start", "StartApplication","StopApplication"],
+ "vf-module": ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "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
index 5f8efc49d..cc0137818 100644
--- 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
@@ -1,141 +1,150 @@
+
{
-"inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id2",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id2",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id3",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id3",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id2",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id4",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id2",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id2",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id3",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id3",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id2",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id4",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id5",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id5",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "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"]
- }
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "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" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "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
index 4a1975b2f..e74c6ac56 100644
--- 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
@@ -1,147 +1,158 @@
+
+
{
- "request-info": {
- "action": "Start",
- "action-level": "vnf",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "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"]
- }
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "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" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json
index bd8167202..fb96abeac 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json
@@ -22,6 +22,7 @@
"vnfc":
{
"vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
"vnfc-name": "SMP - Name"
}
},
@@ -31,6 +32,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -41,6 +43,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -51,6 +54,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -92,7 +96,7 @@
"capabilities" : {
"vnf": ["Stop", "Start", "StartApplication","StopApplication"],
"vf-module": ["Stop", "Start"],
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"vnfc": ["StopApplication", "StartApplication","HealthCheck"]
}
}
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json
index 65916bb6d..e8ed7020e 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json
@@ -1,43 +1,43 @@
{
- "request-info": {
- "action": "Start",
- "action-level": "vm",
- "action-identifier": {
- "vserver-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm-id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- }
- ]
- }
- },
- "dependency-info": {
+ "request-info": {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier": {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm-id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+ }
+ ]
+ }
+ },
+ "dependency-info": {
- },
- "tunable-parameters": {
+ },
+ "tunable-parameters": {
- },
- "capabilities" : {
- "vm" : ["Stop", "Start"],
- "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
- }
+ },
+ "capabilities" : {
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
}
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json
index b9a93cdd8..b5d06ecec 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json
@@ -1,53 +1,54 @@
{
- "request-info": {
- "action": "Start",
- "action-level": "vm",
- "action-identifier": {
- "vserver-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm-id",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm-id",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
+ "request-info": {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier": {
+ "vserver-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
+ }
+ ]
+ }
+ },
+ "dependency-info": {
- },
- "tunable-parameters": {
+ },
+ "tunable-parameters": {
- },
- "capabilities" : {
- "vm" : ["Stop", "Start"],
- "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
- }
+ },
+ "capabilities" : {
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
}
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json
index ea9e7aa6c..e181eb0e9 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json
@@ -1,124 +1,134 @@
{
- "request-info": {
- "action": "Start",
- "action-level": "vm",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "request-info": {
+ "action": "Start",
+ "action-level": "vm",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
+ }
+ ]
+ }
+ },
+ "dependency-info": {
- },
- "tunable-parameters": {
+ },
+ "tunable-parameters": {
- },
- "capabilities" : {
- "vm" : ["Stop", "Start"],
- "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
- }
+ },
+ "capabilities" : {
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc" : ["A", "B","C"],
+ "vf-module" : ["StopApplication", "StartApplication","HealthCheck"],
+ "vnf" : ["Stop", "Start","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
index e806cd460..43a79ea8d 100644
--- 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
@@ -1,149 +1,159 @@
+
{
- "request-info": {
- "action": "Start",
- "action-level": "vnf",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "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"]
- }
-}
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "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" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
+} \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json
index 3251106e3..b30fdd80e 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json
@@ -144,9 +144,8 @@
"capabilities" : {
"vnf": ["Stop", "Start", "StartApplication","StopApplication"],
"vf-module": ["Stop", "Start"],
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["vnfc1", "vnfc2", "SMP"]}, {"Start" :["vnfc3", "vnfc4"]}, {"Restart" :["vnfc5", "vnfc6"]}],
"vnfc": ["StopApplication", "StartApplication","HealthCheck"]
}
}
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json
index 6cdd3de20..7b8225d10 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json
@@ -1,3 +1,5 @@
+
+
{
"request-info": {
"action": "Stop",
@@ -21,6 +23,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
}
@@ -34,7 +37,8 @@
},
"capabilities" : {
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"vnfc": ["StopApplication", "StartApplication","HealthCheck"]
}
}
+
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json
index a49b70403..f036be2c9 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json
@@ -1,3 +1,5 @@
+
+
{
"request-info": {
"action": "Stop",
@@ -21,6 +23,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
},
@@ -30,6 +33,7 @@
"vnfc":
{
"vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
"vnfc-name": "SMP - Name"
}
@@ -43,7 +47,7 @@
},
"capabilities" : {
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"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
index e52269ec0..46e1e65de 100644
--- 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
@@ -24,6 +24,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -34,6 +35,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -44,6 +46,7 @@
"vnfc":
{
"vnfc-type": "FE",
+ "vnfc-function-code": "pld",
"vnfc-name": "FE - Name"
}
@@ -54,6 +57,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -64,6 +68,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -74,6 +79,7 @@
"vnfc":
{
"vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
"vnfc-name": "SMP - Name"
}
@@ -84,6 +90,7 @@
"vnfc":
{
"vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
"vnfc-name": "SMP - Name"
}
},
@@ -93,6 +100,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -103,6 +111,7 @@
"vnfc":
{
"vnfc-type": "BE",
+ "vnfc-function-code": "pld",
"vnfc-name": "BE - Name"
}
@@ -144,9 +153,8 @@
"capabilities" : {
"vnf": ["Stop", "Start", "StartApplication","StopApplication"],
"vf-module": ["Stop", "Start"],
- "vm" : ["Stop", "Start"],
+ "vm" : [{"Stop" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
"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
index 276d550e5..6b0140f1e 100644
--- 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
@@ -1,151 +1,159 @@
{
- "request-info": {
- "action": "start",
- "action-level": "vnf",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "request-info": {
+ "action": "start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "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"]
- }
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "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
index 6c2db0898..bdd92d839 100644
--- 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
@@ -1,151 +1,159 @@
{
- "request-info": {
- "action": "Start",
- "action-level": "vnf",
- "action-identifier": {
- "vnf-id": "dbgx0001v"
- },
- "payload": "ABC"
- },
- "inventory-info": {
- "vnf-info": {
- "vnf-id" : "abc",
- "vnf-name": "vSCP",
- "vnf-type": "vSCP",
- "vnf-version" : "1.0",
- "identity-url" : "test_url",
- "vm": [
- {
- "vserver-id" : "be_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "fe_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "FE",
- "vnfc-name": "FE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "be_vserverid3",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid1",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
-
- },
- {
- "vserver-id" : "smp_vserverid2",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "SMP",
- "vnfc-name": "SMP - Name"
- }
- },
- {
- "vserver-id" : "be_vserverid4",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ "request-info": {
+ "action": "Start",
+ "action-level": "vnf",
+ "action-identifier": {
+ "vnf-id": "dbgx0001v"
+ },
+ "payload": "ABC"
+ },
+ "inventory-info": {
+ "vnf-info": {
+ "vnf-id" : "abc",
+ "vnf-name": "vSCP",
+ "vnf-type": "vSCP",
+ "vnf-version" : "1.0",
+ "identity-url" : "test_url",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid1",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "smp_vserverid2",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "SMP",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "SMP - Name"
+ }
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- },
- {
- "vserver-id" : "be_vserverid5",
- "vm-id" : "vm_id1",
- "vnfc":
- {
- "vnfc-type": "BE",
- "vnfc-name": "BE - Name"
- }
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vm-id" : "vm_id1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-function-code": "pld",
+ "vnfc-name": "BE - Name"
+ }
- }
- ]
- }
- },
- "dependency-info": {
- "vnfcs" : [
- {
- "vnfc-type" : "BE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "SMP"
- ]
- },
- {
- "vnfc-type" : "FE",
- "mandatory" : "true",
- "resilience": "Active-Active",
- "parents" : [
- "BE"
- ]
- },
- {
- "vnfc-type" : "SMP",
- "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"]
- }
+ }
+ ]
+ }
+ },
+ "dependency-info": {
+ "vnfcs" : [
+ {
+ "vnfc-type" : "BE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "SMP"
+ ]
+ },
+ {
+ "vnfc-type" : "FE",
+ "mandatory" : "true",
+ "resilience": "Active-Active",
+ "parents" : [
+ "BE"
+ ]
+ },
+ {
+ "vnfc-type" : "SMP",
+ "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" :["pld", "ssc", "dbo"]}, {"Start" :["pld", "ssc", "dbo"]}, {"Restart" :["pld", "ssc", "dbo"]}],
+ "vnfc": ["StopApplication", "StartApplication","HealthCheck"]
+ }
}
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json
index 8a23ec759..30a768783 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json
@@ -1 +1 @@
-[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - 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"},{"pre-transactionID":3,"param-name":"status","param-value":"success"},{"pre-transactionID":4,"param-name":"status","param-value":"success"},{"pre-transactionID":5,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":7,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - 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":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"FE - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"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":"FE - 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"}}]}] \ No newline at end of file
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - 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"},{"pre-transactionID":3,"param-name":"status","param-value":"success"},{"pre-transactionID":4,"param-name":"status","param-value":"success"},{"pre-transactionID":5,"param-name":"status","param-value":"success"}],"responses":[]},{"transactionId":7,"action":"HealthCheck","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - 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":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"FE - Name"},"payload":"ABC","precheck-operator":"any","precheck-options":[{"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":"FE - 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"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Output-stop.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Output-stop.json
index 17aea0d12..f00626790 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Output-stop.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Output-stop.json
@@ -1,3 +1,3 @@
-[{"transactionId":1,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"SMP - 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":"smp_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":"smp_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":"BE - 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":"be_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":"be_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":"be_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":"be_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":"be_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":"FE - 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":"fe_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":"fe_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
+[{"transactionId":1,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"SMP - Name"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - Name"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":10,"action":"StopApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"FE - Name"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":11,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":12,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":" {\"vnf-host-ip-address\": \"10.147.124.163\" }","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithVmRestartCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithVmRestartCaps.json
new file mode 100644
index 000000000..9acc7d868
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithVmRestartCaps.json
@@ -0,0 +1 @@
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"3"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"3"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"5"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"5"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"7"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"7"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"9"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"9"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithoutAnyCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithoutAnyCaps.json
new file mode 100644
index 000000000..9acc7d868
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/RestartWithoutAnyCaps.json
@@ -0,0 +1 @@
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"3"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"3"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"5"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"5"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"7"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"7"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"9"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"9"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Start2.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Start2.json
index e67f22f56..b70238903 100644
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Start2.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/Start2.json
@@ -1,2 +1,2 @@
-[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"SMP - 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":"SMP - 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":"be_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - 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":"BE - 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":"fe_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":13,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":14,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"FE - 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":"FE - 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":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"SMP - 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":"SMP - 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":"be_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":10,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"BE - 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":"BE - 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":"fe_vserverid1"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":13,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"ABC","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":14,"action":"StartApplication","action-level":"vnfc","action-identifier":{"vnfc-name":"FE - 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":"FE - 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/StartWithVmStartCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithVmStartCaps.json
new file mode 100644
index 000000000..179ebc98e
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithVmStartCaps.json
@@ -0,0 +1 @@
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithoutAnyCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithoutAnyCaps.json
new file mode 100644
index 000000000..179ebc98e
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StartWithoutAnyCaps.json
@@ -0,0 +1 @@
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithVmStopCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithVmStopCaps.json
new file mode 100644
index 000000000..dc3972280
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithVmStopCaps.json
@@ -0,0 +1 @@
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id2\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id3\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id4\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithoutAnyCaps.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithoutAnyCaps.json
new file mode 100644
index 000000000..dc3972280
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/StopWithoutAnyCaps.json
@@ -0,0 +1 @@
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id2\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id3\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id4\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test\",\"vm-id\":\"vm-id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-NoDep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-NoDep.json
index 34c464d63..9acc7d868 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-NoDep.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-NoDep.json
@@ -1 +1 @@
-[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"jump":"3"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"jump":"3"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"jump":"5"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"jump":"5"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"jump":"7"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"jump":"7"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[]}]
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"3"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"3"}}]},{"transactionId":3,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"5"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"5"}}]},{"transactionId":5,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"7"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"7"}}]},{"transactionId":7,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"9"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"9"}}]}] \ No newline at end of file
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-Nodep-SingleVM.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-Nodep-SingleVM.json
index 043ab63b0..6319b5809 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-Nodep-SingleVM.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/restart-Nodep-SingleVM.json
@@ -1,2 +1 @@
[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[]}]
-
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-singleVmPerVnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-singleVmPerVnfc.json
index 6ee628050..55812f92b 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-singleVmPerVnfc.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-singleVmPerVnfc.json
@@ -1 +1 @@
-[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm-id\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm-id\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}]
diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-withoutDependency.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-withoutDependency.json
index 16d03d245..a4cba82d7 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-withoutDependency.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/start-withoutDependency.json
@@ -1 +1 @@
-[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
+[{"transactionId":1,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":3,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"fe_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":4,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":5,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid3"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":6,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":7,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid2"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":8,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid4"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":9,"action":"Start","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid5"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"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
index 15e7faa7e..641fa9491 100644
--- 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
@@ -1,3 +1,2 @@
-
[{"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-singleVmPerVnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-singleVmPerVnfc.json
index 94905af90..ad6ef1cd4 100755
--- a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-singleVmPerVnfc.json
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/stop-singleVmPerVnfc.json
@@ -1 +1 @@
-[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"ignore":"true"}}]}]
+[{"transactionId":1,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"be_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]},{"transactionId":2,"action":"Stop","action-level":"vm","action-identifier":{"vserver-id":"smp_vserverid1"},"payload":"{\"identity-url\":\"test_url\",\"vm-id\":\"vm_id1\"}","responses":[{"response-message":"failure","response-action":{"stop":"true"}}]}] \ No newline at end of file