541b429ccc3aca83f9ebce32a3fd493243d10fde
[transportpce.git] / api / src / main / yang / olm@2017-04-18.yang
1 module olm {
2   yang-version 1;
3   namespace "urn:opendaylight:params:xml:ns:yang:olm";
4   prefix "olm";
5
6   import org-transportpce-common-types {
7       prefix org-transportpce-common-types;
8       revision-date 2017-09-07;
9   }
10
11   import ietf-network-topology {
12      prefix ietf-network-topology;
13      revision-date 2015-06-08;
14   }
15
16  organization
17     "transportPCE";
18   contact
19     "transportPCE committers - ODL";
20   description
21     "YANG definitions of RPCs supported by OLM.
22      Copyright (c) 2017 AT&T and others.  All rights reserved.
23      authors: Dhruv Bhardwaj ( db929a@att.com )
24               Shweta Vachhani ( sv111y@att.com )";
25
26   revision "2017-04-18" {
27     description "Initial revision of olm model";
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        }
127   }
128   rpc calculate-spanloss-current{
129       description
130          "This RPC can be used by PM monitoring to calculate spanloss
131             periodically";
132        input{
133        }
134        output{
135          leaf result{
136            type string;
137          }
138        }
139   }
140 }