YANG Model update for A1 Adapter
[ccsdk/features.git] / sdnr / wt / devicemanager / model / src / main / yang / devicemanager.yang
1 module devicemanager {
2
3     yang-version 1;
4     namespace "urn:opendaylight:params:xml:ns:yang:devicemanager";
5     prefix "devicemanager";
6
7     description
8         "DeviceManager Api Module";
9
10     revision "2019-01-09" {
11         description
12             "Initial revision";
13     }
14
15     grouping maintenance-mode-g {
16         leaf mountpoint-name{
17             mandatory true;
18             type string;
19             description
20                 "Mountpoint-name as key of node";
21         }
22         leaf node-name {
23             mandatory true;
24             type string;
25             description
26                 "Node-name as node";
27         }
28         list filter {
29             container definition {
30                 leaf object-id-ref {
31                     mandatory true;
32                     type string;
33                     description
34                         "object id to filter on";
35                 }
36                 leaf problem {
37                     mandatory true;
38                     type string;
39                     description
40                         "name of the problem to filter";
41                 }
42             }
43             leaf description {
44                 mandatory true;
45                 type string;
46                 description
47                     "Node-name as node";
48             }
49             leaf start-date {
50                 mandatory true;
51                 type string;
52                 description
53                     "begin of maintenance-mode";
54             }
55             leaf end-date {
56                 mandatory true;
57                 type string;
58                 description
59                     "end of maintenance-mode";
60             }
61         }
62     }
63
64     rpc set-maintenance-mode{
65         description
66             "Set maintenance mode for network element";
67         input{
68             uses maintenance-mode-g;
69         }
70         output {
71             uses maintenance-mode-g;
72         }
73     }
74     rpc get-maintenance-mode{
75         description
76             "Get maintenance mode Configuration";
77         input{
78             leaf mountpoint-name{
79                 mandatory true;
80                 type string;
81                 description
82                     "Mountpoint-name as key of node";
83             }
84         }
85         output {
86             uses maintenance-mode-g;
87         }
88     }
89     rpc test-maintenance-mode{
90         description
91             "Send test pattern similar to notification that are test from algorithm";
92         input{
93             leaf mountpoint-name {
94                 mandatory true;
95                 type string;
96                 description    "mountpoint for test";
97             }
98             leaf object-id-ref {
99                 mandatory true;
100                 type string;
101                 description    "object id for test";
102             }
103             leaf problem-name {
104                 mandatory true;
105                 type string;
106                 description    "problem for test";
107             }
108             leaf test-date {
109                 mandatory true;
110                 type string;
111                 description    "point in time used for the test";
112             }
113
114         }
115         output {
116             leaf result-string {
117                 mandatory true;
118                 type string;
119                 description    "Describin if mountpoint was found and result of maintenance mode testing";
120             }
121             uses maintenance-mode-g;
122         }
123     }
124     rpc show-required-network-element {
125         description
126           "Get information for required network element";
127
128         input {
129             leaf mountpoint-name {
130                 mandatory true;
131                 type string;
132                 description
133                     "Mountpoint-name as key of the node to be displayed.";
134             }
135         }
136         output {
137             container required-network-element {
138                 leaf mountpoint-name {
139                     type string;
140                     description
141                        "The name of the mountpoint";
142                 }
143                 leaf status {
144                     type string;
145                     description
146                         "Status: pre-provisoning, installed, end-of-life (Later enum)";
147                 }
148                 leaf description {
149                     type string;
150                     description "Device description";
151                 }
152             }
153         }
154     }
155
156     rpc get-required-network-element-keys {
157         description
158           "Returns a list of netconf nodes for each data store space";
159
160         output {
161             leaf-list mountpoint-names {
162                 type string;
163                 description
164                   "List of required-network-element keys that are the mountpoint-names";
165             }
166         }
167     }
168
169     rpc clear-current-fault-by-nodename {
170         description
171             "try to clear alarms and sync the alarm with the devices currently connected";
172         input {
173             leaf-list nodenames {
174                 type string;
175                 description
176                     "list of network-elements to clear alarms for nodenames, if list empty then all";
177             }
178         }
179         output {
180             leaf-list nodenames {
181                 type string;
182                 description
183                     "list of network-elements alarms cleared";
184             }
185         }
186     }
187
188 }
189