410077e52b667b8dbac582320e5f7b4e71ba2c21
[transportpce.git] / api / src / main / yang / service_path / transportpce-renderer-device@2020-01-28.yang
1 module transportpce-device-renderer {
2   namespace "http://org/opendaylight/transportpce/renderer/device";
3   prefix org-opendaylight-transportpce-renderer-device;
4
5   import transportpce-common-types {
6     prefix org-transportpce-common-types;
7     revision-date 2020-01-28;
8   }
9   import org-openroadm-otn-common-types {
10     prefix org-openroadm-otn-common-types;
11     revision-date 2018-11-30;
12   }
13
14   organization
15     "transportPCE";
16   contact
17     "transportPCE committers - ODL";
18   description
19     "YANG definitions of RPCs supported by renderer.
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 2020-01-28 {
25     description
26       "Complement rpc otn-service-path";
27   }
28   revision 2019-12-12 {
29     description
30       "Add rpc otn-service-path";
31   }
32   revision 2017-02-28 {
33     description
34       "Initial revision of renderer model version 1.5";
35   }
36
37   rpc service-path {
38     input {
39       leaf modulation-format {
40         type string;
41       }
42       leaf operation {
43         type enumeration {
44           enum create {
45             value 1;
46           }
47           enum delete {
48             value 2;
49           }
50         }
51       }
52       uses org-transportpce-common-types:olm-renderer-input;
53     }
54     output {
55       leaf success {
56         type boolean;
57       }
58       leaf result {
59         type string;
60       }
61       uses org-transportpce-common-types:node-interfaces;
62     }
63   }
64
65   rpc otn-service-path {
66     input {
67       leaf service-rate {
68         type string;
69       }
70       leaf service-type {
71         type string;
72       }
73       leaf ethernet-encoding {
74         type string;
75       }
76       leaf trib-slot {
77         type int16;
78       }
79       leaf-list complex-trib-slots {
80         type int16;
81         description
82           "Used in case trib-slot allocation policy of an equipment would
83            not correspond to contiguous trib-slots";
84       }
85       leaf-list opucn-trib-slots {
86         type org-openroadm-otn-common-types:opucn-trib-slot-def;
87       }
88       leaf trib-port-number {
89         type int16;
90       }
91       leaf operation {
92         type enumeration {
93           enum create {
94             value 1;
95           }
96           enum delete {
97             value 2;
98           }
99         }
100       }
101       container a-end-api-info {
102         leaf node-id {
103           type string;
104         }
105         uses org-transportpce-common-types:api-info;
106       }
107       container z-end-api-info {
108         leaf node-id {
109           type string;
110         }
111         uses org-transportpce-common-types:api-info;
112       }
113       uses org-transportpce-common-types:otn-renderer-input;
114     }
115     output {
116       leaf success {
117         type boolean;
118       }
119       leaf result {
120         type string;
121       }
122       uses org-transportpce-common-types:node-interfaces;
123     }
124   }
125
126   rpc renderer-rollback {
127     input {
128       uses org-transportpce-common-types:node-interfaces;
129     }
130     output {
131       leaf success {
132         type boolean;
133       }
134       list failed-to-rollback {
135         key "node-id";
136         leaf node-id {
137           type string;
138         }
139         leaf-list interface {
140           type string;
141         }
142       }
143     }
144   }
145
146   rpc create-ots-oms {
147     input {
148       leaf node-id {
149         type string;
150       }
151       leaf logical-connection-point {
152         type string;
153       }
154     }
155     output {
156       leaf success {
157         type boolean;
158       }
159       leaf result {
160         type string;
161       }
162     }
163   }
164 }