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