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