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

Snmp context instance duplicates output in nxos_snmp_server module #406

Closed
maugli13 opened this issue Dec 29, 2021 · 0 comments · Fixed by #407
Closed

Snmp context instance duplicates output in nxos_snmp_server module #406

maugli13 opened this issue Dec 29, 2021 · 0 comments · Fixed by #407
Assignees
Labels
bug This issue/PR relates to a bug. has_pr This issue has an associated PR. snmp_servers snmp_servers resource module

Comments

@maugli13
Copy link

SUMMARY

Attempt to configure snmp-server context fails with instance keyword duplication

ISSUE TYPE
  • Bug Report
COMPONENT NAME

nxos_snmp_server

ANSIBLE VERSION
ansible 2.10.5
  config file = /etc/ansible/ansible.cfg
  configured module search path = ['/home/ansible/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/ansible/.local/lib/python3.6/site-packages/ansible
  executable location = /home/ansible/.local/bin/ansible
  python version = 3.6.9 (default, Jan 26 2021, 15:33:00) [GCC 8.4.0]
COLLECTION VERSION
# /home/ansible/.ansible/collections/ansible_collections
Collection Version
---------- -------
cisco.nxos 2.8.2  

# /home/ansible/.local/lib/python3.6/site-packages/ansible_collections
Collection Version
---------- -------
cisco.nxos 1.3.1  
CONFIGURATION
DEFAULT_HOST_LIST(/etc/ansible/ansible.cfg) = ['/home/ansible/ansible/hosts']
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
INTERPRETER_PYTHON(/etc/ansible/ansible.cfg) = /usr/bin/python3
OS / ENVIRONMENT

Ubuntu 18.04.6 LTS

STEPS TO REPRODUCE

Run playbook below against any nexus switch

- name: "Connections to NXOS switches"
  hosts: nxos
  gather_facts: no

  tasks:
    - name: Add general settings to the configuration
      cisco.nxos.nxos_snmp_server:
        config:
            context:
                instance: test
                name: fcc-prod-tenant1-context
                vrf: FCC-PROD-T01
            mib:
                community_map:
                    community: fcc-prod-tenant1-community
                    context: fcc-prod-tenant1-context
        state: rendered
EXPECTED RESULTS

Expect to receive the following configuration output:

    "rendered": [
        "snmp-server context fcc-prod-tenant1-context instance test vrf FCC-PROD-T01",
        "snmp-server mib community-map fcc-prod-tenant1-community context fcc-prod-tenant1-context"
    ]
ACTUAL RESULTS

Instead receiving instance keyword duplication

    "rendered": [
        "snmp-server context fcc-prod-tenant1-context instance test instance test vrf FCC-PROD-T01",
        "snmp-server mib community-map fcc-prod-tenant1-community context fcc-prod-tenant1-context"
    ]
@NilashishC NilashishC added has_pr This issue has an associated PR. snmp_servers snmp_servers resource module bug This issue/PR relates to a bug. labels Dec 29, 2021
ansible-zuul bot pushed a commit that referenced this issue Jan 12, 2022
[snmp_server] fix rendering context command

Signed-off-by: NilashishC nilashishchakraborty8@gmail.com
SUMMARY

Fix #406

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
nxos_snmp_server.py

Reviewed-by: Ashwini Mhatre <mashu97@gmail.com>
Reviewed-by: None <None>
NilashishC added a commit to NilashishC/cisco.nxos that referenced this issue Oct 6, 2022
[snmp_server] fix rendering context command

Signed-off-by: NilashishC nilashishchakraborty8@gmail.com
SUMMARY

Fix ansible-collections#406

ISSUE TYPE


Bugfix Pull Request

COMPONENT NAME
nxos_snmp_server.py

Reviewed-by: Ashwini Mhatre <mashu97@gmail.com>
Reviewed-by: None <None>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue/PR relates to a bug. has_pr This issue has an associated PR. snmp_servers snmp_servers resource module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants