Adding TestVNF netconf server
[demo.git] / vnfs / TestVNF / netconftemplates / netconftemplates / turing-machine@2013-12-27.yin
1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2   <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring">&lt;?xml version="1.0" encoding="UTF-8"?&gt;
3 &lt;module name="turing-machine"
4         xmlns="urn:ietf:params:xml:ns:yang:yin:1"
5         xmlns:tm="http://example.net/turing-machine"&gt;
6   &lt;namespace uri="http://example.net/turing-machine"/&gt;
7   &lt;prefix value="tm"/&gt;
8   &lt;description&gt;
9     &lt;text&gt;Data model for the Turing Machine.&lt;/text&gt;
10   &lt;/description&gt;
11   &lt;revision date="2013-12-27"&gt;
12     &lt;description&gt;
13       &lt;text&gt;Initial revision.&lt;/text&gt;
14     &lt;/description&gt;
15   &lt;/revision&gt;
16   &lt;typedef name="tape-symbol"&gt;
17     &lt;type name="string"&gt;
18       &lt;length value="0..1"/&gt;
19     &lt;/type&gt;
20     &lt;description&gt;
21       &lt;text&gt;Type of symbols appearing in tape cells.
22
23 A blank is represented as an empty string where necessary.&lt;/text&gt;
24     &lt;/description&gt;
25   &lt;/typedef&gt;
26   &lt;typedef name="cell-index"&gt;
27     &lt;type name="int64"/&gt;
28     &lt;description&gt;
29       &lt;text&gt;Type for indexing tape cells.&lt;/text&gt;
30     &lt;/description&gt;
31   &lt;/typedef&gt;
32   &lt;typedef name="state-index"&gt;
33     &lt;type name="uint16"/&gt;
34     &lt;description&gt;
35       &lt;text&gt;Type for indexing states of the control unit.&lt;/text&gt;
36     &lt;/description&gt;
37   &lt;/typedef&gt;
38   &lt;typedef name="head-dir"&gt;
39     &lt;type name="enumeration"&gt;
40       &lt;enum name="left"/&gt;
41       &lt;enum name="right"/&gt;
42     &lt;/type&gt;
43     &lt;default value="right"/&gt;
44     &lt;description&gt;
45       &lt;text&gt;Possible directions for moving the read/write head, one cell
46 to the left or right (default).&lt;/text&gt;
47     &lt;/description&gt;
48   &lt;/typedef&gt;
49   &lt;grouping name="tape-cells"&gt;
50     &lt;description&gt;
51       &lt;text&gt;The tape of the Turing Machine is represented as a sparse
52 array.&lt;/text&gt;
53     &lt;/description&gt;
54     &lt;list name="cell"&gt;
55       &lt;key value="coord"/&gt;
56       &lt;description&gt;
57         &lt;text&gt;List of non-blank cells.&lt;/text&gt;
58       &lt;/description&gt;
59       &lt;leaf name="coord"&gt;
60         &lt;type name="cell-index"/&gt;
61         &lt;description&gt;
62           &lt;text&gt;Coordinate (index) of the tape cell.&lt;/text&gt;
63         &lt;/description&gt;
64       &lt;/leaf&gt;
65       &lt;leaf name="symbol"&gt;
66         &lt;type name="tape-symbol"&gt;
67           &lt;length value="1"/&gt;
68         &lt;/type&gt;
69         &lt;description&gt;
70           &lt;text&gt;Symbol appearing in the tape cell.
71
72 Blank (empty string) is not allowed here because the
73 'cell' list only contains non-blank cells.&lt;/text&gt;
74         &lt;/description&gt;
75       &lt;/leaf&gt;
76     &lt;/list&gt;
77   &lt;/grouping&gt;
78   &lt;container name="turing-machine"&gt;
79     &lt;description&gt;
80       &lt;text&gt;State data and configuration of a Turing Machine.&lt;/text&gt;
81     &lt;/description&gt;
82     &lt;leaf name="state"&gt;
83       &lt;type name="state-index"/&gt;
84       &lt;config value="false"/&gt;
85       &lt;mandatory value="true"/&gt;
86       &lt;description&gt;
87         &lt;text&gt;Current state of the control unit.
88
89 The initial state is 0.&lt;/text&gt;
90       &lt;/description&gt;
91     &lt;/leaf&gt;
92     &lt;leaf name="head-position"&gt;
93       &lt;type name="cell-index"/&gt;
94       &lt;config value="false"/&gt;
95       &lt;mandatory value="true"/&gt;
96       &lt;description&gt;
97         &lt;text&gt;Position of tape read/write head.&lt;/text&gt;
98       &lt;/description&gt;
99     &lt;/leaf&gt;
100     &lt;container name="tape"&gt;
101       &lt;config value="false"/&gt;
102       &lt;description&gt;
103         &lt;text&gt;The contents of the tape.&lt;/text&gt;
104       &lt;/description&gt;
105       &lt;uses name="tape-cells"/&gt;
106     &lt;/container&gt;
107     &lt;container name="transition-function"&gt;
108       &lt;description&gt;
109         &lt;text&gt;The Turing Machine is configured by specifying the
110 transition function.&lt;/text&gt;
111       &lt;/description&gt;
112       &lt;list name="delta"&gt;
113         &lt;key value="label"/&gt;
114         &lt;unique tag="input/state input/symbol"/&gt;
115         &lt;description&gt;
116           &lt;text&gt;The list of transition rules.&lt;/text&gt;
117         &lt;/description&gt;
118         &lt;leaf name="label"&gt;
119           &lt;type name="string"/&gt;
120           &lt;description&gt;
121             &lt;text&gt;An arbitrary label of the transition rule.&lt;/text&gt;
122           &lt;/description&gt;
123         &lt;/leaf&gt;
124         &lt;container name="input"&gt;
125           &lt;description&gt;
126             &lt;text&gt;Input parameters (arguments) of the transition rule.&lt;/text&gt;
127           &lt;/description&gt;
128           &lt;leaf name="state"&gt;
129             &lt;type name="state-index"/&gt;
130             &lt;mandatory value="true"/&gt;
131             &lt;description&gt;
132               &lt;text&gt;Current state of the control unit.&lt;/text&gt;
133             &lt;/description&gt;
134           &lt;/leaf&gt;
135           &lt;leaf name="symbol"&gt;
136             &lt;type name="tape-symbol"/&gt;
137             &lt;mandatory value="true"/&gt;
138             &lt;description&gt;
139               &lt;text&gt;Symbol read from the tape cell.&lt;/text&gt;
140             &lt;/description&gt;
141           &lt;/leaf&gt;
142         &lt;/container&gt;
143         &lt;container name="output"&gt;
144           &lt;description&gt;
145             &lt;text&gt;Output values of the transition rule.&lt;/text&gt;
146           &lt;/description&gt;
147           &lt;leaf name="state"&gt;
148             &lt;type name="state-index"/&gt;
149             &lt;description&gt;
150               &lt;text&gt;New state of the control unit. If this leaf is not
151 present, the state doesn't change.&lt;/text&gt;
152             &lt;/description&gt;
153           &lt;/leaf&gt;
154           &lt;leaf name="symbol"&gt;
155             &lt;type name="tape-symbol"/&gt;
156             &lt;description&gt;
157               &lt;text&gt;Symbol to be written to the tape cell. If this leaf is
158 not present, the symbol doesn't change.&lt;/text&gt;
159             &lt;/description&gt;
160           &lt;/leaf&gt;
161           &lt;leaf name="head-move"&gt;
162             &lt;type name="head-dir"/&gt;
163             &lt;description&gt;
164               &lt;text&gt;Move the head one cell to the left or right&lt;/text&gt;
165             &lt;/description&gt;
166           &lt;/leaf&gt;
167         &lt;/container&gt;
168       &lt;/list&gt;
169     &lt;/container&gt;
170   &lt;/container&gt;
171   &lt;rpc name="initialize"&gt;
172     &lt;description&gt;
173       &lt;text&gt;Initialize the Turing Machine as follows:
174
175 1. Put the control unit into the initial state (0).
176
177 2. Move the read/write head to the tape cell with coordinate
178    zero.
179
180 3. Write the string from the 'tape-content' input parameter to
181    the tape, character by character, starting at cell 0. The
182    tape is othewise empty.&lt;/text&gt;
183     &lt;/description&gt;
184     &lt;input&gt;
185       &lt;leaf name="tape-content"&gt;
186         &lt;type name="string"/&gt;
187         &lt;default value=""/&gt;
188         &lt;description&gt;
189           &lt;text&gt;The string with which the tape shall be initialized. The
190 leftmost symbol will be at tape coordinate 0.&lt;/text&gt;
191         &lt;/description&gt;
192       &lt;/leaf&gt;
193     &lt;/input&gt;
194   &lt;/rpc&gt;
195   &lt;rpc name="run"&gt;
196     &lt;description&gt;
197       &lt;text&gt;Start the Turing Machine operation.&lt;/text&gt;
198     &lt;/description&gt;
199   &lt;/rpc&gt;
200   &lt;rpc name="run-until"&gt;
201     &lt;description&gt;
202       &lt;text&gt;Start the Turing Machine operation and let it run until it is halted
203 or ALL the defined breakpoint conditions are satisfied.&lt;/text&gt;
204     &lt;/description&gt;
205     &lt;input&gt;
206       &lt;leaf name="state"&gt;
207         &lt;type name="state-index"/&gt;
208         &lt;description&gt;
209           &lt;text&gt;What state the control unit has to be at for the execution to be paused.&lt;/text&gt;
210         &lt;/description&gt;
211       &lt;/leaf&gt;
212       &lt;leaf name="head-position"&gt;
213         &lt;type name="cell-index"/&gt;
214         &lt;description&gt;
215           &lt;text&gt;Position of tape read/write head for which the breakpoint applies.&lt;/text&gt;
216         &lt;/description&gt;
217       &lt;/leaf&gt;
218       &lt;container name="tape"&gt;
219         &lt;description&gt;
220           &lt;text&gt;What content the tape has to have for the breakpoint to apply.&lt;/text&gt;
221         &lt;/description&gt;
222         &lt;uses name="tape-cells"/&gt;
223       &lt;/container&gt;
224     &lt;/input&gt;
225     &lt;output&gt;
226       &lt;leaf name="step-count"&gt;
227         &lt;type name="uint64"/&gt;
228         &lt;description&gt;
229           &lt;text&gt;The number of steps executed since the last 'run-until' call.&lt;/text&gt;
230         &lt;/description&gt;
231       &lt;/leaf&gt;
232       &lt;leaf name="halted"&gt;
233         &lt;type name="boolean"/&gt;
234         &lt;description&gt;
235           &lt;text&gt;'True' if the Turing machine is halted, 'false' if it is only paused.&lt;/text&gt;
236         &lt;/description&gt;
237       &lt;/leaf&gt;
238     &lt;/output&gt;
239   &lt;/rpc&gt;
240   &lt;notification name="halted"&gt;
241     &lt;description&gt;
242       &lt;text&gt;The Turing Machine has halted. This means that there is no
243 transition rule for the current state and tape symbol.&lt;/text&gt;
244     &lt;/description&gt;
245     &lt;leaf name="state"&gt;
246       &lt;type name="state-index"/&gt;
247       &lt;mandatory value="true"/&gt;
248       &lt;description&gt;
249         &lt;text&gt;The state of the control unit in which the machine has
250 halted.&lt;/text&gt;
251       &lt;/description&gt;
252     &lt;/leaf&gt;
253   &lt;/notification&gt;
254   &lt;notification name="paused"&gt;
255     &lt;description&gt;
256       &lt;text&gt;The Turing machine has reached a breakpoint and was paused.&lt;/text&gt;
257     &lt;/description&gt;
258     &lt;leaf name="state"&gt;
259       &lt;type name="state-index"/&gt;
260       &lt;mandatory value="true"/&gt;
261       &lt;description&gt;
262         &lt;text&gt;State of the control unit in which the machine was paused.&lt;/text&gt;
263       &lt;/description&gt;
264     &lt;/leaf&gt;
265     &lt;leaf name="head-position"&gt;
266       &lt;type name="cell-index"/&gt;
267       &lt;mandatory value="true"/&gt;
268       &lt;description&gt;
269         &lt;text&gt;Position of tape read/write head when the machine was paused.&lt;/text&gt;
270       &lt;/description&gt;
271     &lt;/leaf&gt;
272     &lt;container name="tape"&gt;
273       &lt;description&gt;
274         &lt;text&gt;Content of the tape when the machine was paused.&lt;/text&gt;
275       &lt;/description&gt;
276       &lt;uses name="tape-cells"/&gt;
277     &lt;/container&gt;
278   &lt;/notification&gt;
279 &lt;/module&gt;
280 </data>
281 </rpc-reply>