Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / composer / src / schemas / yang / vlr.yang.src
1
2 /*
3  * 
4  *   Copyright 2016 RIFT.IO Inc
5  *
6  *   Licensed under the Apache License, Version 2.0 (the "License");
7  *   you may not use this file except in compliance with the License.
8  *   You may obtain a copy of the License at
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *   Unless required by applicable law or agreed to in writing, software
13  *   distributed under the License is distributed on an "AS IS" BASIS,
14  *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *   See the License for the specific language governing permissions and
16  *   limitations under the License.
17  *
18  *
19  */
20
21 module vlr
22 {
23   namespace "urn:ietf:params:xml:ns:yang:nfvo:vlr";
24   prefix "vlr";
25
26   import rw-pb-ext {
27     prefix "rwpb";
28   }
29
30   import ietf-inet-types {
31     prefix "inet";
32   }
33
34   import ietf-yang-types {
35     prefix "yang";
36   }
37
38   import mano-types {
39     prefix "manotypes";
40   }
41
42   import vld {
43     prefix "vld";
44   }
45
46   revision 2015-09-10 {
47     description
48       "Initial revision. This YANG file defines
49        the Virtual Link Record (VLR)";
50     reference
51       "Derived from earlier versions of base YANG files";
52   }
53
54   container vlr-catalog {
55     config false;
56
57     list vlr {
58       key "id";
59       unique "name";
60
61       leaf id {
62         description "Identifier for the VLR.";
63         type yang:uuid;
64       }
65
66       leaf name {
67         description "VLR name.";
68         type string;
69       }
70
71       leaf nsr-id-ref {
72         description
73             "NS instance identifier.
74              This is a leafref /nsr:ns-instance-config/nsr:nsr/nsr:id";
75         type yang:uuid;
76       }
77
78       leaf res-id {
79         description "Identifier for resmgr id mapping";
80         type yang:uuid;
81       }
82
83       leaf short-name {
84         description "Short name for VLR for UI";
85         type string;
86       }
87
88       leaf vendor {
89         description "Provider of the VLR.";
90         type string;
91       }
92
93       leaf description {
94         description "Description of the VLR.";
95         type string;
96       }
97
98       leaf version {
99         description "Version of the VLR";
100         type string;
101       }
102
103       leaf type {
104         type manotypes:virtual-link-type;
105       }
106
107       leaf root-bandwidth {
108         description
109             "For ELAN this is the aggregate bandwidth.";
110         type uint64;
111       }
112
113       leaf leaf-bandwidth {
114         description
115             "For ELAN this is the bandwidth of branches.";
116         type uint64;
117       }
118
119       leaf create-time {
120         description
121           "Creation timestamp of this Virtual Link.
122           The timestamp is expressed as seconds
123           since unix epoch - 1970-01-01T00:00:00Z";
124
125         type uint32;
126       }
127
128       leaf vld-ref {
129         description "Reference to VLD";
130         type leafref {
131           path "/vld:vld-catalog/vld:vld/vld:id";
132         }
133       }
134
135       leaf network-id {
136         description
137             "Identifier for the allocated network resource.";
138         type string;
139       }
140
141       // replicate for pnfd container here
142
143       uses manotypes:provider-network;
144
145       leaf status {
146         description
147             "Status of the virtual link record.";
148         type enumeration {
149           enum LINK_UP;
150           enum DEGRADED;
151           enum LINK_DOWN;
152         }
153       }
154       leaf operational-status {
155         description
156           "The operational status of the Virtual Link
157             init                 : The VL is in init stat.
158             vl-alloc-pending     : The VL alloc is pending in VIM
159             running              : The VL is up  and running in VM
160             vl-terminate-pending : The VL is being terminated in VIM.
161             terminated           : The VL is terminated in the VM.
162             failed               : The VL instantiation failed in VIM.
163           ";
164
165         type enumeration {
166           //rwpb:enum-type "VlOperationalStatus";
167           enum init;
168           enum vl-alloc-pending;
169           enum running;
170           enum vl-terminate-pending;
171           enum terminated;
172           enum failed;
173         }
174       }
175     }
176   }
177 }
178