From c7a1f783a03c1ed133cc4686aa3f820bca31bbd9 Mon Sep 17 00:00:00 2001 From: ZhongShengping Date: Tue, 27 Jun 2017 10:13:31 +0800 Subject: [PATCH] Replace neutron module with os_network and os_subnet The neutron library has been removed[0] in openstack-ansible-plugins. We can use standard ansible module instead. [0]https://review.openstack.org/#/c/467797/ Change-Id: Ia30a72bcd3d112d7dce7ebe4cdf5da659b983808 Closes-Bug: #1700700 --- tests/test-configure-ironic.yml | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/tests/test-configure-ironic.yml b/tests/test-configure-ironic.yml index 70e8f857..2f143f74 100644 --- a/tests/test-configure-ironic.yml +++ b/tests/test-configure-ironic.yml @@ -20,28 +20,31 @@ tasks: - name: Install pip requirements pip: - name: "python-neutronclient" + name: "{{ item }}" state: "{{ ironic_pip_package_state }}" + with_items: + - python-neutronclient + - shade register: install_packages until: install_packages|success retries: 5 delay: 2 - name: Create br-prov network - neutron: - command: create_network - openrc_path: /root/openrc - net_name: "{{ ironic_neutron_provisioning_network_name }}" + os_network: + cloud: default + endpoint_type: internal + validate_certs: "{{ not keystone_service_internaluri_insecure | bool }}" + name: "{{ ironic_neutron_provisioning_network_name }}" provider_network_type: flat provider_physical_network: prov - insecure: "{{ keystone_service_internaluri_insecure }}" - name: Ensure public subnet exists - neutron: - command: create_subnet - openrc_path: /root/openrc - net_name: "{{ ironic_neutron_provisioning_network_name }}" - subnet_name: "ironic-prov-subnet" + os_subnet: + state: present + cloud: default + endpoint_type: internal + validate_certs: "{{ not keystone_service_internaluri_insecure | bool }}" + network_name: "{{ ironic_neutron_provisioning_network_name }}" + name: "ironic-prov-subnet" cidr: "10.1.6.0/24" - insecure: "{{ keystone_service_internaluri_insecure }}" - allocation_pools: "" vars_files: - common/test-vars.yml