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

Return correct version on installed VyOS #39115

Merged
merged 2 commits into from Sep 14, 2018
Merged

Return correct version on installed VyOS #39115

merged 2 commits into from Sep 14, 2018

Conversation

maugli13
Copy link
Contributor

@maugli13 maugli13 commented Apr 21, 2018

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from "Version: VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

SUMMARY

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from "Version: VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

vyos_facts

ANSIBLE VERSION
ansible 2.5.1
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/murmanov/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.12 (default, Dec  4 2017, 14:50:18) [GCC 5.4.0 20160609]
ADDITIONAL INFORMATION

Below you can see before and after outputs

ok: [nn-vpn.int] => {
    "ansible_facts": {
        "ansible_net_gather_subset": [
            "neighbors", 
            "default"
        ], 
        "ansible_net_hostname": "nn-vpn", 
        "ansible_net_model": "VMware", 
        "ansible_net_serialnum": "VMware-56", 
        "ansible_net_version": "VyOS"
    }, 
    "changed": false, 
    "invocation": {
        "module_args": {
            "gather_subset": [
                "!config"
            ], 
            "host": null, 
            "password": null, 
            "port": null, 
            "provider": null, 
            "ssh_keyfile": null, 
            "timeout": null, 
            "username": null
        }
    }
}

################# After ####################

ok: [nn-vpn.int] => {
    "ansible_facts": {
        "ansible_net_gather_subset": [
            "neighbors", 
            "default"
        ], 
        "ansible_net_hostname": "nn-vpn", 
        "ansible_net_model": "VMware", 
        "ansible_net_serialnum": "VMware-56", 
        "ansible_net_version": "VyOS 1.1.6"
    }, 
    "changed": false, 
    "invocation": {
        "module_args": {
            "gather_subset": [
                "!config"
            ], 
            "host": null, 
            "password": null, 
            "port": null, 
            "provider": null, 
            "ssh_keyfile": null, 
            "timeout": null, 
            "username": null
        }
    }
}

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well
@ansibot
Copy link
Contributor

ansibot commented Apr 21, 2018

@ansibot ansibot added core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. networking Network category new_contributor This PR is the first contribution by a new community member. support:network This issue/PR relates to code supported by the Ansible Network Team. 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 Apr 21, 2018
@maugli13
Copy link
Contributor Author

Tests in Shippable should be adjusted as well, since they're expecting limited output about VyOS version

@webknjaz
Copy link
Member

!component +lib/ansible/modules/network/vyos/vyos_facts.py
-label needs_triage

@ansibot ansibot removed the needs_triage Needs a first human triage before being processed. label Apr 24, 2018
@mattclay
Copy link
Member

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Apr 26, 2018
@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label May 4, 2018
@ansibot ansibot added the affects_2.6 This issue/PR affects Ansible v2.6 label May 20, 2018
@ansibot ansibot removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. labels Aug 30, 2018
@mattclay
Copy link
Member

@mattclay mattclay added the ci_verified Changes made in this PR are causing tests to fail. label Aug 31, 2018
@NilashishC
Copy link
Contributor

@maugli13 The change looks good to me. Could you also modify the assertions in https://github.com/ansible/ansible/blob/devel/test/units/modules/network/vyos/test_vyos_facts.py so that the tests pass and we can merge it?

@NilashishC NilashishC self-requested a review September 4, 2018 06:16
Copy link
Contributor

@NilashishC NilashishC left a comment

Choose a reason for hiding this comment

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

Please modify the assertions in the unit tests at https://github.com/ansible/ansible/blob/devel/test/units/modules/network/vyos/test_vyos_facts.py so that CI passes.

@ansibot ansibot added the stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. label Sep 13, 2018
@ansibot
Copy link
Contributor

ansibot commented Sep 14, 2018

@ansibot ansibot added support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. and removed ci_verified Changes made in this PR are causing tests to fail. stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. support:network This issue/PR relates to code supported by the Ansible Network Team. labels Sep 14, 2018
@mattclay
Copy link
Member

Closing and re-opening to trigger CI.

@mattclay mattclay closed this Sep 14, 2018
@mattclay mattclay reopened this Sep 14, 2018
@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 Sep 14, 2018
@NilashishC NilashishC added bug This issue/PR relates to a bug. and removed feature This issue/PR relates to a feature request. labels Sep 14, 2018
@NilashishC NilashishC merged commit 235b11f into ansible:devel Sep 14, 2018
@maugli13 maugli13 deleted the patch-1 branch September 17, 2018 20:25
@maugli13 maugli13 restored the patch-1 branch September 17, 2018 21:05
@maugli13 maugli13 deleted the patch-1 branch September 17, 2018 21:06
nitzmahone pushed a commit that referenced this pull request Sep 25, 2018
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f)

* Added changelog
mattclay pushed a commit that referenced this pull request Sep 25, 2018
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f)

* Added changelog
NilashishC pushed a commit to NilashishC/ansible that referenced this pull request Oct 10, 2018
* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f)
abadger pushed a commit that referenced this pull request Oct 11, 2018
* Return correct version on installed VyOS (#39115)

* Return correct version on installed VyOS

Previously existing regexp will shows only "VyOS" without numeric output of router version.
For example: from  "Version:      VyOS 1.1.6" only VyOS will be written in ansible_net_version variable
For more informative output numeric value should be returned as well

* Fixed unittests

(cherry picked from commit 235b11f)

* Added changelog
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.6 This issue/PR affects Ansible v2.6 bug This issue/PR relates to a bug. core_review In order to be merged, this PR must follow the core review workflow. module This issue/PR relates to a module. networking Network category new_contributor This PR is the first contribution by a new community member. small_patch support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants