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 "Add configuration for number of SSH and TLS connections exposed by each simulated device.";
23 "O-RAN SC SIM project";
27 "Change fault-notification-delay-period to leaf-list.";
29 "O-RAN SC SIM project";
33 "Add notification count in status.";
35 "O-RAN SC SIM project";
39 "Modify notifications. Add VES message configuration options.";
41 "O-RAN SC SIM project";
45 "Modify controller details.";
47 "O-RAN SC SIM project";
53 "O-RAN SC SIM project";
56 typedef operational-state-type {
76 "The operation state of the simulated device.";
79 typedef authentication-method-type {
87 "auth by certificate (https)";
91 "auth by basic auth username and password (https)";
93 enum cert-basic-auth {
95 "auth by certificate and basic auth username / password (https)";
99 "The authentication method for VES messaging.";
111 grouping controller-details-type-g {
113 type inet:ip-address;
115 "The IP Address of the SDN Controller.";
117 leaf controller-port {
118 type inet:port-number;
120 "The Port of the SDN Controller.";
122 leaf controller-username {
125 "The Username of the SDN Controller.";
127 leaf controller-password {
130 "The Password of the SDN Controller.";
136 grouping simulated-devices-type-g {
140 "The UUID of the simulated device.";
145 "The IP Address of the simulated device.";
147 leaf-list device-port {
150 "A NETCONF endpoint (port) of the simulated device.";
155 "Specifies if the simulated device is mounted in the SDN Controller.";
157 leaf operational-state {
158 type operational-state-type;
160 "Specifies the operational state of the simulated device.";
166 grouping notification-count-per-severity-g {
170 "The number of normal notifications.";
175 "The number of warning notifications.";
180 "The number of minor notifications.";
185 "The number of major notifications.";
190 "The number of normal notifications.";
196 container simulator-config {
197 must "./ssh-connections + ./tls-connections <= 100" {
198 error-message "The total number of connections (SSH + TLS) needs to be less than or equal with 100.";
200 // presence "Enables NTS configuration.";
202 "Configuration container of the simulator.";
203 leaf simulated-devices {
207 "The number of devices to be simulated.";
209 leaf mounted-devices {
211 must ". <= ../simulated-devices" {
212 error-message "The number of mounted devices cannot be greater that the number of simulated devices";
216 "The number of devices to be mounted in ODL. The configured number should not exceed the number of mounted devices.";
218 leaf ssh-connections {
219 when "../simulated-devices = 0";
223 "The number of SSH connections to be exposed by each simulated device.";
225 leaf tls-connections {
226 when "../simulated-devices = 0";
230 "The number of TLS connections to be exposed by each simulated device.";
232 container notification-config {
233 leaf-list fault-notification-delay-period {
238 "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.
239 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.";
241 leaf ves-heartbeat-period {
245 "Interval in seconds between two VES heartbeat messages. If the attribute is set to 0, heartbeat messages are not generated.";
247 leaf is-netconf-available {
251 "If set to 'true', NETCONF notifications will be generated.";
253 leaf is-ves-available {
257 "If set to 'true', VES messages will be generated.";
262 container controller-details {
263 uses controller-details-type-g;
265 "The connectivity details of the SDN Controller where we want to mount our simulated devices.";
267 container ves-endpoint-details {
268 must 'ves-registration = "false" or ../mounted-devices = 0' {
269 error-message "VES registration cannot be active while devices are still mounted to ODL not via VES.";
271 leaf ves-endpoint-ip {
272 type inet:ip-address;
274 "The IP Address of the VES Endpoint.";
276 leaf ves-endpoint-port {
277 type inet:port-number;
279 "The Port of the VES Endpoint.";
281 leaf ves-endpoint-auth-method {
282 type authentication-method-type;
285 "The type of the authentication to be used with the VES Endpoint.";
287 leaf ves-endpoint-username {
288 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
291 "The Username to be used to authenticate to the VES Endpoint.";
293 leaf ves-endpoint-password {
294 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
297 "The Password to be used to authenticate to the VES Endpoint.";
299 leaf ves-endpoint-certificate {
300 when "../ves-endpoint-auth-method = 'cert-only' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
303 "The Certificate to be used to authenticate to the VES Endpoint.";
305 leaf ves-registration {
309 "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.";
315 container simulator-status {
317 container simulation-usage-details {
319 leaf running-simulated-devices {
322 "The current number of running simulated devices.";
324 leaf running-mounted-devices {
327 "The current number of running simulated devices that are mounted in ODL.";
329 leaf base-netconf-port {
333 "The starting port number for the NETCONF connections exposed.";
338 "Specifies the CPU load generated by this simulated device.";
343 "Specifies the RAM in MB used by this simulated device.";
346 "The details about the simulation, including resources consumed.";
348 container notification-count {
350 container total-ves-notifications {
352 uses notification-count-per-severity-g;
354 "The total number of VES notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
356 container total-netconf-notifications {
358 uses notification-count-per-severity-g;
360 "The total number of NETCONF notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
363 "The total number of notifications sent by the devices managed by this NTS Manager instance.";
366 list simulated-devices-list {
369 uses simulated-devices-type-g;
370 container notification-count {
372 container ves-notifications {
374 uses notification-count-per-severity-g;
376 "The total number of VES notifications that were sent by this simulated device.";
378 container netconf-notifications {
380 uses notification-count-per-severity-g;
382 "The total number of NETCONF notifications that were sent by this simulated device.";
385 "The total number of notifications sent by this simulated device.";
389 "The list of the devices that are currently simulated.";
392 "State data container of the simulator.";
395 rpc restart-simulation {
397 "Operation to restart all the simulated devices with the new configuration of the simulator.";
400 rpc add-key-pair-to-odl {
402 "Operation to add a key pair signed by the NTS to OpenDaylight, such that it can connect to devices using TLS.";