summaryrefslogtreecommitdiffstats
path: root/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources
diff options
context:
space:
mode:
authormojahidi <mojahidul.islam@amdocs.com>2017-09-12 18:53:34 +0530
committerPatrick Brady <pb071s@att.com>2017-09-13 07:17:03 +0000
commit17a1e0e30e3a35ed4ad2ef91960bb58799b208b3 (patch)
tree3bcdc2a640c4668fc0d3a2a744ae1be9f3db5a65 /appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources
parentf0852a8174e38cc0c203a21a59af98e6c3889d5f (diff)
validate mandatry vnfc vm info is absent in invent
when the vnfc SMP is mandatory in the dependency-info block but its corresponding vm details/info is not present in the inventory info validation error should be thrown Issue-ID:APPC-204 Change-Id: I606da8ce086423cf3f23c87ab0166bfb9935875b Signed-off-by: mojahidi <mojahidul.islam@amdocs.com>
Diffstat (limited to 'appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources')
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json130
-rw-r--r--appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json1
2 files changed, 131 insertions, 0 deletions
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
new file mode 100644
index 000000000..2630ee749
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckVNfcInInventory.json
@@ -0,0 +1,130 @@
+
+{
+ "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",
+ "vm": [
+ {
+ "vserver-id" : "be_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid1",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "fe_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "FE",
+ "vnfc-name": "FE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid2",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid3",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid4",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "vnfc-name": "BE - Name"
+ }
+
+ },
+ {
+ "vserver-id" : "be_vserverid5",
+ "vnfc":
+ {
+ "vnfc-type": "BE",
+ "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" :
+ {
+ "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/output/CheckVnfcInInventory.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json
new file mode 100644
index 000000000..8a23ec759
--- /dev/null
+++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/output/CheckVnfcInInventory.json
@@ -0,0 +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