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

ios_snmp_server: improvment for snmp-server module #809

Closed

Conversation

earendilfr
Copy link
Contributor

@earendilfr earendilfr commented Apr 21, 2023

  • add the possibility manage the match part of the context for snmp-server group this part could be usefull on cisco devices to retrieve the MAC table of all VLANs with SNMPv3

  • Fixe an issue with snmp-server ifindex: the command working fine but the result in command could be also seen with the command snmp ifmib ifindex persist

SUMMARY

Performing two change in ios_snmp_server module:

  • Add the possibility to manage the match part for context in snmp-server group command
  • I have also seen a weird bug with the if_index parameter:
    the parameter is correctly sent to the switch but, on many switches, we should also check the command snmp ifmib ifindex persistto validate if the command is present
ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

ios_snmp_server

ADDITIONAL INFORMATION

Before add the context match

snmp-server group group1 v3 auth context vlan-

After:

snmp-server group group1 v3 auth
snmp-server group group1 v3 auth context vlan match prefix

And the output of the complete commands on Cisco switches

fhv-pry-msw01#sh run | section ^snmp
snmp-server group group1 v3 auth
snmp-server group group1 v3 auth context vlan- match prefix
snmp-server location nowhere
snmp-server contact [email protected]
snmp-server enable traps license
snmp-server enable traps stackwise
snmp-server enable traps envmon fan shutdown supply status
snmp ifmib ifindex persist

and the result for the gathered output:

        "gathered": {
            "contact": "[email protected]",
            "groups": [
                {
                    "group": "group1",
                    "read": "snmp-view-full",
                    "version": "v3",
                    "version_option": "auth"
                },
                {
                    "context": "vlan-",
                    "group": "group1",
                    "match": "prefix",
                    "version": "v3",
                    "version_option": "auth"
                }
            ],
            "if_index": true,
            "location": "nowhere",
            "views": [
                {
                    "family_name": "iso",
                    "included": true,
                    "name": "snmp-view-full"
                }
            ]
        }

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/49e394b870ff4cd29e3b4f6308bb25a9

✔️ ansible-galaxy-importer SUCCESS in 3m 40s
✔️ build-ansible-collection SUCCESS in 8m 44s
ansible-ee-integration-ios-latest FAILURE in 28m 22s (non-voting)
ansible-ee-integration-ios-stable-2.9 POST_FAILURE in 28m 25s (non-voting)
ansible-ee-integration-ios-stable-2.11 POST_FAILURE in 28m 43s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 28m 21s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 54m 21s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 52m 51s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 54m 59s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 55m 05s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 36s

@earendilfr earendilfr force-pushed the ios_snmp_change branch 2 times, most recently from a46b3a4 to 7d7904a Compare April 23, 2023 19:22
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/709a1614dc9e4d50bdb0da5de4744a37

✔️ ansible-galaxy-importer SUCCESS in 3m 24s
✔️ build-ansible-collection SUCCESS in 8m 39s
ansible-ee-integration-ios-latest FAILURE in 20m 34s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 20m 19s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 20m 31s (non-voting)
ansible-ee-integration-ios-stable-2.12 POST_FAILURE in 20m 27s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 49m 55s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 46m 18s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 49m 54s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 50m 12s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 31s

@Qalthos Qalthos requested a review from KB-perByte April 26, 2023 13:21
@roverflow roverflow self-assigned this May 2, 2023
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/ba48fd94987d4cbcabb549406537fdc2

✔️ ansible-galaxy-importer SUCCESS in 4m 12s
✔️ build-ansible-collection SUCCESS in 8m 45s
ansible-ee-integration-ios-latest FAILURE in 16m 01s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 24s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 18m 39s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 18m 37s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 45m 54s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 42m 18s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 45m 04s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 45m 39s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 32s

@KB-perByte
Copy link
Collaborator

@roverflow cc

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/37e10beef2df48beb937dfe73928228c

✔️ ansible-galaxy-importer SUCCESS in 3m 43s
✔️ build-ansible-collection SUCCESS in 8m 51s
ansible-ee-integration-ios-latest FAILURE in 15m 59s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 00s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 15m 10s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 13s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 44m 38s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 42m 47s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 46m 20s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 48m 30s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 48s

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/5adebf58bb9d4d0caf1ca2359b7939b5

✔️ ansible-galaxy-importer SUCCESS in 4m 15s
✔️ build-ansible-collection SUCCESS in 8m 37s
ansible-ee-integration-ios-latest FAILURE in 18m 12s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 20m 32s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 21m 10s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 21m 11s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 50m 10s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 44m 08s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 47m 03s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 46m 38s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 30s

@earendilfr earendilfr requested a review from KB-perByte May 9, 2023 14:33
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/4b596820c6fb4ba8b2fbecab76f38898

✔️ ansible-galaxy-importer SUCCESS in 4m 04s
✔️ build-ansible-collection SUCCESS in 8m 51s
ansible-ee-integration-ios-latest FAILURE in 14m 56s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 14m 16s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 14m 56s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 15m 07s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 44m 58s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 39m 48s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 42m 45s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 43m 57s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 37s

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/cebed4213c0c458caa9d35868ef8bf22

✔️ ansible-galaxy-importer SUCCESS in 3m 47s
✔️ build-ansible-collection SUCCESS in 8m 40s
ansible-ee-integration-ios-latest FAILURE in 14m 43s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 35s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 16m 52s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 17m 03s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 47m 33s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 42m 48s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 46m 38s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 43m 42s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 22s

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/6297b4ac9db0497db1939f6f9e89ab00

✔️ ansible-galaxy-importer SUCCESS in 4m 30s
✔️ build-ansible-collection SUCCESS in 8m 51s
ansible-ee-integration-ios-latest FAILURE in 17m 46s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 19m 55s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 19m 57s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 19m 25s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 49m 03s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 46m 22s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 43m 55s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 43m 27s (non-voting)
✔️ ansible-tox-linters SUCCESS in 11m 01s

@softwarefactory-project-zuul
Copy link

Build failed.
https://ansible.softwarefactory-project.io/zuul/buildset/88139495ec1547849e258f0482bd017c

✔️ ansible-galaxy-importer SUCCESS in 4m 22s
✔️ build-ansible-collection SUCCESS in 8m 56s
ansible-ee-integration-ios-latest FAILURE in 16m 19s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 15m 29s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 13m 04s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 17m 01s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 16m 39s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 15m 47s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 13m 48s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 16m 10s (non-voting)
ansible-tox-linters FAILURE in 10m 33s

@earendilfr earendilfr force-pushed the ios_snmp_change branch 2 times, most recently from a4e8f99 to 1255543 Compare August 8, 2023 08:37
@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/944bc1300baf4475becee8569b2440ab

✔️ ansible-galaxy-importer SUCCESS in 4m 07s
✔️ build-ansible-collection SUCCESS in 8m 43s
ansible-ee-integration-ios-latest FAILURE in 13m 52s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 15m 04s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 14m 04s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 13m 50s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 13m 23s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 23s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 12m 31s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 13m 38s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 47s

@softwarefactory-project-zuul
Copy link

Build succeeded.
https://ansible.softwarefactory-project.io/zuul/buildset/6da14a63685d43a78ad59a02329ab5bf

✔️ ansible-galaxy-importer SUCCESS in 4m 47s
✔️ build-ansible-collection SUCCESS in 9m 00s
ansible-ee-integration-ios-latest FAILURE in 13m 34s (non-voting)
ansible-ee-integration-ios-stable-2.9 FAILURE in 16m 21s (non-voting)
ansible-ee-integration-ios-stable-2.11 FAILURE in 16m 02s (non-voting)
ansible-ee-integration-ios-stable-2.12 FAILURE in 16m 09s (non-voting)
ansible-ee-integration-ios-libssh-latest FAILURE in 14m 26s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.9 FAILURE in 13m 48s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.11 FAILURE in 14m 07s (non-voting)
ansible-ee-integration-ios-libssh-stable-2.12 FAILURE in 12m 58s (non-voting)
✔️ ansible-tox-linters SUCCESS in 10m 18s

Copy link
Member

@roverflow roverflow left a comment

Choose a reason for hiding this comment

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

Hey @earendilfr , thanks for the contribution, if you are still looking to merge this PR, can you resolve the conflicts and also can you add tests for the match attribute that you have added

earendilfr and others added 4 commits November 24, 2023 15:56
- add the possibility manage the match part of the context for snmp-server group
  this part could be usefull on cisco devices to retrieve the MAC table of all VLANs with SNMPv3

- Fixe an issue with snmp-server ifindex: the command working fine but the result in command could be also seen with the command `snmp ifmib ifindex persist`
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

Merging #809 (19306b3) into main (1f140c6) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #809   +/-   ##
=======================================
  Coverage   86.44%   86.44%           
=======================================
  Files         202      202           
  Lines       12764    12764           
=======================================
  Hits        11034    11034           
  Misses       1730     1730           

see 1 file with indirect coverage changes

@earendilfr
Copy link
Contributor Author

I'm nearly sure that this PR is already covered with the PR #828.
So we can close it

@earendilfr earendilfr closed this Nov 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants