Upgrade to Service Path 1.7
[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
10   import ietf-network-topology {
11      prefix ietf-network-topology;
12      revision-date 2018-02-26;
13   }
14
15  organization
16     "transportPCE";
17   contact
18     "transportPCE committers - ODL";
19   description
20     "YANG definitions of RPCs supported by OLM.
21      Copyright (c) 2017 AT&T and others.  All rights reserved.
22      authors: Dhruv Bhardwaj ( db929a@att.com )
23               Shweta Vachhani ( sv111y@att.com )";
24
25   revision "2017-04-18" {
26     description "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   rpc service-power-setup{
54    description
55       "This RPC sets up output power values on a list of ROADMs/Transponders
56          based on the path the wavelength takes";
57     input{
58        uses org-transportpce-common-types:olm-renderer-input;
59     }
60     output{
61       leaf result{
62         type string;
63       }
64     }
65   }
66   rpc service-power-turndown{
67    description
68       "This RPC turn down the output power values on a list of ROADMs/Transponders
69          based on the path the wavelength takes";
70     input{
71        uses org-transportpce-common-types:olm-renderer-input;
72     }
73     output{
74       leaf result{
75         type string;
76       }
77     }
78   }
79   rpc service-power-reset{
80       description
81          "This RPC re-calculates and re-sets power for all nodes part of a
82               service given in input";
83        input{
84          leaf service-name{
85               type string;
86               description
87                "Name of the service. Unique identifier for serivice";
88          }
89        }
90        output{
91          leaf result{
92            type string;
93          }
94        }
95   }
96   rpc calculate-spanloss-base{
97       description
98          "This RPC calculates spanloss for the very first time on all links
99             in the network model or any newly discovered link";
100        input{
101          leaf src-type {
102            description
103              "Soruce type defines whether RPC runs for all links or given link Id";
104           type enumeration{
105              enum "link"{
106                value 1;
107              }
108              enum "all"{
109                value 2;
110              }
111            }
112          }
113          leaf link-id {
114             when "../src-type = 'link'";
115             type ietf-network-topology:link-id;
116             default "all";
117              description
118                "Link-Id for the link where spanloss-base needs to be calculated. Default option is
119                calculating spanloss for all Roadm to Roadm links";
120          }
121        }
122        output{
123          leaf result{
124            type string;
125          }
126          list spans {
127              leaf link-id {
128                  type ietf-network-topology:link-id;
129              }
130              leaf spanloss {
131                  type string;
132              }
133          }
134        }
135   }
136   rpc calculate-spanloss-current{
137       description
138          "This RPC can be used by PM monitoring to calculate spanloss
139             periodically";
140        input{
141        }
142        output{
143          leaf result{
144            type string;
145          }
146        }
147   }
148 }