Skip to content

Update SNMP resource model #305

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions models/enterprise_sonic/snmp/deleted_example_02.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# md5 auth-password
# U2FsdGVkX18J+L+L9OyQYWpAkGUrTgcg/6xzZoDjCbQw1ISHJ5mxmxrYZgQypEUXDeNe6rBupsc9sVDJBKxrwA==
# priv aes-128 priv-password U2FsdGVkX1/Xs+ffZvdV9YzfyGHgIJ+zkLRPfF3/WgYIE1S4Ribvbzhu5chpHHI7ooCBpcVxYZotAXDzgetxvQ==
# snmp-server group group-floor2 v3 priv read r_view write w_view notify n_view
# snmp-server group group-floor2 v2c priv read r_view write w_view notify n_view
# snmp-server community comm1 group group-lab
# snmp-server user user2 group group-lab
# auth sha auth-password U2FsdGVkX18J+L+L9OyQYWpAkGUrTgcg/6xzZoDjCbQw1ISHJ5mxmxrYZgQypEUXDeNe6rBupsc9sVDJBKxrwA==
Expand All @@ -26,5 +26,5 @@
#
# show running-configuration | grep snmp
#
# snmp-server group group-floor2 v3 priv read r_view write w_view notify n_view
# snmp-server group group-floor2 v2c priv read r_view write w_view notify n_view
# snmp-server community comm1 group group-lab
4 changes: 2 additions & 2 deletions models/enterprise_sonic/snmp/merged_example_02.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
group:
- name: group-floor2
access:
security_model: v3
security_model: v2c
security_level: auth-priv
read_view: r_view
write_view: w_view
Expand All @@ -29,4 +29,4 @@
# show running-configuration | grep snmp
#
# snmp-server community comm1 group group-lab
# snmp-server group group-floor2 v3 priv read r_view write w_view notify n_view
# snmp-server group group-floor2 v2c priv read r_view write w_view notify n_view
21 changes: 20 additions & 1 deletion models/enterprise_sonic/snmp/sonic_snmp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ DOCUMENTATION: |
type: list
elements: dict
suboptions:
name:
description:
- Name of this agentaddress entry
- The name is auto-generated if not explicitly specified for agentaddress entry creation
type: str
ip:
description:
- IPv4 or IPv6 address
Expand Down Expand Up @@ -158,6 +163,7 @@ DOCUMENTATION: |
enable_trap:
description:
- Specify trap(s) to enable. The all choice indicates all traps should be enabled
- The "all" choice can not be specified unless none of the other choices is specified
type: list
elements: str
choices:
Expand All @@ -182,6 +188,7 @@ DOCUMENTATION: |
access:
description:
- List of access rights configuration for a group
- The old access list will be replaced with the new access list
type: list
elements: dict
suboptions:
Expand All @@ -193,10 +200,12 @@ DOCUMENTATION: |
choices:
- any
- v2c
- v3
- usm
security_level:
description:
- When I(security_model=v3), specifies the minimum security level under which the access rights apply.
type: str
required: true
choices:
- no-auth-no-priv
- auth-no-priv
Expand All @@ -216,14 +225,24 @@ DOCUMENTATION: |
host:
description:
- List of SNMP host configuration
- I(community) and I(user) are mutually exclusive
type: list
elements: dict
suboptions:
name:
description:
- Name of the host
- The name is auto-generated if not explicitly specified for host entry creation
type: str
ip:
description:
- IPv4 or IPv6 address
type: str
required: true
source_interface:
description:
- Name of source interface
type: str
community:
description:
- SNMP community for the host
Expand Down