Update power target mask for mixed line-rate
[transportpce.git] / api / src / main / yang / transportpce-olm@2021-06-18.yang
1 module transportpce-olm {
2   yang-version 1.1;
3   namespace "http://org/opendaylight/transportpce/olm";
4   prefix org-opendaylight-transportpce-olm;
5
6   import transportpce-common-types {
7     prefix org-transportpce-common-types;
8   }
9   import ietf-network-topology {
10     prefix ietf-network-topology;
11     revision-date 2018-02-26;
12   }
13
14   organization
15     "transportPCE";
16   contact
17     "transportPCE committers - ODL";
18   description
19     "YANG definitions of RPCs supported by OLM.
20      Copyright (c) 2017 AT&T and others.  All rights reserved.
21      authors: Dhruv Bhardwaj ( db929a@att.com )
22               Shweta Vachhani ( sv111y@att.com )";
23
24   revision 2021-06-18 {
25     description
26       "Updated following transportpce-common-types udpate";
27   }
28   revision 2017-04-18 {
29     description
30       "Initial revision of olm model";
31   }
32
33   rpc get-pm {
34     description
35       "This RPC fetches from the device a list of pm measurements
36        on a given resource and granularity.";
37     input {
38       uses org-transportpce-common-types:olm-get-pm-input;
39     }
40     output {
41       uses org-transportpce-common-types:olm-get-pm-input;
42       leaf resource-id {
43         type string;
44       }
45       list measurements {
46         description
47           "Set of parameters related to a PM Measurement";
48         leaf pmparameter-name {
49           type string;
50         }
51         leaf pmparameter-value {
52           type string;
53         }
54       }
55     }
56   }
57
58   rpc service-power-setup {
59     description
60       "This RPC sets up output power values on a list of ROADMs/Transponders
61          based on the path the wavelength takes";
62     input {
63       uses org-transportpce-common-types:optical-renderer-input;
64     }
65     output {
66       leaf result {
67         type string;
68       }
69     }
70   }
71
72   rpc service-power-turndown {
73     description
74       "This RPC turn down the output power values on a list of ROADMs/Transponders
75          based on the path the wavelength takes";
76     input {
77       uses org-transportpce-common-types:optical-renderer-input;
78     }
79     output {
80       leaf result {
81         type string;
82       }
83     }
84   }
85
86   rpc service-power-reset {
87     description
88       "This RPC re-calculates and re-sets power for all nodes part of a
89            service given in input";
90     input {
91       leaf service-name {
92         type string;
93         description
94           "Name of the service. Unique identifier for serivice";
95       }
96     }
97     output {
98       leaf result {
99         type string;
100       }
101     }
102   }
103
104   rpc calculate-spanloss-base {
105     description
106       "This RPC calculates spanloss for the very first time on all links
107          in the network model or any newly discovered link";
108     input {
109       leaf src-type {
110         type enumeration {
111           enum link {
112             value 1;
113           }
114           enum all {
115             value 2;
116           }
117         }
118         description
119           "Source type defines whether RPC runs for all links or given link Id";
120       }
121       leaf link-id {
122         when "../src-type = 'link'";
123         type ietf-network-topology:link-id;
124         default "all";
125         description
126           "Link-Id for the link where spanloss-base needs to be calculated. Default option is
127            calculating spanloss for all Roadm to Roadm links";
128       }
129     }
130     output {
131       leaf result {
132         type string;
133       }
134       list spans {
135         leaf link-id {
136           type ietf-network-topology:link-id;
137         }
138         leaf spanloss {
139           type string;
140         }
141       }
142     }
143   }
144
145   rpc calculate-spanloss-current {
146     description
147       "This RPC can be used by PM monitoring to calculate spanloss
148          periodically";
149     // input;
150     output {
151       leaf result {
152         type string;
153       }
154     }
155   }
156 }