From 403fcf8e19af9dd37ca4a8cc0faf222aeae4fa52 Mon Sep 17 00:00:00 2001 From: Logan V Date: Sat, 13 Aug 2016 11:38:33 -0500 Subject: [PATCH] Fix tempest neutron setup tasks 1) Allow the creation of network types outside the norm of vxlan/vlan. 2) tempest_public_physical_net_type was used in the resources setup tasks, while it was defined in defaults as tempest_public_net_physical_type. 3) Consolidate the public network setup task from "if flat" and "if vlan" into something that will accommodate other network types such as local. 4) Do not require a segmentation id on private network setup, enabling the use of types other than vxlan/vlan. Change-Id: I54de9862686f9c67266d4c7335f00c0553202c85 --- tasks/tempest_resources.yml | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index ed57cd7b..7912b82e 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -209,7 +209,7 @@ openrc_path: /root/openrc net_name: private provider_network_type: "{{ tempest_private_net_provider_type }}" - provider_segmentation_id: "{{ tempest_private_net_seg_id }}" + provider_segmentation_id: "{{ tempest_private_net_seg_id | default(omit) }}" tenant_id: "{{ keystone_demo_tenant_id }}" insecure: "{{ keystone_service_internaluri_insecure }}" when: tempest_service_available_neutron | bool @@ -225,36 +225,19 @@ - tempest-setup - tempest-config -- name: Ensure public network exists (if flat) +- name: Ensure public network exists neutron: command: create_network openrc_path: /root/openrc net_name: public provider_network_type: "{{ tempest_public_net_provider_type }}" - provider_physical_network: "{{ tempest_public_net_physical_type }}" - router_external: "{{ tempest_public_router_external }}" - insecure: "{{ keystone_service_internaluri_insecure }}" - when: - - tempest_service_available_neutron | bool - - tempest_public_net_provider_type == "flat" - tags: - - tempest-setup - - tempest-config - -- name: Ensure public network exists (if vlan) - neutron: - command: create_network - openrc_path: /root/openrc - net_name: public - provider_network_type: "{{ tempest_public_net_provider_type }}" - provider_physical_network: "{{ tempest_public_physical_net_type }}" - provider_segmentation_id: "{{ tempest_public_net_seg_id }}" + provider_physical_network: "{{ tempest_public_net_physical_type | default(omit) }}" + provider_segmentation_id: "{{ tempest_public_net_seg_id | default(omit) }}" router_external: "{{ tempest_public_router_external }}" tenant_id: "{{ keystone_demo_tenant_id }}" insecure: "{{ keystone_service_internaluri_insecure }}" when: - tempest_service_available_neutron | bool - - tempest_public_net_provider_type == "vlan" tags: - tempest-setup - tempest-config