T-API notification functional tests
[transportpce.git] / api / src / main / yang / transportpce-networkutils@2022-06-30.yang
1 module transportpce-networkutils {
2   yang-version 1.1;
3   namespace "http://org/opendaylight/transportpce/networkutils";
4   prefix org-opendaylight-transportpce-networkutils;
5
6   import ietf-network {
7     prefix nd;
8     revision-date 2018-02-26;
9   }
10   import ietf-network-topology {
11     prefix nwt;
12     revision-date 2018-02-26;
13   }
14   import org-openroadm-common-network {
15     prefix cnet;
16     revision-date 2021-12-10;
17   }
18
19   revision 2022-06-30 {
20     description
21       "Add transportpce augmentation to manage otn-link-type in otn-topology";
22   }
23
24   revision 2017-08-18 {
25     description
26       "Initial revision of networkutils model";
27   }
28
29   typedef otn-link-type {
30     type enumeration {
31       enum "OTU4" {
32         value 0;
33       }
34       enum "ODU4" {
35         value 1;
36       }
37       enum "ODTU4" {
38         value 2;
39       }
40       enum "ODU2e" {
41         value 3;
42       }
43       enum "ODU0" {
44         value 4;
45       }
46       enum "OTUC4" {
47         value 5;
48       }
49       enum "ODUC4" {
50         value 6;
51       }
52       enum "OTUC3" {
53         value 7;
54       }
55       enum "ODUC3" {
56         value 8;
57       }
58       enum "OTUC2" {
59         value 9;
60       }
61       enum "ODUC2" {
62         value 10;
63       }
64     }
65   }
66
67   grouping links-input-grouping {
68     container links-input {
69       description
70         "This is the input to initialize the nodes";
71       leaf xpdr-node {
72         type string;
73       }
74       leaf xpdr-num {
75         type uint8;
76       }
77       leaf network-num {
78         type uint8;
79       }
80       leaf rdm-node {
81         type string;
82       }
83       leaf srg-num {
84         type uint8;
85       }
86       leaf termination-point-num {
87         type string;
88       }
89     }
90   }
91
92   rpc init-roadm-nodes {
93     description
94       "This rpc initiates roadm to roadm link";
95     input {
96       leaf rdm-a-node {
97         type string;
98       }
99       leaf deg-a-num {
100         type uint8;
101       }
102       leaf termination-point-a {
103         type string;
104       }
105       leaf rdm-z-node {
106         type string;
107       }
108       leaf deg-z-num {
109         type uint8;
110       }
111       leaf termination-point-z {
112         type string;
113       }
114     }
115     output {
116       leaf result {
117         type string;
118       }
119     }
120   }
121
122   rpc init-xpdr-rdm-links {
123     description
124       "This rpc initiates xponder to rdm link";
125     input {
126       uses links-input-grouping;
127     }
128     output {
129       leaf result {
130         type string;
131       }
132     }
133   }
134
135   rpc init-rdm-xpdr-links {
136     description
137       "This rpc initiates rdm to xponder link";
138     input {
139       uses links-input-grouping;
140     }
141     output {
142       leaf result {
143         type string;
144       }
145     }
146   }
147
148   rpc delete-link {
149     description
150       "This rpc deletes a given link in openroadm Topology layer";
151     input {
152       leaf link-id {
153         type string;
154       }
155     }
156     output {
157       leaf result {
158         type string;
159       }
160     }
161   }
162
163   augment "/nd:networks/nd:network/nwt:link" {
164     when "../nd:network-types/cnet:openroadm-common-network/otn-topology";
165     description
166       "Defines more accurate otn link types to differentiate otn links in otn-topology";
167     leaf otn-link-type {
168       when
169         "../cnet:link-type = 'OTN-LINK'";
170       type otn-link-type;
171       description
172         "type of otn link, to help link management inside transportpce";
173     }
174   }
175 }