5b33e8368093b73776de4e3197dfe1f8b36b8d1a
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-resource@2017-12-15.yang
1 module org-openroadm-resource {
2   namespace "http://org/openroadm/resource";
3   prefix org-openroadm-resource;
4
5   import org-openroadm-resource-types {
6     prefix org-openroadm-resource-types;
7     revision-date 2017-12-15;
8   }
9
10   organization
11     "Open ROADM MSA";
12   contact
13     "OpenROADM.org";
14   description
15     "YANG definitions of resources.
16
17       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
18       AT&T Intellectual Property.  All other rights reserved.
19
20       Redistribution and use in source and binary forms, with or without modification,
21       are permitted provided that the following conditions are met:
22
23       * Redistributions of source code must retain the above copyright notice, this
24         list of conditions and the following disclaimer.
25       * Redistributions in binary form must reproduce the above copyright notice,
26         this list of conditions and the following disclaimer in the documentation and/or
27         other materials provided with the distribution.
28       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
29         contributors may be used to endorse or promote products derived from this software
30         without specific prior written permission.
31
32       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
33       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
34       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
35       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
36       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
37       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
38       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
39       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
40       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41       POSSIBILITY OF SUCH DAMAGE";
42
43   revision 2017-12-15 {
44     description
45       "Version 2.2";
46   }
47   revision 2017-09-29 {
48     description
49       "Version 2.1";
50   }
51   revision 2017-07-28 {
52     description
53       "Version 2.0.1 - added revision-date to imports";
54   }
55   revision 2017-06-26 {
56     description
57       "Version 2.0";
58   }
59   revision 2016-10-14 {
60     description
61       "Version 1.2";
62   }
63
64   grouping resource {
65     description
66       "This resource identifier is intended to provide a generic identifer
67        for any resource that can be used without specific knowledge of
68        the resource.";
69     container device {
70       description
71         "Device of the resource, used only when the system using this
72          model report on more than one device. ";
73       uses org-openroadm-resource-types:device-id;
74     }
75     container resource {
76       choice resource {
77         case circuit-pack {
78           uses org-openroadm-resource-types:circuit-pack-name;
79         }
80         case port {
81           container port {
82             uses org-openroadm-resource-types:port-name;
83           }
84         }
85         case connection {
86           uses org-openroadm-resource-types:connection-name {
87             refine "connection-name" {
88               mandatory true;
89             }
90           }
91         }
92         case physical-link {
93           uses org-openroadm-resource-types:physical-link-name;
94         }
95         case internal-link {
96           uses org-openroadm-resource-types:internal-link-name;
97         }
98         case shelf {
99           uses org-openroadm-resource-types:shelf-name;
100         }
101         case srg {
102           uses org-openroadm-resource-types:srg-number {
103             refine "srg-number" {
104               mandatory true;
105             }
106           }
107         }
108         case degree {
109           uses org-openroadm-resource-types:degree-number {
110             refine "degree-number" {
111               mandatory true;
112             }
113           }
114         }
115         case service {
116           uses org-openroadm-resource-types:service-name;
117         }
118         case interface {
119           uses org-openroadm-resource-types:interface-name;
120         }
121         case odu-sncp-pg {
122           uses org-openroadm-resource-types:odu-sncp-pg-name;
123         }
124         case other {
125           uses org-openroadm-resource-types:other-resource-id;
126         }
127         case device {
128           uses org-openroadm-resource-types:device-id {
129             refine "node-id" {
130               mandatory true;
131             }
132           }
133         }
134         case line-amplifier {
135           uses org-openroadm-resource-types:amp-number;
136         }
137         case xponder {
138           uses org-openroadm-resource-types:xpdr-number;
139         }
140         case versioned-service {
141           uses org-openroadm-resource-types:versioned-service-name;
142         }
143         case temp-service {
144           uses org-openroadm-resource-types:temp-service-name;
145         }
146       }
147     }
148     container resourceType {
149       uses org-openroadm-resource-types:resource-type;
150     }
151   }
152 }