blob: a7d27c29397a50ae01ebc901bfc29016a55f7e21 [file] [log] [blame]
Gaurav Agrawal28920d82017-10-06 17:39:42 +05301submodule ietf-snmp-common {
2
3 belongs-to ietf-snmp {
4 prefix snmp;
5 }
6
7 import ietf-yang-types {
8 prefix yang;
9 }
10
11 organization
12 "IETF NETMOD (NETCONF Data Modeling Language) Working Group";
13
14 contact
15 "WG Web: <http://tools.ietf.org/wg/netmod/>
16 WG List: <mailto:netmod@ietf.org>
17 WG Chair: Thomas Nadeau
18 <mailto:tnadeau@lucidvision.com>
19
20 WG Chair: Juergen Schoenwaelder
21 <mailto:j.schoenwaelder@jacobs-university.de>
22
23 Editor: Martin Bjorklund
24 <mailto:mbj@tail-f.com>
25
26 Editor: Juergen Schoenwaelder
27 <mailto:j.schoenwaelder@jacobs-university.de>";
28
29 description
30 "This submodule contains a collection of common YANG definitions
31 for configuring SNMP engines.
32
33 Copyright (c) 2014 IETF Trust and the persons identified as
34 authors of the code. All rights reserved.
35
36 Redistribution and use in source and binary forms, with or
37 without modification, is permitted pursuant to, and subject
38 to the license terms contained in, the Simplified BSD License
39 set forth in Section 4.c of the IETF Trust's Legal Provisions
40 Relating to IETF Documents
41 (http://trustee.ietf.org/license-info).
42
43 This version of this YANG module is part of RFC 7407; see
44 the RFC itself for full legal notices.";
45
46 revision 2014-12-10 {
47 description
48 "Initial revision.";
49 reference
50 "RFC 7407: A YANG Data Model for SNMP Configuration";
51 }
52
53 /* Collection of SNMP-specific data types */
54
55 typedef admin-string {
56 type string {
57 length "0..255";
58 }
59 description
60 "Represents SnmpAdminString as defined in RFC 3411.
61
62 Note that the size of an SnmpAdminString is measured in
63 octets, not characters.";
64
65 reference
66 "RFC 3411: An Architecture for Describing Simple Network
67 Management Protocol (SNMP) Management Frameworks.
68 SNMP-FRAMEWORK-MIB.SnmpAdminString";
69 }
70
71 typedef identifier {
72 type admin-string {
73 length "1..32";
74 }
75 description
76 "Identifiers are used to name items in the SNMP configuration
77 datastore.";
78 }
79
80 typedef context-name {
81 type admin-string {
82 length "0..32";
83 }
84 description
85 "The context type represents an SNMP context name.";
86 reference
87 "RFC 3411: An Architecture for Describing Simple Network
88 Management Protocol (SNMP) Management Frameworks";
89 }
90
91 typedef security-name {
92 type admin-string {
93 length "1..32";
94 }
95 description
96 "The security-name type represents an SNMP security name.";
97 reference
98 "RFC 3411: An Architecture for Describing Simple Network
99 Management Protocol (SNMP) Management Frameworks";
100 }
101
102 typedef security-model {
103 type union {
104 type enumeration {
105 enum v1 { value 1; }
106 enum v2c { value 2; }
107 enum usm { value 3; }
108 enum tsm { value 4; }
109 }
110 type int32 {
111 range "1..2147483647";
112 }
113 }
114 reference
115 "RFC 3411: An Architecture for Describing Simple Network
116 Management Protocol (SNMP) Management Frameworks";
117 }
118
119 typedef security-model-or-any {
120 type union {
121 type enumeration {
122 enum any { value 0; }
123 }
124 type security-model;
125 }
126 reference
127 "RFC 3411: An Architecture for Describing Simple Network
128 Management Protocol (SNMP) Management Frameworks";
129 }
130
131 typedef security-level {
132 type enumeration {
133 enum no-auth-no-priv { value 1; }
134 enum auth-no-priv { value 2; }
135 enum auth-priv { value 3; }
136 }
137 reference
138 "RFC 3411: An Architecture for Describing Simple Network
139 Management Protocol (SNMP) Management Frameworks";
140 }
141
142 typedef engine-id {
143 type yang:hex-string {
144 pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2}){4,31}';
145 }
146 description
147 "The engine ID specified as a list of colon-specified
148 hexadecimal octets, e.g., '80:00:02:b8:04:61:62:63'.";
149 reference
150 "RFC 3411: An Architecture for Describing Simple Network
151 Management Protocol (SNMP) Management Frameworks";
152 }
153
154 typedef wildcard-object-identifier {
155 type string;
156 description
157 "The wildcard-object-identifier type represents an SNMP object
158 identifier where subidentifiers can be given either as a label,
159 in numeric form, or a wildcard, represented by an asterisk
160 ('*').";
161 }
162
163 typedef tag-value {
164 type string {
165 length "0..255";
166 }
167 description
168 "Represents SnmpTagValue as defined in RFC 3413.
169
170 Note that the size of an SnmpTagValue is measured in
171 octets, not characters.";
172 reference
173 "RFC 3413: Simple Network Management Protocol (SNMP)
174 Applications.
175 SNMP-TARGET-MIB.SnmpTagValue";
176 }
177
178 container snmp {
179 description
180 "Top-level container for SNMP-related configuration and
181 status objects.";
182 }
183
184}