Handle migration of br-ex network
[1] changing br-ex network from 192.168.24 to 172.16.1 for standalone jobs. In order to allow the migration need to adjust tempest configuration. This can be reverted once [1] and [2] lands. [1] https://review.opendev.org/#/c/757605 [2] https://review.opendev.org/#/c/755607 Related-Bug: #1895822 Change-Id: I1865db911661092debb133fd2638c9a6a9bd2e47
This commit is contained in:
parent
03a4a46242
commit
eaf976ae0e
|
@ -160,6 +160,36 @@
|
|||
tempest_network_ping_gateway: true
|
||||
when: tempest_cidr is defined
|
||||
|
||||
- name: Handle migration of br-ex network
|
||||
block:
|
||||
- name: Check if standalone parameters exists
|
||||
stat:
|
||||
path: "{{ working_dir }}/standalone_parameters.yaml"
|
||||
register: parameter_file
|
||||
|
||||
- name: Read content of standalone parameters file if exists
|
||||
slurp:
|
||||
src: "{{ working_dir }}/standalone_parameters.yaml"
|
||||
register: standalone_parameters
|
||||
when: parameter_file.stat.exists
|
||||
|
||||
- name: Parse contents
|
||||
set_fact:
|
||||
standalone_parameters_yaml: "{{ standalone_parameters['content'] | b64decode | from_yaml }}"
|
||||
when: parameter_file.stat.exists
|
||||
|
||||
- name: set tempest facts for br-ex network migration
|
||||
set_fact:
|
||||
tempest_public_subnet_cidr: '172.16.1.0/24'
|
||||
tempest_public_subnet_gateway_ip: '172.16.1.2'
|
||||
tempest_public_subnet_allocation_pools: '172.16.1.100-172.16.1.150'
|
||||
when:
|
||||
- parameter_file.stat.exists
|
||||
- "'NeutronPhysicalBridge' not in (standalone_parameters_yaml | from_yaml)['parameter_defaults']"
|
||||
when:
|
||||
- job.environment_type is defined and job.environment_type == "standalone"
|
||||
- job.bridge_address_prefix is defined and job.bridge_address_prefix == "172.16.1"
|
||||
|
||||
- name: Set tempest workspace related vars
|
||||
set_fact:
|
||||
tempest_use_tempestconf: true
|
||||
|
|
Loading…
Reference in New Issue