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