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