Comment 3 for bug 1761717

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (master)

Reviewed: https://review.openstack.org/559304
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=d0dc69c1eb8277f9b6789d57ed7ef632161d29a1
Submitter: Zuul
Branch: master

commit d0dc69c1eb8277f9b6789d57ed7ef632161d29a1
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
      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/)

    Change-Id: If3bc62df730739640341386022c0cd99295b880b
    Closes-Bug: #1761717