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