Clean up API YANG models with the help of pyang
[transportpce.git] / ordmodels / network / src / main / yang / org-openroadm-network-topology-types@2018-11-30.yang
1 module org-openroadm-network-topology-types {
2   yang-version 1.1;
3   namespace "http://org/openroadm/network/topology/types";
4   prefix org-openroadm-network-topology-types;
5
6   import ietf-network {
7     prefix nd;
8     revision-date 2018-02-26;
9   }
10   import ietf-network-topology {
11     prefix nwt;
12     revision-date 2018-02-26;
13   }
14   import org-openroadm-switching-pool-types {
15     prefix org-openroadm-switching-pool-types;
16     revision-date 2018-11-30;
17   }
18
19   organization
20     "OPEN ROADM MSA";
21   contact
22     "www.OpenROADM.org.";
23   description
24     "Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
25      All other rights reserved.
26
27      Redistribution and use in source and binary forms, with or without modification,
28      are permitted provided that the following conditions are met:
29
30      * Redistributions of source code must retain the above copyright notice, this
31        list of conditions and the following disclaimer.
32      * Redistributions in binary form must reproduce the above copyright notice,
33        this list of conditions and the following disclaimer in the documentation and/or
34        other materials provided with the distribution.
35      * Neither the Members of the Open ROADM MSA Agreement nor the names of its
36        contributors may be used to endorse or promote products derived from this software
37        without specific prior written permission.
38
39      THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
40      AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
41      WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
42      IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
43      INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44      NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
45      OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
46      WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
47      ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
48      POSSIBILITY OF SUCH DAMAGE.";
49
50   revision 2018-11-30 {
51     description
52       "Version 4.1.0";
53   }
54   revision 2017-12-15 {
55     description
56       "Version 2.2";
57   }
58
59   grouping xpdr-tp-bandwidth-sharing {
60     list tp-bandwidth-sharing {
61       key "tp-sharing-id";
62       leaf tp-sharing-id {
63         type uint16;
64       }
65       leaf-list tp-list {
66         type nwt:tp-id;
67       }
68       leaf shared-bandwidth {
69         type uint16;
70         units "Gbps";
71       }
72     }
73   }
74
75   grouping xpdr-odu-switching-pools {
76     list odu-switching-pools {
77       key "switching-pool-number";
78       leaf switching-pool-number {
79         type uint16;
80         description
81           "Unique identifier for this odu-switching-pool";
82       }
83       leaf switching-pool-type {
84         type org-openroadm-switching-pool-types:switching-pool-types;
85       }
86       list non-blocking-list {
87         key "nbl-number";
88         description
89           "List of ports in a non-blocking switch element";
90         leaf nbl-number {
91           type uint16;
92           description
93             "Identifier for this non-blocking-list. Unique within odu-switching-pool";
94         }
95         leaf interconnect-bandwidth-unit {
96           type uint32;
97           description
98             "Switch fabric interconnect bandwidth unit rate in bits per second.
99              Represents granularity of switch fabric";
100         }
101         leaf capable-interconnect-bandwidth {
102           type uint32;
103           description
104             "Total interconnect bandwidth for a non-blocking element expressed as
105              number of inter-connect-bandwidth units";
106         }
107         leaf available-interconnect-bandwidth {
108           type uint32;
109           description
110             "Total interconnect bandwidth available for a non-blocking element can use as
111              number of inter-connect-bandwidth units";
112         }
113         leaf-list tp-list {
114           type nwt:tp-id;
115           description
116             "Termination point. Unique within device";
117         }
118       }
119     }
120   }
121
122   grouping xpdr-otn-tail-attributes {
123     leaf tp-id {
124       type nwt:tp-id;
125     }
126     leaf network-ref {
127       type leafref {
128         path "/nd:networks/nd:network/nd:network-id";
129       }
130       description
131         "Used to reference a network, for example an underlay
132          network.";
133     }
134     leaf node-ref {
135       type leafref {
136         path "/nd:networks/nd:network[nd:network-id=current()/../network-ref]/nd:node/nd:node-id";
137       }
138       description
139         "Used to reference a node.
140          Nodes are identified relative to the network they are
141          contained in.";
142     }
143   }
144 }