Merge changes I1ed16552,Ia080da84
[transportpce.git] / api / src / main / yang / service_path / transportpce-pathDescription@2020-06-29.yang
1 module transportpce-pathDescription {
2   namespace "http://org/transportpce/B-C-interface/pathDescription";
3   prefix transportpce-pathDescription;
4
5   import org-openroadm-resource {
6     prefix org-openroadm-resource;
7   }
8
9   organization
10     "transportPCE";
11   contact
12     "transportPCE committers - ODL";
13   description
14     "YANG definitions of B interface (transportPCE). Adapted from service definition (openroadm)
15      Copyright © 2017 Orange, Inc. and others.  All rights reserved.
16
17      openroadm copyright:
18       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
19       AT&T Intellectual Property.  All other rights reserved.
20
21       Redistribution and use in source and binary forms, with or without modification,
22       are permitted provided that the following conditions are met:
23
24       * Redistributions of source code must retain the above copyright notice, this
25         list of conditions and the following disclaimer.
26       * Redistributions in binary form must reproduce the above copyright notice,
27         this list of conditions and the following disclaimer in the documentation and/or
28         other materials provided with the distribution.
29       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
30         contributors may be used to endorse or promote products derived from this software
31         without specific prior written permission.
32
33       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
34       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
35       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
36       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
37       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
38       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
39       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
40       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42       POSSIBILITY OF SUCH DAMAGE";
43
44   revision 2017-04-26 {
45     description
46       "Version 1.5";
47   }
48   revision 2017-10-17 {
49     description
50       "Version 1.6";
51   }
52   revision 2020-06-29 {
53       description
54         "Version 1.6.1. To manage otn services";
55     }
56
57   grouping PCE-resource {
58     description
59       "This resource identifier is intended to provide a generic identifer
60        for any resource that can be used without specific knowledge of
61        the resource.";
62     container resource {
63       choice resource {
64         case termination-point {
65           leaf tp-id {
66             type string;
67             //to be clarified with topology model
68           }
69           leaf tp-node-id {
70             type string;
71             //to be clarified with topology model
72           }
73         }
74         case link {
75           leaf link-id {
76             type string;
77             //to be clarified with topology model
78           }
79         }
80         case node {
81           leaf node-id {
82             type string;
83             // to be clarified with topology model
84           }
85         }
86       }
87     }
88   }
89
90   grouping path-description {
91     description
92       "Topology reports the individual hops along the service in the A to Z direction and Z to A directions.  This includes both ports internal to a device and those
93        at its edge that are available for externally connections. It includes both physical and logical ports.
94        Physical ports are ordered with the logical ports that run over them as follows:
95        a.\tOn ingress to a node/card, physical then logical
96        b.\tOn egress to a node/card, logical then physical";
97     container aToZ-direction {
98       leaf aToZ-wavelength-number {
99         type uint32;
100       }
101       leaf trib-port-number {
102         type uint16;
103       }
104       leaf trib-slot-number {
105         type uint16;
106       }
107       leaf rate {
108         type uint32;
109         mandatory true;
110       }
111       leaf modulation-format {
112         type string;
113         // enum ?
114       }
115       list aToZ {
116         key "id";
117         leaf id {
118           type string;
119           description
120             "Unique identifier for this topology component within this service";
121         }
122         uses hop;
123       }
124     }
125     container zToA-direction {
126       leaf zToA-wavelength-number {
127         type uint32;
128       }
129       leaf trib-port-number {
130         type uint16;
131       }
132       leaf trib-slot-number {
133         type uint16;
134       }
135       leaf rate {
136         type uint32;
137         mandatory true;
138       }
139       leaf modulation-format {
140         type string;
141         // enum ?
142       }
143       list zToA {
144         key "id";
145         leaf id {
146           type string;
147           description
148             "Unigue identifier for this topology component within this service";
149         }
150         uses hop;
151       }
152     }
153   }
154
155   grouping hop {
156     uses PCE-resource;
157   }
158 }