From a459dee88ba00d6f8283232ce2159594ae23d22a Mon Sep 17 00:00:00 2001 From: Manuel Buil Date: Sat, 24 Mar 2018 17:07:21 +0100 Subject: Use different config files depending on version We can read the openstack version from the env variables and then use a different config. The reason we use this is because openstack API changed from Pike to Queens and Pike is the official version for OPNFV Fraser release Change-Id: I8a94e71224d2ba0aa75a6438f3d7b03929acbbef Signed-off-by: Manuel Buil --- sfc/tests/functest/config-pike.yaml | 84 ++++++++++++++++++++++ sfc/tests/functest/config.yaml | 4 +- .../test-deletion-vnffgd-pike.yaml | 38 ++++++++++ .../vnffgd-templates/test-deletion-vnffgd.yaml | 4 +- .../test-deletion-vnffgd.yaml-queens | 38 ---------- .../test-one-chain-vnffgd-pike.yaml | 40 +++++++++++ .../vnffgd-templates/test-one-chain-vnffgd.yaml | 4 +- .../test-one-chain-vnffgd.yaml-queens | 40 ----------- .../test-two-chains-vnffgd1-pike.yaml | 38 ++++++++++ .../vnffgd-templates/test-two-chains-vnffgd1.yaml | 19 +++-- .../test-two-chains-vnffgd1.yaml-queens | 45 ------------ .../test-two-chains-vnffgd2-pike.yaml | 39 ++++++++++ .../vnffgd-templates/test-two-chains-vnffgd2.yaml | 20 ++++-- .../test-two-chains-vnffgd2.yaml-queens | 45 ------------ 14 files changed, 271 insertions(+), 187 deletions(-) create mode 100644 sfc/tests/functest/config-pike.yaml create mode 100644 sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd-pike.yaml delete mode 100644 sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml-queens create mode 100644 sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd-pike.yaml delete mode 100644 sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml-queens create mode 100644 sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1-pike.yaml delete mode 100644 sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml-queens create mode 100644 sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2-pike.yaml delete mode 100644 sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml-queens (limited to 'sfc/tests') diff --git a/sfc/tests/functest/config-pike.yaml b/sfc/tests/functest/config-pike.yaml new file mode 100644 index 00000000..6b7b5a80 --- /dev/null +++ b/sfc/tests/functest/config-pike.yaml @@ -0,0 +1,84 @@ +--- +defaults: + # odl-sfc uses custom flavors as per below params + flavor: custom + ram_size_in_mb: 500 + disk_size_in_gb: 1 + vcpu_count: 1 + image_name: sfc_nsh_fraser + installer: + fuel: + user: root + password: r00tme + cluster: 1 # Change this to the id of the desired fuel env (1, 2, 3...) + apex: + user: stack + pkey_file: "/root/.ssh/id_rsa" + osa: + user: root + pkey_file: "/root/.ssh/id_rsa" + compass: + user: root + pkey_file: "/root/.ssh/id_rsa" + image_format: qcow2 + image_url: "http://artifacts.opnfv.org/sfc/images/sfc_nsh_fraser.qcow2" + vnfd-dir: "vnfd-templates" + vnfd-default-params-file: "test-vnfd-default-params.yaml" + + +testcases: + sfc_one_chain_two_service_functions: + enabled: true + order: 0 + description: "ODL-SFC Testing SFs when they are located on the same chain" + net_name: example-net + subnet_name: example-subnet + router_name: example-router + subnet_cidr: "11.0.0.0/24" + secgroup_name: "example-sg" + secgroup_descr: "Example Security group" + test_vnfd_red: "test-one-chain-vnfd1.yaml" + test_vnfd_blue: "test-one-chain-vnfd2.yaml" + test_vnffgd_red: "test-one-chain-vnffgd-pike.yaml" + + sfc_two_chains_SSH_and_HTTP: + enabled: false + order: 1 + description: "ODL-SFC tests with two chains and one SF per chain" + net_name: example-net + subnet_name: example-subnet + router_name: example-router + subnet_cidr: "11.0.0.0/24" + secgroup_name: "example-sg" + secgroup_descr: "Example Security group" + test_vnfd_red: "test-two-chains-vnfd1.yaml" + test_vnfd_blue: "test-two-chains-vnfd2.yaml" + test_vnffgd_red: "test-two-chains-vnffgd1-pike.yaml" + test_vnffgd_blue: "test-two-chains-vnffgd2-pike.yaml" + + sfc_symmetric_chain: + enabled: false + order: 2 + description: "Verify the behavior of a symmetric service chain" + net_name: example-net + subnet_name: example-subnet + router_name: example-router + subnet_cidr: "11.0.0.0/24" + secgroup_name: "example-sg" + secgroup_descr: "Example Security group" + test_vnfd: "test-symmetric-vnfd.yaml" + allowed_source_port: 22222 + blocked_source_port: 33333 + + sfc_chain_deletion: + enabled: false + order: 3 + description: "Verify if chains work correctly after deleting one" + net_name: example-net + subnet_name: example-subnet + router_name: example-router + subnet_cidr: "11.0.0.0/24" + secgroup_name: "example-sg" + secgroup_descr: "Example Security group" + test_vnfd_red: "test-one-chain-vnfd1.yaml" + test_vnffgd_red: "test-deletion-vnffgd-pike.yaml" diff --git a/sfc/tests/functest/config.yaml b/sfc/tests/functest/config.yaml index cad3cf72..3cd1883a 100644 --- a/sfc/tests/functest/config.yaml +++ b/sfc/tests/functest/config.yaml @@ -67,8 +67,8 @@ testcases: secgroup_name: "example-sg" secgroup_descr: "Example Security group" test_vnfd: "test-symmetric-vnfd.yaml" - test_vnffgd: "test-symmetric-vnffgd.yaml" - source_port: 22222 + allowed_source_port: 22222 + blocked_source_port: 33333 sfc_chain_deletion: enabled: false diff --git a/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd-pike.yaml b/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd-pike.yaml new file mode 100644 index 00000000..3f10e6b8 --- /dev/null +++ b/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd-pike.yaml @@ -0,0 +1,38 @@ +--- +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 +description: test-case2_HTTP Test + +topology_template: + description: topology-template-test2 + inputs: + net_src_port_id: + type: string + + node_templates: + Forwarding_path1: + type: tosca.nodes.nfv.FP.Tacker + description: creates path + properties: + id: 1 + policy: + type: ACL + criteria: + - network_src_port_id: {get_input: net_src_port_id} + - destination_port_range: 80-80 + - ip_proto: 6 + path: + - forwarder: test-vnfd1 + capability: CP1 + + groups: + VNFFG1: + type: tosca.groups.nfv.VNFFG + description: creates chain + properties: + vendor: tacker + version: 1.0 + number_of_endpoints: 1 + dependent_virtual_link: [VL1] + connection_point: [CP1] + constituent_vnfs: [test-vnfd1] + members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml b/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml index 3f10e6b8..28b78ead 100644 --- a/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml +++ b/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml @@ -18,8 +18,8 @@ topology_template: type: ACL criteria: - network_src_port_id: {get_input: net_src_port_id} - - destination_port_range: 80-80 - - ip_proto: 6 + destination_port_range: 80-80 + ip_proto: 6 path: - forwarder: test-vnfd1 capability: CP1 diff --git a/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml-queens b/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml-queens deleted file mode 100644 index 28b78ead..00000000 --- a/sfc/tests/functest/vnffgd-templates/test-deletion-vnffgd.yaml-queens +++ /dev/null @@ -1,38 +0,0 @@ ---- -tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 -description: test-case2_HTTP Test - -topology_template: - description: topology-template-test2 - inputs: - net_src_port_id: - type: string - - node_templates: - Forwarding_path1: - type: tosca.nodes.nfv.FP.Tacker - description: creates path - properties: - id: 1 - policy: - type: ACL - criteria: - - network_src_port_id: {get_input: net_src_port_id} - destination_port_range: 80-80 - ip_proto: 6 - path: - - forwarder: test-vnfd1 - capability: CP1 - - groups: - VNFFG1: - type: tosca.groups.nfv.VNFFG - description: creates chain - properties: - vendor: tacker - version: 1.0 - number_of_endpoints: 1 - dependent_virtual_link: [VL1] - connection_point: [CP1] - constituent_vnfs: [test-vnfd1] - members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd-pike.yaml b/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd-pike.yaml new file mode 100644 index 00000000..27c7d545 --- /dev/null +++ b/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd-pike.yaml @@ -0,0 +1,40 @@ +--- +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 +description: test-case1 + +topology_template: + description: topology-template-test1 + inputs: + net_src_port_id: + type: string + + node_templates: + Forwarding_path1: + type: tosca.nodes.nfv.FP.Tacker + description: creates path + properties: + id: 1 + policy: + type: ACL + criteria: + - network_src_port_id: {get_input: net_src_port_id} + - destination_port_range: 80-80 + - ip_proto: 6 + path: + - forwarder: test-vnfd1 + capability: CP1 + - forwarder: test-vnfd2 + capability: CP1 + + groups: + VNFFG1: + type: tosca.groups.nfv.VNFFG + description: creates chain + properties: + vendor: tacker + version: 1.0 + number_of_endpoints: 2 + dependent_virtual_link: [VL1, VL1] + connection_point: [CP1, CP1] + constituent_vnfs: [test-vnfd1, test-vnfd2] + members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml b/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml index 27c7d545..544d6e8e 100644 --- a/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml +++ b/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml @@ -18,8 +18,8 @@ topology_template: type: ACL criteria: - network_src_port_id: {get_input: net_src_port_id} - - destination_port_range: 80-80 - - ip_proto: 6 + destination_port_range: 80-80 + ip_proto: 6 path: - forwarder: test-vnfd1 capability: CP1 diff --git a/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml-queens b/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml-queens deleted file mode 100644 index 544d6e8e..00000000 --- a/sfc/tests/functest/vnffgd-templates/test-one-chain-vnffgd.yaml-queens +++ /dev/null @@ -1,40 +0,0 @@ ---- -tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 -description: test-case1 - -topology_template: - description: topology-template-test1 - inputs: - net_src_port_id: - type: string - - node_templates: - Forwarding_path1: - type: tosca.nodes.nfv.FP.Tacker - description: creates path - properties: - id: 1 - policy: - type: ACL - criteria: - - network_src_port_id: {get_input: net_src_port_id} - destination_port_range: 80-80 - ip_proto: 6 - path: - - forwarder: test-vnfd1 - capability: CP1 - - forwarder: test-vnfd2 - capability: CP1 - - groups: - VNFFG1: - type: tosca.groups.nfv.VNFFG - description: creates chain - properties: - vendor: tacker - version: 1.0 - number_of_endpoints: 2 - dependent_virtual_link: [VL1, VL1] - connection_point: [CP1, CP1] - constituent_vnfs: [test-vnfd1, test-vnfd2] - members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1-pike.yaml b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1-pike.yaml new file mode 100644 index 00000000..f0615e4e --- /dev/null +++ b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1-pike.yaml @@ -0,0 +1,38 @@ +--- +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 +description: test-case2_HTTP Test + +topology_template: + description: topology-template-test2 + inputs: + net_src_port_id: + type: string + + node_templates: + Forwarding_path1: + type: tosca.nodes.nfv.FP.Tacker + description: creates path + properties: + id: 1 + policy: + type: ACL + criteria: + - network_src_port_id: {get_input: net_src_port_id} + - destination_port_range: 22-80 + - ip_proto: 6 + path: + - forwarder: test-vnfd1 + capability: CP1 + + groups: + VNFFG1: + type: tosca.groups.nfv.VNFFG + description: creates chain + properties: + vendor: tacker + version: 1.0 + number_of_endpoints: 1 + dependent_virtual_link: [VL1] + connection_point: [CP1] + constituent_vnfs: [test-vnfd1] + members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml index f0615e4e..ceee363b 100644 --- a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml +++ b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml @@ -1,25 +1,32 @@ --- tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 -description: test-case2_HTTP Test +description: test-two-chains_HTTP Test topology_template: - description: topology-template-test2 + description: topology-template-test-two-chains inputs: net_src_port_id: type: string node_templates: Forwarding_path1: - type: tosca.nodes.nfv.FP.Tacker + type: tosca.nodes.nfv.FP.TackerV2 description: creates path properties: id: 1 policy: type: ACL criteria: - - network_src_port_id: {get_input: net_src_port_id} - - destination_port_range: 22-80 - - ip_proto: 6 + - name: get_ssh + classifier: + network_src_port_id: {get_input: net_src_port_id} + destination_port_range: 22-22 + ip_proto: 6 + - name: get_http + classifier: + network_src_port_id: {get_input: net_src_port_id} + destination_port_range: 80-80 + ip_proto: 6 path: - forwarder: test-vnfd1 capability: CP1 diff --git a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml-queens b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml-queens deleted file mode 100644 index 6123fb50..00000000 --- a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd1.yaml-queens +++ /dev/null @@ -1,45 +0,0 @@ ---- -tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 -description: test-two-chains_HTTP Test - -topology_template: - description: topology-template-test-two-chains - inputs: - net_src_port_id: - type: string - - node_templates: - Forwarding_path1: - type: tosca.nodes.nfv.FP.TackerV2 - description: creates path - properties: - id: 1 - policy: - type: ACL - criteria: - - name: get_ssh - classifier: - network_src_port_id: {get_input: net_src_port_id} - destination_port_range: 22-22 - ip_proto: 6 - - name: get_http - classifier: - network_src_port_id: {get_input: net_src_port_id} - destination_port_range: 80-80 - ip_proto: 6 - path: - - forwarder: test-vnfd1 - capability: CP1 - - groups: - VNFFG1: - type: tosca.groups.nfv.VNFFG - description: creates chain - properties: - vendor: tacker - version: 1.0 - number_of_endpoints: 1 - dependent_virtual_link: [VL1] - connection_point: [CP1] - constituent_vnfs: [test-vnfd1] - members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2-pike.yaml b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2-pike.yaml new file mode 100644 index 00000000..ec18c9d6 --- /dev/null +++ b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2-pike.yaml @@ -0,0 +1,39 @@ +--- +tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 +description: test-case2_SSH Test + +topology_template: + description: topology-template-test2 + inputs: + net_src_port_id: + type: string + + + node_templates: + Forwarding_path1: + type: tosca.nodes.nfv.FP.Tacker + description: creates path + properties: + id: 2 + policy: + type: ACL + criteria: + - network_src_port_id: {get_input: net_src_port_id} + - destination_port_range: 22-80 + - ip_proto: 6 + path: + - forwarder: test-vnfd2 + capability: CP1 + + groups: + VNFFG1: + type: tosca.groups.nfv.VNFFG + description: creates chain + properties: + vendor: tacker + version: 1.0 + number_of_endpoints: 1 + dependent_virtual_link: [VL1] + connection_point: [CP1] + constituent_vnfs: [test-vnfd2] + members: [Forwarding_path1] diff --git a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml index ec18c9d6..15739cc7 100644 --- a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml +++ b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml @@ -1,26 +1,32 @@ --- tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 -description: test-case2_SSH Test +description: test-two-chains_SSH Test topology_template: - description: topology-template-test2 + description: topology-template-test-two-chains inputs: net_src_port_id: type: string - node_templates: Forwarding_path1: - type: tosca.nodes.nfv.FP.Tacker + type: tosca.nodes.nfv.FP.TackerV2 description: creates path properties: id: 2 policy: type: ACL criteria: - - network_src_port_id: {get_input: net_src_port_id} - - destination_port_range: 22-80 - - ip_proto: 6 + - name: get_ssh + classifier: + network_src_port_id: {get_input: net_src_port_id} + destination_port_range: 22-22 + ip_proto: 6 + - name: get_http + classifier: + network_src_port_id: {get_input: net_src_port_id} + destination_port_range: 80-80 + ip_proto: 6 path: - forwarder: test-vnfd2 capability: CP1 diff --git a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml-queens b/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml-queens deleted file mode 100644 index 4d0763aa..00000000 --- a/sfc/tests/functest/vnffgd-templates/test-two-chains-vnffgd2.yaml-queens +++ /dev/null @@ -1,45 +0,0 @@ ---- -tosca_definitions_version: tosca_simple_profile_for_nfv_1_0_0 -description: test-two-chains_SSH Test - -topology_template: - description: topology-template-test-two-chains - inputs: - net_src_port_id: - type: string - - node_templates: - Forwarding_path1: - type: tosca.nodes.nfv.FP.TackerV2 - description: creates path - properties: - id: 2 - policy: - type: ACL - criteria: - - name: get_ssh - classifier: - network_src_port_id: {get_input: net_src_port_id} - destination_port_range: 22-22 - ip_proto: 6 - - name: get_http - classifier: - network_src_port_id: {get_input: net_src_port_id} - destination_port_range: 80-80 - ip_proto: 6 - path: - - forwarder: test-vnfd2 - capability: CP1 - - groups: - VNFFG1: - type: tosca.groups.nfv.VNFFG - description: creates chain - properties: - vendor: tacker - version: 1.0 - number_of_endpoints: 1 - dependent_virtual_link: [VL1] - connection_point: [CP1] - constituent_vnfs: [test-vnfd2] - members: [Forwarding_path1] -- cgit 1.2.3-korg