4 * Copyright 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/nsd-base";
26 import ietf-inet-types {
40 "Initial revision. This YANG file defines
41 the Network Service Descriptor (NSD)
44 "Derived from earlier versions of base YANG files";
47 typedef scaling-trigger {
64 typedef scaling-policy-type {
75 typedef scaling-criteria-operation {
86 grouping primitive-parameter {
89 "Name of the parameter.";
95 "Data type associated with the name.";
96 type manotypes:parameter-data-type;
100 description "Is this field mandatory";
106 description "The default value for this field";
110 leaf parameter-pool {
111 description "NSD parameter pool name to use for this parameter";
116 grouping nsd-descriptor-common {
118 description "Identifier for the NSD.";
125 description "NSD name.";
131 description "Short name to appear as label in the UI";
136 description "Vendor of the NSD.";
142 "File path for the vendor specific logo. For example icons/mylogo.png.
143 The logo should be part of the network service";
148 description "Description of the NSD.";
153 description "Version of the NSD";
157 list connection-point {
159 "List for external connection points.
160 Each NS has one or more external connection
161 points. As the name implies that external
162 connection points are used for connecting
163 the NS to other NS or to external networks.
164 Each NS exposes these connection points to
165 the orchestrator. The orchestrator can
166 construct network service chains by
167 connecting the connection points between
173 "Name of the NS connection point.";
179 "Type of the connection point.";
180 type manotypes:connection-point-type;
183 leaf floating-ip-required {
185 "Boolean parameter to indicate whether the CP must be exposed.
186 A public IP address will be allocated to this CP if exposed is true.
187 The default is false meaning a floating IP address is not required.
188 It must be explicitly asked for a floating IP address to be allocated.";
193 description "Logical connection of the CP to a VLD or to a VNF CP";
199 "ID reference to a VLD in the NS";
207 case vnfd-connection-point-ref {
209 leaf member-vnf-index-ref {
210 description "Reference to member-vnf within constituent-vnfd";
212 path "../../constituent-vnfd/member-vnf-index";
218 "A reference to a vnfd. This is a leafref to path:
219 ../../nsd:constituent-vnfd
220 + [nsd:id = current()/../nsd:id-ref]
223 path "../../constituent-vnfd" +
224 "[member-vnf-index = current()/../member-vnf-index-ref]" +
229 leaf vnfd-connection-point-ref {
231 "A reference to a connection point name
232 in a vnfd. This is a leafref to path:
233 /vnfd:vnfd-catalog/vnfd:vnfd
234 + [vnfd:id = current()/../nsd:vnfd-id-ref]
235 + /vnfd:connection-point/vnfd:name";
237 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
238 "[vnfd:id = current()/../vnfd-id-ref]" +
239 "/vnfd:connection-point/vnfd:name";
249 list scaling-group-descriptor {
251 "scaling group descriptor within this network service.
252 The scaling group defines a group of VNFs,
253 and the ratio of VNFs in the network service
254 that is used as target for scaling action";
259 description "Name of this scaling group.";
263 list scaling-policy {
269 "Name of the scaling policy";
276 type scaling-policy-type;
281 "Specifies if the scaling policy can be applied";
286 leaf scale-in-operation-type {
288 "Operation to be applied to check between scaling criterias to
289 check if the scale in threshold condition has been met.
291 type scaling-criteria-operation;
295 leaf scale-out-operation-type {
297 "Operation to be applied to check between scaling criterias to
298 check if the scale out threshold condition has been met.
300 type scaling-criteria-operation;
304 leaf threshold-time {
306 "The duration for which the criteria must hold true";
313 "The duration after a scaling-in/scaling-out action has been
314 triggered, for which there will be no further optional";
319 list scaling-criteria {
321 "list of conditions to be met for generating scaling
329 leaf scale-in-threshold {
331 "Value below which scale-in requests are generated";
335 leaf scale-out-threshold {
337 "Value above which scale-out requests are generated";
341 leaf ns-monitoring-param-ref {
343 "Reference to the NS level monitoring parameter
346 path "../../../../monitoring-param/id";
353 description "List of VNFs in this scaling group";
354 key "member-vnf-index-ref";
356 leaf member-vnf-index-ref {
357 description "member VNF index of this member VNF";
359 path "../../../constituent-vnfd/member-vnf-index";
365 "count of this member VNF within this scaling group.
366 The count allows to define the number of instances
367 when a scaling action targets this scaling group";
373 leaf min-instance-count {
375 "Minimum instances of the scaling group which are allowed.
376 These instances are created by default when the network service
382 leaf max-instance-count {
384 "Maximum instances of this scaling group that are allowed
385 in a single network service. The network service scaling
386 will fail, when the number of service group instances
387 exceed the max-instance-count specified.";
392 list scaling-config-action {
393 description "List of scaling config actions";
397 description "scaling trigger";
398 type scaling-trigger;
401 leaf ns-service-primitive-name-ref {
402 description "Reference to the NS service primitive";
404 path "../../../service-primitive/name";
413 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
419 "Identifier for the VNFFGD.";
431 "Short name to appear as label in the UI";
436 description "Provider of the VNFFGD.";
441 description "Description of the VNFFGD.";
446 description "Version of the VNFFGD";
452 "List of Rendered Service Paths (RSP).";
458 "Identifier for the RSP.";
468 list vnfd-connection-point-ref {
470 "A list of references to connection points.";
471 key "member-vnf-index-ref";
473 leaf member-vnf-index-ref {
474 description "Reference to member-vnf within constituent-vnfds";
476 path "../../../../constituent-vnfd/member-vnf-index";
483 "A number that denotes the order of a VNF in a chain";
488 "A reference to a vnfd. This is a
490 ../../../../nsd:constituent-vnfd
491 + [nsd:id = current()/../nsd:id-ref]
495 path "../../../../constituent-vnfd" +
496 "[member-vnf-index = current()/../member-vnf-index-ref]" +
501 leaf vnfd-connection-point-ref {
503 "A reference to a connection point name
504 in a vnfd. This is a leafref to path:
505 /vnfd:vnfd-catalog/vnfd:vnfd
506 + [vnfd:id = current()/../nsd:vnfd-id-ref]
507 + /vnfd:connection-point/vnfd:name
508 NOTE: An issue with confd is preventing the
509 use of xpath. Seems to be an issue with leafref
510 to leafref, whose target is in a different module.
511 Once that is resolved this will switched to use
513 // TODO: Keeping as string as this needs to be
514 // diffenent lvel based of if it is nsd-catalog or
517 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
518 // "[vnfd:id = current()/../vnfd-id-ref]/" +
519 // "vnfd:connection-point/vnfd:name";
528 "List of classifier rules.";
534 "Identifier for the classifier rule.";
540 "Name of the classifier.";
546 "A reference to the RSP.";
552 leaf member-vnf-index-ref {
553 description "Reference to member-vnf within constituent-vnfds";
555 path "../../../constituent-vnfd/member-vnf-index";
561 "A reference to a vnfd. This is a
563 ../../../nsd:constituent-vnfd
564 + [nsd:id = current()/../nsd:id-ref]
568 path "../../../constituent-vnfd" +
569 "[member-vnf-index = current()/../member-vnf-index-ref]" +
574 leaf vnfd-connection-point-ref {
576 "A reference to a connection point name
577 in a vnfd. This is a leafref to path:
578 /vnfd:vnfd-catalog/vnfd:vnfd
579 + [vnfd:id = current()/../nsd:vnfd-id-ref]
580 + /vnfd:connection-point/vnfd:name
581 NOTE: An issue with confd is preventing the
582 use of xpath. Seems to be an issue with leafref
583 to leafref, whose target is in a different module.
584 Once that is resolved this will switched to use
586 // TODO: Keeping as string as this needs to be
587 // diffenent lvel based of if it is nsd-catalog or
590 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
591 // "[vnfd:id = current()/../vnfd-id-ref]/" +
592 // "vnfd:connection-point/vnfd:name";
597 list match-attributes {
599 "List of match attributes.";
605 "Identifier for the classifier match attribute rule.";
615 leaf source-ip-address {
617 "Source IP address.";
618 type inet:ip-address;
621 leaf destination-ip-address {
623 "Destination IP address.";
624 type inet:ip-address;
629 "Source port number.";
630 type inet:port-number;
633 leaf destination-port {
635 "Destination port number.";
636 type inet:port-number;
638 //TODO: Add more match criteria
643 uses manotypes:ip-profile-list;
645 list initial-service-primitive {
647 "Initial set of service primitives for NSD.";
650 uses manotypes:event-config;
653 list terminate-service-primitive {
655 "Set of service primitives during
656 termination for NSD.";
659 uses manotypes:event-config;
662 uses manotypes:input-parameter-xpath;
664 list parameter-pool {
666 "Pool of parameter values which must be
667 pulled from during configuration";
672 "Name of the configuration value pool";
678 "Create a range of values to populate the pool with";
682 "Generated pool values start at this value";
689 "Generated pool values stop at this value";
698 description "Used to configure the list of public keys to be injected as part
699 of ns instantiation";
702 description "Name of this key pair";
707 description "Key associated with this key pair";
714 description "List of users to be added through cloud-config";
717 description "Name of the user ";
722 description "The user name's real name";
728 description "Used to configure the list of public keys to be injected as part
729 of ns instantiation";
732 description "Name of this key pair";
737 description "Key associated with this key pair";
744 grouping nsd-vld-common {
745 /* Still having issues modelling this,
746 see the comments under vnfd-connection-point-ref
749 "List of Virtual Link Descriptors.";
753 "Identifier for the VLD.";
759 "Virtual Link Descriptor (VLD) name.";
765 "Short name to appear as label in the UI";
770 description "Provider of the VLD.";
775 description "Description of the VLD.";
780 description "Version of the VLD";
785 type manotypes:virtual-link-type;
788 leaf root-bandwidth {
790 "For ELAN this is the aggregate bandwidth.";
794 leaf leaf-bandwidth {
796 "For ELAN this is the bandwidth of branches.";
800 // replicate for pnfd container here
801 uses manotypes:provider-network;
804 description "Flag indicating whether this network is a VIM management network";
810 description "Extra parameters for VLD instantiation";
812 case vim-network-ref {
813 leaf vim-network-name {
815 "Name of network in VIM account. This is used to indicate
816 pre-provisioned network name in cloud account.";
821 case vim-network-profile {
822 leaf ip-profile-ref {
823 description "Named reference to IP-profile object";
825 path "../../ip-profiles/name";
833 grouping monitoring-param-common {
835 "List of monitoring parameters from VNF's that should be
836 propogated up into NSR";
846 uses manotypes:monitoring-param-value;
847 uses manotypes:monitoring-param-ui-data;
848 uses manotypes:monitoring-param-aggregation;