Added test to yang-maven-plugin-it.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / maven-yang-plugin-it / src / test / resources / GenerateTest1 / src / main / resources / testfile3.yang
1 module types3 {
2     yang-version 1;
3     namespace "urn:simple.container.demo.test";
4     prefix "t3";
5
6     import types2 {
7         prefix "data";
8         revision-date 2013-02-27;
9     }
10
11     organization "opendaylight";
12     contact "http://www.opendaylight.org/";
13
14     revision "2013-02-27" {
15         reference " WILL BE DEFINED LATER";
16     }
17
18     typedef union1 {
19         type union2;
20     }
21
22     typedef union2 {
23         type union {
24             type int32;
25             type data:nested-union2;
26         }
27     }
28
29     augment "/data:interfaces/data:ifEntry" {
30         when "if:ifType='ds0'";
31         container augment-holder {
32             description "Description for augment holder";
33         }
34     }
35     
36     augment "/data:interfaces/data:ifEntry" {
37         when "if:ifType='ds2'";
38         container augment-holder2 {
39             description "Description for augment holder";
40         }
41     }
42
43     container network {
44         mnt:mountpoint point {
45                 mnt:target-ref target;
46         }
47         
48             description "network-description";
49             reference "network-reference";
50             status obsolete;
51             config true;
52             presence "some presence text";
53     }
54
55     feature local-storage {
56         description
57             "This feature means the device supports local
58              storage (memory, flash or disk) that can be used to
59              store syslog messages.";
60     }
61     
62     extension c-define {
63         description
64             "Takes as argument a name string.
65              Makes the code generator use the given name in the
66              #define.";
67         argument "name";
68     }
69     
70     notification event {
71         leaf event-class {
72             type string;
73         }
74         anyxml reporting-entity;
75         leaf severity {
76             type string;
77         }
78     }
79     
80     rpc get-config {
81         description
82           "Retrieve all or part of a specified configuration.";
83
84         reference "RFC 6241, Section 7.1";
85
86         input {
87             container source {
88                 description
89                   "Particular configuration to retrieve.";
90
91                 choice config-source {
92                     mandatory true;
93                     description
94                       "The configuration to retrieve.";
95                     case a {
96                         leaf candidate {
97                             if-feature candidate;
98                             type empty;
99                             description
100                               "The candidate configuration is the config source.";
101                         }
102                     }
103                     case b {
104                         leaf running {
105                             type empty;
106                             description
107                               "The running configuration is the config source.";
108                         }
109                     }
110                     case c {
111                         leaf startup {
112                             if-feature startup;
113                             type empty;
114                             description
115                               "The startup configuration is the config source.
116                                This is optional-to-implement on the server because
117                                not all servers will support filtering for this
118                                datastore.";
119                         }
120                     }
121                 }
122             }
123
124             anyxml filter {
125                 description
126                   "Subtree or XPath filter to use.";
127                    nc:get-filter-element-attributes;
128             }
129         }
130
131         output {
132             anyxml data {
133                 description
134                   "Copy of the source datastore subset that matched
135                    the filter criteria (if any).  An empty data container
136                    indicates that the request did not produce any results.";
137             }
138         }
139     }
140
141 }