blob: 60fc75773ce47f14c8699438104b6a47e3dc448c [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
Adam Israelcc14dd72017-06-28 14:31:45 -0400152 container vnf-configuration {
153 uses manotypes:vca-configuration;
154 }
velandy793e5ea2017-06-07 13:01:55 -0400155
156 container mgmt-interface {
157 description
158 "Interface over which the VNF is managed.";
159
160 choice endpoint-type {
161 description
162 "Indicates the type of management endpoint.";
163
164 case ip {
165 description
166 "Specifies the static IP address for managing the VNF.";
167 leaf ip-address {
168 type inet:ip-address;
169 }
170 }
171
172 case vdu-id {
173 description
174 "Use the default management interface on this VDU.";
175 leaf vdu-id {
176 type leafref {
177 path "../../vdu/id";
178 }
179 }
180 }
181
182 case cp {
183 description
184 "Use the ip address associated with this connection point.";
185 leaf cp {
186 type leafref {
187 path "../../connection-point/name";
188 }
189 }
190 }
191 }
192
193 leaf port {
194 description
195 "Port for the management interface.";
196 type inet:port-number;
197 }
198
199 container dashboard-params {
200 description "Parameters for the VNF dashboard";
201
202 leaf path {
203 description "The HTTP path for the dashboard";
204 type string;
205 }
206
207 leaf https {
208 description "Pick HTTPS instead of HTTP , Default is false";
209 type boolean;
210 }
211
212 leaf port {
213 description "The HTTP port for the dashboard";
214 type inet:port-number;
215 }
216 }
217 }
218
219 list internal-vld {
220 key "id";
221 description
222 "List of Internal Virtual Link Descriptors (VLD).
223 The internal VLD describes the basic topology of
224 the connectivity such as E-LAN, E-Line, E-Tree.
225 between internal VNF components of the system.";
226
227 leaf id {
228 description "Identifier for the VLD";
229 type string;
230 }
231
232 leaf name {
233 description "Name of the internal VLD";
234 type string;
235 }
236
237 leaf short-name {
238 description "Short name to appear as label in the UI";
239 type string;
240 }
241
242 leaf description {
243 description "Description of internal VLD.";
244 type string;
245 }
246
247 leaf type {
248 type manotypes:virtual-link-type;
249 }
250
251 leaf root-bandwidth {
252 description
253 "For ELAN this is the aggregate bandwidth.";
254 type uint64;
255 }
256
257 leaf leaf-bandwidth {
258 description
259 "For ELAN this is the bandwidth of branches.";
260 type uint64;
261 }
262
263 list internal-connection-point {
264 key "id-ref";
265 description "List of internal connection points in this VLD";
266 leaf id-ref {
267 description "reference to the internal connection point id";
268 type leafref {
269 path "../../../vdu/internal-connection-point/id";
270 }
271 }
272 }
273 uses manotypes:provider-network;
274 choice init-params {
275 description "Extra parameters for VLD instantiation";
276
277 case vim-network-ref {
278 leaf vim-network-name {
279 description
280 "Name of network in VIM account. This is used to indicate
281 pre-provisioned network name in cloud account.";
282 type string;
283 }
284 }
285
286 case vim-network-profile {
287 leaf ip-profile-ref {
288 description "Named reference to IP-profile object";
289 type leafref {
290 path "../../ip-profiles/name";
291 }
292 }
293 }
294 }
295 }
296
297 uses manotypes:ip-profile-list;
298
299 list connection-point {
300 key "name";
301 description
302 "List for external connection points. Each VNF has one
303 or more external connection points that connect the VNF
304 to other VNFs or to external networks. Each VNF exposes
305 connection points to the orchestrator, which can construct
306 network services by connecting the connection points
307 between different VNFs. The NFVO will use VLDs and VNFFGs
308 at the network service level to construct network services.";
309
310 uses common-connection-point;
311 }
312
313 list vdu {
314 description "List of Virtual Deployment Units";
315 key "id";
316
317 leaf id {
318 description "Unique id for the VDU";
319 type string;
320 }
321
322 leaf name {
323 description "Unique name for the VDU";
324 type string;
325 }
326
327 leaf description {
328 description "Description of the VDU.";
329 type string;
330 }
331
332 leaf count {
333 description "Number of instances of VDU";
334 type uint64;
335 }
336
337 leaf mgmt-vpci {
338 description
339 "Specifies the virtual PCI address. Expressed in
340 the following format dddd:dd:dd.d. For example
341 0000:00:12.0. This information can be used to
342 pass as metadata during the VM creation.";
343 type string;
344 }
345
346 uses manotypes:vm-flavor;
347 uses manotypes:guest-epa;
348 uses manotypes:vswitch-epa;
349 uses manotypes:hypervisor-epa;
350 uses manotypes:host-epa;
351
352 list alarm {
353 key "alarm-id";
354
355 uses manotypes:alarm;
356 }
357
358 uses manotypes:image-properties;
359
Adam Israelcc14dd72017-06-28 14:31:45 -0400360 container vdu-configuration {
361 uses manotypes:vca-configuration;
362 }
363
velandy793e5ea2017-06-07 13:01:55 -0400364 choice cloud-init-input {
365 description
366 "Indicates how the contents of cloud-init script are provided.
367 There are 2 choices - inline or in a file";
368
369 case inline {
370 leaf cloud-init {
371 description
372 "Contents of cloud-init script, provided inline, in cloud-config format";
373 type string;
374 }
375 }
376
377 case filename {
378 leaf cloud-init-file {
379 description
380 "Name of file with contents of cloud-init script in cloud-config format";
381 type string;
382 }
383 }
384 }
385
386 uses manotypes:supplemental-boot-data;
387
388 list internal-connection-point {
389 key "id";
390 description
391 "List for internal connection points. Each VNFC
392 has zero or more internal connection points.
393 Internal connection points are used for connecting
394 the VNF with components internal to the VNF. If a VNF
395 has only one VNFC, it may not have any internal
396 connection points.";
397
398 uses common-connection-point;
399 }
400
401 list internal-interface {
402 description
403 "List of internal interfaces for the VNF";
404 key name;
405
406 leaf name {
407 description
408 "Name of internal interface. Note that this
409 name has only local significance to the VDU.";
410 type string;
411 }
412
413 leaf vdu-internal-connection-point-ref {
414 type leafref {
415 path "../../internal-connection-point/id";
416 }
417 }
418 uses virtual-interface;
419 }
420
421 list external-interface {
422 description
423 "List of external interfaces for the VNF.
424 The external interfaces enable sending
425 traffic to and from VNF.";
426 key name;
427
428 leaf name {
429 description
430 "Name of the external interface. Note that
431 this name has only local significance to
432 the VDU.";
433 type string;
434 }
435
436 leaf vnfd-connection-point-ref {
437 description
438 "Name of the external connection point.";
439 type leafref {
440 path "../../../connection-point/name";
441 }
442 }
443 uses virtual-interface;
444 }
445
446 list volumes {
447 key "name";
448
449 leaf name {
450 description "Name of the disk-volumes, e.g. vda, vdb etc";
451 type string;
452 }
453
454 uses manotypes:volume-info;
455 }
456 }
457
458 list vdu-dependency {
459 description
460 "List of VDU dependencies.";
461
462 key vdu-source-ref;
463 leaf vdu-source-ref {
464 type leafref {
465 path "../../vdu/id";
466 }
467 }
468
469 leaf vdu-depends-on-ref {
470 description
471 "Reference to the VDU on which
472 the source VDU depends.";
473 type leafref {
474 path "../../vdu/id";
475 }
476 }
477 }
478
479 leaf service-function-chain {
480 description "Type of node in Service Function Chaining Architecture";
481
482 type enumeration {
483 enum UNAWARE;
484 enum CLASSIFIER;
485 enum SF;
486 enum SFF;
487 }
488 default "UNAWARE";
489 }
490
491 leaf service-function-type {
492 description
493 "Type of Service Function.
494 NOTE: This needs to map with Service Function Type in ODL to
495 support VNFFG. Service Function Type is mandatory param in ODL
496 SFC. This is temporarily set to string for ease of use";
497 type string;
498 }
499
500 uses manotypes:monitoring-param;
501
502 list placement-groups {
503 description "List of placement groups at VNF level";
504
505 key "name";
506 uses manotypes:placement-group-info;
507
508 list member-vdus {
509
510 description
511 "List of VDUs that are part of this placement group";
512 key "member-vdu-ref";
513
514 leaf member-vdu-ref {
515 type leafref {
516 path "../../../vdu/id";
517 }
518 }
519 }
520 }
521 }
522
523 container vnfd-catalog {
524 description
525 "Virtual Network Function Descriptor (VNFD).";
526
527 list vnfd {
528 key "id";
529
530 uses vnfd-descriptor;
531 }
532 }
533}
534
535// vim: sw=2