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 "Modify notifications. Add VES message configuration options.";
23 "O-RAN SC SIM project";
27 "Modify controller details.";
29 "O-RAN SC SIM project";
35 "O-RAN SC SIM project";
38 typedef operational-state-type {
58 "The operation state of the simulated device.";
61 typedef authentication-method-type {
69 "auth by certificate (https)";
73 "auth by basic auth username and password (https)";
75 enum cert-basic-auth {
77 "auth by certificate and basic auth username / password (https)";
81 "The authentication method for VES messaging.";
93 grouping controller-details-type-g {
97 "The IP Address of the SDN Controller.";
99 leaf controller-port {
100 type inet:port-number;
102 "The Port of the SDN Controller.";
104 leaf controller-username {
107 "The Username of the SDN Controller.";
109 leaf controller-password {
112 "The Password of the SDN Controller.";
118 grouping simulated-devices-type-g {
122 "The UUID of the simulated device.";
127 "The IP Address of the simulated device.";
129 leaf-list device-port {
132 "A NETCONF endpoint (port) of the simulated device.";
137 "Specifies if the simulated device is mounted in the SDN Controller.";
139 leaf operational-state {
140 type operational-state-type;
142 "Specifies the operational state of the simulated device.";
148 container simulator-config {
150 "Configuration container of the simulator.";
151 leaf simulated-devices {
155 "The number of devices to be simulated.";
157 leaf mounted-devices {
161 "The number of devices to be mounted in ODL. The configured number should not exceed the number of mounted devices.";
163 container notification-config {
164 leaf fault-notification-delay-period {
168 "Interval in seconds between two consecutive notifications. If the attribute is set to 0, nofitications are not generated.";
170 leaf ves-heartbeat-period {
174 "Interval in seconds between two VES heartbeat messages. If the attribute is set to 0, heartbeat messages are not generated.";
176 leaf is-netconf-available {
180 "If set to 'true', NETCONF notifications will be generated.";
182 leaf is-ves-available {
186 "If set to 'true', VES messages will be generated.";
191 container controller-details {
192 uses controller-details-type-g;
194 "The connectivity details of the SDN Controller where we want to mount our simulated devices.";
196 container ves-endpoint-details {
197 must 'ves-registration = "false" or ../mounted-devices = 0' {
198 error-message "VES registration cannot be active while devices are still mounted to ODL not via VES.";
200 leaf ves-endpoint-ip {
201 type inet:ip-address;
203 "The IP Address of the VES Endpoint.";
205 leaf ves-endpoint-port {
206 type inet:port-number;
208 "The Port of the VES Endpoint.";
210 leaf ves-endpoint-auth-method {
211 type authentication-method-type;
214 "The type of the authentication to be used with the VES Endpoint.";
216 leaf ves-endpoint-username {
217 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
220 "The Username to be used to authenticate to the VES Endpoint.";
222 leaf ves-endpoint-password {
223 when "../ves-endpoint-auth-method = 'basic-auth' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
226 "The Password to be used to authenticate to the VES Endpoint.";
228 leaf ves-endpoint-certificate {
229 when "../ves-endpoint-auth-method = 'cert-only' or ../ves-endpoint-auth-method = 'cert-basic-auth'";
232 "The Certificate to be used to authenticate to the VES Endpoint.";
234 leaf ves-registration {
238 "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.";
244 container simulator-status {
246 container simulation-usage-details {
248 leaf running-simulated-devices {
251 "The current number of running simulated devices.";
253 leaf running-mounted-devices {
256 "The current number of running simulated devices that are mounted in ODL.";
258 leaf base-netconf-port {
262 "The starting port number for the NETCONF connections exposed.";
267 "Specifies the CPU load generated by this simulated device.";
272 "Specifies the RAM in MB used by this simulated device.";
275 "The details about the simulation, including resources consumed.";
277 list simulated-devices-list {
280 uses simulated-devices-type-g;
282 "The list of the devices that are currently simulated.";
285 "State data container of the simulator.";
288 rpc restart-simulation {
290 "Operation to restart all the simulated devices with the new configuration of the simulator.";
293 rpc add-key-pair-to-odl {
295 "Operation to add a key pair signed by the NTS to OpenDaylight, such that it can connect to devices using TLS.";