From 98f71874a230bf60dc78433ff6833b74e4f7b21c Mon Sep 17 00:00:00 2001 From: George Paraskevopoulos Date: Wed, 7 Dec 2016 14:12:16 +0200 Subject: Move vnfd yaml files into separate directory Create vnfd-templates directory where all TOSCA VNFD files will be stored. Change-Id: I3286da41800f9a42e5a3ffce51ee6cc6809b734e Signed-off-by: George Paraskevopoulos --- tests/functest/odl-sfc/config.yaml | 1 + tests/functest/odl-sfc/sfc-test2.py | 4 +-- tests/functest/odl-sfc/sfc.py | 2 ++ tests/functest/odl-sfc/sfc_tacker_test2.bash | 4 +-- tests/functest/odl-sfc/test-vnfd1.yaml | 31 ---------------------- tests/functest/odl-sfc/test-vnfd2.yaml | 31 ---------------------- tests/functest/odl-sfc/test2-vnfd1.yaml | 31 ---------------------- tests/functest/odl-sfc/test2-vnfd2.yaml | 31 ---------------------- .../odl-sfc/vnfd-templates/test-vnfd1.yaml | 31 ++++++++++++++++++++++ .../odl-sfc/vnfd-templates/test-vnfd2.yaml | 31 ++++++++++++++++++++++ .../odl-sfc/vnfd-templates/test2-vnfd1.yaml | 31 ++++++++++++++++++++++ .../odl-sfc/vnfd-templates/test2-vnfd2.yaml | 31 ++++++++++++++++++++++ 12 files changed, 131 insertions(+), 128 deletions(-) delete mode 100644 tests/functest/odl-sfc/test-vnfd1.yaml delete mode 100644 tests/functest/odl-sfc/test-vnfd2.yaml delete mode 100644 tests/functest/odl-sfc/test2-vnfd1.yaml delete mode 100644 tests/functest/odl-sfc/test2-vnfd2.yaml create mode 100644 tests/functest/odl-sfc/vnfd-templates/test-vnfd1.yaml create mode 100644 tests/functest/odl-sfc/vnfd-templates/test-vnfd2.yaml create mode 100644 tests/functest/odl-sfc/vnfd-templates/test2-vnfd1.yaml create mode 100644 tests/functest/odl-sfc/vnfd-templates/test2-vnfd2.yaml diff --git a/tests/functest/odl-sfc/config.yaml b/tests/functest/odl-sfc/config.yaml index e99ea102..05f087f0 100644 --- a/tests/functest/odl-sfc/config.yaml +++ b/tests/functest/odl-sfc/config.yaml @@ -7,6 +7,7 @@ defaults: fuel_master_passwd: r00tme image_format: qcow2 url: "http://artifacts.opnfv.org/sfc/demo" + vnfd-dir: "vnfd-templates" testcases: # this change requires sfc.py to be renamed as sfc_two_chains_SSH_and_HTTP diff --git a/tests/functest/odl-sfc/sfc-test2.py b/tests/functest/odl-sfc/sfc-test2.py index 2c64a3d6..5e97e698 100755 --- a/tests/functest/odl-sfc/sfc-test2.py +++ b/tests/functest/odl-sfc/sfc-test2.py @@ -45,8 +45,8 @@ SECGROUP_NAME = "example-sg" SECGROUP_DESCR = "Example Security group" SFC_TEST_DIR = os.path.join(REPO_PATH, "tests/functest/odl-sfc/") TACKER_SCRIPT = os.path.join(SFC_TEST_DIR, "sfc_tacker_test2.bash") -TACKER_VNFD1 = os.path.join(SFC_TEST_DIR, "test2-vnfd1.yaml") -TACKER_VNFD2 = os.path.join(SFC_TEST_DIR, "test2-vnfd2.yaml") +TACKER_VNFD1 = os.path.join(SFC_TEST_DIR, "vnfd-templates", "test2-vnfd1.yaml") +TACKER_VNFD2 = os.path.join(SFC_TEST_DIR, "vnfd-templates", "test2-vnfd2.yaml") ssh_options = '-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no' json_results = {"tests": 4, "failures": 0} diff --git a/tests/functest/odl-sfc/sfc.py b/tests/functest/odl-sfc/sfc.py index 5c7a8522..0cc2d14a 100755 --- a/tests/functest/odl-sfc/sfc.py +++ b/tests/functest/odl-sfc/sfc.py @@ -103,12 +103,14 @@ def main(): srv_prv_ip = srv_instance.networks.get(TESTCASE_CONFIG.net_name)[0] tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir, + COMMON_CONFIG.vnfd_dir, TESTCASE_CONFIG.test_vnfd_red) os_tacker.create_vnfd( tacker_client, tosca_file=tosca_file) tosca_file = os.path.join(COMMON_CONFIG.sfc_test_dir, + COMMON_CONFIG.vnfd_dir, TESTCASE_CONFIG.test_vnfd_blue) os_tacker.create_vnfd( tacker_client, diff --git a/tests/functest/odl-sfc/sfc_tacker_test2.bash b/tests/functest/odl-sfc/sfc_tacker_test2.bash index 04e6506e..156b19cb 100755 --- a/tests/functest/odl-sfc/sfc_tacker_test2.bash +++ b/tests/functest/odl-sfc/sfc_tacker_test2.bash @@ -2,8 +2,8 @@ BASEDIR=`dirname $0` #import VNF descriptor -tacker vnfd-create --vnfd-file ${BASEDIR}/test2-vnfd1.yaml -tacker vnfd-create --vnfd-file ${BASEDIR}/test2-vnfd2.yaml +tacker vnfd-create --vnfd-file ${BASEDIR}/vnfd-templates/test2-vnfd1.yaml +tacker vnfd-create --vnfd-file ${BASEDIR}/vnfd-templates/test2-vnfd2.yaml #create instances of the imported VNF tacker vnf-create --name testVNF1 --vnfd-name test-vnfd1 diff --git a/tests/functest/odl-sfc/test-vnfd1.yaml b/tests/functest/odl-sfc/test-vnfd1.yaml deleted file mode 100644 index 5c672e38..00000000 --- a/tests/functest/odl-sfc/test-vnfd1.yaml +++ /dev/null @@ -1,31 +0,0 @@ -template_name: test-vnfd1 -description: firewall1-example - -service_properties: - Id: firewall1-vnfd - vendor: tacker - version: 1 - type: - - firewall1 -vdus: - vdu1: - id: vdu1 - vm_image: sf_nsh_colorado - instance_type: custom - service_type: firewall1 - - network_interfaces: - management: - network: example-net - management: true - - placement_policy: - availability_zone: nova - - auto-scaling: noop - monitoring_policy: noop - failure_policy: respawn - - config: - param0: key0 - param1: key1 diff --git a/tests/functest/odl-sfc/test-vnfd2.yaml b/tests/functest/odl-sfc/test-vnfd2.yaml deleted file mode 100644 index 8a570ab9..00000000 --- a/tests/functest/odl-sfc/test-vnfd2.yaml +++ /dev/null @@ -1,31 +0,0 @@ -template_name: test-vnfd2 -description: firewall2-example - -service_properties: - Id: firewall2-vnfd - vendor: tacker - version: 1 - type: - - firewall2 -vdus: - vdu1: - id: vdu1 - vm_image: sf_nsh_colorado - instance_type: custom - service_type: firewall2 - - network_interfaces: - management: - network: example-net - management: true - - placement_policy: - availability_zone: nova - - auto-scaling: noop - monitoring_policy: noop - failure_policy: respawn - - config: - param0: key0 - param1: key1 diff --git a/tests/functest/odl-sfc/test2-vnfd1.yaml b/tests/functest/odl-sfc/test2-vnfd1.yaml deleted file mode 100644 index 5c672e38..00000000 --- a/tests/functest/odl-sfc/test2-vnfd1.yaml +++ /dev/null @@ -1,31 +0,0 @@ -template_name: test-vnfd1 -description: firewall1-example - -service_properties: - Id: firewall1-vnfd - vendor: tacker - version: 1 - type: - - firewall1 -vdus: - vdu1: - id: vdu1 - vm_image: sf_nsh_colorado - instance_type: custom - service_type: firewall1 - - network_interfaces: - management: - network: example-net - management: true - - placement_policy: - availability_zone: nova - - auto-scaling: noop - monitoring_policy: noop - failure_policy: respawn - - config: - param0: key0 - param1: key1 diff --git a/tests/functest/odl-sfc/test2-vnfd2.yaml b/tests/functest/odl-sfc/test2-vnfd2.yaml deleted file mode 100644 index 8a570ab9..00000000 --- a/tests/functest/odl-sfc/test2-vnfd2.yaml +++ /dev/null @@ -1,31 +0,0 @@ -template_name: test-vnfd2 -description: firewall2-example - -service_properties: - Id: firewall2-vnfd - vendor: tacker - version: 1 - type: - - firewall2 -vdus: - vdu1: - id: vdu1 - vm_image: sf_nsh_colorado - instance_type: custom - service_type: firewall2 - - network_interfaces: - management: - network: example-net - management: true - - placement_policy: - availability_zone: nova - - auto-scaling: noop - monitoring_policy: noop - failure_policy: respawn - - config: - param0: key0 - param1: key1 diff --git a/tests/functest/odl-sfc/vnfd-templates/test-vnfd1.yaml b/tests/functest/odl-sfc/vnfd-templates/test-vnfd1.yaml new file mode 100644 index 00000000..5c672e38 --- /dev/null +++ b/tests/functest/odl-sfc/vnfd-templates/test-vnfd1.yaml @@ -0,0 +1,31 @@ +template_name: test-vnfd1 +description: firewall1-example + +service_properties: + Id: firewall1-vnfd + vendor: tacker + version: 1 + type: + - firewall1 +vdus: + vdu1: + id: vdu1 + vm_image: sf_nsh_colorado + instance_type: custom + service_type: firewall1 + + network_interfaces: + management: + network: example-net + management: true + + placement_policy: + availability_zone: nova + + auto-scaling: noop + monitoring_policy: noop + failure_policy: respawn + + config: + param0: key0 + param1: key1 diff --git a/tests/functest/odl-sfc/vnfd-templates/test-vnfd2.yaml b/tests/functest/odl-sfc/vnfd-templates/test-vnfd2.yaml new file mode 100644 index 00000000..8a570ab9 --- /dev/null +++ b/tests/functest/odl-sfc/vnfd-templates/test-vnfd2.yaml @@ -0,0 +1,31 @@ +template_name: test-vnfd2 +description: firewall2-example + +service_properties: + Id: firewall2-vnfd + vendor: tacker + version: 1 + type: + - firewall2 +vdus: + vdu1: + id: vdu1 + vm_image: sf_nsh_colorado + instance_type: custom + service_type: firewall2 + + network_interfaces: + management: + network: example-net + management: true + + placement_policy: + availability_zone: nova + + auto-scaling: noop + monitoring_policy: noop + failure_policy: respawn + + config: + param0: key0 + param1: key1 diff --git a/tests/functest/odl-sfc/vnfd-templates/test2-vnfd1.yaml b/tests/functest/odl-sfc/vnfd-templates/test2-vnfd1.yaml new file mode 100644 index 00000000..5c672e38 --- /dev/null +++ b/tests/functest/odl-sfc/vnfd-templates/test2-vnfd1.yaml @@ -0,0 +1,31 @@ +template_name: test-vnfd1 +description: firewall1-example + +service_properties: + Id: firewall1-vnfd + vendor: tacker + version: 1 + type: + - firewall1 +vdus: + vdu1: + id: vdu1 + vm_image: sf_nsh_colorado + instance_type: custom + service_type: firewall1 + + network_interfaces: + management: + network: example-net + management: true + + placement_policy: + availability_zone: nova + + auto-scaling: noop + monitoring_policy: noop + failure_policy: respawn + + config: + param0: key0 + param1: key1 diff --git a/tests/functest/odl-sfc/vnfd-templates/test2-vnfd2.yaml b/tests/functest/odl-sfc/vnfd-templates/test2-vnfd2.yaml new file mode 100644 index 00000000..8a570ab9 --- /dev/null +++ b/tests/functest/odl-sfc/vnfd-templates/test2-vnfd2.yaml @@ -0,0 +1,31 @@ +template_name: test-vnfd2 +description: firewall2-example + +service_properties: + Id: firewall2-vnfd + vendor: tacker + version: 1 + type: + - firewall2 +vdus: + vdu1: + id: vdu1 + vm_image: sf_nsh_colorado + instance_type: custom + service_type: firewall2 + + network_interfaces: + management: + network: example-net + management: true + + placement_policy: + availability_zone: nova + + auto-scaling: noop + monitoring_policy: noop + failure_policy: respawn + + config: + param0: key0 + param1: key1 -- cgit 1.2.3-korg