Fix failing IT tests
[controller.git] / opendaylight / md-sal / sal-rest-docgen / src / test / resources / yang / toaster_short.yang
1   module toaster2 {
2
3     yang-version 1;
4
5     namespace
6       "http://netconfcentral.org/ns/toaster2";
7
8     prefix toast;
9
10     organization "Netconf Central";
11
12     contact
13       "Andy Bierman <andy@netconfcentral.org>";
14
15     description
16       "YANG version of the TOASTER-MIB.";
17
18     revision "2009-11-20" {
19       description
20         "Toaster module in progress.";
21     }
22
23
24     identity toast-type {
25       description
26         "Base for all bread types supported by the toaster.
27            New bread types not listed here nay be added in the
28            future.";
29     }
30
31     identity white-bread {
32       base toast:toast-type;
33       description "White bread.";
34     }
35
36     identity wheat-bread {
37       base toast-type;
38       description "Wheat bread.";
39     }
40
41     identity wonder-bread {
42       base toast-type;
43       description "Wonder bread.";
44     }
45
46     identity frozen-waffle {
47       base toast-type;
48       description "Frozen waffle.";
49     }
50
51     identity frozen-bagel {
52       base toast-type;
53       description "Frozen bagel.";
54     }
55
56     identity hash-brown {
57       base toast-type;
58       description "Hash browned potatos.";
59     }
60
61     typedef DisplayString {
62       type string {
63         length "0 .. 255";
64       }
65       description
66         "YANG version of the SMIv2 DisplayString TEXTUAL-CONVENTION.";
67       reference
68         "RFC 2579, section 2.";
69
70     }
71
72     container toaster {
73       presence
74         "Indicates the toaster service is available";
75       description
76         "Top-level container for all toaster database objects.";
77       leaf toasterManufacturer {
78         type DisplayString;
79         config false;
80         mandatory true;
81         description
82           "The name of the toaster's manufacturer. For instance,
83                 Microsoft Toaster.";
84       }
85
86       leaf toasterModelNumber {
87         type DisplayString;
88         config false;
89         mandatory true;
90         description
91           "The name of the toaster's model. For instance,
92                Radiant Automatic.";
93       }
94
95       leaf toasterStatus {
96         type enumeration {
97           enum "up" {
98             value 1;
99             description
100               "The toaster knob position is up.
101                       No toast is being made now.";
102           }
103           enum "down" {
104             value 2;
105             description
106               "The toaster knob position is down.
107                       Toast is being made now.";
108           }
109         }
110         config false;
111         mandatory true;
112         description
113           "This variable indicates the current state of
114                the toaster.";
115       }
116
117       leaf darknessFactor {
118         type uint32;
119         config true;
120         default 1000;
121         description
122           "The darkness factor. Basically, the number of ms to multiple the doneness value by.";
123       }
124     }  // container toaster
125
126     rpc make-toast {
127       description
128         "Make some toast.
129            The toastDone notification will be sent when
130            the toast is finished.
131            An 'in-use' error will be returned if toast
132            is already being made.
133            A 'resource-denied' error will be returned
134            if the toaster service is disabled.";
135       input {
136         leaf toasterDoneness {
137           type uint32 {
138             range "1 .. 10";
139           }
140           default '5';
141           description
142             "This variable controls how well-done is the
143                    ensuing toast. It should be on a scale of 1 to 10.
144                    Toast made at 10 generally is considered unfit
145                    for human consumption; toast made at 1 is warmed
146                    lightly.";
147         }
148
149         leaf toasterToastType {
150           type identityref {
151             base toast:toast-type;
152           }
153           default 'wheat-bread';
154           description
155             "This variable informs the toaster of the type of
156                    material that is being toasted. The toaster
157                    uses this information, combined with
158                    toasterDoneness, to compute for how
159                    long the material must be toasted to achieve
160                    the required doneness.";
161         }
162       }
163     }  // rpc make-toast
164
165     rpc cancel-toast {
166       description
167         "Stop making toast, if any is being made.
168            A 'resource-denied' error will be returned
169            if the toaster service is disabled.";
170     }  // rpc cancel-toast
171
172     rpc restock-toaster {
173         description
174           "Restocks the toaster with the amount of bread specified.";
175
176         input {
177             leaf amountOfBreadToStock {
178                 type uint32;
179                 description
180                   "Indicates the amount of bread to re-stock";
181             }
182         }
183     }
184
185     notification toasterOutOfBread {
186       description
187         "Indicates that the toaster has run of out bread.";
188     }  // notification toasterOutOfStock
189
190     notification toasterRestocked {
191       description
192         "Indicates that the toaster has run of out bread.";
193       leaf amountOfBread {
194         type uint32;
195         description
196           "Indicates the amount of bread that was re-stocked";
197       }
198     }  // notification toasterOutOfStock
199
200   }  // module toaster