Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vos_config collection fix using FQCN #60446

Merged
merged 1 commit into from Aug 21, 2019

Conversation

pabelanger
Copy link
Contributor

SUMMARY

Do not merge, testing collections

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
ADDITIONAL INFORMATION

@ansibot
Copy link
Contributor

ansibot commented Aug 12, 2019

@ansibot ansibot added WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. networking Network category small_patch support:network This issue/PR relates to code supported by the Ansible Network Team. labels Aug 12, 2019
@ansibot
Copy link
Contributor

ansibot commented Aug 12, 2019

@ansible-zuul
Copy link

ansible-zuul bot commented Aug 12, 2019

Build succeeded (third-party-check pipeline).

@@ -38,7 +38,7 @@ class ActionModule(ActionNetworkModule):
def run(self, tmp=None, task_vars=None):
del tmp # tmp no longer has any effect

self._config_module = True if self._task.action == 'vyos_config' else False
self._config_module = True if 'vyos_config' in self._task.action else False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather see something like

Suggested change
self._config_module = True if 'vyos_config' in self._task.action else False
module_name = self._task.action.split('.')[-1]
self._config_module = True if module_name == 'vyos_config' else False

So that we're checking the whole module name. Otherwise if someone has a custom module named, e.g. vyos_configuration, unexpected things might happen.

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Aug 14, 2019
This deals with hardcoded vos_config in our vyos action plugin. Needed
for when we move to collections.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@pabelanger
Copy link
Contributor Author

Pull-request updated, HEAD is now f2660af

@pabelanger pabelanger changed the title WIP: testing vos_config collection fix vos_config collection fix using FQCN Aug 20, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed WIP This issue/PR is a work in progress. Nevertheless it was shared for getting input from peers. labels Aug 20, 2019
@ansible-zuul
Copy link

ansible-zuul bot commented Aug 20, 2019

Build succeeded (third-party-check pipeline).

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Aug 20, 2019
@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. and removed needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Aug 20, 2019
@pabelanger pabelanger merged commit 4615139 into ansible:devel Aug 21, 2019
adharshsrivatsr pushed a commit to adharshsrivatsr/ansible that referenced this pull request Sep 3, 2019
This deals with hardcoded vos_config in our vyos action plugin. Needed
for when we move to collections.

Signed-off-by: Paul Belanger <pabelanger@redhat.com>
@ansible ansible locked and limited conversation to collaborators Sep 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.9 This issue/PR affects Ansible v2.9 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. networking Network category small_patch support:network This issue/PR relates to code supported by the Ansible Network Team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants