Set topology tp states from device port state
[transportpce.git] / api / src / main / yang / transportpce-olm@2017-04-18.yang
1 module transportpce-olm {
2   yang-version 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 2017-04-18 {
25     description
26       "Initial revision of olm model";
27   }
28
29   rpc get-pm {
30     description
31       "This RPC fetches from the device a list of pm measurements
32        on a given resource and granularity.";
33     input {
34       uses org-transportpce-common-types:olm-get-pm-input;
35     }
36     output {
37       uses org-transportpce-common-types:olm-get-pm-input;
38       leaf resource-id {
39         type string;
40       }
41       list measurements {
42         description
43           "Set of parameters related to a PM Measurement";
44         leaf pmparameter-name {
45           type string;
46         }
47         leaf pmparameter-value {
48           type string;
49         }
50       }
51     }
52   }
53
54   rpc service-power-setup {
55     description
56       "This RPC sets up output power values on a list of ROADMs/Transponders
57          based on the path the wavelength takes";
58     input {
59       uses org-transportpce-common-types:olm-renderer-input;
60     }
61     output {
62       leaf result {
63         type string;
64       }
65     }
66   }
67
68   rpc service-power-turndown {
69     description
70       "This RPC turn down the output power values on a list of ROADMs/Transponders
71          based on the path the wavelength takes";
72     input {
73       uses org-transportpce-common-types:olm-renderer-input;
74     }
75     output {
76       leaf result {
77         type string;
78       }
79     }
80   }
81
82   rpc service-power-reset {
83     description
84       "This RPC re-calculates and re-sets power for all nodes part of a
85            service given in input";
86     input {
87       leaf service-name {
88         type string;
89         description
90           "Name of the service. Unique identifier for serivice";
91       }
92     }
93     output {
94       leaf result {
95         type string;
96       }
97     }
98   }
99
100   rpc calculate-spanloss-base {
101     description
102       "This RPC calculates spanloss for the very first time on all links
103          in the network model or any newly discovered link";
104     input {
105       leaf src-type {
106         type enumeration {
107           enum link {
108             value 1;
109           }
110           enum all {
111             value 2;
112           }
113         }
114         description
115           "Source type defines whether RPC runs for all links or given link Id";
116       }
117       leaf link-id {
118         when "../src-type = 'link'";
119         type ietf-network-topology:link-id;
120         default "all";
121         description
122           "Link-Id for the link where spanloss-base needs to be calculated. Default option is
123            calculating spanloss for all Roadm to Roadm links";
124       }
125     }
126     output {
127       leaf result {
128         type string;
129       }
130       list spans {
131         leaf link-id {
132           type ietf-network-topology:link-id;
133         }
134         leaf spanloss {
135           type string;
136         }
137       }
138     }
139   }
140
141   rpc calculate-spanloss-current {
142     description
143       "This RPC can be used by PM monitoring to calculate spanloss
144          periodically";
145     input;
146     output {
147       leaf result {
148         type string;
149       }
150     }
151   }
152 }