Skip to content

Commit

Permalink
Partially revert "Use upstream openstack network modules"
Browse files Browse the repository at this point in the history
Using the upstream library breaks the ability to test network plugins
that use 'local' neutron networks (ie. calico).

ansible/ansible-modules-core#5589

This reverts commit 21972c7.

Depends-On: I8a33db524c24324dc2af8463a43cb145f7cc34d6
Change-Id: I7fb1f83029ae3176895027a65f1e3cbe803caf7a
  • Loading branch information
logan2211 committed Nov 14, 2016
1 parent 08a97c5 commit b520e97
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions tasks/tempest_resources.yml
Expand Up @@ -165,41 +165,39 @@
keystone_demo_tenant_id: "{{ keystone_facts.id }}"

- name: Ensure private network exists
os_network:
cloud: default
endpoint_type: internal
validate_certs: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}"
name: "{{ tempest_private_net_name }}"
neutron:
command: create_network
openrc_path: /root/openrc
net_name: "{{ tempest_private_net_name }}"
provider_network_type: "{{ tempest_private_net_provider_type }}"
provider_segmentation_id: "{{ tempest_private_net_seg_id | default(omit) }}"
project: "{{ keystone_demo_tenant_id }}"
register: private_network
tenant_id: "{{ keystone_demo_tenant_id }}"
insecure: "{{ keystone_service_internaluri_insecure }}"
when: tempest_service_available_neutron | bool

- name: Store neutron private network id
set_fact:
tempest_neutron_private_network_id: "{{ private_network.id }}"
tempest_neutron_private_network_id: "{{ neutron_networks.private.id }}"
when: tempest_service_available_neutron | bool

- name: Ensure public network exists
os_network:
cloud: default
endpoint_type: internal
validate_certs: "{{ keystone_service_internaluri_insecure | ternary(false, true) }}"
name: "{{ tempest_public_net_name }}"
neutron:
command: create_network
openrc_path: /root/openrc
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) }}"
external: "{{ tempest_public_router_external }}"
project: "{{ keystone_demo_tenant_id }}"
register: public_network
router_external: "{{ tempest_public_router_external }}"
tenant_id: "{{ keystone_demo_tenant_id }}"
insecure: "{{ keystone_service_internaluri_insecure }}"
when: tempest_service_available_neutron | bool

# This fact is used in tempest.conf.j2; we set an empty string if it doesn't get
# set above to ensure the template will parse correctly.
- name: Store neutron public network id
set_fact:
tempest_neutron_public_network_id: "{{ tempest_service_available_neutron | ternary(public_network.id, '') }}"
tempest_neutron_public_network_id: "{{ tempest_service_available_neutron | ternary(neutron_networks.public.id, '') }}"

- name: Ensure private subnet exists
os_subnet:
Expand Down

0 comments on commit b520e97

Please sign in to comment.