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