Add variables for network names

This role contains a network named "public" and a subnet named
"public-subnet". This patch adds variables to make the two names
configurable.

Change-Id: I7958e84bf1e4bb10541fb07bc6beab08ac9eb634
Closes-bug: 1588818
This commit is contained in:
Mike Carden 2016-06-08 11:44:53 +10:00 committed by Kevin Carter
parent 403fcf8e19
commit b558fa4413
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
3 changed files with 19 additions and 7 deletions

View File

@ -57,6 +57,8 @@ tempest_fatal_deprecations: False
# This needs to coincide with tempest_network_tenant_network_cidr and
# tempest_network_tenant_network_mask_bits below
tempest_private_net_name: "private"
tempest_private_subnet_name: "private-subnet"
tempest_private_subnet_cidr: "192.168.74.0/28"
tempest_private_net_provider_type: "vxlan"
tempest_private_net_seg_id: 1
@ -65,6 +67,8 @@ tempest_private_net_seg_id: 1
# Currently supports 2 types
# Flat - default
# Vlan - make sure you override seg id, cidr, provider and physical
tempest_public_net_name: "public"
tempest_public_subnet_name: "public-subnet"
tempest_public_subnet_cidr: "10.1.13.0/24"
tempest_public_net_provider_type: "flat"
tempest_public_net_physical_type: "flat"

View File

@ -0,0 +1,8 @@
---
fixes:
- This role assumes that there is a network named "public|private" and a
subnet named "public|private-subnet". These names are made configurable
by the addition of two sets of variables; ``tempest_public_net_name``
and ``tempest_public_subnet_name`` for public networks and
``tempest_private_net_name`` and ``tempest_private_subnet_name`` for
private networks This addresses `bug 1588818 <https://bugs.launchpad.net/openstack-ansible/+bug/1588818>`_

View File

@ -207,7 +207,7 @@
neutron:
command: create_network
openrc_path: /root/openrc
net_name: private
net_name: "{{ tempest_private_net_name }}"
provider_network_type: "{{ tempest_private_net_provider_type }}"
provider_segmentation_id: "{{ tempest_private_net_seg_id | default(omit) }}"
tenant_id: "{{ keystone_demo_tenant_id }}"
@ -229,7 +229,7 @@
neutron:
command: create_network
openrc_path: /root/openrc
net_name: public
net_name: "{{ tempest_public_net_name }}"
provider_network_type: "{{ tempest_public_net_provider_type }}"
provider_physical_network: "{{ tempest_public_net_physical_type | default(omit) }}"
provider_segmentation_id: "{{ tempest_public_net_seg_id | default(omit) }}"
@ -264,8 +264,8 @@
neutron:
command: create_subnet
openrc_path: /root/openrc
net_name: private
subnet_name: private-subnet
net_name: "{{ tempest_private_net_name }}"
subnet_name: "{{ tempest_private_subnet_name }}"
cidr: "{{ tempest_private_subnet_cidr }}"
tenant_id: "{{ keystone_demo_tenant_id }}"
insecure: "{{ keystone_service_internaluri_insecure }}"
@ -277,8 +277,8 @@
neutron:
command: create_subnet
openrc_path: /root/openrc
net_name: public
subnet_name: public-subnet
net_name: "{{ tempest_public_net_name }}"
subnet_name: "{{ tempest_public_subnet_name }}"
cidr: "{{ tempest_public_subnet_cidr }}"
insecure: "{{ keystone_service_internaluri_insecure }}"
allocation_pools: "{{ tempest_public_subnet_allocation_pools }}"
@ -303,7 +303,7 @@
command: add_router_interface
openrc_path: /root/openrc
router_name: router
subnet_name: private-subnet
subnet_name: "{{ tempest_private_subnet_name }}"
insecure: "{{ keystone_service_internaluri_insecure }}"
when: tempest_service_available_neutron | bool
tags: