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.";
22 "Add notification count in status.";
24 "O-RAN SC SIM project";
28 "Modify notifications. Add VES message configuration options.";
30 "O-RAN SC SIM project";
34 "Modify controller details.";
36 "O-RAN SC SIM project";
42 "O-RAN SC SIM project";
45 typedef operational-state-type {
65 "The operation state of the simulated device.";
68 typedef authentication-method-type {
76 "auth by certificate (https)";
80 "auth by basic auth username and password (https)";
82 enum cert-basic-auth {
84 "auth by certificate and basic auth username / password (https)";
88 "The authentication method for VES messaging.";
100 grouping controller-details-type-g {
102 type inet:ip-address;
104 "The IP Address of the SDN Controller.";
106 leaf controller-port {
107 type inet:port-number;
109 "The Port of the SDN Controller.";
111 leaf controller-username {
114 "The Username of the SDN Controller.";
116 leaf controller-password {
119 "The Password of the SDN Controller.";
125 grouping simulated-devices-type-g {
129 "The UUID of the simulated device.";
134 "The IP Address of the simulated device.";
136 leaf-list device-port {
139 "A NETCONF endpoint (port) of the simulated device.";
144 "Specifies if the simulated device is mounted in the SDN Controller.";
146 leaf operational-state {
147 type operational-state-type;
149 "Specifies the operational state of the simulated device.";
155 grouping notification-count-per-severity-g {
159 "The number of normal notifications.";
164 "The number of warning notifications.";
169 "The number of minor notifications.";
174 "The number of major notifications.";
179 "The number of normal notifications.";
185 container simulator-config {
187 "Configuration container of the simulator.";
188 leaf simulated-devices {
192 "The number of devices to be simulated.";
194 leaf mounted-devices {
198 "The number of devices to be mounted in ODL. The configured number should not exceed the number of mounted devices.";
200 container notification-config {
201 leaf fault-notification-delay-period {
205 "Interval in seconds between two consecutive notifications. If the attribute is set to 0, nofitications are not generated.";
207 leaf ves-heartbeat-period {
211 "Interval in seconds between two VES heartbeat messages. If the attribute is set to 0, heartbeat messages are not generated.";
213 leaf is-netconf-available {
217 "If set to 'true', NETCONF notifications will be generated.";
219 leaf is-ves-available {
223 "If set to 'true', VES messages will be generated.";
228 container controller-details {
229 uses controller-details-type-g;
231 "The connectivity details of the SDN Controller where we want to mount our simulated devices.";
233 container ves-endpoint-details {
234 must 'ves-registration = "false" or ../mounted-devices = 0' {
235 error-message "VES registration cannot be active while devices are still mounted to ODL not via VES.";
237 leaf ves-endpoint-ip {
238 type inet:ip-address;
240 "The IP Address of the VES Endpoint.";
242 leaf ves-endpoint-port {
243 type inet:port-number;
245 "The Port of the VES Endpoint.";
247 leaf ves-endpoint-auth-method {
248 type authentication-method-type;
251 "The type of the authentication to be used with the VES Endpoint.";
253 leaf ves-endpoint-username {
254 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
257 "The Username to be used to authenticate to the VES Endpoint.";
259 leaf ves-endpoint-password {
260 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
263 "The Password to be used to authenticate to the VES Endpoint.";
265 leaf ves-endpoint-certificate {
266 when "../ves-endpoint-auth-method = 'cert-only' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
269 "The Certificate to be used to authenticate to the VES Endpoint.";
271 leaf ves-registration {
275 "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.";
281 container simulator-status {
283 container simulation-usage-details {
285 leaf running-simulated-devices {
288 "The current number of running simulated devices.";
290 leaf running-mounted-devices {
293 "The current number of running simulated devices that are mounted in ODL.";
295 leaf base-netconf-port {
299 "The starting port number for the NETCONF connections exposed.";
304 "Specifies the CPU load generated by this simulated device.";
309 "Specifies the RAM in MB used by this simulated device.";
312 "The details about the simulation, including resources consumed.";
314 container notification-count {
316 container total-ves-notifications {
318 uses notification-count-per-severity-g;
320 "The total number of VES notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
322 container total-netconf-notifications {
324 uses notification-count-per-severity-g;
326 "The total number of NETCONF notifications that were sent by all the simulated devices managed by this NTS Manager instance.";
329 "The total number of notifications sent by the devices managed by this NTS Manager instance.";
332 list simulated-devices-list {
335 uses simulated-devices-type-g;
336 container notification-count {
338 container ves-notifications {
340 uses notification-count-per-severity-g;
342 "The total number of VES notifications that were sent by this simulated device.";
344 container netconf-notifications {
346 uses notification-count-per-severity-g;
348 "The total number of NETCONF notifications that were sent by this simulated device.";
351 "The total number of notifications sent by this simulated device.";
355 "The list of the devices that are currently simulated.";
358 "State data container of the simulator.";
361 rpc restart-simulation {
363 "Operation to restart all the simulated devices with the new configuration of the simulator.";
366 rpc add-key-pair-to-odl {
368 "Operation to add a key pair signed by the NTS to OpenDaylight, such that it can connect to devices using TLS.";