17cf07c49acb0a63618f855ed3cc147326a4cf1c
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-generator-impl / src / test / resources / choice-case-type-test-models / augment-monitoring@2013-07-01.yang
1 module augment-monitoring {
2     yang-version 1;
3     namespace "urn:ietf:params:xml:ns:yang:augment-monitoring";
4     prefix "amon";
5
6     import ietf-netconf-monitoring { prefix nm; }
7
8     organization "OPEN DAYLIGHT";
9     contact "http://www.opendaylight.org/";
10
11     revision "2013-07-01" {
12             reference "NO REF";
13     }
14
15     augment "/nm:netconf-state/nm:datastores/nm:datastore/nm:locks/nm:lock-type" {
16         case autonomous-lock {
17             container autonomous-def {
18                 leaf lock-id {
19                     type int32;
20                 }
21
22                 leaf lock-time {
23                     type uint32;
24                 }
25             }
26         }
27
28         case anonymous-lock {
29             leaf lock-time {
30                 type uint32;
31             }
32         }
33
34         leaf leaf-aug-case {
35             type string;
36         }
37     }
38
39     augment "/nm:netconf-state/nm:datastores/nm:datastore/nm:locks/nm:lock-type/nm:partial-lock" {
40         choice aug-case-by-choice {
41             case foo {
42                 leaf foo {
43                     type string;
44                 }
45             }
46
47             case bar {
48                 leaf bar {
49                     type boolean;
50                 }
51             }
52         }
53     }
54
55     augment "/nm:netconf-state/nm:datastores/nm:datastore" {
56         choice storage-format {
57             case xml {
58                 container xml-def {
59                     leaf file-name {
60                         type string;
61                     }
62                 }
63             }
64
65             case yang {
66                 leaf yang-file-name {
67                     type string;
68                 }
69             }
70
71             case unknown-files {
72                 list files {
73                     key "file-name";
74
75                     leaf file-name {
76                         type string;
77                     }
78
79                     container file-data {
80                         leaf utf8-data {
81                             type string;
82                         }
83                     }
84                 }
85             }
86         }
87     }
88 }