Vidyashree Rama | bc9611f | 2016-04-12 23:33:33 +0530 | [diff] [blame] | 1 | module 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 saraswal | a5c2851 | 2016-11-10 21:09:23 +0530 | [diff] [blame] | 10 | 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 Rama | bc9611f | 2016-04-12 23:33:33 +0530 | [diff] [blame] | 30 | } |