The "Compare switch VLANs to VLANs in nic config" validation breaks when
run through Mistral. This is because the custom module used in the
validation imports functions from another custom module. Custom modules
are recognized by Ansible, but they don't necessarily live on the Python
path, so when run through Mistral the imported module cannot be found
and the validation breaks.
This patch moves the two imported functions to different locations:
- `library.network_environment.get_network_config` is refactored into a
generic utility function in `tripleo_validations.utils`.
- `library.network_environment.open_network_environment_files` is copied
to `library.network_environment.switch_vlans` (this is an ugly
duplication, but the function is going to be removed from the original
location in a different patch: https://review.openstack.org/#/c/547518/)
Reviewed: https:/ /review. openstack. org/559304 /git.openstack. org/cgit/ openstack/ tripleo- validations/ commit/ ?id=d0dc69c1eb8 277f9b6789d57ed 7ef632161d29a1
Committed: https:/
Submitter: Zuul
Branch: master
commit d0dc69c1eb8277f 9b6789d57ed7ef6 32161d29a1
Author: Florian Fuchs <email address hidden>
Date: Fri Apr 6 09:53:25 2018 +0000
Fix Switch VLANs validation
The "Compare switch VLANs to VLANs in nic config" validation breaks when
run through Mistral. This is because the custom module used in the
validation imports functions from another custom module. Custom modules
are recognized by Ansible, but they don't necessarily live on the Python
path, so when run through Mistral the imported module cannot be found
and the validation breaks.
This patch moves the two imported functions to different locations:
- `library. network_ environment. get_network_ config` is refactored into a validations. utils`. network_ environment. open_network_ environment_ files` is copied network_ environment. switch_ vlans` (this is an ugly /review. openstack. org/#/c/ 547518/)
generic utility function in `tripleo_
- `library.
to `library.
duplication, but the function is going to be removed from the original
location in a different patch:
https:/
Change-Id: If3bc62df730739 640341386022c0c d99295b880b
Closes-Bug: #1761717