CI: Update RTD configuration file
[sim/o1-interface.git] / ntsimulator / deploy / base / yang / nts-common.yang
1 module nts-common {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:params:xml:ns:yang:nts:common";
4   prefix ntsc;
5
6   import ietf-inet-types {
7     prefix inet;
8   }
9
10   organization
11     "O-RAN-SC";
12   contact
13     " Web: <https://wiki.o-ran-sc.org/display/SIM/SIM>
14         Editors:
15         Alex Stancu <mailto:alexandru.stancu@highstreet-technologies.com>
16         Adrian Lita <mailto:adrian.lita@highstreet-technologies.com>
17         Martin Skorupski <mailto:martin.skorupski@highstreet-technologies.com>";
18   description
19     "This module contains common yang definitions YANG definitions for the Network Topology Simulator.";
20
21   revision 2022-09-29 {
22     description
23       "Added O1 pnfRegistration standard defined capabilities.";
24     reference
25       "O-RAN-SC SIM project";
26   }
27   revision 2021-10-29 {
28     description
29       "Added separate SDN Controller IP address for NETCONF Call Home.";
30     reference
31       "O-RAN-SC SIM project";
32   }
33   revision 2021-06-08 {
34     description
35       "Moved NTS_PROTOCOL_TYPE_BASE identities from nts-manager.";
36     reference
37       "O-RAN-SC SIM project";
38   }
39   revision 2021-03-26 {
40     description
41       "Added controller-protocol.";
42     reference
43       "O-RAN-SC SIM project";
44   }
45   revision 2021-02-15 {
46     description
47       "Added presence to configuration containers.";
48     reference
49       "O-RAN-SC SIM project";
50   }
51   revision 2020-11-20 {
52     description
53       "Add feature-type for the Web cut through feature.";
54     reference
55       "O-RAN-SC SIM project";
56   }
57   revision 2020-10-22 {
58     description
59       "Add feature-type for the NETCONF Call Home feature.";
60     reference
61       "O-RAN-SC SIM project";
62   }
63   revision 2020-10-13 {
64     description
65       "Add feature-type typedef containing the features that can be activated in the Network Function.";
66     reference
67       "O-RAN-SC SIM project";
68   }
69   revision 2020-09-07 {
70     description
71       "Initial revision for the Network Topology Simulator - Next Generation common types.";
72     reference
73       "O-RAN-SC SIM project";
74   }
75
76   identity NTS_PROTOCOL_TYPE_BASE {
77     description
78       "Base identity for protocol.";
79   }
80
81   identity NTS_PROTOCOL_TYPE_NETCONF_SSH {
82     base NTS_PROTOCOL_TYPE_BASE;
83     description
84       "Identity for NETCONF SSH protocol.";
85   }
86
87   identity NTS_PROTOCOL_TYPE_NETCONF_TLS {
88     base NTS_PROTOCOL_TYPE_BASE;
89     description
90       "Identity for NETCONF TLS protocol.";
91   }
92
93   identity NTS_PROTOCOL_TYPE_FTP {
94     base NTS_PROTOCOL_TYPE_BASE;
95     description
96       "Identity for FTP protocol.";
97   }
98
99   identity NTS_PROTOCOL_TYPE_SFTP {
100     base NTS_PROTOCOL_TYPE_BASE;
101     description
102       "Identity for SFTP protocol.";
103   }
104
105   identity NTS_PROTOCOL_TYPE_HTTP {
106     base NTS_PROTOCOL_TYPE_BASE;
107     description
108       "Identity for HTTP protocol.";
109   }
110
111   identity NTS_PROTOCOL_TYPE_HTTPS {
112     base NTS_PROTOCOL_TYPE_BASE;
113     description
114       "Identity for HTTPS protocol.";
115   }
116
117   feature faults-status {
118     description
119       "This means that the server supports reporting back the number of faults that were generated";
120   }
121
122   identity NTS_FUNCTION_TYPE_BASE {
123     description
124       "The reference of each identity represents the name of the associated docker image.";
125   }
126
127   typedef authentication-method-type {
128     type enumeration {
129       enum no-auth {
130         description
131           "no security (http)";
132       }
133       enum cert-only {
134         description
135           "auth by certificate (https)";
136       }
137       enum basic-auth {
138         description
139           "auth by basic auth username and password (https)";
140       }
141       enum cert-basic-auth {
142         description
143           "auth by certificate and basic auth username / password (https)";
144       }
145     }
146     description
147       "The authentication method for VES messaging.";
148   }
149
150   typedef feature-type {
151     type bits {
152       bit ves-file-ready {
153         position 0;
154         description
155           "Controls the ves-file-ready feature.";
156       }
157       bit ves-heartbeat {
158         position 1;
159         description
160           "Controls the ves-heartbeat feature.";
161       }
162       bit ves-pnf-registration {
163         position 2;
164         description
165           "Controls the ves-pnf-registration feature.";
166       }
167       bit manual-notification-generation {
168         position 3;
169         description
170           "Controls the manual notification generation feature.";
171       }
172       bit netconf-call-home {
173         position 4;
174         description
175           "Controls the NETCONF Call Home feature.";
176       }
177       bit web-cut-through {
178         position 5;
179         description
180           "Controls the Web Cut Through feature.";
181       }
182       bit ves-o1-pnf-registration {
183         position 6;
184         description
185           "Controls the ves-o1-pnf-registration (stndDefined) feature.";
186       }
187     }
188     description
189       "Describes the features that can be enabled/disabled in the Network Function.";
190   }
191
192   grouping mount-point-details-g {
193     description
194       "Groups details about mount point";
195     leaf mount-point-addressing-method {
196       type enumeration {
197         enum host-mapping {
198           description
199             "Uses IP and port mapped to the host machine to address the nework function.";
200         }
201         enum docker-mapping {
202           description
203             "Uses Docker IP and port to address the nework function.";
204         }
205       }
206       default "docker-mapping";
207       description
208         "Specifies how to address the simulated network function: via the host machine or via docker.";
209     }
210   }
211
212   grouping fault-delay-period-g {
213     description
214       "For reusing the same fault-delay-period.";
215     list fault-delay-list {
216       key "index";
217       ordered-by user;
218       description
219         "The list defining the pattern for generating events.";
220       leaf index {
221         type uint16;
222         description
223           "The index of the list.";
224       }
225       leaf delay-period {
226         type uint16;
227         units "s";
228         description
229           "The amount of seconds before the next event.";
230       }
231     }
232   }
233
234   grouping fault-count-g {
235     description
236       "Grouping for counting the fault events, grouped by severity.";
237     container fault-count {
238       if-feature "faults-status";
239       config false;
240       description
241         "Container which groups the number of fault events, by severity.";
242       leaf normal {
243         type uint32;
244         description
245           "Number of normal (non-alarmed) events.";
246       }
247       leaf warning {
248         type uint32;
249         description
250           "Number of warning events.";
251       }
252       leaf minor {
253         type uint32;
254         description
255           "Number of minor events.";
256       }
257       leaf major {
258         type uint32;
259         description
260           "Number of major events.";
261       }
262       leaf critical {
263         type uint32;
264         description
265           "Number of critical events.";
266       }
267     }
268   }
269
270   grouping faults-g {
271     description
272       "Grouping for fault generation";
273     container fault-generation {
274       presence "Enables fault generation configuration.";
275       description
276         "Groups the fault generation configuration and status.";
277       uses fault-delay-period-g;
278       uses fault-count-g;
279     }
280   }
281
282   grouping faults-enabled-g {
283     description
284       "Groups the enabling of faults.";
285     leaf faults-enabled {
286       type boolean;
287       description
288         "For enabling the fault generation.";
289     }
290   }
291
292   grouping netconf-config-g {
293     description
294       "Groups the configuration and status of NETCONF Fault notifications.";
295     container netconf {
296       presence "Enables NETCONF configuration.";
297       description
298         "Container for describing the NETCONF details.";
299       uses faults-enabled-g;
300       leaf call-home {
301         type boolean;
302         description
303           "For enabling the NETCONF Call Home feature. If set to 'true', each simulated device, when booting up, will try to Call Home to the SDN Controller.";
304       }
305     }
306   }
307
308   grouping ves-config-g {
309     description
310       "Groups the configuration and status of VES Fault notifications.";
311     container ves {
312       presence "Enables VES configuration.";
313       description
314         "Container for describing the VES details.";
315       uses faults-enabled-g;
316       leaf pnf-registration {
317         type boolean;
318         description
319           "For enabling the PNF Registration messages. If set to 'true', each simulated device, when booting up, will send a PNF Registration message to the VES Collector.";
320       }
321       leaf o1-pnf-registration {
322         type boolean;
323         description
324           "For enabling the O1 PNF Registration (stndDefined) messages. If set to 'true', each simulated device, when booting up, will send a O1 PNF Registration (stndDefined) message to the VES Collector.";
325       }
326       leaf heartbeat-period {
327         type uint16;
328         description
329           "The number of seconds between VES heartbeat messages.";
330       }
331     }
332   }
333
334   grouping controller-g {
335     description
336       "Groups information about the SDN Controller.";
337     leaf controller-protocol {
338       type enumeration {
339         enum http {
340           description
341             "HTTP protocol will be used to connect to the VES Collector.";
342         }
343         enum https {
344           description
345             "HTTPS protocol will be used to connect to the VES Collector.";
346         }
347       }
348       default "https";
349       description
350         "The protocol used for communication with the SDN Controller.";
351     }
352     leaf controller-ip {
353       type inet:host;
354       description
355         "The IP address of the SDN Controller.";
356     }
357     leaf controller-port {
358       type inet:port-number;
359       description
360         "The port exposed by the SDN Controller.";
361     }
362     leaf controller-netconf-call-home-ip {
363       type inet:host;
364       description
365         "The IP address of the SDN Controller for NETCONF Call Home.";
366     }
367     leaf controller-netconf-call-home-port {
368       type inet:port-number;
369       description
370         "The port exposed by the SDN Controller for NETCONF Call Home.";
371     }
372     leaf controller-username {
373       type string;
374       description
375         "The username for accessing the SDN Controller.";
376     }
377     leaf controller-password {
378       type string;
379       description
380         "The password for accessing the SDN Controller.";
381     }
382   }
383
384   grouping ves-endpoint-g {
385     description
386       "Groups information about the VES Collector.";
387     leaf ves-endpoint-protocol {
388       type enumeration {
389         enum http {
390           description
391             "HTTP protocol will be used to connect to the VES Collector.";
392         }
393         enum https {
394           description
395             "HTTPS protocol will be used to connect to the VES Collector.";
396         }
397       }
398       default "https";
399       description
400         "The protocol (HTTP / HTTPS) to be used to address the VES Collector.";
401     }
402     leaf ves-endpoint-ip {
403       type inet:host;
404       description
405         "The IP address of the VES Collector.";
406     }
407     leaf ves-endpoint-port {
408       type inet:port-number;
409       description
410         "The port exposed by the VES Collector.";
411     }
412     leaf ves-endpoint-auth-method {
413       type authentication-method-type;
414       default "no-auth";
415       description
416         "The type of the authentication to be used with the VES Collector.";
417     }
418     leaf ves-endpoint-username {
419       type string;
420       description
421         "The username for accessing the VES Collector.";
422     }
423     leaf ves-endpoint-password {
424       type string;
425       description
426         "The password for accessing the VES Collector.";
427     }
428     leaf ves-endpoint-certificate {
429       type string;
430       description
431         "The Certificate to be used to authenticate to the VES Collector.";
432     }
433   }
434
435   grouping rpc-status-g {
436     description
437       "RPC output grouping.";
438     leaf status {
439       type enumeration {
440         enum SUCCESS {
441           description
442             "The RPC was successfully invoked.";
443         }
444         enum ERROR {
445           description
446             "An error was encountered when invoking the RPC.";
447         }
448       }
449       mandatory true;
450       description
451         "The status of the RPC.";
452     }
453   }
454 }