1 module Cisco-IOS-XR-types {
3 namespace "http://cisco.com/ns/yang/cisco-xr-types";
6 organization "Cisco Systems, Inc.";
12 Postal: 170 W Tasman Drive
17 E-mail: cs-yang@cisco.com";
21 "This module contains a collection of IOS-XR derived YANG data
24 Copyright (c) 2013-2015 by Cisco Systems, Inc.
25 All rights reserved.";
27 revision "2015-01-19" {
29 "This revision adds the following new data types:
30 - Bgp-ipv4-flowspec-address
31 - Bgp-ipv6-flowspec-address";
34 extension xr-cli-map {
35 argument "cli-command";
36 description "The xr-cli-map statement takes as an argument
37 relevant CLI configuration command.";
40 extension xr-xml-map {
41 argument "xr-xml-node";
42 description "The xr-xml-map statement takes as an argument
43 relevant Cisco XML Schema node name.";
48 pattern "[a-fA-F0-9]{16}";
50 description "Route distinguisher in hexadecimal notation.";
53 typedef Bgp-l2vpn-evpn-addrs {
55 pattern "[a-fA-F0-9]{58}";
57 description "L2VPN EVPN Address in hexadecimal notation.";
62 pattern "[a-fA-F0-9]+";
64 description "BGP link state unicast address in hexadecimal
68 typedef Bgp-ipv6-mvpn-addr {
70 pattern "[a-fA-F0-9]{104}";
72 description "An IPV6 MVPN address in hexadecimal notation.";
75 typedef Bgp-ipv4-mvpn-addr {
77 pattern "[a-fA-F0-9]{56}";
79 description "An IPV4 MVPN address in hexadecimal notation.";
82 typedef Bgp-rt-constrt-addr {
84 pattern "[a-fA-F0-9]{24}";
87 "An IPV4 RTConstraint address in hexadecimal notation.";
90 typedef Bgp-ipv4-mdt-addr {
92 pattern "(([a-f0-9]{16}-)(([1-9]?[0-9]|1[0-9][0-9]|2[0-4]"+
93 "[0-9]|25[0-5])\.){3}([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]"+
96 description "An IPV4 MDT address in dotted decimal notation.
97 An IPv4 MDT address should be of the form
98 0000006400000065-129.29.83.45. This datatype
99 restricts the value of each field 16 digits in
100 hexadecimal for RD field and between 0 and 255
101 for IPv4 address field, i.e.
102 [0000000000000000-ffffffffffffffff]-
103 [0-255].[0-255].[0-255].[0-255].";
106 typedef Bgp-ipv4-tunnel-addr {
108 pattern "((0:|[1-9][0-9]{0,4}:)"+
109 "(([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}"+
110 "([1-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]))";
112 description "An IPV4 tunnel address in dotted decimal notation.
113 An IPv4 tunnel address should be of the form
114 65535:129.29.83.45. This datatype restricts the
115 value of each field between 0 and 65535 for prefix
116 field and 0 and 255 for IPv4 address field, i.e.
117 [0-65535]:[0-255].[0-255].[0-255].[0-255]";
120 typedef Cisco-ios-xr-port-number {
124 description "Port number of range from 1 to 65535";
127 typedef Interface-name {
129 pattern "(([a-zA-Z0-9_]*\d+/){3}\d+)|"+
130 "(([a-zA-Z0-9_]*\d+/){4}\d+)|"+
131 "(([a-zA-Z0-9_]*\d+/){3}\d+\.\d+)|"+
132 "(([a-zA-Z0-9_]*\d+/){2}([a-zA-Z0-9_]*\d+))|"+
133 "([a-zA-Z0-9_-]*\d+)|"+
134 "([a-zA-Z0-9_-]*\d+\.\d+)|"+
137 description "An interface name specifying an interface type and
139 Interface represents a string defining an interface
140 type and instance, e.g. MgmtEth0/4/CPU1/0 or
141 TenGigE0/2/0/0.2 or Bundle-Ether9 or
145 typedef Cisco-ios-xr-string {
147 pattern "[\w\-\.:,_@#%$\+=\|;]+";
149 description "Special characters are not allowed.";
152 typedef Ipv4-prefix-length {
156 description "An IPv4 address prefix length.
157 Must lie between 0 and 32 inclusive.";
160 typedef Ipv6-prefix-length {
164 description "An IPv6 address prefix length.
165 Must lie between 0 and 32 inclusive.";
170 pattern "[a-zA-Z0-9_]*\d+";
172 description "Names the rack portion of a NodeID
173 Rack/Slot/Instance triple";
178 pattern "[a-zA-Z0-9_]*\d+";
180 description "Names the slot portion of a NodeID
181 Rack/Slot/Instance triple";
184 typedef Instance-id {
186 pattern "[a-zA-Z0-9_]*\d+";
188 description "Names the instance portion of a NodeID
189 Rack/Slot/Instance triple";
192 typedef Sub-instance-id {
194 pattern "[a-zA-Z0-9_]*\d+";
196 description "Names the sub-instance portion of an extended
197 NodeID Rack/Slot/Instance/SubInstance";
200 typedef Encryption-type {
204 description "The password string is clear text.";
208 description "The password is encrypted to an MD5 digest.";
212 description "The password is encrypted using Cisco type 7
213 password encryption.";
216 description "The type of encryption used on a password string.";
220 typedef Hex-integer {
222 pattern "[0-9a-fA-F]{1,8}";
224 description "An unsigned 32-bit integer represented in
225 hexadecimal format.";
228 typedef Osi-system-id {
230 pattern "[a-fA-F0-9]{4}(\.[a-fA-F0-9]{4}){2}";
232 description "An OSI system ID should be of the form
233 0123.4567.89ab. This data type restricts each
234 character to a hex character.";
237 typedef Osi-area-address {
239 pattern "[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){0,6}";
241 description "An OSI area address should consist of an odd number
242 of octets, and be of the form 01 or 01.2345 etc up
243 to 01.2345.6789.abcd.ef01.2345.6789. This data type
244 restricts each character to a hex character.";
247 typedef Isis-node-id {
249 pattern "[a-fA-F0-9]{4}(\.[a-fA-F0-9]{4}){2}\.[a-fA-F0-9]{2}";
251 description "An ISIS node ID should be of the form
252 0123.4567.89ab.cd. This data type restricts each
253 character to a hex character.";
258 pattern "[a-fA-F0-9]{4}(\.[a-fA-F0-9]{4}){2}";
260 description "String representation of a SNPA, 802.2 MAC address
261 in canonical format, e.g. 0123.4567.89ab";
264 typedef Isis-lsp-id {
266 pattern "[a-fA-F0-9]{4}(\.[a-fA-F0-9]{4}){2}\.[a-fA-F0-9]{2}"+
269 description "An ISIS LSP ID should be of the form
270 0123.4567.89ab.cd-ef. This data type restricts each
271 character to a hex character.";
277 "[a-fA-F0-9]{2}(\.[a-fA-F0-9]{4}){3,9}\.[a-fA-F0-9]{2}";
279 description "An OSI NET should consist of an even number of
280 octets, and be of the form 01.2345.6789.abcd.ef etc
282 01.2345.6789.abcd.ef01.2345.6789.abcd.ef01.2345.67.
283 This data type restricts each character to a hex
287 typedef String-identifier {
289 pattern "[a-zA-Z][\w\-]*";
291 description "A string for specifying identifier.";
294 typedef Extended-node-id {
296 pattern "([a-zA-Z0-9_]*\d+/){3}([a-zA-Z0-9_]*\d+)";
298 description "A location used as value information and specified
299 as a Rack/Slot/Instance/SubInstance, e.g.
305 pattern "([a-zA-Z0-9_]*\d+/){2}([a-zA-Z0-9_]*\d+)";
307 description "A location used as value information and specified
308 as a Rack/Slot/Instance triple, e.g. F0/SC1/0.";
313 pattern "((([a-zA-Z0-9_]*\d+)|(\*))/){2}(([a-zA-Z0-9_]*\d+)"+
316 description "Partially qualified location which is used for
317 wildcarding location specifications, e.g. 1/*/*";
320 typedef Md5-password {
322 pattern "(!.+)|([^!].+)";
325 "The Md5-password type is used to store password using the MD5
327 When a clear text value is set to a leaf of this type, the
328 server calculates a password hash and stores the result
329 in the datastore. The password is never stored in clear text.
331 When a leaf of this type is read, the stored password hash is
334 A value of this type matches one of the forms:
336 !<clear text password>
339 The '!' prefix signals that the value is clear text. When
340 such a value is received by the server, a hash value is
341 calculated. This value is stored in the configuration data
344 If a value starting without '!' is received, the server knows
345 that the value already represents a hashed value, and stores
346 it as is in the data store.";
349 typedef Proprietary-password {
351 pattern "(!.+)|([^!].+)";
354 "The Proprietary-password type is used to store password
355 using the Cisco proprietary hash function.
356 When a clear text value is set to a leaf of this type, the
357 server calculates a password hash and stores the result
358 in the datastore. The password is never stored in clear text.
360 When a leaf of this type is read, the stored password hash is
363 A value of this type matches one of the forms:
365 !<clear text password>
368 The '!' prefix signals that the value is clear text. When
369 such a value is received by the server, a hash value is
370 calculated. This value is stored in the configuration data
373 If a value starting without '!' is received, the server knows
374 that the value already represents a hashed value, and stores
375 it as is in the data store.";
378 typedef Bgp-ipv4-flowspec-address {
380 pattern "[a-fA-F0-9]{4096}";
382 description "An IPV4 Flowspec address in hexadecimal notation.";
385 typedef Bgp-ipv6-flowspec-address {
387 pattern "[a-fA-F0-9]{4096}";
389 description "An IPV6 Flowspec address in hexadecimal notation.";