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