upgrade models to OpenROADM service 5.1.0
[transportpce.git] / ordmodels / common / src / main / yang / org-openroadm-network-resource@2018-11-30.yang
1 module org-openroadm-network-resource {
2   namespace "http://org/openroadm/network-resource";
3   prefix org-openroadm-network-resource;
4
5   organization
6     "Open ROADM MSA";
7   contact
8     "OpenROADM.org";
9   description
10     "YANG definitions of resources.
11
12       Copyright of the Members of the Open ROADM MSA Agreement dated (c) 2016,
13       All other rights reserved.
14
15       Redistribution and use in source and binary forms, with or without modification,
16       are permitted provided that the following conditions are met:
17
18       * Redistributions of source code must retain the above copyright notice, this
19         list of conditions and the following disclaimer.
20       * Redistributions in binary form must reproduce the above copyright notice,
21         this list of conditions and the following disclaimer in the documentation and/or
22         other materials provided with the distribution.
23       * Neither the Members of the Open ROADM MSA Agreement nor the names of its
24         contributors may be used to endorse or promote products derived from this software
25         without specific prior written permission.
26
27       THIS SOFTWARE IS PROVIDED BY THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT ''AS IS''
28       AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
29       WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
30       IN NO EVENT THE MEMBERS OF THE OPEN ROADM MSA  AGREEMENT BE LIABLE FOR ANY DIRECT,
31       INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
32       NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;  LOSS OF USE, DATA,
33       OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
34       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
35       ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
36       POSSIBILITY OF SUCH DAMAGE";
37
38   revision 2018-11-30 {
39     description
40       "Version 4.1.0";
41   }
42   revision 2018-03-30 {
43     description
44       "Version 3.0.0";
45   }
46
47   identity network-resource-types {
48     description
49       "base type for network resources";
50   }
51
52   identity network-resource-tp {
53     base network-resource-types;
54     description
55       "tp-id network resource";
56   }
57
58   identity network-resource-link {
59     base network-resource-types;
60     description
61       "link-id network resource";
62   }
63
64   grouping network-resource {
65     description
66       "This resource identifier is intended to provide a generic identifer
67        for any network resource that can be used without specific knowledge of
68        the resource.";
69     container network-resource {
70       choice network-resource {
71         case network-resource-tp {
72           uses network-tp-name;
73         }
74         case network-resource-link {
75           uses network-link-name;
76         }
77       }
78     }
79     leaf network-resource-type {
80       type identityref {
81         base network-resource-types;
82       }
83       mandatory true;
84     }
85   }
86
87   grouping network-tp-name {
88     leaf tp-network-id {
89       type string;
90       mandatory true;
91       description
92         "network-id from the network model.";
93     }
94     leaf tp-node-id {
95       type string;
96       mandatory true;
97       description
98         "node-id from the network model.";
99     }
100     leaf tp-id {
101       type string;
102       mandatory true;
103       description
104         "tp-id from the network model.";
105     }
106   }
107
108   grouping network-link-name {
109     leaf link-network-id {
110       type string;
111       mandatory true;
112       description
113         "network-id from the network model.";
114     }
115     leaf link-id {
116       type string;
117       mandatory true;
118       description
119         "link-id from the network model.";
120     }
121   }
122 }