From f57ef996a28b0a34ca7427ba52876f33c47f7a4d Mon Sep 17 00:00:00 2001 From: Jacob Wagner Date: 2016年5月10日 15:30:41 -0500 Subject: [PATCH] Allow tempest network overrides for public and private net Added default variables to allow for individual overrides of the public and private networks that will be created. This required seperate blocks for different net types. Change-Id: I177a41fc8134cb916de38989c1a702028633fa06 Closes-bug: 1580292 --- defaults/main.yml | 16 ++++++++++ ...on-network-variables-ff6d2c7f8c7c3ccd.yaml | 10 ++++++ tasks/tempest_resources.yml | 32 ++++++++++++++++--- 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/neutron-network-variables-ff6d2c7f8c7c3ccd.yaml diff --git a/defaults/main.yml b/defaults/main.yml index 989a657f..7f04f592 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -36,10 +36,26 @@ tempest_plugins: [] tempest_venv_download_url: http://127.0.0.1/venvs/untagged/ubuntu/tempest.tgz tempest_fatal_deprecations: False +# Private network configuration +# Currently supports 2 types +# vlan - will need to make sure your seg id and subnet cidr are correct +# vxlan - default, can change subnet cidr and seg id + # This needs to coincide with tempest_network_tenant_network_cidr and # tempest_network_tenant_network_mask_bits below tempest_private_subnet_cidr: "192.168.74.0/28" +tempest_private_net_provider_type: "vxlan" +tempest_private_net_seg_id: 1 + +# Public network configuration +# Currently supports 2 types +# Flat - default +# Vlan - make sure you override seg id, cidr, provider and physical tempest_public_subnet_cidr: "10.1.13.0/24" +tempest_public_net_provider_type: "flat" +tempest_public_net_physical_type: "flat" +tempest_public_net_seg_id: "" +tempest_public_router_external: "true" # Example allocation range: #tempest_public_subnet_allocation_pools: "10.1.13.150-10.1.13.200" tempest_public_subnet_allocation_pools: "" diff --git a/releasenotes/notes/neutron-network-variables-ff6d2c7f8c7c3ccd.yaml b/releasenotes/notes/neutron-network-variables-ff6d2c7f8c7c3ccd.yaml new file mode 100644 index 00000000..ae87ed33 --- /dev/null +++ b/releasenotes/notes/neutron-network-variables-ff6d2c7f8c7c3ccd.yaml @@ -0,0 +1,10 @@ +--- +features: + - Deployers can now configure tempest public and private networks by setting + the following variables, 'tempest_private_net_provider_type' to either vxlan + or vlan and 'tempest_public_net_provider_type' to flat or vlan. Depending on + what the deployer sets these variables to, they may also need to update other + variables accordingly, this mainly involves 'tempest_public_net_physical_type' + and 'tempest_public_net_seg_id'. Please refer to + http://docs.openstack.org/mitaka/networking-guide/intro-basic-networking.html + for more neutron networking information. diff --git a/tasks/tempest_resources.yml b/tasks/tempest_resources.yml index bf5121ec..1560df1a 100644 --- a/tasks/tempest_resources.yml +++ b/tasks/tempest_resources.yml @@ -208,6 +208,8 @@ command: create_network openrc_path: /root/openrc net_name: private + provider_network_type: "{{ tempest_private_net_provider_type }}" + provider_segmentation_id: "{{ tempest_private_net_seg_id }}" tenant_id: "{{ keystone_demo_tenant_id }}" insecure: "{{ keystone_service_internaluri_insecure }}" when: tempest_service_available_neutron | bool @@ -223,16 +225,36 @@ - tempest-setup - tempest-config -- name: Ensure public network exists +- name: Ensure public network exists (if flat) neutron: command: create_network openrc_path: /root/openrc net_name: public - provider_network_type: flat - provider_physical_network: flat - router_external: true + 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 + 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 }}" + 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

AltStyle によって変換されたページ (->オリジナル) /