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