Rewrite NTS Framework.
[sim/o1-interface.git] / ntsimulator / deploy / base / yang / nts-network-function.yang
1 module nts-network-function {
2   yang-version 1.1;
3   namespace "urn:o-ran-sc:params:xml:ns:yang:nts:network:function";
4   prefix ntsnf;
5
6   import nts-common {
7     prefix ntsc;
8     revision-date 2020-10-22;
9   }
10
11   organization
12     "O-RAN-SC";
13   contact
14     " Web: <https://wiki.o-ran-sc.org/display/SIM/SIM>
15         Editors:  
16         Alex Stancu <mailto:alexandru.stancu@highstreet-technologies.com>
17         Adrian Lita <mailto:adrian.lita@highstreet-technologies.com>
18         Martin Skorupski <mailto:martin.skorupski@highstreet-technologies.com>";
19   description
20     "This module contains YANG definitions for the Network Topology Simulator - Network Functions";
21
22   revision 2020-10-28 {
23     description
24       "Add RPC for clearing the fault counters.";
25     reference
26       "O-RAN-SC SIM project";
27   }
28
29   revision 2020-10-13 {
30     description
31       "Add RPC for datastore populating and feature control.";
32     reference
33       "O-RAN-SC SIM project";
34   }
35
36   revision 2020-09-07 {
37     description
38       "Initial revision for the Network Topology Simulator - Next Generation";
39     reference
40       "O-RAN-SC SIM project";
41   }
42
43   container simulation {
44       container network-function {
45             uses ntsc:mount-point-details-g;
46             uses ntsc:faults-g;
47             uses ntsc:netconf-config-g;
48             uses ntsc:ves-config-g;
49           description
50             "Container which encompasses the details of the network function.";
51       }
52       container sdn-controller {
53           uses ntsc:controller-g;
54           description
55             "Groups details about the SDN Controller.";
56       }
57       container ves-endpoint {
58           uses ntsc:ves-endpoint-g;
59           description
60             "Groups details about the VES Collector endpoint.";
61       }
62       description
63         "Root level container which controls the Network Function.";
64   }
65
66   rpc datastore-random-populate {
67     description
68       "Operation to populate the datastore with random data for all the containing YANG models.";
69     
70     output {
71       uses ntsc:rpc-status-g;
72     }
73   }
74
75   rpc feature-control {
76     description
77       "Operation to control the features in a Network Function.";
78     input {
79       leaf features {
80           type ntsc:feature-type;
81           mandatory true;
82           description
83             "A bit-wise list with features to be activated.";
84       }
85     }
86     output {
87       uses ntsc:rpc-status-g;
88     }
89   }
90
91   rpc invoke-notification {
92     description
93       "Operation to control the features in a Network Function.";
94     input {
95       leaf notification-format {
96           type enumeration {
97             enum xml {
98             description
99               "The notification string is formatted as XML.";
100             }
101             enum json {
102             description
103               "The notification string is formatted as JSON.";
104             }
105           }
106           mandatory true;
107           description
108             "The format of the notification string.";
109       }
110       leaf notification-object {
111           type string;
112           mandatory true;
113           description
114             "A JSON string containing the notification object to be sent by the device.";
115       }
116     }
117     output {
118       uses ntsc:rpc-status-g;
119     }
120   }
121
122   rpc invoke-ves-pm-file-ready {
123     description
124       "Operation to generate a VES  notification from a Network Function.";
125     input {
126       leaf file-location {
127           type string;
128           mandatory true;
129           description
130             "A string containing the location of the file on the server.";
131       }
132     }
133     output {
134       uses ntsc:rpc-status-g;
135     }
136   }
137
138   rpc clear-fault-counters {
139     description
140       "Operation to clear the fault counters.";
141
142     output {
143       uses ntsc:rpc-status-g;
144     }
145   }
146
147 } //end module