Merge "OF plugin classes must have a strict dependency on Connection Service"
[controller.git] / opendaylight / sal / yang-prototype / 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   import ietf-yang-types { prefix yang; }
7   import ietf-inet-types { prefix inet; }
8
9   organization "OPEN DAYLIGHT";
10   contact "http://www.opendaylight.org/";
11
12   description
13     "Test model for testing of resolving choice, case nodes and generation types from them.";
14
15   revision 2013-07-01 {
16
17   }
18
19   typedef tls-fingerprint-type {
20     type string {
21       pattern '([0-9a-fA-F]){2}(:([0-9a-fA-F]){2})*';
22     }
23   }
24
25   typedef netconf-datastore-type {
26     type enumeration {
27       enum running;
28       enum candidate;
29       enum startup;
30     }
31   }
32
33   container netconf-state {
34     config false;
35
36     container datastores {
37       list datastore {
38         key name;
39
40         leaf name {
41           type netconf-datastore-type;
42         }
43         container locks {
44           choice lock-type {
45
46             case global-lock {
47                 container global-lock {
48
49                 leaf locked-by-session {
50                   type uint32;
51                   mandatory true;
52                 }
53
54                 leaf locked-time {
55                   type yang:date-and-time;
56                   mandatory true;
57                 }
58
59                 container capabilities {
60                   leaf-list capability {
61                       type inet:uri;
62                   }
63                 }
64               }
65             }
66
67             case partial-lock {
68               list partial-lock {
69                   key lock-id;
70
71                   leaf lock-id {
72                     type uint32;
73                   }
74                   leaf-list select {
75                     type yang:xpath1.0;
76                     min-elements 1;
77                   }
78                   leaf-list locked-node {
79                     type string;
80                   }
81               }
82             }
83
84             case fingerprint {
85               choice algorithm-and-hash {
86                   mandatory true;
87                   case md5 {
88                     leaf md5 {
89                       type tls-fingerprint-type;
90                     }
91                   }
92
93                   case sha1 {
94                     leaf sha1 {
95                       type tls-fingerprint-type;
96                     }
97                   }
98                   
99                   case sha224 {
100                     leaf sha224 {
101                       type tls-fingerprint-type;
102                     }
103                   }
104                   
105                   case sha256 {
106                     leaf sha256 {
107                       type tls-fingerprint-type;
108                     }
109                   }
110                   
111                   case sha384 {
112                     leaf sha384 {
113                       type tls-fingerprint-type;
114                     }
115                   }                
116                   
117                   case sha512 {
118                     leaf sha512 {
119                       type tls-fingerprint-type;
120                     }
121                   }
122               }
123             }
124           }
125         }
126       }
127     }
128   }
129 }