upgrade models to OpenROADM service 5.1.0
[transportpce.git] / api / src / main / yang / service_path / transportpce-routing-constraints@2017-10-17.yang
1 module transportpce-routing-constraints {
2   namespace "http://org/transportpce/B-C-interface/routing/constraints";
3   prefix transportpce-routing-constraints;
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      openroadm copyright:
13       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
14       AT&T Intellectual Property.  All other rights reserved.
15
16       Redistribution and use in source and binary forms, with or without modification,
17       are permitted provided that the following conditions are met:
18
19       * Redistributions of source code must retain the above copyright notice, this
20         list of conditions and the following disclaimer.
21       * Redistributions in binary form must reproduce the above copyright notice,
22         this list of conditions and the following disclaimer in the documentation and/or
23         other materials provided with the distribution.
24       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
25         contributors may be used to endorse or promote products derived from this software
26         without specific prior written permission.
27
28       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
29       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
30       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
31       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
32       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
34       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
35       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37       POSSIBILITY OF SUCH DAMAGE";
38
39   revision 2017-04-26 {
40       description
41         "Version 1.5";
42   }
43
44   revision 2017-10-17 {
45     description
46       "Version 1.6";
47   }
48
49   grouping common-constraints-sp {
50     leaf-list SRLG {
51       type string;
52     }
53     leaf-list clli {
54       type string;
55     }
56     leaf-list node-id {
57       type string;
58     }
59   }
60
61 grouping ordered-constraints-sp {
62     description
63       "";
64     container hop-type {
65       choice hop-type {
66         case SRLG {
67           leaf SRLG {
68                type string; //to be clarified with topology model
69           }
70         }
71
72         case clli {
73           leaf clli {
74                type string; //to be clarified with topology model
75           }
76         }
77
78         case node {
79           leaf node-id {
80                type string; // to be clarified with topology model
81           }
82         }
83       }
84     }
85   }
86
87
88   grouping diversity-existing-service-contraints-sp {
89     leaf-list existing-service {
90       type string;
91       description
92         "Diverse from existing services identified by facility CLFI";
93     }
94     container existing-service-applicability {
95       leaf clli {
96         type boolean;
97       }
98       leaf node {
99         type boolean;
100       }
101       leaf srlg {
102         type boolean;
103       }
104     }
105   }
106   grouping routing-constraints-sp {
107     container hard-constraints {
108       uses constraints-sp;
109     }
110     container soft-constraints {
111       uses constraints-sp;
112     }
113     leaf pce-metric {
114          type enumeration {
115               enum hop-count;
116               enum propagation-delay;
117               enum TE-metric;
118               enum IGP-metric;
119          }
120     }
121     leaf locally-protected-links {
122          type boolean;
123          description "indicates whether it must use locally protected links or not";
124     }
125   }
126
127   grouping constraints-sp {
128     leaf-list customer-code {
129       type string;
130     }
131     choice co-routing-or-general {
132       case general {
133         container diversity {
134           uses diversity-existing-service-contraints-sp;
135         }
136         container exclude_ {
137           uses common-constraints-sp;
138           leaf-list supporting-service-name {
139             description
140               "Supporting service(s) to exclude from this route.";
141             type string;
142           }
143           leaf affinity {
144                type uint32;
145           }
146         }
147         container include_ {
148           list ordered-hops {
149                key hop-number;
150                leaf hop-number {
151                     description
152                       "designates the id of the hop: node-id, SRLG-id, site-id";
153                     type uint16;
154                }
155                uses ordered-constraints-sp;
156           }
157
158         }
159         container latency {
160           description
161             "Maximum latency allowed";
162           leaf max-latency {
163             type uint32;
164             units "ms";
165           }
166         }
167       }
168       case co-routing {
169         container co-routing {
170           leaf-list existing-service {
171             type string;
172             description
173               "Diverse from existing services identified by facility CLFI";
174           }
175         }
176       }
177     }
178   }
179
180
181 }