blob: b3f820dbfb9d00b2802d976a803f58e3d725abd2 [file] [log] [blame]
velandy793e5ea2017-06-07 13:01:55 -04001
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
21module vnfd
22{
23 namespace "urn:ietf:params:xml:ns:yang:nfvo:vnfd";
24 prefix "vnfd";
25
26 import mano-types {
27 prefix "manotypes";
28 }
29
velandy793e5ea2017-06-07 13:01:55 -040030 import ietf-inet-types {
31 prefix "inet";
32 }
33
34 revision 2015-09-10 {
35 description
36 "Initial revision. This YANG file defines
37 the Virtual Network Function (VNF)";
38 reference
39 "Derived from earlier versions of base YANG files";
40 }
41
42 grouping common-connection-point {
43 leaf name {
44 description "Name of the connection point";
45 type string;
46 }
47
48 leaf id {
49 description "Identifier for the internal connection points";
50 type string;
51 }
52
53 leaf short-name {
54 description "Short name to appear as label in the UI";
55 type string;
56 }
57
58 leaf type {
59 description "Type of the connection point.";
60 type manotypes:connection-point-type;
61 }
62 leaf port-security-enabled {
63 description "Enables the port security for the port";
64 type boolean;
65 }
66 }
67
68 grouping virtual-interface {
69 container virtual-interface {
70 description
71 "Container for the virtual interface properties";
72
73 leaf type {
74 description
75 "Specifies the type of virtual interface
76 between VM and host.
77 VIRTIO : Use the traditional VIRTIO interface.
78 PCI-PASSTHROUGH : Use PCI-PASSTHROUGH interface.
79 SR-IOV : Use SR-IOV interface.
80 E1000 : Emulate E1000 interface.
81 RTL8139 : Emulate RTL8139 interface.
82 PCNET : Emulate PCNET interface.
83 OM-MGMT : Used to specify openmano mgmt external-connection type";
84
85 type enumeration {
86 enum OM-MGMT;
87 enum PCI-PASSTHROUGH;
88 enum SR-IOV;
89 enum VIRTIO;
90 enum E1000;
91 enum RTL8139;
92 enum PCNET;
93 }
94 default "VIRTIO";
95 }
96
97 leaf vpci {
98 description
99 "Specifies the virtual PCI address. Expressed in
100 the following format dddd:dd:dd.d. For example
101 0000:00:12.0. This information can be used to
102 pass as metadata during the VM creation.";
103 type string;
104 }
105
106 leaf bandwidth {
107 description
108 "Aggregate bandwidth of the NIC.";
109 type uint64;
110 }
111 }
112 }
113
114 grouping vnfd-descriptor {
115 leaf id {
116 description "Identifier for the VNFD.";
117 type string;
118 }
119
120 leaf name {
121 description "VNFD name.";
122 mandatory true;
123 type string;
124 }
125
126 leaf short-name {
127 description "Short name to appear as label in the UI";
128 type string;
129 }
130
131 leaf vendor {
132 description "Vendor of the VNFD.";
133 type string;
134 }
135
136 leaf logo {
137 description
138 "Vendor logo for the Virtual Network Function";
139 type string;
140 }
141
142 leaf description {
143 description "Description of the VNFD.";
144 type string;
145 }
146
147 leaf version {
148 description "Version of the VNFD";
149 type string;
150 }
151
152 uses manotypes:vnf-configuration;
153
154 container mgmt-interface {
155 description
156 "Interface over which the VNF is managed.";
157
158 choice endpoint-type {
159 description
160 "Indicates the type of management endpoint.";
161
162 case ip {
163 description
164 "Specifies the static IP address for managing the VNF.";
165 leaf ip-address {
166 type inet:ip-address;
167 }
168 }
169
170 case vdu-id {
171 description
172 "Use the default management interface on this VDU.";
173 leaf vdu-id {
174 type leafref {
175 path "../../vdu/id";
176 }
177 }
178 }
179
180 case cp {
181 description
182 "Use the ip address associated with this connection point.";
183 leaf cp {
184 type leafref {
185 path "../../connection-point/name";
186 }
187 }
188 }
189 }
190
191 leaf port {
192 description
193 "Port for the management interface.";
194 type inet:port-number;
195 }
196
197 container dashboard-params {
198 description "Parameters for the VNF dashboard";
199
200 leaf path {
201 description "The HTTP path for the dashboard";
202 type string;
203 }
204
205 leaf https {
206 description "Pick HTTPS instead of HTTP , Default is false";
207 type boolean;
208 }
209
210 leaf port {
211 description "The HTTP port for the dashboard";
212 type inet:port-number;
213 }
214 }
215 }
216
217 list internal-vld {
218 key "id";
219 description
220 "List of Internal Virtual Link Descriptors (VLD).
221 The internal VLD describes the basic topology of
222 the connectivity such as E-LAN, E-Line, E-Tree.
223 between internal VNF components of the system.";
224
225 leaf id {
226 description "Identifier for the VLD";
227 type string;
228 }
229
230 leaf name {
231 description "Name of the internal VLD";
232 type string;
233 }
234
235 leaf short-name {
236 description "Short name to appear as label in the UI";
237 type string;
238 }
239
240 leaf description {
241 description "Description of internal VLD.";
242 type string;
243 }
244
245 leaf type {
246 type manotypes:virtual-link-type;
247 }
248
249 leaf root-bandwidth {
250 description
251 "For ELAN this is the aggregate bandwidth.";
252 type uint64;
253 }
254
255 leaf leaf-bandwidth {
256 description
257 "For ELAN this is the bandwidth of branches.";
258 type uint64;
259 }
260
261 list internal-connection-point {
262 key "id-ref";
263 description "List of internal connection points in this VLD";
264 leaf id-ref {
265 description "reference to the internal connection point id";
266 type leafref {
267 path "../../../vdu/internal-connection-point/id";
268 }
269 }
270 }
271 uses manotypes:provider-network;
272 choice init-params {
273 description "Extra parameters for VLD instantiation";
274
275 case vim-network-ref {
276 leaf vim-network-name {
277 description
278 "Name of network in VIM account. This is used to indicate
279 pre-provisioned network name in cloud account.";
280 type string;
281 }
282 }
283
284 case vim-network-profile {
285 leaf ip-profile-ref {
286 description "Named reference to IP-profile object";
287 type leafref {
288 path "../../ip-profiles/name";
289 }
290 }
291 }
292 }
293 }
294
295 uses manotypes:ip-profile-list;
296
297 list connection-point {
298 key "name";
299 description
300 "List for external connection points. Each VNF has one
301 or more external connection points that connect the VNF
302 to other VNFs or to external networks. Each VNF exposes
303 connection points to the orchestrator, which can construct
304 network services by connecting the connection points
305 between different VNFs. The NFVO will use VLDs and VNFFGs
306 at the network service level to construct network services.";
307
308 uses common-connection-point;
309 }
310
311 list vdu {
312 description "List of Virtual Deployment Units";
313 key "id";
314
315 leaf id {
316 description "Unique id for the VDU";
317 type string;
318 }
319
320 leaf name {
321 description "Unique name for the VDU";
322 type string;
323 }
324
325 leaf description {
326 description "Description of the VDU.";
327 type string;
328 }
329
330 leaf count {
331 description "Number of instances of VDU";
332 type uint64;
333 }
334
335 leaf mgmt-vpci {
336 description
337 "Specifies the virtual PCI address. Expressed in
338 the following format dddd:dd:dd.d. For example
339 0000:00:12.0. This information can be used to
340 pass as metadata during the VM creation.";
341 type string;
342 }
343
344 uses manotypes:vm-flavor;
345 uses manotypes:guest-epa;
346 uses manotypes:vswitch-epa;
347 uses manotypes:hypervisor-epa;
348 uses manotypes:host-epa;
349
350 list alarm {
351 key "alarm-id";
352
353 uses manotypes:alarm;
354 }
355
356 uses manotypes:image-properties;
357
358 choice cloud-init-input {
359 description
360 "Indicates how the contents of cloud-init script are provided.
361 There are 2 choices - inline or in a file";
362
363 case inline {
364 leaf cloud-init {
365 description
366 "Contents of cloud-init script, provided inline, in cloud-config format";
367 type string;
368 }
369 }
370
371 case filename {
372 leaf cloud-init-file {
373 description
374 "Name of file with contents of cloud-init script in cloud-config format";
375 type string;
376 }
377 }
378 }
379
380 uses manotypes:supplemental-boot-data;
381
382 list internal-connection-point {
383 key "id";
384 description
385 "List for internal connection points. Each VNFC
386 has zero or more internal connection points.
387 Internal connection points are used for connecting
388 the VNF with components internal to the VNF. If a VNF
389 has only one VNFC, it may not have any internal
390 connection points.";
391
392 uses common-connection-point;
393 }
394
395 list internal-interface {
396 description
397 "List of internal interfaces for the VNF";
398 key name;
399
400 leaf name {
401 description
402 "Name of internal interface. Note that this
403 name has only local significance to the VDU.";
404 type string;
405 }
406
407 leaf vdu-internal-connection-point-ref {
408 type leafref {
409 path "../../internal-connection-point/id";
410 }
411 }
412 uses virtual-interface;
413 }
414
415 list external-interface {
416 description
417 "List of external interfaces for the VNF.
418 The external interfaces enable sending
419 traffic to and from VNF.";
420 key name;
421
422 leaf name {
423 description
424 "Name of the external interface. Note that
425 this name has only local significance to
426 the VDU.";
427 type string;
428 }
429
430 leaf vnfd-connection-point-ref {
431 description
432 "Name of the external connection point.";
433 type leafref {
434 path "../../../connection-point/name";
435 }
436 }
437 uses virtual-interface;
438 }
439
440 list volumes {
441 key "name";
442
443 leaf name {
444 description "Name of the disk-volumes, e.g. vda, vdb etc";
445 type string;
446 }
447
448 uses manotypes:volume-info;
449 }
450 }
451
452 list vdu-dependency {
453 description
454 "List of VDU dependencies.";
455
456 key vdu-source-ref;
457 leaf vdu-source-ref {
458 type leafref {
459 path "../../vdu/id";
460 }
461 }
462
463 leaf vdu-depends-on-ref {
464 description
465 "Reference to the VDU on which
466 the source VDU depends.";
467 type leafref {
468 path "../../vdu/id";
469 }
470 }
471 }
472
473 leaf service-function-chain {
474 description "Type of node in Service Function Chaining Architecture";
475
476 type enumeration {
477 enum UNAWARE;
478 enum CLASSIFIER;
479 enum SF;
480 enum SFF;
481 }
482 default "UNAWARE";
483 }
484
485 leaf service-function-type {
486 description
487 "Type of Service Function.
488 NOTE: This needs to map with Service Function Type in ODL to
489 support VNFFG. Service Function Type is mandatory param in ODL
490 SFC. This is temporarily set to string for ease of use";
491 type string;
492 }
493
494 uses manotypes:monitoring-param;
495
496 list placement-groups {
497 description "List of placement groups at VNF level";
498
499 key "name";
500 uses manotypes:placement-group-info;
501
502 list member-vdus {
503
504 description
505 "List of VDUs that are part of this placement group";
506 key "member-vdu-ref";
507
508 leaf member-vdu-ref {
509 type leafref {
510 path "../../../vdu/id";
511 }
512 }
513 }
514 }
515 }
516
517 container vnfd-catalog {
518 description
519 "Virtual Network Function Descriptor (VNFD).";
520
521 list vnfd {
522 key "id";
523
524 uses vnfd-descriptor;
525 }
526 }
527}
528
529// vim: sw=2