blob: 6a9b5916a104138265d31c945f6d7f87a27e3f33 [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 {
53 config false;
velandy88a64f12017-06-07 23:32:49 -040054
Rajesh Velandye27e0b22017-09-18 17:21:48 -040055 list vlr {
56 key "id";
57 unique "name";
velandy88a64f12017-06-07 23:32:49 -040058
Rajesh Velandye27e0b22017-09-18 17:21:48 -040059 leaf id {
60 description "Identifier for the VLR.";
61 type yang:uuid;
62 }
velandy88a64f12017-06-07 23:32:49 -040063
Rajesh Velandye27e0b22017-09-18 17:21:48 -040064 leaf name {
65 description "VLR name.";
66 type string;
67 }
velandy88a64f12017-06-07 23:32:49 -040068
Rajesh Velandye27e0b22017-09-18 17:21:48 -040069 leaf nsr-id-ref {
70 description
velandy88a64f12017-06-07 23:32:49 -040071 "NS instance identifier.
Rajesh Velandye27e0b22017-09-18 17:21:48 -040072 This is a leafref /rw-project:project/nsr:ns-instance-config/nsr:nsr/nsr:id";
73 type yang:uuid;
74 }
velandy88a64f12017-06-07 23:32:49 -040075
Rajesh Velandye27e0b22017-09-18 17:21:48 -040076 leaf vld-ref {
77 description
78 "Reference to VLD
79 /rw-project:project/nsr:ns-instance-config/nsr:nsr[nsr:id=../nsr-id-ref]
80 /nsd/vld:vld/vld:id";
81 type string;
82 }
velandy88a64f12017-06-07 23:32:49 -040083
Rajesh Velandye27e0b22017-09-18 17:21:48 -040084 leaf res-id {
85 description "Identifier for resmgr id mapping";
86 type yang:uuid;
87 }
velandy88a64f12017-06-07 23:32:49 -040088
Rajesh Velandye27e0b22017-09-18 17:21:48 -040089 leaf short-name {
90 description "Short name to appear as label in the UI";
91 type string;
92 }
velandy88a64f12017-06-07 23:32:49 -040093
Rajesh Velandye27e0b22017-09-18 17:21:48 -040094 leaf vendor {
95 description "Provider of the VLR.";
96 type string;
97 }
velandy88a64f12017-06-07 23:32:49 -040098
Rajesh Velandye27e0b22017-09-18 17:21:48 -040099 leaf description {
100 description "Description of the VLR.";
101 type string;
102 }
velandy88a64f12017-06-07 23:32:49 -0400103
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400104 leaf version {
105 description "Version of the VLR";
106 type string;
107 }
velandy88a64f12017-06-07 23:32:49 -0400108
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400109 leaf type {
110 type manotypes:virtual-link-type;
111 }
velandy88a64f12017-06-07 23:32:49 -0400112
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400113 leaf root-bandwidth {
114 description
velandy88a64f12017-06-07 23:32:49 -0400115 "For ELAN this is the aggregate bandwidth.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400116 type uint64;
117 }
velandy88a64f12017-06-07 23:32:49 -0400118
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400119 leaf leaf-bandwidth {
120 description
velandy88a64f12017-06-07 23:32:49 -0400121 "For ELAN this is the bandwidth of branches.";
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 create-time {
126 description
127 "Creation timestamp of this Virtual Link.
velandy88a64f12017-06-07 23:32:49 -0400128 The timestamp is expressed as seconds
129 since unix epoch - 1970-01-01T00:00:00Z";
130
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400131 type uint32;
132 }
velandy88a64f12017-06-07 23:32:49 -0400133
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400134 leaf uptime {
135 description
136 "Active period of this Virtual Link.
velandy88a64f12017-06-07 23:32:49 -0400137 Uptime is expressed in seconds";
138
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400139 type uint32;
140 }
velandy88a64f12017-06-07 23:32:49 -0400141
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400142 leaf network-id {
143 description
velandy88a64f12017-06-07 23:32:49 -0400144 "Identifier for the allocated network resource.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400145 type string;
146 }
velandy88a64f12017-06-07 23:32:49 -0400147
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400148 leaf vim-network-name {
149 description
velandy88a64f12017-06-07 23:32:49 -0400150 "Name of network in VIM account. This is used to indicate
151 pre-provisioned network name in cloud account.";
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400152 type string;
velandy88a64f12017-06-07 23:32:49 -0400153 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400154
155 // replicate for pnfd container here
156
157 uses manotypes:provider-network;
158 uses manotypes:ip-profile-info;
159
160 leaf status {
161 description
162 "Status of the virtual link record.";
163 type enumeration {
164 enum LINK_UP;
165 enum DEGRADED;
166 enum LINK_DOWN;
167 }
168 }
169 leaf operational-status {
170 description
171 "The operational status of the Virtual Link
velandy88a64f12017-06-07 23:32:49 -0400172 init : The VL is in init stat.
173 vl-alloc-pending : The VL alloc is pending in VIM
174 running : The VL is up and running in VM
175 vl-terminate-pending : The VL is being terminated in VIM.
176 terminated : The VL is terminated in the VM.
177 failed : The VL instantiation failed in VIM.
178 ";
179
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400180 type enumeration {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400181 enum init;
182 enum vl-alloc-pending;
183 enum running;
184 enum vl-terminate-pending;
185 enum terminated;
186 enum failed;
187 }
velandy88a64f12017-06-07 23:32:49 -0400188 }
189 }
190 }
191 }
192}
193