blob: 616bad0bae80095e4de2140284898e5a573fd8a5 [file] [log] [blame]
velandy88a64f12017-06-07 23:32:49 -04001
2/*
3 *
Rajesh Velandye27e0b22017-09-18 17:21:48 -04004 * Copyright 2016-2017 RIFT.IO Inc
velandy88a64f12017-06-07 23:32:49 -04005 *
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
21module 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
velandy88a64f12017-06-07 23:32:49 -040030 import ietf-yang-types {
31 prefix "yang";
32 }
33
34 import mano-types {
35 prefix "manotypes";
36 }
37
Rajesh Velandye27e0b22017-09-18 17:21:48 -040038 import rw-project {
39 prefix "rw-project";
40 }
41
42 revision 2017-02-08 {
43 description
44 "Update model to support projects.";
45 }
velandy88a64f12017-06-07 23:32:49 -040046
47 revision 2015-09-10 {
48 description
49 "Initial revision. This YANG file defines
50 the Virtual Link Record (VLR)";
51 reference
52 "Derived from earlier versions of base YANG files";
53 }
54
Rajesh Velandye27e0b22017-09-18 17:21:48 -040055 augment "/rw-project:project" {
56 container vlr-catalog {
57 config false;
velandy88a64f12017-06-07 23:32:49 -040058
Rajesh Velandye27e0b22017-09-18 17:21:48 -040059 list vlr {
60 key "id";
61 unique "name";
velandy88a64f12017-06-07 23:32:49 -040062
Rajesh Velandye27e0b22017-09-18 17:21:48 -040063 leaf id {
64 description "Identifier for the VLR.";
65 type yang:uuid;
66 }
velandy88a64f12017-06-07 23:32:49 -040067
Rajesh Velandye27e0b22017-09-18 17:21:48 -040068 leaf name {
69 description "VLR name.";
70 type string;
71 }
velandy88a64f12017-06-07 23:32:49 -040072
Rajesh Velandye27e0b22017-09-18 17:21:48 -040073 leaf nsr-id-ref {
74 description
velandy88a64f12017-06-07 23:32:49 -040075 "NS instance identifier.
Rajesh Velandye27e0b22017-09-18 17:21:48 -040076 This is a leafref /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:id";
77 type yang:uuid;
78 }
velandy88a64f12017-06-07 23:32:49 -040079
Rajesh Velandye27e0b22017-09-18 17:21:48 -040080 leaf vld-ref {
81 description
82 "Reference to VLD
83 /rw-project:project/nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]
84 /nsd/vld:vld/vld:id";
85 type string;
86 }
velandy88a64f12017-06-07 23:32:49 -040087
Rajesh Velandye27e0b22017-09-18 17:21:48 -040088 leaf res-id {
89 description "Identifier for resmgr id mapping";
90 type yang:uuid;
91 }
velandy88a64f12017-06-07 23:32:49 -040092
Rajesh Velandye27e0b22017-09-18 17:21:48 -040093 leaf short-name {
94 description "Short name to appear as label in the UI";
95 type string;
96 }
velandy88a64f12017-06-07 23:32:49 -040097
Rajesh Velandye27e0b22017-09-18 17:21:48 -040098 leaf vendor {
99 description "Provider of the VLR.";
100 type string;
101 }
velandy88a64f12017-06-07 23:32:49 -0400102
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400103 leaf description {
104 description "Description of the VLR.";
105 type string;
106 }
velandy88a64f12017-06-07 23:32:49 -0400107
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400108 leaf version {
109 description "Version of the VLR";
110 type string;
111 }
velandy88a64f12017-06-07 23:32:49 -0400112
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400113 leaf type {
114 type manotypes:virtual-link-type;
115 }
velandy88a64f12017-06-07 23:32:49 -0400116
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400117 leaf root-bandwidth {
118 description
velandy88a64f12017-06-07 23:32:49 -0400119 "For ELAN this is the aggregate bandwidth.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400120 type uint64;
121 }
velandy88a64f12017-06-07 23:32:49 -0400122
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400123 leaf leaf-bandwidth {
124 description
velandy88a64f12017-06-07 23:32:49 -0400125 "For ELAN this is the bandwidth of branches.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400126 type uint64;
127 }
velandy88a64f12017-06-07 23:32:49 -0400128
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400129 leaf create-time {
130 description
131 "Creation timestamp of this Virtual Link.
velandy88a64f12017-06-07 23:32:49 -0400132 The timestamp is expressed as seconds
133 since unix epoch - 1970-01-01T00:00:00Z";
134
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400135 type uint32;
136 }
velandy88a64f12017-06-07 23:32:49 -0400137
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400138 leaf uptime {
139 description
140 "Active period of this Virtual Link.
velandy88a64f12017-06-07 23:32:49 -0400141 Uptime is expressed in seconds";
142
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400143 type uint32;
144 }
velandy88a64f12017-06-07 23:32:49 -0400145
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400146 leaf network-id {
147 description
velandy88a64f12017-06-07 23:32:49 -0400148 "Identifier for the allocated network resource.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400149 type string;
150 }
velandy88a64f12017-06-07 23:32:49 -0400151
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400152 leaf vim-network-name {
153 description
velandy88a64f12017-06-07 23:32:49 -0400154 "Name of network in VIM account. This is used to indicate
155 pre-provisioned network name in cloud account.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400156 type string;
velandy88a64f12017-06-07 23:32:49 -0400157 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400158
159 // replicate for pnfd container here
160
161 uses manotypes:provider-network;
162 uses manotypes:ip-profile-info;
163
164 leaf status {
165 description
166 "Status of the virtual link record.";
167 type enumeration {
168 enum LINK_UP;
169 enum DEGRADED;
170 enum LINK_DOWN;
171 }
172 }
173 leaf operational-status {
174 description
175 "The operational status of the Virtual Link
velandy88a64f12017-06-07 23:32:49 -0400176 init : The VL is in init stat.
177 vl-alloc-pending : The VL alloc is pending in VIM
178 running : The VL is up and running in VM
179 vl-terminate-pending : The VL is being terminated in VIM.
180 terminated : The VL is terminated in the VM.
181 failed : The VL instantiation failed in VIM.
182 ";
183
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400184 type enumeration {
185 rwpb:enum-type "VlOperationalStatus";
186 enum init;
187 enum vl-alloc-pending;
188 enum running;
189 enum vl-terminate-pending;
190 enum terminated;
191 enum failed;
192 }
velandy88a64f12017-06-07 23:32:49 -0400193 }
194 }
195 }
196 }
197}
198