1 module network-topology-simulator {
3 namespace "urn:onf:params:xml:ns:yang:network-topology-simulator";
4 prefix network-topology-simulator;
6 import ietf-inet-types {
13 "Web: <https://github.com/Melacon>
15 <mailto:stancu.liviualex@gmail.com>";
17 "This module contains a collection of YANG definitions for managing the Network Topology Simulator.";
21 "Change fault-notification-delay-period to leaf-list.";
23 "O-RAN SC SIM project";
27 "Add notification count in status.";
29 "O-RAN SC SIM project";
33 "Modify notifications. Add VES message configuration options.";
35 "O-RAN SC SIM project";
39 "Modify controller details.";
41 "O-RAN SC SIM project";
47 "O-RAN SC SIM project";
50 typedef operational-state-type {
70 "The operation state of the simulated device.";
73 typedef authentication-method-type {
81 "auth by certificate (https)";
85 "auth by basic auth username and password (https)";
87 enum cert-basic-auth {
89 "auth by certificate and basic auth username / password (https)";
93 "The authentication method for VES messaging.";
105 grouping controller-details-type-g {
107 type inet:ip-address;
109 "The IP Address of the SDN Controller.";
111 leaf controller-port {
112 type inet:port-number;
114 "The Port of the SDN Controller.";
116 leaf controller-username {
119 "The Username of the SDN Controller.";
121 leaf controller-password {
124 "The Password of the SDN Controller.";
130 grouping simulated-devices-type-g {
134 "The UUID of the simulated device.";
139 "The IP Address of the simulated device.";
141 leaf-list device-port {
144 "A NETCONF endpoint (port) of the simulated device.";
149 "Specifies if the simulated device is mounted in the SDN Controller.";
151 leaf operational-state {
152 type operational-state-type;
154 "Specifies the operational state of the simulated device.";
160 grouping notification-count-per-severity-g {
164 "The number of normal notifications.";
169 "The number of warning notifications.";
174 "The number of minor notifications.";
179 "The number of major notifications.";
184 "The number of normal notifications.";
190 container simulator-config {
192 "Configuration container of the simulator.";
193 leaf simulated-devices {
197 "The number of devices to be simulated.";
199 leaf mounted-devices {
203 "The number of devices to be mounted in ODL. The configured number should not exceed the number of mounted devices.";
205 container notification-config {
206 leaf-list fault-notification-delay-period {
211 "Defines a pattern of generating notifications, represented by the amount of time between two generated fault notifications. The pattern is circular, it restarts at the beginning after all the leaf-list items are being used.
212 E.g.: if the leaf-list contains three items: 4, 8 and 10, then a fault-notification will be generated, then after 4 seconds a new notification will be generaed, then after 8 seconds, then after 10 seconds, then again after 4 seconds etc.";
214 leaf ves-heartbeat-period {
218 "Interval in seconds between two VES heartbeat messages. If the attribute is set to 0, heartbeat messages are not generated.";
220 leaf is-netconf-available {
224 "If set to 'true', NETCONF notifications will be generated.";
226 leaf is-ves-available {
230 "If set to 'true', VES messages will be generated.";
235 container controller-details {
236 uses controller-details-type-g;
238 "The connectivity details of the SDN Controller where we want to mount our simulated devices.";
240 container ves-endpoint-details {
241 must 'ves-registration = "false" or ../mounted-devices = 0' {
242 error-message "VES registration cannot be active while devices are still mounted to ODL not via VES.";
244 leaf ves-endpoint-ip {
245 type inet:ip-address;
247 "The IP Address of the VES Endpoint.";
249 leaf ves-endpoint-port {
250 type inet:port-number;
252 "The Port of the VES Endpoint.";
254 leaf ves-endpoint-auth-method {
255 type authentication-method-type;
258 "The type of the authentication to be used with the VES Endpoint.";
260 leaf ves-endpoint-username {
261 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
264 "The Username to be used to authenticate to the VES Endpoint.";
266 leaf ves-endpoint-password {
267 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
270 "The Password to be used to authenticate to the VES Endpoint.";
272 leaf ves-endpoint-certificate {
273 when "../ves-endpoint-auth-method = 'cert-only' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
276 "The Certificate to be used to authenticate to the VES Endpoint.";
278 leaf ves-registration {
282 "If this is set to 'True', the simulated devices will automatically send a pnfRegistration VES message when they start. This cannot be set to 'True' if we already have 'mounted-devices' greater that 0, because we already mounted the devices directly to ODL.";
288 container simulator-status {
290 container simulation-usage-details {
292 leaf running-simulated-devices {
295 "The current number of running simulated devices.";
297 leaf running-mounted-devices {
300 "The current number of running simulated devices that are mounted in ODL.";
302 leaf base-netconf-port {
306 "The starting port number for the NETCONF connections exposed.";
311 "Specifies the CPU load generated by this simulated device.";
316 "Specifies the RAM in MB used by this simulated device.";
319 "The details about the simulation, including resources consumed.";
321 container notification-count {
323 container total-ves-notifications {
325 uses notification-count-per-severity-g;
327 "The total number of VES notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
329 container total-netconf-notifications {
331 uses notification-count-per-severity-g;
333 "The total number of NETCONF notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
336 "The total number of notifications sent by the devices managed by this NTS Manager instance.";
339 list simulated-devices-list {
342 uses simulated-devices-type-g;
343 container notification-count {
345 container ves-notifications {
347 uses notification-count-per-severity-g;
349 "The total number of VES notifications that were sent by this simulated device.";
351 container netconf-notifications {
353 uses notification-count-per-severity-g;
355 "The total number of NETCONF notifications that were sent by this simulated device.";
358 "The total number of notifications sent by this simulated device.";
362 "The list of the devices that are currently simulated.";
365 "State data container of the simulator.";
368 rpc restart-simulation {
370 "Operation to restart all the simulated devices with the new configuration of the simulator.";
373 rpc add-key-pair-to-odl {
375 "Operation to add a key pair signed by the NTS to OpenDaylight, such that it can connect to devices using TLS.";