4 * Copyright 2016-2017 RIFT.IO Inc
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 namespace "http://riftio.com/ns/riftware-1.0/rw-vnfr";
39 prefix "project-vnfd";
50 import ietf-yang-types {
54 import ietf-inet-types {
62 import mano-rift-groupings {
68 "Update model to support projects.";
73 "Initial revision. This YANG file augments
76 "Derived from earlier versions of base YANG files";
79 typedef vdur-operational-event-types {
81 enum instantiate-rcvd;
82 enum vm-allocation-requested;
85 enum vm-terminate-requested;
90 typedef vnfr-operational-event-types {
92 enum instantiate-rcvd;
103 grouping vnfr-operational-events {
104 list operational-events {
107 "Recent operational events for VNFR
108 Though the model does not impose any restrictions on the numbe of events,
109 the max operational events will be limited to the most recent 10";
112 description "The id of the instance";
118 "The timestamp of this event expressed as seconds since
119 unix epoch - 1970-01-01T00:00:00Z";
123 description "The event";
124 type vnfr-operational-event-types;
128 "The description of this event";
134 grouping vdur-operational-events {
135 list operational-events {
138 "Recent operational events for VDUR
139 Though the model does not impose any restrictions on the numbe of events,
140 the max operational events will be limited to the most recent 10";
143 description "The id of the instance";
149 "The timestamp of this event expressed as seconds since
150 unix epoch - 1970-01-01T00:00:00Z";
154 description "The event";
155 type vdur-operational-event-types;
159 "The description of this event";
165 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr {
166 uses manotypes:action-param;
167 uses manotypes:control-param;
171 "Datacenter name to use when instantiating
172 the network service.";
176 container nfvi-metrics {
180 "Label to show in UI";
187 "The number of active VMs.";
193 "The number of inactive VMs.";
198 uses manotypes:nfvi-metrics;
200 uses vnfr-operational-events;
202 leaf operational-status-details {
204 "The error message in case of a failed VNFR operational status";
209 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur {
212 "The pool from which this vm was allocated from";
216 container nfvi-metrics {
217 uses manotypes:nfvi-metrics;
221 uses vdur-operational-events;
223 leaf operational-status-details {
225 "The error message in case of a failed VDU operational status";
230 grouping vnfd-ref-count {
231 list vnfd-ref-count {
233 description "This table maintains the number of VNFRs used by each VNFD";
236 description "Reference to VNFD";
238 path "../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
241 leaf instance-ref-count {
243 "Reference count for the number of VNFRs refering this VNFD.
244 Every VNF Record instantiated using this descriptor takes
245 a reference on the VNFD and releases the reference when the
246 virtual network service is terminated. This desciptor cannot
247 be deleted when this counter is non zero";
253 grouping vnfd-config-parameter {
254 container config-parameter {
256 "List of VNF config parameter requests and sources";
257 list config-parameter-source {
258 description "The list of parameters exposed by this VNF";
262 description "Name of the source";
269 description " Description of the source";
277 "Location of this source as an xpath.
279 ../../../mgmt-interface/port";
287 "Location of this source as runtime attribute.
288 The value is <xpath>, <attribute_name>
290 ../../../mgmt-interface, ip-address
291 which retruns the ip-address assigned to the
292 mgmt-interface after VNF instantiation.";
298 leaf config-primitive-name-ref {
300 "A leafref to configuration primitive.
301 This refers to a config parameter whose
302 output parameter is referred in out-parameter.";
304 path "../../../vnfr:vnf-configuration/vnfr:config-primitive/vnfr:name";
310 "Name of the output parameter in the config primitiive";
313 "../../../vnfr:vnf-configuration/vnfr:config-primitive[vnfr:name=current()/../config-primitive-name-ref]/vnfr:parameter/vnfr:name";
321 "Pre-defined value to be used for this source";
328 key "config-primitive-name-ref";
330 leaf config-primitive-name-ref {
332 "Name of the configuration primitive where this
335 path "../../../../vnfr:vnf-configuration/vnfr:config-primitive/vnfr:name";
339 leaf config-primitive-parameter-ref {
341 "Parameter name of the config primitive";
343 path "../../../../vnfr:vnf-configuration/vnfr:config-primitive[vnfr:name=current()/../config-primitive-name-ref]/vnfr:parameter/vnfr:name";
349 list config-parameter-request {
350 description "The list of requests for this VNF";
354 description "Name of this parameter request";
361 description "Description of this request";
366 key "config-primitive-name-ref";
368 leaf config-primitive-name-ref {
370 "Name of the configuration primitive where this
373 path "../../../../vnfr:vnf-configuration/vnfr:config-primitive/vnfr:name";
377 leaf config-primitive-parameter-ref {
379 "Parameter name of the config primitive";
381 path "../../../../vnfr:vnf-configuration/vnfr:config-primitive[vnfr:name=current()/../config-primitive-name-ref]/vnfr:parameter/vnfr:name";
389 augment /rw-project:project/vnfr:vnfr-catalog {
393 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:mgmt-interface {
396 "Whether SSH keys need to be generated and passed
397 to the RO and VCA during instantiation.";
402 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:vm-flavor {
403 uses manotypes:vm-flavor-name;
406 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:interface {
407 leaf static-ip-address {
408 description "Static IP address for the connection point";
409 type inet:ip-address;
412 leaf floating-ip-needed{
416 "Sole purpose of this field is to facilitate translation of VNFD
421 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:interface {
422 leaf static-ip-address {
423 description "Static IP address for the connection point";
424 type inet:ip-address;
427 leaf floating-ip-needed{
431 "Sole purpose of this field is to facilitate translation of VNFD
436 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:vm-flavor {
437 uses manotypes:vm-flavor-name;
440 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd {
443 "Any meta-data needed by the UI";
447 uses vnfd-config-parameter;
450 augment /rw-project:project {
451 container vnfr-console {
456 description "Identifier for the VNFR.";
460 description "List of Virtual Deployment Units";
463 description "Unique id for the VDU";
467 description "Console URL for this VDU, if available";
475 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:http-endpoint {
476 uses mano-rift:http-end-point-additions;
479 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:http-endpoint {
480 uses mano-rift:http-end-point-additions;
483 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:supplemental-boot-data {
484 uses mano-rift:custom-meta-data;
487 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:supplemental-boot-data {
488 uses mano-rift:custom-meta-data;
491 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:volumes {
492 uses mano-rift:volume-info-additions;
493 uses mano-rift:custom-meta-data;
496 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vdu/vnfr:volumes/vnfr:volume-source {
499 description "Reference for pre-existing volume in VIM";
505 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnf-configuration/vnfr:config-primitive/vnfr:parameter {
507 description "If this is an output of the primitive execution";
513 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vnf-configuration/vnfr:config-primitive/vnfr:parameter {
515 description "If this is an output of the primitive execution";
521 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnf-configuration/vnfr:initial-config-primitive/vnfr:primitive-type {
523 leaf config-primitive-ref {
525 "Reference to a config primitive name.
526 NOTE: The config primitive referred should have
527 all the input parameters predefined either
528 with default values or dependency references.";
530 path "../../vnfr:config-primitive/vnfr:name";
536 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:vnf-configuration/vnfr:initial-config-primitive/vnfr:primitive-type {
538 leaf config-primitive-ref {
540 "Reference to a config primitive name.
541 NOTE: The config primitive referred should have
542 all the input parameters predefined either
543 with default values or dependency references.";
545 path "../../vnfr:config-primitive/vnfr:name";
551 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vdur/vnfr:volumes {
552 uses mano-rift:volume-info-additions;
553 uses mano-rift:custom-meta-data;
556 augment /rw-project:project/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:vnfd/vnfr:internal-vld {
557 list virtual-connection-points {
559 "A list of virtual-connection points associated with Virtual Link.
560 These connection points are not directly associated with any VDUs";
562 uses vnfd-base:common-connection-point;
564 leaf-list associated-cps {
566 "A List of connection points associated with virtual connection point";
568 path "../../vnfr:internal-connection-point/vnfr:id-ref";