upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / service / src / main / yang / org-openroadm-topology@2019-05-31.yang
1 module org-openroadm-topology {
2   namespace "http://org/openroadm/topology";
3   prefix org-openroadm-topology;
4
5   import org-openroadm-resource {
6     prefix org-openroadm-resource;
7     revision-date 2019-05-31;
8   }
9   import org-openroadm-network-resource {
10     prefix org-openroadm-network-resource;
11     revision-date 2018-11-30;
12   }
13
14   organization
15     "Open ROADM MSA";
16   contact
17     "OpenROADM.org";
18   description
19     "YANG definitions of topology.
20
21       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
22       All other rights reserved.
23
24       Redistribution and use in source and binary forms, with or without modification,
25       are permitted provided that the following conditions are met:
26
27       * Redistributions of source code must retain the above copyright notice, this
28         list of conditions and the following disclaimer.
29       * Redistributions in binary form must reproduce the above copyright notice,
30         this list of conditions and the following disclaimer in the documentation and/or
31         other materials provided with the distribution.
32       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
33         contributors may be used to endorse or promote products derived from this software
34         without specific prior written permission.
35
36       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
37       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
38       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
39       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
40       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
41       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
42       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
43       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
45       POSSIBILITY OF SUCH DAMAGE";
46
47   revision 2019-05-31 {
48     description
49       "Version 5.1.0";
50   }
51   revision 2019-03-29 {
52     description
53       "Version 5.0.0";
54   }
55   revision 2018-11-30 {
56     description
57       "Version 4.1.0";
58   }
59   revision 2018-09-28 {
60     description
61       "Version 4.0.0";
62   }
63   revision 2018-03-30 {
64     description
65       "Version 3.0.0";
66   }
67   revision 2017-12-15 {
68     description
69       "Version 2.2";
70   }
71   revision 2017-09-29 {
72     description
73       "Version 2.1";
74   }
75   revision 2017-07-28 {
76     description
77       "Version 2.0.1 - added revision-date to imports";
78   }
79   revision 2017-06-26 {
80     description
81       "Version 2.0";
82   }
83   revision 2016-10-14 {
84     description
85       "Version 1.2";
86   }
87
88   grouping topology {
89     description
90       "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
91        at its edge that are available for externally connections. It includes both physical and logical ports.
92        Physical ports are ordered with the logical ports that run over them as follows:
93        a.\t On ingress to a node/card, physical then logical
94        b.\t On egress to a node/card, logical then physical";
95     list aToZ {
96       key "id";
97       leaf id {
98         type string;
99         description
100           "Unique identifier for this topology component within this service";
101       }
102       uses hop;
103     }
104     list zToA {
105       key "id";
106       leaf id {
107         type string;
108         description
109           "Unique identifier for this topology component within this service";
110       }
111       uses hop;
112     }
113   }
114
115   grouping hop {
116     leaf hop-type {
117       type enumeration {
118         enum "node-external" {
119           value 1;
120           description
121             "The given resource is on the edge of the node, and used in relationships to resources outside of the node.";
122         }
123         enum "node-internal" {
124           value 2;
125           description
126             "The given resource is internally to the node";
127         }
128       }
129     }
130     uses org-openroadm-resource:resource {
131       augment "resource/resource/interface" {
132         uses org-openroadm-resource:resource-reporting;
133       }
134     }
135   }
136
137   grouping network-topology {
138     description
139       "network-topology defines the ordered a-to-z and z-to-a topology in terms of network model entities: tp-id and link-id";
140     list a-to-z {
141       key "id";
142       leaf id {
143         type string;
144         description
145           "Unique identifier for this network-topology component within this service";
146       }
147       uses org-openroadm-network-resource:network-resource;
148     }
149     list z-to-a {
150       key "id";
151       leaf id {
152         type string;
153         description
154           "Unigue identifier for this network-topology component within this service";
155       }
156       uses org-openroadm-network-resource:network-resource;
157     }
158   }
159 }