From 566f7f2401b79a79abe5ed9597fed325540983fa Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Thu, 30 Dec 2021 21:37:44 +0100 Subject: snmp: T4124: migrate to get_config_dict() --- .../include/snmp/access-mode.xml.i | 23 ++ .../include/snmp/authentication-type.xml.i | 22 ++ .../include/snmp/privacy-type.xml.i | 22 ++ interface-definitions/include/snmp/protocol.xml.i | 22 ++ interface-definitions/snmp.xml.in | 236 +++------------------ 5 files changed, 120 insertions(+), 205 deletions(-) create mode 100644 interface-definitions/include/snmp/access-mode.xml.i create mode 100644 interface-definitions/include/snmp/authentication-type.xml.i create mode 100644 interface-definitions/include/snmp/privacy-type.xml.i create mode 100644 interface-definitions/include/snmp/protocol.xml.i (limited to 'interface-definitions') diff --git a/interface-definitions/include/snmp/access-mode.xml.i b/interface-definitions/include/snmp/access-mode.xml.i new file mode 100644 index 000000000..1fce2364e --- /dev/null +++ b/interface-definitions/include/snmp/access-mode.xml.i @@ -0,0 +1,23 @@ + + + + Define access permission + + ro rw + + + ro + Read-Only (default) + + + rw + read write + + + ^(ro|rw)$ + + Authorization type must be either 'rw' or 'ro' + + ro + + diff --git a/interface-definitions/include/snmp/authentication-type.xml.i b/interface-definitions/include/snmp/authentication-type.xml.i new file mode 100644 index 000000000..2a545864a --- /dev/null +++ b/interface-definitions/include/snmp/authentication-type.xml.i @@ -0,0 +1,22 @@ + + + + Define used protocol + + md5 sha + + + md5 + Message Digest 5 (default) + + + sha + Secure Hash Algorithm + + + ^(md5|sha)$ + + + md5 + + diff --git a/interface-definitions/include/snmp/privacy-type.xml.i b/interface-definitions/include/snmp/privacy-type.xml.i new file mode 100644 index 000000000..47a1e632e --- /dev/null +++ b/interface-definitions/include/snmp/privacy-type.xml.i @@ -0,0 +1,22 @@ + + + + Defines the protocol for privacy + + des aes + + + des + Data Encryption Standard (default) + + + aes + Advanced Encryption Standard + + + ^(des|aes)$ + + + des + + diff --git a/interface-definitions/include/snmp/protocol.xml.i b/interface-definitions/include/snmp/protocol.xml.i new file mode 100644 index 000000000..335736724 --- /dev/null +++ b/interface-definitions/include/snmp/protocol.xml.i @@ -0,0 +1,22 @@ + + + + Protocol to be used (TCP/UDP) + + udp tcp + + + udp + Listen protocol UDP (default) + + + tcp + Listen protocol TCP + + + ^(udp|tcp)$ + + + udp + + diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in index 949536fe7..67d3aef9a 100644 --- a/interface-definitions/snmp.xml.in +++ b/interface-definitions/snmp.xml.in @@ -20,23 +20,24 @@ - Authorization type (default: 'ro') + Authorization type ro rw ro - read only + Read-Only (default) rw - read write + Read-Write ^(ro|rw)$ Authorization type must be either 'rw' or 'ro' + ro @@ -105,18 +106,9 @@ + #include - - Port for SNMP service (default: '161') - - u32:1-65535 - Numeric IP port - - - - - Port number must be in range 1 to 65535 - + 161 @@ -131,50 +123,27 @@ - Enable specific oids - - txt - Enable specific oids - - - route-table - Enable route table oids (ipCidrRouteTable inetCidrRouteTable) - + Enable specific OIDs route-table - - ^(route-table)$ - - Oid must be 'route-table' - - - - - Listen protocol for SNMP - - udp tcp - - udp - Listen protocol UDP (default) - - - tcp - Listen protocol TCP + route-table + Enable routing table OIDs (ipCidrRouteTable inetCidrRouteTable) - ^(udp|tcp)$ + ^(route-table)$ + OID must be 'route-table' - udp + #include Register a subtree for SMUX-based processing - oid - Object Identifier + txt + SNMP Object Identifier @@ -218,18 +187,9 @@ Community used when sending trap information + #include - - Destination port used for trap notification - - u32:1-65535 - Numeric IP port - - - - - Port number must be in range 1 to 65535 - + 162 @@ -246,32 +206,14 @@ ID must contain an even number (from 2 to 36) of hex digits + Specifies the group with name groupname - - - Define group access permission (default: 'ro') - - ro rw - - - ro - read only - - - rw - read write - - - ^(ro|rw)$ - - Authorization type must be either 'rw' or 'ro' - - + #include Security levels @@ -284,7 +226,7 @@ auth - Messages are authenticated but not encrypted (authNoPriv) + Messages are authenticated but not encrypted (authNoPriv, default) priv @@ -294,6 +236,7 @@ ^(noauth|auth|priv)$ + auth @@ -345,39 +288,12 @@ Key must contain 8 or more characters - - - Defines the protocol used for authentication (default: 'md5') - - md5 sha - - - md5 - Message Digest 5 - - - sha - Secure Hash Algorithm - - - ^(md5|sha)$ - - - + #include + #include - - Specifies TCP/UDP port of destination SNMP traps/informs (default: '162') - - u32:1-65535 - Numeric IP port - - - - - Port number must be in range 1 to 65535 - + 162 @@ -402,54 +318,18 @@ Key must contain 8 or more characters - - - Defines the protocol for privacy (default: 'des') - - des aes - - - des - Data Encryption Standard - - - aes - Advanced Encryption Standard - - - ^(des|aes)$ - - - + #include - - - Defines protocol for notification between TCP and UDP - - tcp udp - - - tcp - Use Transmission Control Protocol for notifications - - - udp - Use User Datagram Protocol for notifications - - - ^(tcp|udp)$ - - - + #include - Specifies the type of notification between inform and trap (default: 'inform') + Specifies the type of notification between inform and trap inform trap - inform + inform (default) Use INFORM @@ -460,6 +340,7 @@ ^(inform|trap)$ + inform @@ -503,25 +384,7 @@ Key must contain 8 or more characters - - - Defines the protocol used for authentication (default: 'md5') - - md5 sha - - - md5 - Message Digest 5 - - - sha - Secure Hash Algorithm - - - ^(md5|sha)$ - - - + #include @@ -532,26 +395,7 @@ - - - Define users access permission (default: 'ro') - - ro rw - - - ro - read only - - - rw - read write - - - ^(ro|rw)$ - - Authorization type must be either 'rw' or 'ro' - - + #include Defines the privacy @@ -575,25 +419,7 @@ Key must contain 8 or more characters - - - Defines the protocol for privacy (default: 'des') - - des aes - - - des - Data Encryption Standard - - - aes - Advanced Encryption Standard - - - ^(des|aes)$ - - - + #include -- cgit v1.2.3