1 module nts-network-function {
3 namespace "urn:o-ran-sc:params:xml:ns:yang:nts:network:function";
6 import ietf-inet-types {
12 import ietf-yang-types {
19 " Web: <https://wiki.o-ran-sc.org/display/SIM/SIM>
21 Alex Stancu <mailto:alexandru.stancu@highstreet-technologies.com>
22 Adrian Lita <mailto:adrian.lita@highstreet-technologies.com>
23 Martin Skorupski <mailto:martin.skorupski@highstreet-technologies.com>";
25 "This module contains YANG definitions for the Network Topology Simulator - Network Functions";
29 "Added test-list for NETCONF hardware delay emulation.";
31 "O-RAN-SC SIM project";
35 "Added total loss network emulation RPC and NETCONF write-delay emulation.";
37 "O-RAN-SC SIM project";
41 "Added more info and NETCONF latency emulation.";
43 "O-RAN-SC SIM project";
47 "Added support for network emulation.";
49 "O-RAN-SC SIM project";
53 "Added info container, and expanted feature control mechanism and status.";
55 "O-RAN-SC SIM project";
59 "Renamed datastore-random-populate RPC to datastore-populate";
61 "O-RAN-SC SIM project";
65 "Added function-type to simulated function.";
67 "O-RAN-SC SIM project";
71 "Cleared revision for nts-common import.";
73 "O-RAN-SC SIM project";
77 "Add RPC for clearing the fault counters.";
79 "O-RAN-SC SIM project";
83 "Add RPC for datastore populating and feature control.";
85 "O-RAN-SC SIM project";
89 "Initial revision for the Network Topology Simulator - Next Generation";
91 "O-RAN-SC SIM project";
94 rpc datastore-populate {
96 "Operation to populate the datastore with data for all the containing YANG models, based on settings in config.json";
98 uses ntsc:rpc-status-g;
102 rpc feature-control {
104 "Operation to control the features in a Network Function.";
106 leaf start-features {
107 type ntsc:feature-type;
109 "A bit-wise list with features to be activated.";
112 type ntsc:feature-type;
114 "A bit-wise list with features to be deactivated.";
118 uses ntsc:rpc-status-g;
122 rpc invoke-notification {
124 "Operation to control the features in a Network Function.";
126 leaf notification-format {
130 "The notification string is formatted as XML.";
134 "The notification string is formatted as JSON.";
139 "The format of the notification string.";
141 leaf notification-object {
145 "A JSON string containing the notification object to be sent by the device.";
149 uses ntsc:rpc-status-g;
153 rpc invoke-ves-pm-file-ready {
155 "Operation to generate a VES notification from a Network Function.";
161 "A string containing the location of the file on the server.";
165 uses ntsc:rpc-status-g;
169 rpc clear-fault-counters {
171 "Operation to clear the fault counters.";
173 uses ntsc:rpc-status-g;
177 rpc emulate-total-loss {
179 "Operation to emulate 100% loss in network packets. Operation will resume after specified timeout.";
183 units "miliseconds (ms)";
185 "Period after which loss will stop being 100%.";
189 uses ntsc:rpc-status-g;
196 "Information about NTS application and modules.";
198 type yang:date-and-time;
200 "Build time of NTS application.";
205 "NTS version of current network-function.";
207 leaf started-features {
208 type ntsc:feature-type;
210 "A bit-wise list with currently started features.";
212 leaf ssh-connections {
216 "The number of SSH Endpoints the network function instance exposes.";
218 leaf tls-connections {
222 "The number of TLS Endpoints the network function instance exposes.";
227 "Current network function hostname.";
232 "The ports which are exposed inside the docker container implementing this network function instance.";
234 type inet:port-number;
240 base ntsc:NTS_PROTOCOL_TYPE_BASE;
243 "Protocol attached to current port.";
247 container simulation {
249 "Root level container which controls the Network Function.";
250 container network-function {
252 "Container which encompasses the details of the network function.";
256 "Type of network function that is simulated.";
258 uses ntsc:mount-point-details-g;
260 uses ntsc:netconf-config-g;
261 uses ntsc:ves-config-g;
263 container network-emulation {
265 "Container which encompasses the details of the network emulation.";
273 "Maximum number of packets the qdisc may hold queued at a time.";
277 "Adds the chosen delay to the packets outgoing to chosen network interface.";
280 units "miliseconds (ms)";
282 "Delay time between packets.";
286 units "miliseconds (ms)";
296 "Delay correlation.";
302 "Uniform delay distribution.";
306 "Normal delay distribution.";
310 "Pareto delay distribution.";
314 "Paretonormal delay distribution.";
318 "Delay distribution.";
327 "Adds an independent loss probability to the packets outgoing from the chosen network interface.";
329 container corruption {
331 "Allows the emulation of random noise introducing an error in a random position for a chosen percent of packets.";
338 "Corruption percentage.";
346 "Corruption correlation.";
349 container duplication {
351 "Using this option the chosen percent of packets is duplicated before queuing them.";
358 "Duplication percentage.";
366 "Duplication correlation.";
369 container reordering {
371 "Used together with delay; a percentage of packets are sent immediately (with defined correlation) while the others are delayed (by specified delay).";
378 "Reordering percentage.";
386 "Reordering correlation.";
393 "Delay packets based on packet size.";
396 container hardware-emulation {
398 "Container which encompasses the details of hardware emulation.";
399 container netconf-delay {
401 "Emulates delay on an operational leaf.";
404 units "miliseconds (ms)";
407 "Delay time to be set for get operation on test leaf.";
411 units "miliseconds (ms)";
414 "Read to test. Value represents emulated delay.";
418 units "miliseconds (ms)";
420 "Writing non-null value will emulate a write-delay.";
425 "Read to test. Returned values are saved from edit-test-list.";
429 "Values from edit-test-list.";
432 list edit-test-list {
439 "Unique values for testing.";
444 container sdn-controller {
446 "Groups details about the SDN Controller.";
447 uses ntsc:controller-g;
449 container ves-endpoint {
451 "Groups details about the VES Collector endpoint.";
452 uses ntsc:ves-endpoint-g;