blob: 9137539a0c0f43252cc9768cdc067fcbf5d3b1a2 [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
velandy88a64f12017-06-07 23:32:49 -040026 import ietf-yang-types {
27 prefix "yang";
28 }
29
30 import mano-types {
31 prefix "manotypes";
32 }
33
Rajesh Velandye27e0b22017-09-18 17:21:48 -040034 import rw-project {
35 prefix "rw-project";
36 }
37
38 revision 2017-02-08 {
39 description
40 "Update model to support projects.";
41 }
velandy88a64f12017-06-07 23:32:49 -040042
43 revision 2015-09-10 {
44 description
45 "Initial revision. This YANG file defines
46 the Virtual Link Record (VLR)";
47 reference
48 "Derived from earlier versions of base YANG files";
49 }
50
Rajesh Velandye27e0b22017-09-18 17:21:48 -040051 augment "/rw-project:project" {
52 container vlr-catalog {
garciadeblas781fe342017-12-18 11:34:47 +010053 leaf schema-version {
54 description "Schema version for the VLR. If unspecified, it assumes v3.0";
55 type string;
56 default "v3.0";
57 }
58
Rajesh Velandye27e0b22017-09-18 17:21:48 -040059 config false;
velandy88a64f12017-06-07 23:32:49 -040060
Rajesh Velandye27e0b22017-09-18 17:21:48 -040061 list vlr {
62 key "id";
63 unique "name";
velandy88a64f12017-06-07 23:32:49 -040064
Rajesh Velandye27e0b22017-09-18 17:21:48 -040065 leaf id {
66 description "Identifier for the VLR.";
67 type yang:uuid;
68 }
velandy88a64f12017-06-07 23:32:49 -040069
Rajesh Velandye27e0b22017-09-18 17:21:48 -040070 leaf name {
71 description "VLR name.";
72 type string;
73 }
velandy88a64f12017-06-07 23:32:49 -040074
Rajesh Velandye27e0b22017-09-18 17:21:48 -040075 leaf nsr-id-ref {
76 description
velandy88a64f12017-06-07 23:32:49 -040077 "NS instance identifier.
Rajesh Velandye27e0b22017-09-18 17:21:48 -040078 This is a leafref /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:id";
79 type yang:uuid;
80 }
velandy88a64f12017-06-07 23:32:49 -040081
Rajesh Velandye27e0b22017-09-18 17:21:48 -040082 leaf vld-ref {
83 description
84 "Reference to VLD
85 /rw-project:project/nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]
86 /nsd/vld:vld/vld:id";
87 type string;
88 }
velandy88a64f12017-06-07 23:32:49 -040089
Rajesh Velandye27e0b22017-09-18 17:21:48 -040090 leaf res-id {
91 description "Identifier for resmgr id mapping";
92 type yang:uuid;
93 }
velandy88a64f12017-06-07 23:32:49 -040094
Rajesh Velandye27e0b22017-09-18 17:21:48 -040095 leaf short-name {
96 description "Short name to appear as label in the UI";
97 type string;
98 }
velandy88a64f12017-06-07 23:32:49 -040099
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400100 leaf vendor {
101 description "Provider of the VLR.";
102 type string;
103 }
velandy88a64f12017-06-07 23:32:49 -0400104
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400105 leaf description {
106 description "Description of the VLR.";
107 type string;
108 }
velandy88a64f12017-06-07 23:32:49 -0400109
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400110 leaf version {
111 description "Version of the VLR";
112 type string;
113 }
velandy88a64f12017-06-07 23:32:49 -0400114
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400115 leaf type {
116 type manotypes:virtual-link-type;
117 }
velandy88a64f12017-06-07 23:32:49 -0400118
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400119 leaf root-bandwidth {
120 description
velandy88a64f12017-06-07 23:32:49 -0400121 "For ELAN this is the aggregate bandwidth.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400122 type uint64;
123 }
velandy88a64f12017-06-07 23:32:49 -0400124
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400125 leaf leaf-bandwidth {
126 description
velandy88a64f12017-06-07 23:32:49 -0400127 "For ELAN this is the bandwidth of branches.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400128 type uint64;
129 }
velandy88a64f12017-06-07 23:32:49 -0400130
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400131 leaf create-time {
132 description
133 "Creation timestamp of this Virtual Link.
velandy88a64f12017-06-07 23:32:49 -0400134 The timestamp is expressed as seconds
135 since unix epoch - 1970-01-01T00:00:00Z";
136
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400137 type uint32;
138 }
velandy88a64f12017-06-07 23:32:49 -0400139
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400140 leaf uptime {
141 description
142 "Active period of this Virtual Link.
velandy88a64f12017-06-07 23:32:49 -0400143 Uptime is expressed in seconds";
144
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400145 type uint32;
146 }
velandy88a64f12017-06-07 23:32:49 -0400147
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400148 leaf network-id {
149 description
velandy88a64f12017-06-07 23:32:49 -0400150 "Identifier for the allocated network resource.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400151 type string;
152 }
velandy88a64f12017-06-07 23:32:49 -0400153
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400154 leaf vim-network-name {
155 description
velandy88a64f12017-06-07 23:32:49 -0400156 "Name of network in VIM account. This is used to indicate
157 pre-provisioned network name in cloud account.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400158 type string;
velandy88a64f12017-06-07 23:32:49 -0400159 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400160
161 // replicate for pnfd container here
162
163 uses manotypes:provider-network;
164 uses manotypes:ip-profile-info;
165
166 leaf status {
167 description
168 "Status of the virtual link record.";
169 type enumeration {
170 enum LINK_UP;
171 enum DEGRADED;
172 enum LINK_DOWN;
173 }
174 }
175 leaf operational-status {
176 description
177 "The operational status of the Virtual Link
velandy88a64f12017-06-07 23:32:49 -0400178 init : The VL is in init stat.
179 vl-alloc-pending : The VL alloc is pending in VIM
180 running : The VL is up and running in VM
181 vl-terminate-pending : The VL is being terminated in VIM.
182 terminated : The VL is terminated in the VM.
183 failed : The VL instantiation failed in VIM.
184 ";
185
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400186 type enumeration {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400187 enum init;
188 enum vl-alloc-pending;
189 enum running;
190 enum vl-terminate-pending;
191 enum terminated;
192 enum failed;
193 }
velandy88a64f12017-06-07 23:32:49 -0400194 }
195 }
196 }
197 }
198}
199