230b329c59698b7349d4fc3ca43e127ca587c5d3
[mdsal.git] / code-generator / binding-generator-impl / src / test / resources / choice-case-type-test-models / choice-monitoring@2013-07-01.yang
1 module choice-monitoring {
2   yang-version 1;
3   namespace "urn:ietf:params:xml:ns:yang:choice-monitoring";
4   prefix "ncm";
5
6   revision 2013-07-01 {
7   }
8
9   typedef tls-fingerprint-type {
10     type string {
11       pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2})*';
12     }
13   }
14
15   typedef netconf-datastore-type {
16     type enumeration {
17       enum running;
18       enum candidate;
19       enum startup;
20     }
21   }
22
23   container netconf-state {
24     config false;
25
26     container datastores {
27       list datastore {
28         key name;
29
30         leaf name {
31           type netconf-datastore-type;
32         }
33         container locks {
34           choice lock-type {
35
36             case global-lock {
37                 container global-lock {
38
39                 leaf locked-by-session {
40                   type uint32;
41                   mandatory true;
42                 }
43
44                 leaf locked-time {
45                   type string;
46                   mandatory true;
47                 }
48
49                 container capabilities {
50                   leaf-list capability {
51                       type string;
52                   }
53                 }
54               }
55             }
56
57             case partial-lock {
58               list partial-lock {
59                   key lock-id;
60
61                   leaf lock-id {
62                     type uint32;
63                   }
64                   leaf-list select {
65                     type string;
66                     min-elements 1;
67                   }
68                   leaf-list locked-node {
69                     type string;
70                   }
71               }
72             }
73
74             case fingerprint {
75               choice algorithm-and-hash {
76                   mandatory true;
77                   case md5 {
78                     leaf md5 {
79                       type tls-fingerprint-type;
80                     }
81                   }
82
83                   case sha1 {
84                     leaf sha1 {
85                       type tls-fingerprint-type;
86                     }
87                   }
88                   
89                   case sha224 {
90                     leaf sha224 {
91                       type tls-fingerprint-type;
92                     }
93                   }
94                   
95                   case sha256 {
96                     leaf sha256 {
97                       type tls-fingerprint-type;
98                     }
99                   }
100                   
101                   case sha384 {
102                     leaf sha384 {
103                       type tls-fingerprint-type;
104                     }
105                   }                
106                   
107                   case sha512 {
108                     leaf sha512 {
109                       type tls-fingerprint-type;
110                     }
111                   }
112               }
113             }
114           }
115         }
116       }
117     }
118   }
119 }