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