blob: 0c93e9d730396ee63e0d4a2f5f56fa582406fe5d [file] [log] [blame]
Vidyashree Ramabc9611f2016-04-12 23:33:33 +05301module Test {
2 yang-version 1;
3 namespace http://huawei.com;
4 prefix Ant;
5 leaf invalid-interval {
6 type string {
7 pattern "[a-zA-Z]";
8 }
9 }
Bharat saraswala5c28512016-11-10 21:09:23 +053010 leaf ipv4-address {
11 type string {
12 pattern
13 '(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(%[\p{N}\p{L}]+)?';
14 }
15 description
16 "The ipv4-address type represents an IPv4 address in
17 dotted-quad notation. The IPv4 address may include a zone
18 index, separated by a % sign.
19
20 The zone index is used to disambiguate identical address
21 values. For link-local addresses, the zone index will
22 typically be the interface index number or the name of an
23 interface. If the zone index is not present, the default
24 zone of the device will be used.
25
26 The canonical format for the zone index is the numerical
27 format";
28 }
29
Vidyashree Ramabc9611f2016-04-12 23:33:33 +053030}