Merge "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     import data-provider { prefix "data-provider"; }
8
9     description
10         "DeviceManager Api Module";
11
12     revision "2019-01-09" {
13         description
14             "Initial revision";
15     }
16
17     rpc set-maintenance-mode{
18         description
19             "Set maintenance mode for network element";
20         input{
21             uses data-provider:maintenance-entity;
22         }
23         output {
24             uses data-provider:maintenance-entity;
25         }
26     }
27     rpc get-maintenance-mode{
28         description
29             "Get maintenance mode Configuration";
30         input{
31             leaf mountpoint-name{
32                 mandatory true;
33                 type string;
34                 description
35                     "Mountpoint-name as key of node";
36             }
37         }
38         output {
39             uses data-provider:maintenance-entity;
40         }
41     }
42     rpc test-maintenance-mode{
43         description
44             "Send test pattern similar to notification that are test from algorithm";
45         input{
46             leaf mountpoint-name {
47                 mandatory true;
48                 type string;
49                 description    "mountpoint for test";
50             }
51             leaf object-id-ref {
52                 mandatory true;
53                 type string;
54                 description    "object id for test";
55             }
56             leaf problem-name {
57                 mandatory true;
58                 type string;
59                 description    "problem for test";
60             }
61             leaf test-date {
62                 mandatory true;
63                 type string;
64                 description    "point in time used for the test";
65             }
66
67         }
68         output {
69             leaf result-string {
70                 mandatory true;
71                 type string;
72                 description    "Describin if mountpoint was found and result of maintenance mode testing";
73             }
74             uses data-provider:maintenance-entity;
75         }
76     }
77     rpc show-required-network-element {
78         description
79           "Get information for required network element";
80
81         input {
82             leaf mountpoint-name {
83                 mandatory true;
84                 type string;
85                 description
86                     "Mountpoint-name as key of the node to be displayed.";
87             }
88         }
89         output {
90             container required-network-element {
91                 leaf mountpoint-name {
92                     type string;
93                     description
94                        "The name of the mountpoint";
95                 }
96                 leaf status {
97                     type string;
98                     description
99                         "Status: pre-provisoning, installed, end-of-life (Later enum)";
100                 }
101                 leaf description {
102                     type string;
103                     description "Device description";
104                 }
105             }
106         }
107     }
108
109     rpc get-required-network-element-keys {
110         description
111           "Returns a list of netconf nodes for each data store space";
112
113         output {
114             leaf-list mountpoint-names {
115                 type string;
116                 description
117                   "List of required-network-element keys that are the mountpoint-names";
118             }
119         }
120     }
121
122     rpc clear-current-fault-by-nodename {
123         description
124             "try to clear alarms and sync the alarm with the devices currently connected";
125         input {
126             leaf-list nodenames {
127                 type string;
128                 description
129                     "list of network-elements to clear alarms for nodenames, if list empty then all";
130             }
131         }
132         output {
133             leaf-list nodenames {
134                 type string;
135                 description
136                     "list of network-elements alarms cleared";
137             }
138         }
139     }
140     rpc push-fault-notification {
141         description
142             "Forward fault problem notification of a network-element";
143         input {
144                 uses data-provider:object-change-reference;
145                 uses data-provider:fault;
146         }
147     }
148     rpc push-attribute-change-notification {
149         description
150             "Forward attribute change notification of a network-element";
151         input {
152                 uses data-provider:object-change-reference;
153                 uses data-provider:attribute-change;
154         }
155     }
156 }
157