From 13b9505921e2cbbd4b155a78bfdaa5caa3375ec0 Mon Sep 17 00:00:00 2001 From: Ramya Balaji Date: Tue, 2 Jan 2018 21:58:59 -0500 Subject: Updated SDC listener and dependent bundles Changes related to SDC adapter.Also includes sequence generator changes and changes to appc-dg-shared. Issue-ID: APPC-355 Change-Id: Ib8a0b1d304199db6d2595291539b266885842d63 Signed-off-by: Ramya Balaji --- .../test/resources/input/CheckMandatoryVnfc.json | 124 ++++++++ .../resources/input/MissingDependencyInfo.json | 133 +++++++++ .../src/test/resources/input/NoDep-SingleVM.json | 38 +++ .../test/resources/input/WrongDependencyModel.json | 117 ++++++++ .../src/test/resources/input/cyclic.json | 155 ++++------ .../test/resources/input/missingrequestinfo.json | 147 +++------- .../src/test/resources/input/no-strategy.json | 150 +++------- .../src/test/resources/input/restartNodep.json | 97 +++++++ .../src/test/resources/input/start-singleVM-.json | 42 +++ .../resources/input/start-singleVmPerVnfc-.json | 51 ++++ .../resources/input/start-withoutDependency.json | 114 ++++++++ .../src/test/resources/input/start.json | 310 ++++++++------------ .../src/test/resources/input/stop-WithoutDep.json | 142 +++++++++ .../src/test/resources/input/stop-singleVM.json | 42 +++ .../test/resources/input/stop-singleVmPerVnfc.json | 50 ++++ .../src/test/resources/input/stop.json | 153 ++++------ .../src/test/resources/input/wrongaction.json | 321 +++++++++------------ .../src/test/resources/input/wrongnumber.json | 321 +++++++++------------ 18 files changed, 1537 insertions(+), 970 deletions(-) create mode 100644 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json create mode 100644 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json create mode 100755 appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json (limited to 'appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input') 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 new file mode 100644 index 000000000..8af3e7332 --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/CheckMandatoryVnfc.json @@ -0,0 +1,124 @@ +{ + "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" : "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/MissingDependencyInfo.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json new file mode 100644 index 000000000..667565d0a --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/MissingDependencyInfo.json @@ -0,0 +1,133 @@ +{ + "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" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + }, + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - 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" : [ + + ] + }, + { + "vnfc-type" : "FE", + "mandatory" : "true", + "resilience": "Active-Active", + "parents" : [ + "BE" + ] + } + + ] + }, + "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"] + } +} \ No newline at end of file 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 new file mode 100755 index 000000000..e1475ef6c --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/NoDep-SingleVM.json @@ -0,0 +1,38 @@ + + + +{ + "request-info": { + "action": "Restart", + "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", + "vm": [ + { + "vserver-id" : "be_vserverid1" + } + ] + } + }, + "dependency-info" : { + + }, + "tunable-parameters" : { + + }, + "capabilities" : { + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json new file mode 100755 index 000000000..984128f9d --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/WrongDependencyModel.json @@ -0,0 +1,117 @@ +{ + "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" + ] + } + + ] + }, + "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/cyclic.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/cyclic.json index 522b99692..312c0f542 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,197 +1,140 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "request-info": - { + "request-info": { "action": "Start", "action-level": "vnf", - "action-identifier": - { + "action-identifier": { "vnf-id": "dbgx0001v" }, "payload": "ABC" }, - "inventory-info": - { - "vnf-info": - { + "inventory-info": { + "vnf-info": { "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", + "vnf-name": "vSCP", + "vnf-type": "vSCP", "vnf-version" : "1.0", "vm": [ { - "vserver-id" : "vnfc2_vserverid1", + "vserver-id" : "be_vserverid1", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc3_vserverid1", + "vserver-id" : "fe_vserverid1", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc3_vserverid2", + "vserver-id" : "fe_vserverid2", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc2_vserverid2", + "vserver-id" : "be_vserverid2", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid3", + "vserver-id" : "be_vserverid3", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc1_vserverid1", + "vserver-id" : "smp_vserverid1", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc1_vserverid2", + "vserver-id" : "smp_vserverid2", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc2_vserverid4", + "vserver-id" : "be_vserverid4", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid5", + "vserver-id" : "be_vserverid5", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } } ] } }, - "dependency-info" : - { - "vnfcs" : - [ + "dependency-info" : { + "vnfcs" : [ { - "vnfc-type" : "VNFC2", + "vnfc-type" : "BE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC1" + "parents" : [ + "SMP" ] }, { - "vnfc-type" : "VNFC3", + "vnfc-type" : "FE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC2" + "parents" : [ + "BE" ] }, { - "vnfc-type" : "VNFC1", + "vnfc-type" : "SMP", "mandatory" : "true", "resilience": "Active-Passive", - "parents" : - [ - "VNFC3" - ] + "parents" : ["FE"] } ] }, - "tunable-parameters" : - { + "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" - ] + "capabilities" : { + "vnf": ["Stop", "Start", "StartApplication","StopApplication"], + "vf-module": ["Stop", "Start"], + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] } } diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/missingrequestinfo.json index c5bc7ead2..80c9ff501 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,185 +1,132 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "inventory-info": - { - "vnf-info": - { + "inventory-info": { + "vnf-info": { "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", + "vnf-name": "vSCP", + "vnf-type": "vSCP", "vnf-version" : "1.0", - "vm": - [ + "vm": [ { - "vserver-id" : "vnfc2_vserverid1", + "vserver-id" : "be_vserverid1", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc3_vserverid1", + "vserver-id" : "fe_vserverid1", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc3_vserverid2", + "vserver-id" : "fe_vserverid2", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc2_vserverid2", + "vserver-id" : "be_vserverid2", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid3", + "vserver-id" : "be_vserverid3", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc1_vserverid1", + "vserver-id" : "smp_vserverid1", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc1_vserverid2", + "vserver-id" : "smp_vserverid2", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc2_vserverid4", + "vserver-id" : "be_vserverid4", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid5", + "vserver-id" : "be_vserverid5", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } } ] } }, - "dependency-info": - { - "vnfcs" : - [ + "dependency-info": { + "vnfcs" : [ { - "vnfc-type" : "VNFC2", + "vnfc-type" : "BE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC1" + "parents" : [ + "SMP" ] }, { - "vnfc-type" : "VNFC3", + "vnfc-type" : "FE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC2" + "parents" : [ + "BE" ] }, { - "vnfc-type" : "VNFC1", + "vnfc-type" : "SMP", "mandatory" : "true", "resilience": "Active-Passive", "parents" : [] } ] }, - "tunable-parameters": - { + "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" - ] + "capabilities" : { + "vnf": ["Stop", "Start", "StartApplication","StopApplication"], + "vf-module": ["Stop", "Start"], + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] } } diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/no-strategy.json index 1371d2273..1b5ee9477 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,194 +1,140 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "request-info": - { + "request-info": { "action": "Start", "action-level": "vnf", - "action-identifier": - { + "action-identifier": { "vnf-id": "dbgx0001v" }, "payload": "ABC" }, - "inventory-info": - { - "vnf-info": - { + "inventory-info": { + "vnf-info": { "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", + "vnf-name": "vSCP", + "vnf-type": "vSCP", "vnf-version" : "1.0", "vm": [ { - "vserver-id" : "vnfc2_vserverid1", + "vserver-id" : "be_vserverid1", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc3_vserverid1", + "vserver-id" : "fe_vserverid1", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc3_vserverid2", + "vserver-id" : "fe_vserverid2", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc2_vserverid2", + "vserver-id" : "be_vserverid2", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid3", + "vserver-id" : "be_vserverid3", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc1_vserverid1", + "vserver-id" : "smp_vserverid1", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc1_vserverid2", + "vserver-id" : "smp_vserverid2", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc2_vserverid4", + "vserver-id" : "be_vserverid4", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid5", + "vserver-id" : "be_vserverid5", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } } ] } }, - "dependency-info": - { - "vnfcs" : - [ + "dependency-info": { + "vnfcs" : [ { - "vnfc-type" : "VNFC2", + "vnfc-type" : "BE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC1" + "parents" : [ + "SMP" ] }, { - "vnfc-type" : "VNFC3", + "vnfc-type" : "FE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC2" + "parents" : [ + "BE" ] }, { - "vnfc-type" : "VNFC1", + "vnfc-type" : "SMP", "mandatory" : "true", "resilience": "Active-Passive", "parents" : [] } ] }, - "tunable-parameters": - { + "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" - ] + "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/restartNodep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json new file mode 100755 index 000000000..5b44097ff --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/restartNodep.json @@ -0,0 +1,97 @@ + + +{ + "request-info": { + "action": "Restart", + "action-level": "vm", + "action-identifier": { + "vnf-id": "dbgx0001v" + }, + "payload": " {\"vnf-host-ip-address\": \"10.147.124.163\" }" + + }, + "inventory-info": { + "vnf-info": { + "vnf-id" : "abc", + "vnf-name": "vSCP", + "vnf-type": "vSCP", + "vnf-version" : "1.0", + "vm": [ + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + }, + { + "vserver-id" : "be_vserverid2", + "vnfc": + { + "vnfc-type": "FE", + "vnfc-name": "FE - Name" + } + + }, + { + "vserver-id" : "fe_vserverid2", + "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" : "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", "Start"], + "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 new file mode 100755 index 000000000..acc6b9c02 --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVM-.json @@ -0,0 +1,42 @@ + + +{ + "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", + "vm": [ + { + "vserver-id" : "be_vserverid1", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } + } + ] + } + }, + "dependency-info": { + + }, + "tunable-parameters": { + + }, + "capabilities" : { + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json new file mode 100755 index 000000000..4ec59c245 --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-singleVmPerVnfc-.json @@ -0,0 +1,51 @@ + + +{ + "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", + "vm": [ + { + "vserver-id" : "be_vserverid1", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } + }, + { + "vserver-id" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + } + ] + } + }, + "dependency-info": { + + }, + "tunable-parameters": { + + }, + "capabilities" : { + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json new file mode 100755 index 000000000..b1a58e3a1 --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start-withoutDependency.json @@ -0,0 +1,114 @@ + + +{ + "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", + "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" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + }, + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - 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": { + + }, + "tunable-parameters": { + + }, + "capabilities" : { + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/start.json index 143b41d23..5dc584d4d 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,196 +1,142 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "request-info": - { - "action": "Start", - "action-level": "vnf", - "action-identifier": - { - "vnf-id": "dbgx0001v" - }, - "payload": "ABC" - }, - "inventory-info": - { - "vnf-info": - { - "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", - "vnf-version" : "1.0", - "vm": - [ - { - "vserver-id" : "vnfc2_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + "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" : "vnfc3_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" - } + }, + { + "vserver-id" : "fe_vserverid1", + "vnfc": + { + "vnfc-type": "FE", + "vnfc-name": "FE - Name" + } - }, - { - "vserver-id" : "vnfc3_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" - } + }, + { + "vserver-id" : "fe_vserverid2", + "vnfc": + { + "vnfc-type": "FE", + "vnfc-name": "FE - Name" + } - }, - { - "vserver-id" : "vnfc2_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + }, + { + "vserver-id" : "be_vserverid2", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - }, - { - "vserver-id" : "vnfc2_vserverid3", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + }, + { + "vserver-id" : "be_vserverid3", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - }, - { - "vserver-id" : "vnfc1_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" - } + }, + { + "vserver-id" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } - }, - { - "vserver-id" : "vnfc1_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" - } - }, - { - "vserver-id" : "vnfc2_vserverid4", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + }, + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + }, + { + "vserver-id" : "be_vserverid4", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - }, - { - "vserver-id" : "vnfc2_vserverid5", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + }, + { + "vserver-id" : "be_vserverid5", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - } - ] - } - }, - "dependency-info" : - { - "vnfcs" : - [ - { - "vnfc-type" : "VNFC2", - "mandatory" : "true", - "resilience": "Active-Active", - "parents" : - [ - "VNFC1" - ] - }, - { - "vnfc-type" : "VNFC3", - "mandatory" : "true", - "resilience": "Active-Active", - "parents" : - [ - "VNFC2" - ] - }, - { - "vnfc-type" : "VNFC1", - "mandatory" : "true", - "resilience": "Active-Passive", - "parents" : [] - } - ] - }, - "tunable-parameters" : - { - "strategy" : "FORWARD", - "wait-time" : "120", - "retry-count" : "5" - }, - "capabilities" : - { - "vnf": - [ - "Stop", - "Start", - "StartApplication", - "StopApplication" - ], - "vf-module": - [ - "Stop", - "Start" - ], - "vm" : - [ - "Stop", - "Start" - ], - "vnfc": - [ - "StopApplication", - "StartApplication", - "HealthCheck" - ] - } + } + ] + } + }, + "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/stop-WithoutDep.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json new file mode 100755 index 000000000..137a67c19 --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-WithoutDep.json @@ -0,0 +1,142 @@ + + +{ + "request-info": { + "action": "Stop", + "action-level": "vm", + "action-identifier": { + "vnf-id": "dbgx0001v" + }, + "payload": " {\"vnf-host-ip-address\": \"10.147.124.163\" }" + + }, + "inventory-info": { + "vnf-info": { + "vnf-id" : "abc", + "vnf-name": "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" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + }, + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - 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" : "true", + "resilience": "Active-Passive", + "parents" : [] + } + ] + }, + "tunable-parameters": { + "strategy" : "FORWARD", + "wait-time": "120", + "retry-count": "5" + }, + "capabilities" : { + "vnf": ["Stop", "Start", "StartApplication","StopApplication"], + "vf-module": ["Stop", "Start"], + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json new file mode 100755 index 000000000..30b936585 --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVM.json @@ -0,0 +1,42 @@ + + +{ + "request-info": { + "action": "Stop", + "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", + "vm": [ + { + "vserver-id" : "be_vserverid1", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } + } + ] + } + }, + "dependency-info": { + + }, + "tunable-parameters": { + + }, + "capabilities" : { + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json new file mode 100755 index 000000000..61d9630ab --- /dev/null +++ b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop-singleVmPerVnfc.json @@ -0,0 +1,50 @@ + + +{ + "request-info": { + "action": "Stop", + "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", + "vm": [ + { + "vserver-id" : "be_vserverid1", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } + }, + { + "vserver-id" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + } + ] + }}, + "dependency-info": { + + }, + "tunable-parameters": { + + }, + "capabilities" : { + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] + } +} + + diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/stop.json index 9131a652b..0b7a1a7c1 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 @@ -1,196 +1,141 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "request-info": - { + "request-info": { "action": "Stop", "action-level": "vnf", - "action-identifier": - { + "action-identifier": { "vnf-id": "dbgx0001v" }, "payload": " {\"vnf-host-ip-address\": \"10.147.124.163\" }" }, - "inventory-info": - { - "vnf-info": - { + "inventory-info": { + "vnf-info": { "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", + "vnf-name": "vSCP", + "vnf-type": "vSCP", "vnf-version" : "1.0", - "vm": - [ + "vm": [ { - "vserver-id" : "vnfc2_vserverid1", + "vserver-id" : "be_vserverid1", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc3_vserverid1", + "vserver-id" : "fe_vserverid1", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc3_vserverid2", + "vserver-id" : "fe_vserverid2", "vnfc": { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" + "vnfc-type": "FE", + "vnfc-name": "FE - Name" } }, { - "vserver-id" : "vnfc2_vserverid2", + "vserver-id" : "be_vserverid2", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid3", + "vserver-id" : "be_vserverid3", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc1_vserverid1", + "vserver-id" : "smp_vserverid1", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc1_vserverid2", + "vserver-id" : "smp_vserverid2", "vnfc": { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" } }, { - "vserver-id" : "vnfc2_vserverid4", + "vserver-id" : "be_vserverid4", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } }, { - "vserver-id" : "vnfc2_vserverid5", + "vserver-id" : "be_vserverid5", "vnfc": { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" + "vnfc-type": "BE", + "vnfc-name": "BE - Name" } } ] } }, - "dependency-info": - { - "vnfcs" : - [ + "dependency-info": { + "vnfcs" : [ { - "vnfc-type" : "VNFC2", + "vnfc-type" : "BE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC1" + "parents" : [ + "SMP" ] }, { - "vnfc-type" : "VNFC3", + "vnfc-type" : "FE", "mandatory" : "true", "resilience": "Active-Active", - "parents" : - [ - "VNFC2" + "parents" : [ + "BE" ] }, { - "vnfc-type" : "VNFC1", + "vnfc-type" : "SMP", "mandatory" : "true", "resilience": "Active-Passive", "parents" : [] } ] }, - "tunable-parameters": - { + "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" - ] + "capabilities" : { + "vnf": ["Stop", "Start", "StartApplication","StopApplication"], + "vf-module": ["Stop", "Start"], + "vm" : ["Stop", "Start"], + "vnfc": ["StopApplication", "StartApplication","HealthCheck"] } } diff --git a/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json b/appc-sequence-generator/appc-sequence-generator-bundle/src/test/resources/input/wrongaction.json index 72f6ed87f..cd6eaa779 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,196 +1,141 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "request-info": - { - "action": "start", - "action-level": "vnf", - "action-identifier": - { - "vnf-id": "dbgx0001v" - }, - "payload": "ABC" - }, - "inventory-info": - { - "vnf-info": - { - "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", - "vnf-version" : "1.0", - "vm": - [ - { - "vserver-id" : "vnfc2_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } - - }, - { - "vserver-id" : "vnfc3_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" - } - - }, - { - "vserver-id" : "vnfc3_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" - } - - }, - { - "vserver-id" : "vnfc2_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } - - }, - { - "vserver-id" : "vnfc2_vserverid3", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } - - }, - { - "vserver-id" : "vnfc1_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" - } - - }, - { - "vserver-id" : "vnfc1_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" - } - }, - { - "vserver-id" : "vnfc2_vserverid4", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + "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" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + }, + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + }, + { + "vserver-id" : "be_vserverid4", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - }, - { - "vserver-id" : "vnfc2_vserverid5", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + }, + { + "vserver-id" : "be_vserverid5", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - } - ] - } - }, - "dependency-info": - { - "vnfcs" : - [ - { - "vnfc-type" : "VNFC2", - "mandatory" : "true", - "resilience": "Active-Active", - "parents" : - [ - "VNFC1" - ] - }, - { - "vnfc-type" : "VNFC3", - "mandatory" : "true", - "resilience": "Active-Active", - "parents" : - [ - "VNFC2" - ] - }, - { - "vnfc-type" : "VNFC1", - "mandatory" : "true", - "resilience": "Active-Passive", - "parents" : [] - } - ] - }, - "tunable-parameters": - { - "strategy" : "FORWARD", - "wait-time": "120", - "retry-count": "5" - }, - "capabilities" : - { - "vnf": - [ - "Stop", - "Start", - "StartApplication", - "StopApplication" - ], - "vf-module": - [ - "Stop", - "Start" - ], - "vm" : - [ - "Stop", - "Start" - ], - "vnfc": - [ - "StopApplication", - "StartApplication", - "HealthCheck" - ] - } + } + ] + } + }, + "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 958df0379..ffdaec28a 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,196 +1,141 @@ -/*- - * ============LICENSE_START======================================================= - * ONAP : APPC - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Copyright (C) 2017 Amdocs - * ============================================================================= - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * ECOMP is a trademark and service mark of AT&T Intellectual Property. - * ============LICENSE_END========================================================= - */ - - { - "request-info": - { - "action": "Start", - "action-level": "vnf", - "action-identifier": - { - "vnf-id": "dbgx0001v" - }, - "payload": "ABC" - }, - "inventory-info": - { - "vnf-info": - { - "vnf-id" : "abc", - "vnf-name": "vVNF", - "vnf-type": "vVNF", - "vnf-version" : "1.0", - "vm": - [ - { - "vserver-id" : "vnfc2_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } - - }, - { - "vserver-id" : "vnfc3_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" - } - - }, - { - "vserver-id" : "vnfc3_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC3", - "vnfc-name": "VNFC3 - Name" - } - - }, - { - "vserver-id" : "vnfc2_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } - - }, - { - "vserver-id" : "vnfc2_vserverid3", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } - - }, - { - "vserver-id" : "vnfc1_vserverid1", - "vnfc": - { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" - } - - }, - { - "vserver-id" : "vnfc1_vserverid2", - "vnfc": - { - "vnfc-type": "VNFC1", - "vnfc-name": "VNFC1 - Name" - } - }, - { - "vserver-id" : "vnfc2_vserverid4", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + "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" : "smp_vserverid1", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + + }, + { + "vserver-id" : "smp_vserverid2", + "vnfc": + { + "vnfc-type": "SMP", + "vnfc-name": "SMP - Name" + } + }, + { + "vserver-id" : "be_vserverid4", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - }, - { - "vserver-id" : "vnfc2_vserverid5", - "vnfc": - { - "vnfc-type": "VNFC2", - "vnfc-name": "VNFC2 - Name" - } + }, + { + "vserver-id" : "be_vserverid5", + "vnfc": + { + "vnfc-type": "BE", + "vnfc-name": "BE - Name" + } - } - ] - } - }, - "dependency-info": - { - "vnfcs" : - [ - { - "vnfc-type" : "VNFC2", - "mandatory" : "true", - "resilience": "Active-Active", - "parents" : - [ - "VNFC1" - ] - }, - { - "vnfc-type" : "VNFC3", - "mandatory" : "true", - "resilience": "Active-Active", - "parents" : - [ - "VNFC2" - ] - }, - { - "vnfc-type" : "VNFC1", - "mandatory" : "true", - "resilience": "Active-Passive", - "parents" : [] - } - ] - }, - "tunable-parameters": - { - "strategy" : "FORWARD", - "wait-time": "6a", - "retry-count": "5" - }, - "capabilities" : - { - "vnf": - [ - "Stop", - "Start", - "StartApplication", - "StopApplication" - ], - "vf-module": - [ - "Stop", - "Start" - ], - "vm" : - [ - "Stop", - "Start" - ], - "vnfc": - [ - "StopApplication", - "StartApplication", - "HealthCheck" - ] - } + } + ] + } + }, + "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"] + } } -- cgit 1.2.3-korg