@@ -26,116 +26,128 @@ module example-test {
26
26
reference
27
27
"draft-ietf-dtn-adm-yang" ;
28
28
}
29
- amm: enum 9999 ;
29
+
30
30
feature example {
31
31
description
32
32
"some feature" ;
33
33
}
34
+
35
+ amm:enum 9999 ;
34
36
amm:typedef counter32 {
35
37
amm:enum 26 ;
38
+ description
39
+ "32-bit counter" ;
36
40
amm:type "/ARITYPE/UINT" ;
37
41
}
38
42
amm:typedef gauge32 {
39
43
amm:enum 27 ;
44
+ description
45
+ "32-bit gauge" ;
40
46
amm:type "/ARITYPE/INT" ;
41
47
}
42
48
amm:typedef counter64 {
43
49
amm:enum 28 ;
50
+ description
51
+ "64-bit counter" ;
44
52
amm:type "/ARITYPE/UVAST" ;
45
53
}
46
54
amm:typedef gauge64 {
47
55
amm:enum 29 ;
56
+ description
57
+ "64-bit gauge" ;
48
58
amm:type "/ARITYPE/VAST" ;
49
59
}
50
60
amm:edd edd_uvast {
51
61
amm:enum 0 ;
52
- amm:type "/ARITYPE/UVAST" ;
53
62
description
54
63
"Example UVAST EDD." ;
64
+ amm:type "/ARITYPE/UVAST" ;
55
65
}
56
66
amm:edd edd_uvast_param {
57
67
amm:enum 1 ;
68
+ description
69
+ "Example UVAST EDD with parameters." ;
58
70
amm:type "/ARITYPE/UVAST" ;
59
71
amm:parameter other {
60
- amm:type "/ARITYPE/UVAST" ;
61
72
description
62
73
"Example parameter." ;
74
+ amm:type "/ARITYPE/UVAST" ;
63
75
}
64
- description
65
- "Example UVAST EDD with parameters." ;
66
76
}
67
77
amm:edd edd_tp {
68
78
amm:enum 2 ;
69
- amm:type "/ARITYPE/TP" ;
70
79
description
71
80
"Example TP EDD: current system time." ;
81
+ amm:type "/ARITYPE/TP" ;
72
82
}
73
83
amm:edd endpoint_active {
74
84
amm:enum 3 ;
85
+ description
86
+ "Is the given endpoint active? (0=no)" ;
75
87
amm:type "/ARITYPE/UVAST" ;
76
88
amm:parameter endpoint_name {
77
- amm:type "/ARITYPE/TEXTSTR" ;
78
89
description
79
90
"Endpoint name." ;
91
+ amm:type "/ARITYPE/TEXTSTR" ;
80
92
}
81
- description
82
- "Is the given endpoint active? (0=no)" ;
83
93
}
84
94
amm:var var_uvast_val {
85
95
amm:enum 0 ;
86
- amm:type "/ARITYPE/UVAST" ;
87
- amm:init-value "34" ;
88
96
description
89
97
"Example UVAST VAR with initialized value." ;
98
+ amm:init-value "34" ;
99
+ amm:type "/ARITYPE/UVAST" ;
90
100
}
91
101
amm:const const1 {
92
- amm:enum 0 ;
93
102
if-feature "example" ;
94
- amm:type "/ARITYPE/UVAST" ;
95
- amm:init-value "31" ;
103
+ amm:enum 0 ;
96
104
description
97
105
"Example value." ;
106
+ amm:init-value "31" ;
107
+ amm:type "/ARITYPE/UVAST" ;
98
108
}
99
109
amm:const showall {
100
110
amm:enum 1 ;
101
- amm:type "/ARITYPE/AC" ;
111
+ description
112
+ "Some constant list" ;
102
113
amm:init-value "/AC/(./CONST/const1)" ;
114
+ amm:type "/ARITYPE/AC" ;
103
115
}
104
116
amm:ctrl get {
105
117
amm:enum 2 ;
118
+ description
119
+ "Get a single MIB value from the agent." ;
106
120
amm:parameter object {
107
- amm:type "/ARITYPE/OBJECT" ;
108
- amm:default "hello" ;
109
121
description
110
122
"Identity of the object to retrieve." ;
123
+ amm:default "hello" ;
124
+ amm:type "/ARITYPE/OBJECT" ;
111
125
}
112
126
amm:result data {
113
- amm:type "/ARITYPE/BYTESTR" ;
114
127
description
115
128
"Encoded value of the object." ;
129
+ amm:type "/ARITYPE/BYTESTR" ;
116
130
}
117
- description
118
- "Get a single MIB value from the agent." ;
119
131
}
120
132
amm:ctrl set {
121
133
amm:enum 3 ;
134
+ description
135
+ "Set a single MIB value in the agent." ;
122
136
amm:parameter object {
123
- amm:type "/ARITYPE/OBJECT" ;
124
137
description
125
138
"Identify the value to retrieve." ;
139
+ amm:type "/ARITYPE/OBJECT" ;
126
140
}
127
141
amm:parameter data {
128
- amm:type "/ARITYPE/BYTESTR" ;
129
142
description
130
143
"Endcoded value used to write the object" ;
144
+ amm:type "/ARITYPE/BYTESTR" ;
131
145
}
132
146
amm:result errorcode {
133
- amm:type "/ARITYPE/BYTE" ;
134
147
description
135
148
"If non-zero, an indicator of an error." ;
149
+ amm:type "/ARITYPE/BYTE" ;
136
150
}
137
- description
138
- "Set a single MIB value in the agent." ;
139
151
}
140
152
amm:oper add {
141
153
amm:enum 0 ;
@@ -159,4 +171,4 @@ module example-test {
159
171
amm:type "/ARITYPE/UVAST" ;
160
172
}
161
173
}
162
- }
174
+ }
0 commit comments