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

fix nxos_snmp_traps issues #39444

Merged
merged 4 commits into from May 3, 2018
Merged

fix nxos_snmp_traps issues #39444

merged 4 commits into from May 3, 2018

Conversation

saichint
Copy link
Contributor

@saichint saichint commented Apr 27, 2018

SUMMARY

fixes #39443

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

nxos_snmp_traps

ANSIBLE VERSION
ansible 2.6.0 (devel fed20b825f) last updated 2018/02/15 12:51:12 (GMT -400)
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /root/agents-ci/ansible/lib/ansible
  executable location = /root/agents-ci/ansible/bin/ansible
  python version = 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4]
ADDITIONAL INFORMATION
  • This PR fixes nxos_snmp_traps issues #39443
  • Integration tests are added along with skips for any older platforms issues.
  • All tests pass on all platforms

@ansibot
Copy link
Contributor

ansibot commented Apr 27, 2018

@ansibot ansibot added 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. needs_triage Needs a first human triage before being processed. networking Network category nxos Cisco NXOS community support:core This issue/PR relates to code supported by the Ansible Engineering Team. support:network This issue/PR relates to code supported by the Ansible Network Team. test This PR relates to tests. labels Apr 27, 2018
@s-hertel s-hertel removed the needs_triage Needs a first human triage before being processed. label Apr 27, 2018
@ansibot
Copy link
Contributor

ansibot commented Apr 27, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 1 error:

lib/ansible/modules/network/nxos/nxos_snmp_traps.py:0:0: E326 Value for "choices" from the argument_spec (['aaa', 'bfd', 'bgp', 'bridge', 'callhome', 'cfs', 'config', 'eigrp', 'entity', 'feature-control', 'generic', 'hsrp', 'license', 'link', 'lldp', 'mmode', 'ospf', 'pim', 'rf', 'rmon', 'snmp', 'storm-control', 'stpx', 'switchfabric', 'syslog', 'sysmgr', 'system', 'upgrade', 'vtp', 'all']) for "group" does not match the documentation (['aaa', 'bfd', 'bgp', 'bridge', 'callhome', 'cfs', 'config', 'eigrp', 'entity', 'feature-control', 'generic', 'hsrp', 'license', 'link', 'lldp', "mmode'", 'ospf', 'pim', 'rf', 'rmon', 'snmp', 'storm-control', 'stpx', 'switchfabric', "syslog'", 'sysmgr', 'system', 'upgrade', 'vtp', 'all'])

click here for bot help

@ansibot ansibot added ci_verified Changes made in this PR are causing tests to fail. 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 27, 2018
@ansibot
Copy link
Contributor

ansibot commented Apr 27, 2018

@ansibot ansibot removed the ci_verified Changes made in this PR are causing tests to fail. label Apr 27, 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 Apr 27, 2018
@trishnaguha trishnaguha self-assigned this Apr 30, 2018

always:
- name: Cleanup
nxos_snmp_traps: *remove
Copy link
Member

Choose a reason for hiding this comment

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

@saichint The PR looks good, Any chance that nxapi might fail for *remove and require ignore_errors: yes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@trishnaguha It is fine without ignore_errors: yes. This is because when try to disable a trap, the code basically checks that, if the existing state for that trap is in enabled state or not and only runs the 'no' cmd, if it is already in enabled state. So there is no issue here.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks. will merge the PR.

@trishnaguha trishnaguha merged commit 99748cb into ansible:devel May 3, 2018
@saichint saichint deleted the snmp_traps branch May 3, 2018 16:06
@trishnaguha trishnaguha moved this from In Review to Need CP into 2.5.3 in zzz NOT USED: Networking Bugs May 4, 2018
@trishnaguha trishnaguha moved this from Need CP into 2.5.3 to In Review in zzz NOT USED: Networking Bugs May 4, 2018
@trishnaguha trishnaguha moved this from In Review to Need CP into 2.5.3 in zzz NOT USED: Networking Bugs May 4, 2018
@trishnaguha trishnaguha moved this from Need CP into 2.5.3 to Done in zzz NOT USED: Networking Bugs May 4, 2018
@trishnaguha
Copy link
Member

cherry-picked to 2.5

trishnaguha pushed a commit to trishnaguha/ansible that referenced this pull request May 4, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore

(cherry picked from commit 99748cb)
trishnaguha added a commit that referenced this pull request May 4, 2018
* Handle nxos_feature issue where json isn't supported (#39150)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 9eff1f1)

* Integration Tests only: nxos_snmp_contact (#39318)

* add integration test cases for snmp_contact

* removing unnecessary files

(cherry picked from commit bdb75cd)

* fix nxos_ntp issues (#39178)

* fix nxos_ntp issues

* review comments

* fix idempotent fail case

(cherry picked from commit 2f99a17)

* nxos_interface: AttributeError: 'NoneType' object has no attribute 'group' (#38544)

This fixes an issue we recently encounteredi with nxos_interface:

```
Traceback (most recent call last):
  File "/tmp/ansible_JmLoba/ansible_module_nxos_interface.py", line 777, in main
    have = map_config_to_obj(want, module)
  File "/tmp/ansible_JmLoba/ansible_module_nxos_interface.py", line 606, in map_config_to_obj
    obj['speed'] = re.search(r'speed (\d+)', body).group(1)
AttributeError: 'NoneType' object has no attribute 'group'
```

(cherry picked from commit dca6e2d)

* fix nxos_snmp_community issues (#39258)

(cherry picked from commit 1afec5a)

* Add aggregate example in nxos_l2_interface module doc (#39275)

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
(cherry picked from commit 86817cd)

* Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. … (#39074)

* Fix misuse of 'self' in lib/ansible/module_utils/network/eos/eos.py. Method load_config

* Fix all instances of self.config(self,...

(cherry picked from commit 80d7e22)

* Fix for nxos_snmp_host issues (#39642)

* fix snmp_host issues

* source files

* fix shippable

* remove defaults to match arg spec

(cherry picked from commit f99bae1)

* fix nxos_snmp_traps issues (#39444)

* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore

(cherry picked from commit 99748cb)

* changelog

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 12, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 14, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
tonal pushed a commit to tonal/ansible that referenced this pull request May 15, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
oolongbrothers pushed a commit to oolongbrothers/ansible that referenced this pull request May 15, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
ilicmilan pushed a commit to ilicmilan/ansible that referenced this pull request Nov 7, 2018
* fix snmp_traps code

* add IT cases

* fix shippable

* fix shippable without ignore
@dagwieers dagwieers added the cisco Cisco technologies label Feb 23, 2019
@ansible ansible locked and limited conversation to collaborators May 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug. cisco Cisco technologies 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 nxos Cisco NXOS community support:core This issue/PR relates to code supported by the Ansible Engineering Team. support:network This issue/PR relates to code supported by the Ansible Network Team. test This PR relates to tests.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

nxos_snmp_traps issues
5 participants