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-criteria-operation {
75 grouping primitive-parameter {
78 "Name of the parameter.";
84 "Data type associated with the name.";
85 type manotypes:parameter-data-type;
89 description "Is this field mandatory";
95 description "The default value for this field";
100 description "NSD parameter pool name to use for this parameter";
105 grouping nsd-descriptor-common {
107 description "Identifier for the NSD.";
114 description "NSD name.";
120 description "Short name to appear as label in the UI";
125 description "Vendor of the NSD.";
131 "File path for the vendor specific logo. For example icons/mylogo.png.
132 The logo should be part of the network service";
137 description "Description of the NSD.";
142 description "Version of the NSD";
146 list connection-point {
148 "List for external connection points.
149 Each NS has one or more external connection
150 points. As the name implies that external
151 connection points are used for connecting
152 the NS to other NS or to external networks.
153 Each NS exposes these connection points to
154 the orchestrator. The orchestrator can
155 construct network service chains by
156 connecting the connection points between
162 "Name of the NS connection point.";
168 "Type of the connection point.";
169 type manotypes:connection-point-type;
172 leaf floating-ip-required {
174 "Boolean parameter to indicate whether the CP must be exposed.
175 A public IP address will be allocated to this CP if exposed is true.
176 The default is false meaning a floating IP address is not required.
177 It must be explicitly asked for a floating IP address to be allocated.";
182 description "Logical connection of the CP to a VLD or to a VNF CP";
188 "ID reference to a VLD in the NS";
196 case vnfd-connection-point-ref {
198 leaf member-vnf-index-ref {
199 description "Reference to member-vnf within constituent-vnfd";
201 path "../../constituent-vnfd/member-vnf-index";
207 "A reference to a vnfd. This is a leafref to path:
208 ../../nsd:constituent-vnfd
209 + [nsd:id = current()/../nsd:id-ref]
212 path "../../constituent-vnfd" +
213 "[member-vnf-index = current()/../member-vnf-index-ref]" +
218 leaf vnfd-connection-point-ref {
220 "A reference to a connection point name
221 in a vnfd. This is a leafref to path:
222 /vnfd:vnfd-catalog/vnfd:vnfd
223 + [vnfd:id = current()/../nsd:vnfd-id-ref]
224 + /vnfd:connection-point/vnfd:name";
226 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
227 "[vnfd:id = current()/../vnfd-id-ref]" +
228 "/vnfd:connection-point/vnfd:name";
238 list scaling-group-descriptor {
240 "scaling group descriptor within this network service.
241 The scaling group defines a group of VNFs,
242 and the ratio of VNFs in the network service
243 that is used as target for scaling action";
248 description "Name of this scaling group.";
252 list scaling-policy {
258 "Name of the scaling policy";
265 type manotypes:scaling-policy-type;
270 "Specifies if the scaling policy can be applied";
275 leaf scale-in-operation-type {
277 "Operation to be applied to check between scaling criterias to
278 check if the scale in threshold condition has been met.
280 type manotypes:scaling-criteria-operation;
284 leaf scale-out-operation-type {
286 "Operation to be applied to check between scaling criterias to
287 check if the scale out threshold condition has been met.
289 type manotypes:scaling-criteria-operation;
293 leaf threshold-time {
295 "The duration for which the criteria must hold true";
302 "The duration after a scaling-in/scaling-out action has been
303 triggered, for which there will be no further optional";
308 list scaling-criteria {
310 "list of conditions to be met for generating scaling
318 leaf scale-in-threshold {
320 "Value below which scale-in requests are generated";
324 leaf scale-in-relational-operation {
326 "The relational operator used to compare the monitoring param
327 against the scale-in-threshold.";
328 type manotypes:relational-operation-type;
332 leaf scale-out-threshold {
334 "Value above which scale-out requests are generated";
338 leaf scale-out-relational-operation {
340 "The relational operator used to compare the monitoring param
341 against the scale-out-threshold.";
342 type manotypes:relational-operation-type;
346 leaf ns-monitoring-param-ref {
348 "Reference to the NS level monitoring parameter
351 path "../../../../monitoring-param/id";
358 description "List of VNFs in this scaling group";
359 key "member-vnf-index-ref";
361 leaf member-vnf-index-ref {
362 description "member VNF index of this member VNF";
364 path "../../../constituent-vnfd/member-vnf-index";
370 "count of this member VNF within this scaling group.
371 The count allows to define the number of instances
372 when a scaling action targets this scaling group";
378 leaf min-instance-count {
380 "Minimum instances of the scaling group which are allowed.
381 These instances are created by default when the network service
387 leaf max-instance-count {
389 "Maximum instances of this scaling group that are allowed
390 in a single network service. The network service scaling
391 will fail, when the number of service group instances
392 exceed the max-instance-count specified.";
397 list scaling-config-action {
398 description "List of scaling config actions";
402 description "scaling trigger";
403 type manotypes:scaling-trigger;
406 leaf ns-service-primitive-name-ref {
407 description "Reference to the NS service primitive";
409 path "../../../service-primitive/name";
418 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
424 "Identifier for the VNFFGD.";
436 "Short name to appear as label in the UI";
441 description "Provider of the VNFFGD.";
446 description "Description of the VNFFGD.";
451 description "Version of the VNFFGD";
457 "List of Rendered Service Paths (RSP).";
463 "Identifier for the RSP.";
473 list vnfd-connection-point-ref {
475 "A list of references to connection points.";
476 key "member-vnf-index-ref";
478 leaf member-vnf-index-ref {
479 description "Reference to member-vnf within constituent-vnfds";
481 path "../../../../constituent-vnfd/member-vnf-index";
488 "A number that denotes the order of a VNF in a chain";
493 "A reference to a vnfd. This is a
495 ../../../../nsd:constituent-vnfd
496 + [nsd:id = current()/../nsd:id-ref]
500 path "../../../../constituent-vnfd" +
501 "[member-vnf-index = current()/../member-vnf-index-ref]" +
506 leaf vnfd-connection-point-ref {
508 "A reference to a connection point name
509 in a vnfd. This is a leafref to path:
510 /vnfd:vnfd-catalog/vnfd:vnfd
511 + [vnfd:id = current()/../nsd:vnfd-id-ref]
512 + /vnfd:connection-point/vnfd:name
513 NOTE: An issue with confd is preventing the
514 use of xpath. Seems to be an issue with leafref
515 to leafref, whose target is in a different module.
516 Once that is resolved this will switched to use
518 // TODO: Keeping as string as this needs to be
519 // diffenent lvel based of if it is nsd-catalog or
522 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
523 // "[vnfd:id = current()/../vnfd-id-ref]/" +
524 // "vnfd:connection-point/vnfd:name";
533 "List of classifier rules.";
539 "Identifier for the classifier rule.";
545 "Name of the classifier.";
551 "A reference to the RSP.";
557 leaf member-vnf-index-ref {
558 description "Reference to member-vnf within constituent-vnfds";
560 path "../../../constituent-vnfd/member-vnf-index";
566 "A reference to a vnfd. This is a
568 ../../../nsd:constituent-vnfd
569 + [nsd:id = current()/../nsd:id-ref]
573 path "../../../constituent-vnfd" +
574 "[member-vnf-index = current()/../member-vnf-index-ref]" +
579 leaf vnfd-connection-point-ref {
581 "A reference to a connection point name
582 in a vnfd. This is a leafref to path:
583 /vnfd:vnfd-catalog/vnfd:vnfd
584 + [vnfd:id = current()/../nsd:vnfd-id-ref]
585 + /vnfd:connection-point/vnfd:name
586 NOTE: An issue with confd is preventing the
587 use of xpath. Seems to be an issue with leafref
588 to leafref, whose target is in a different module.
589 Once that is resolved this will switched to use
591 // TODO: Keeping as string as this needs to be
592 // diffenent lvel based of if it is nsd-catalog or
595 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
596 // "[vnfd:id = current()/../vnfd-id-ref]/" +
597 // "vnfd:connection-point/vnfd:name";
602 list match-attributes {
604 "List of match attributes.";
610 "Identifier for the classifier match attribute rule.";
620 leaf source-ip-address {
622 "Source IP address.";
623 type inet:ip-address;
626 leaf destination-ip-address {
628 "Destination IP address.";
629 type inet:ip-address;
634 "Source port number.";
635 type inet:port-number;
638 leaf destination-port {
640 "Destination port number.";
641 type inet:port-number;
643 //TODO: Add more match criteria
648 uses manotypes:ip-profile-list;
650 list initial-service-primitive {
652 "Initial set of service primitives for NSD.";
655 uses manotypes:event-config;
658 list terminate-service-primitive {
660 "Set of service primitives during
661 termination for NSD.";
664 uses manotypes:event-config;
667 uses manotypes:input-parameter-xpath;
669 list parameter-pool {
671 "Pool of parameter values which must be
672 pulled from during configuration";
677 "Name of the configuration value pool";
683 "Create a range of values to populate the pool with";
687 "Generated pool values start at this value";
694 "Generated pool values stop at this value";
703 description "Used to configure the list of public keys to be injected as part
704 of ns instantiation";
707 description "Name of this key pair";
712 description "Key associated with this key pair";
719 description "List of users to be added through cloud-config";
722 description "Name of the user ";
727 description "The user name's real name";
733 description "Used to configure the list of public keys to be injected as part
734 of ns instantiation";
737 description "Name of this key pair";
742 description "Key associated with this key pair";
749 grouping nsd-vld-common {
750 /* Still having issues modelling this,
751 see the comments under vnfd-connection-point-ref
754 "List of Virtual Link Descriptors.";
758 "Identifier for the VLD.";
764 "Virtual Link Descriptor (VLD) name.";
770 "Short name to appear as label in the UI";
775 description "Provider of the VLD.";
780 description "Description of the VLD.";
785 description "Version of the VLD";
790 type manotypes:virtual-link-type;
793 leaf root-bandwidth {
795 "For ELAN this is the aggregate bandwidth.";
799 leaf leaf-bandwidth {
801 "For ELAN this is the bandwidth of branches.";
805 // replicate for pnfd container here
806 uses manotypes:provider-network;
809 description "Flag indicating whether this network is a VIM management network";
815 description "Extra parameters for VLD instantiation";
817 case vim-network-ref {
818 leaf vim-network-name {
820 "Name of network in VIM account. This is used to indicate
821 pre-provisioned network name in cloud account.";
826 case vim-network-profile {
827 leaf ip-profile-ref {
828 description "Named reference to IP-profile object";
830 path "../../ip-profiles/name";
838 grouping monitoring-param-common {
840 "List of monitoring parameters from VNF's that should be
841 propogated up into NSR";
851 uses manotypes:monitoring-param-value;
852 uses manotypes:monitoring-param-ui-data;
853 uses manotypes:monitoring-param-aggregation;