Skip to content

Commit

Permalink
Adapt SNMP support (#159)
Browse files Browse the repository at this point in the history
* snmp support

* Add changelog fragment

* Update changelogs/fragments/159-snmp_community.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

* Update changelogs/fragments/159-snmp_community.yml

Co-authored-by: Felix Fontein <felix@fontein.de>

---------

Co-authored-by: Felix Fontein <felix@fontein.de>
  • Loading branch information
phox142 and felixfontein committed Mar 11, 2023
1 parent 720debb commit 071f742
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 13 deletions.
3 changes: 3 additions & 0 deletions changelogs/fragments/159-snmp_community.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
minor_changes:
- api_modify - add support for ``trap-interfaces`` in API path ``snmp`` (https://github.com/ansible-collections/community.routeros/pull/159).
- api_modify - add support for API path ``snmp community`` (https://github.com/ansible-collections/community.routeros/pull/159).
27 changes: 14 additions & 13 deletions plugins/module_utils/_api_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -748,20 +748,20 @@ def join_path(path):
},
),
('snmp', 'community'): APIData(
unknown_mechanism=True,
# primary_keys=('default', ),
fully_understood=True,
primary_keys=('name', ),
fields={
'default': KeyInfo(),
'addresses': KeyInfo(),
'authentication-password': KeyInfo(),
'authentication-protocol': KeyInfo(),
'disabled': KeyInfo(),
'encryption-password': KeyInfo(),
'encryption-protocol': KeyInfo(),
'name': KeyInfo(),
'read-access': KeyInfo(),
'security': KeyInfo(),
'write-access': KeyInfo(),
'addresses': KeyInfo(default='::/0'),
'authentication-password': KeyInfo(default=''),
'authentication-protocol': KeyInfo(default='MD5'),
'comment': KeyInfo(can_disable=True, remove_value=''),
'disabled': KeyInfo(default=False),
'encryption-password': KeyInfo(default=''),
'encryption-protocol': KeyInfo(default='DES'),
'name': KeyInfo(required=True),
'read-access': KeyInfo(default=True),
'security': KeyInfo(default='none'),
'write-access': KeyInfo(default=False),
},
),
('caps-man', 'aaa'): APIData(
Expand Down Expand Up @@ -2286,6 +2286,7 @@ def join_path(path):
'trap-generators': KeyInfo(default='temp-exception'),
'trap-target': KeyInfo(default=''),
'trap-version': KeyInfo(default=1),
'trap-interfaces': KeyInfo(default=''),
},
),
('system', 'clock'): APIData(
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
- routing rip
- routing ripng
- snmp
- snmp community
- system clock
- system clock manual
- system identity
Expand Down
1 change: 1 addition & 0 deletions plugins/modules/api_modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
- routing rip
- routing ripng
- snmp
- snmp community
- system clock
- system clock manual
- system identity
Expand Down

0 comments on commit 071f742

Please sign in to comment.