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 "New RPC for generic NETCONF notification generation.";
23 "O-RAN SC SIM project";
27 "Add configuration for number of SSH and TLS connections exposed by each simulated device.";
29 "O-RAN SC SIM project";
33 "Change fault-notification-delay-period to leaf-list.";
35 "O-RAN SC SIM project";
39 "Add notification count in status.";
41 "O-RAN SC SIM project";
45 "Modify notifications. Add VES message configuration options.";
47 "O-RAN SC SIM project";
51 "Modify controller details.";
53 "O-RAN SC SIM project";
59 "O-RAN SC SIM project";
62 typedef operational-state-type {
82 "The operation state of the simulated device.";
85 typedef authentication-method-type {
93 "auth by certificate (https)";
97 "auth by basic auth username and password (https)";
99 enum cert-basic-auth {
101 "auth by certificate and basic auth username / password (https)";
105 "The authentication method for VES messaging.";
117 grouping controller-details-type-g {
119 type inet:ip-address;
121 "The IP Address of the SDN Controller.";
123 leaf controller-port {
124 type inet:port-number;
126 "The Port of the SDN Controller.";
128 leaf netconf-call-home-port {
129 type inet:port-number;
131 "The NETCONF Call Home Port of the SDN Controller.";
133 leaf controller-username {
136 "The Username of the SDN Controller.";
138 leaf controller-password {
141 "The Password of the SDN Controller.";
147 grouping simulated-devices-type-g {
151 "The UUID of the simulated device.";
156 "The IP Address of the simulated device.";
158 leaf-list device-port {
161 "A NETCONF endpoint (port) of the simulated device.";
166 "Specifies if the simulated device is mounted in the SDN Controller.";
168 leaf operational-state {
169 type operational-state-type;
171 "Specifies the operational state of the simulated device.";
177 grouping notification-count-per-severity-g {
181 "The number of normal notifications.";
186 "The number of warning notifications.";
191 "The number of minor notifications.";
196 "The number of major notifications.";
201 "The number of normal notifications.";
207 container simulator-config {
208 presence "Enables NTS configuration.";
210 "Configuration container of the simulator.";
211 leaf simulated-devices {
215 "The number of devices to be simulated.";
217 leaf mounted-devices {
219 must ". <= ../simulated-devices" {
220 error-message "The number of mounted devices cannot be greater that the number of simulated devices";
224 "The number of devices to be mounted in ODL. The configured number should not exceed the number of mounted devices.";
226 leaf netconf-call-home {
230 "Configuration of NETCONF Call Home feature. If set to 'true', the device will use the SDN controller details and try to connect to it via Call Home.";
232 container notification-config {
233 leaf-list fault-notification-delay-period {
239 "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.
240 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.";
242 leaf ves-heartbeat-period {
246 "Interval in seconds between two VES heartbeat messages. If the attribute is set to 0, heartbeat messages are not generated.";
248 leaf is-netconf-available {
252 "If set to 'true', NETCONF notifications will be generated.";
254 leaf is-ves-available {
258 "If set to 'true', VES messages will be generated.";
263 container controller-details {
264 uses controller-details-type-g;
266 "The connectivity details of the SDN Controller where we want to mount our simulated devices.";
268 container ves-endpoint-details {
269 must 'ves-registration = "false" or ../mounted-devices = 0' {
270 error-message "VES registration cannot be active while devices are still mounted to ODL not via VES.";
272 leaf ves-endpoint-ip {
273 type inet:ip-address;
275 "The IP Address of the VES Endpoint.";
277 leaf ves-endpoint-port {
278 type inet:port-number;
280 "The Port of the VES Endpoint.";
282 leaf ves-endpoint-auth-method {
283 type authentication-method-type;
286 "The type of the authentication to be used with the VES Endpoint.";
288 leaf ves-endpoint-username {
289 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
292 "The Username to be used to authenticate to the VES Endpoint.";
294 leaf ves-endpoint-password {
295 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
298 "The Password to be used to authenticate to the VES Endpoint.";
300 leaf ves-endpoint-certificate {
301 when "../ves-endpoint-auth-method = 'cert-only' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
304 "The Certificate to be used to authenticate to the VES Endpoint.";
306 leaf ves-registration {
310 "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.";
316 container simulator-status {
318 container simulation-usage-details {
320 leaf running-simulated-devices {
323 "The current number of running simulated devices.";
325 leaf running-mounted-devices {
328 "The current number of running simulated devices that are mounted in ODL.";
330 leaf ssh-connections {
333 "The number of SSH connections that are exposed by each simulated device. This can be set through the ENV variable SshConnections when starting the NTS Manager.";
335 leaf tls-connections {
338 "The number of TLS connections that are exposed by each simulated device. This can be set through the ENV variable TlsConnections when starting the NTS Manager.";
340 leaf base-netconf-port {
344 "The starting port number for the NETCONF connections exposed.";
349 "Specifies the CPU load generated by this simulated device.";
354 "Specifies the RAM in MB used by this simulated device.";
357 "The details about the simulation, including resources consumed.";
359 container notification-count {
361 container total-ves-notifications {
363 uses notification-count-per-severity-g;
365 "The total number of VES notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
367 container total-netconf-notifications {
369 uses notification-count-per-severity-g;
371 "The total number of NETCONF notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
374 "The total number of notifications sent by the devices managed by this NTS Manager instance.";
377 list simulated-devices-list {
380 uses simulated-devices-type-g;
381 container notification-count {
383 container ves-notifications {
385 uses notification-count-per-severity-g;
387 "The total number of VES notifications that were sent by this simulated device.";
389 container netconf-notifications {
391 uses notification-count-per-severity-g;
393 "The total number of NETCONF notifications that were sent by this simulated device.";
396 "The total number of notifications sent by this simulated device.";
400 "The list of the devices that are currently simulated.";
403 "State data container of the simulator.";
406 grouping notification-job-g {
411 "Device to invoke the NETCONF notification. If it is not present, all simulated devices would invoke the notification.";
413 leaf yang-module-name {
417 "Name of the YANG module containing the notification to be invoked.";
419 leaf notification-object {
423 "A JSON string containing the notification object to be sent by the device.";
426 "Notification job object class.";
429 rpc restart-simulation {
431 "Operation to restart all the simulated devices with the new configuration of the simulator.";
434 rpc add-key-pair-to-odl {
436 "Operation to add a key pair signed by the NTS to OpenDaylight, such that it can connect to devices using TLS.";
439 rpc invoke-notification {
441 "Operation to generate a NETCONF notification from a device.";
443 uses notification-job-g;
450 "This means that the RPC was successfully invoked.";
454 "This means that an error was encountered when invoking the notification.";
459 "The status of the RPC.";