migrate sdnr features to sulfur
[ccsdk/features.git] / sdnr / wt / devicemanager-core / model / src / main / yang / devicemanager.yang
1 module devicemanager {
2
3   yang-version 1.1;
4   namespace "urn:opendaylight:params:xml:ns:yang:devicemanager";
5   prefix devicemanager;
6
7   import data-provider {
8     prefix data-provider;
9     revision-date 2020-11-10;
10   }
11   import ietf-yang-types {
12     prefix yang;
13   }
14   organization
15     "highstreet technologies GmbH";
16   contact
17     "Web:   <https://highstreet-technologies.com>
18      ONAP:  <https://wiki.onap.org/display/DW/ODLUX+DB+API>";
19
20   description
21     "DeviceManager Api Module
22
23      Copyright 2019 highstreet technologies GmbH Intellectual Property.
24      All rights reserved.
25      Update Copyright 2021 Samsung Electronics Intellectual Property.
26      All rights reserved.
27
28      Licensed under the Apache License, Version 2.0 (the 'License');
29      you may not use this file except in compliance with the License.
30      You may obtain a copy of the License at
31
32        http://www.apache.org/licenses/LICENSE-2.0
33
34      Unless required by applicable law or agreed to in writing, software
35      distributed under the License is distributed on an 'AS IS' BASIS,
36      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
37      See the License for the specific language governing permissions and
38      limitations under the License.";
39
40   revision 2019-01-09 {
41     description
42       "Initial revision";
43     reference
44       "https://jira.onap.org/browse/SDNC-877";
45   }
46
47   notification object-creation-notification {
48       uses object-creation-notification-g;
49       description "none";
50   }
51   grouping object-creation-notification-g {
52       leaf counter {
53           type int32;
54           default -1;
55           description "Counts object creation notifications.";
56       }
57       leaf time-stamp {
58           type yang:date-and-time;
59           default "2017-01-01T00:00:00.0Z";
60           description "none";
61       }
62       leaf object-id-ref {
63           type string;
64           description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
65       }
66       leaf object-type {
67           type string;
68           default "Type of created object not specified.";
69           description "Type of Object to be chosen from the following list of values: 'MW_AirInterface_Pac', 'MW_AirInterfaceDiversity_Pac', 'MW_Structure_Pac', 'MW_PureEthernetStructure_Pac', 'MW_HybridMwStructure_Pac', 'MW_Container_Pac', 'MW_EthernetContainer_Pac' or 'MW_TdmContainer_Pac'.";
70       }
71       description "To be sent when a new MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac has to be instancieted in the controller.";
72   }
73   notification object-deletion-notification {
74       uses object-deletion-notification-g;
75       description "none";
76   }
77   grouping object-deletion-notification-g {
78       leaf counter {
79           type int32;
80           default -1;
81           description "Counts object deletion notifications.";
82       }
83       leaf time-stamp {
84           type yang:date-and-time;
85           default "2017-01-01T00:00:00.0Z";
86           description "none";
87       }
88       leaf object-id-ref {
89           type string;
90           description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
91       }
92       description "To be sent when a new MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac instance has to be deleted in the controller.";
93   }
94   notification attribute-value-changed-notification {
95       uses attribute-value-changed-notification-g;
96       description "none";
97   }
98   grouping attribute-value-changed-notification-g {
99       leaf counter {
100           type int32;
101           default -1;
102           description "Counts attribute value changed notifications.";
103       }
104       leaf time-stamp {
105           type yang:date-and-time;
106           default "2017-01-01T00:00:00.0Z";
107           description "none";
108       }
109       leaf object-id-ref {
110           type string;
111           description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
112       }
113       leaf attribute-name {
114           type string;
115           default "Attribute name not specified.";
116           description "Name of the attribute that has been changed.";
117       }
118       leaf new-value {
119           type string;
120           default "New value not specified.";
121           description "Attribute value converted to a string (xml, json, ...)";
122       }
123       description "To be sent when an attribute has changed and one or more controllers have to update their data.";
124   }
125   notification problem-notification {
126       uses problem-notification-g;
127       description "none";
128   }
129   grouping problem-notification-g {
130       leaf counter {
131           type int32;
132           default -1;
133           description "Counts problem notifications";
134       }
135       leaf time-stamp {
136           type yang:date-and-time;
137           default "2017-01-01T00:00:00.0Z";
138           description "none";
139       }
140       leaf object-id-ref {
141           type string;
142           description "ID of the affected MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
143       }
144       leaf problem {
145           type string;
146           default "Problem name not specified.";
147           description "Name of the problem according to AirInterface::AirInterfaceCapability::supportedAlarms or AirInterfaceDiversity::AirInterfaceDiversityCapability::supportedAlarms or Structure::StructureCapability::supportedAlarms or PureEthernetStructure::PureEthernetStructureCapability::supportedAlarms or HybridMwStructure::HybridMwStructureCapability::supportedAlarms or Container::ContainerCapability::supportedAlarms or EthernetContainer::EthernetContainerCapability::supportedAlarms or TdmContainer::TdmContainerCapability::supportedAlarms.";
148       }
149       leaf severity {
150           type severity-type;
151           default warning;
152           description "Severity of the problem according to AirInterface::AirInterfaceConfiguration::problemSeverityList, AirInterfaceDiversity::AirInterfaceDiversityConfiguration::problemSeverityList, Structure::StructureConfiguration::problemSeverityList, PureEthernetStructure::PureEthernetStructureConfiguration::problemSeverityList, HybridMwStructure::HybridMwStructureConfiguration::problemSeverityList, Container::ContainerConfiguration::problemSeverityList, EthernetContainer::EthernetContainerConfiguration::problemSeverityList or TdmContainer::TdmContainerConfiguration::problemSeverityList";
153       }
154       description "To be sent when a problem occurs at a MW_AirInterface_Pac, MW_AirInterfaceDiversity_Pac, MW_Structure_Pac, MW_PureEthernetStructure_Pac, MW_HybridMwStructure_Pac, MW_Container_Pac, MW_EthernetContainer_Pac or MW_TdmContainer_Pac.";
155   }
156   typedef severity-type {
157       type enumeration {
158           enum non-alarmed {
159               description "none";
160           }
161           enum warning {
162               description "none";
163           }
164           enum minor {
165               description "none";
166           }
167           enum major {
168               description "none";
169           }
170           enum critical {
171               description "none";
172           }
173       }
174       description "According to ITU-T M.3160";
175   }
176
177   rpc set-maintenance-mode {
178     description
179       "Set maintenance mode for network element";
180     input {
181       uses data-provider:maintenance-entity;
182     }
183     output {
184       uses data-provider:maintenance-entity;
185     }
186   }
187
188   rpc get-maintenance-mode {
189     description
190       "Get maintenance mode Configuration";
191     input {
192       leaf mountpoint-name {
193         type string;
194         description
195           "Mountpoint-name as key of node";
196       }
197     }
198     output {
199       uses data-provider:maintenance-entity;
200     }
201   }
202
203   rpc test-maintenance-mode {
204     description
205       "Send test pattern similar to notification that are test from algorithm";
206     input {
207       leaf mountpoint-name {
208         type string;
209         mandatory true;
210         description
211           "mountpoint for test";
212       }
213       leaf object-id-ref {
214         type string;
215         mandatory true;
216         description
217           "object id for test";
218       }
219       leaf problem-name {
220         type string;
221         mandatory true;
222         description
223           "problem for test";
224       }
225       leaf test-date {
226         type string;
227         mandatory true;
228         description
229           "point in time used for the test";
230       }
231     }
232     output {
233       leaf result-string {
234         type string;
235         mandatory true;
236         description
237           "Describin if mountpoint was found and result of maintenance mode testing";
238       }
239       uses data-provider:maintenance-entity;
240     }
241   }
242
243   rpc show-required-network-element {
244     description
245       "Get information for required network element";
246     input {
247       leaf mountpoint-name {
248         type string;
249         mandatory true;
250         description
251           "Mountpoint-name as key of the node to be displayed.";
252       }
253     }
254     output {
255       container required-network-element {
256         leaf mountpoint-name {
257           type string;
258           description
259             "The name of the mountpoint";
260         }
261         leaf status {
262           type string;
263           description
264             "Status: pre-provisoning, installed, end-of-life (Later enum)";
265         }
266         leaf description {
267           type string;
268           description
269             "Device description";
270         }
271         description
272           "An output object presenting a network element (or device, NetConf
273            server, network function) which is expected to be connected.";
274       }
275     }
276   }
277
278   rpc get-required-network-element-keys {
279     description
280       "Returns a list of netconf nodes for each data store space";
281     output {
282       leaf-list mountpoint-names {
283         type string;
284         description
285           "List of required-network-element keys that are the mountpoint-names";
286       }
287     }
288   }
289
290   rpc clear-current-fault-by-nodename {
291     description
292       "try to clear alarms and sync the alarm with the devices currently connected";
293     input {
294       leaf-list nodenames {
295         type string;
296         description
297           "list of network-elements to clear alarms for nodenames, if list empty then all";
298       }
299     }
300     output {
301       leaf-list nodenames {
302         type string;
303         description
304           "list of network-elements alarms cleared";
305       }
306     }
307   }
308
309   rpc push-fault-notification {
310     description
311       "Forward fault problem notification of a network-element";
312     input {
313       uses data-provider:object-change-reference;
314       uses data-provider:fault;
315     }
316   }
317
318   rpc push-cm-notification {
319     description
320       "Forward CM notification";
321     input {
322       uses data-provider:object-change-reference;
323       uses data-provider:cm;
324     }
325   }
326
327   rpc push-attribute-change-notification {
328     description
329       "Forward attribute change notification of a network-element";
330     input {
331       uses data-provider:object-change-reference;
332       uses data-provider:attribute-change;
333     }
334   }
335 }