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";
103 } // primitive-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
160 uses nsd-connection-point-common;
164 "Type of the connection point.";
165 type manotypes:connection-point-type;
169 description "Logical connection of the CP to a VLD or to a VNF CP";
175 "ID reference to a VLD in the NS";
183 case vnfd-connection-point-ref {
185 leaf member-vnf-index-ref {
186 description "Reference to member-vnf within constituent-vnfd";
188 path "../../constituent-vnfd/member-vnf-index";
194 "A reference to a vnfd. This is a leafref to path:
195 ../../nsd:constituent-vnfd
196 + [nsd:id = current()/../nsd:id-ref]
199 path "../../constituent-vnfd" +
200 "[member-vnf-index = current()/../member-vnf-index-ref]" +
205 leaf vnfd-connection-point-ref {
207 "A reference to a connection point name
208 in a vnfd. This is a leafref to path:
209 /vnfd:vnfd-catalog/vnfd:vnfd
210 + [vnfd:id = current()/../nsd:vnfd-id-ref]
211 + /vnfd:connection-point/vnfd:name";
213 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
214 "[vnfd:id = current()/../vnfd-id-ref]" +
215 "/vnfd:connection-point/vnfd:name";
225 list scaling-group-descriptor {
227 "scaling group descriptor within this network service.
228 The scaling group defines a group of VNFs,
229 and the ratio of VNFs in the network service
230 that is used as target for scaling action";
235 description "Name of this scaling group.";
239 list scaling-policy {
245 "Name of the scaling policy";
252 type manotypes:scaling-policy-type;
257 "Specifies if the scaling policy can be applied";
262 leaf scale-in-operation-type {
264 "Operation to be applied to check between scaling criterias to
265 check if the scale in threshold condition has been met.
267 type manotypes:scaling-criteria-operation;
271 leaf scale-out-operation-type {
273 "Operation to be applied to check between scaling criterias to
274 check if the scale out threshold condition has been met.
276 type manotypes:scaling-criteria-operation;
280 leaf threshold-time {
282 "The duration for which the criteria must hold true";
289 "The duration after a scaling-in/scaling-out action has been
290 triggered, for which there will be no further optional";
295 list scaling-criteria {
297 "list of conditions to be met for generating scaling
305 leaf scale-in-threshold {
307 "Value below which scale-in requests are generated";
311 leaf scale-in-relational-operation {
313 "The relational operator used to compare the monitoring param
314 against the scale-in-threshold.";
315 type manotypes:relational-operation-type;
319 leaf scale-out-threshold {
321 "Value above which scale-out requests are generated";
325 leaf scale-out-relational-operation {
327 "The relational operator used to compare the monitoring param
328 against the scale-out-threshold.";
329 type manotypes:relational-operation-type;
333 leaf ns-monitoring-param-ref {
335 "Reference to the NS level monitoring parameter
338 path "../../../../monitoring-param/id";
345 description "List of VNFs in this scaling group";
346 key "member-vnf-index-ref";
348 leaf member-vnf-index-ref {
349 description "member VNF index of this member VNF";
351 path "../../../constituent-vnfd/member-vnf-index";
357 "count of this member VNF within this scaling group.
358 The count allows to define the number of instances
359 when a scaling action targets this scaling group";
365 leaf min-instance-count {
367 "Minimum instances of the scaling group which are allowed.
368 These instances are created by default when the network service
374 leaf max-instance-count {
376 "Maximum instances of this scaling group that are allowed
377 in a single network service. The network service scaling
378 will fail, when the number of service group instances
379 exceed the max-instance-count specified.";
384 list scaling-config-action {
385 description "List of scaling config actions";
389 description "scaling trigger";
390 type manotypes:scaling-trigger;
393 leaf ns-service-primitive-name-ref {
394 description "Reference to the NS service primitive";
396 path "../../../service-primitive/name";
405 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
413 "List of Rendered Service Paths (RSP).";
418 list vnfd-connection-point-ref { // not common
420 "A list of references to connection points.";
421 key "member-vnf-index-ref";
423 leaf member-vnf-index-ref {
424 description "Reference to member-vnf within constituent-vnfds";
426 path "../../../../constituent-vnfd/member-vnf-index";
433 "A number that denotes the order of a VNF in a chain";
438 "A reference to a vnfd. This is a
440 ../../../../nsd:constituent-vnfd
441 + [nsd:id = current()/../nsd:id-ref]
445 path "../../../../constituent-vnfd" +
446 "[member-vnf-index = current()/../member-vnf-index-ref]" +
451 leaf vnfd-ingress-connection-point-ref {
453 "A reference to a connection point name
454 in a vnfd. This is a leafref to path:
455 /vnfd:vnfd-catalog/vnfd:vnfd
456 + [vnfd:id = current()/../nsd:vnfd-id-ref]
457 + /vnfd:connection-point/vnfd:name
458 NOTE: An issue with confd is preventing the
459 use of xpath. Seems to be an issue with leafref
460 to leafref, whose target is in a different module.
461 Once that is resolved this will switched to use
463 // TODO: Keeping as string as this needs to be
464 // diffenent lvel based of if it is nsd-catalog or
467 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
468 // "[vnfd:id = current()/../vnfd-id-ref]/" +
469 // "vnfd:connection-point/vnfd:name";
474 leaf vnfd-egress-connection-point-ref {
476 "A reference to a connection point name
477 in a vnfd. This is a leafref to path:
478 /vnfd:vnfd-catalog/vnfd:vnfd
479 + [vnfd:id = current()/../nsd:vnfd-id-ref]
480 + /vnfd:connection-point/vnfd:name
481 NOTE: An issue with confd is preventing the
482 use of xpath. Seems to be an issue with leafref
483 to leafref, whose target is in a different module.
484 Once that is resolved this will switched to use
486 // TODO: Keeping as string as this needs to be
487 // diffenent lvel based of if it is nsd-catalog or
490 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
491 // "[vnfd:id = current()/../vnfd-id-ref]/" +
492 // "vnfd:connection-point/vnfd:name";
501 "List of classifier rules.";
505 uses classifier-common;
507 leaf member-vnf-index-ref {
508 description "Reference to member-vnf within constituent-vnfds";
510 path "../../../constituent-vnfd/member-vnf-index";
516 "A reference to a vnfd. This is a
518 ../../../nsd:constituent-vnfd
519 + [nsd:id = current()/../nsd:id-ref]
523 path "../../../constituent-vnfd" +
524 "[member-vnf-index = current()/../member-vnf-index-ref]" +
529 leaf vnfd-connection-point-ref {
531 "A reference to a connection point name
532 in a vnfd. This is a leafref to path:
533 /vnfd:vnfd-catalog/vnfd:vnfd
534 + [vnfd:id = current()/../nsd:vnfd-id-ref]
535 + /vnfd:connection-point/vnfd:name
536 NOTE: An issue with confd is preventing the
537 use of xpath. Seems to be an issue with leafref
538 to leafref, whose target is in a different module.
539 Once that is resolved this will switched to use
541 // TODO: Keeping as string as this needs to be
542 // diffenent lvel based of if it is nsd-catalog or
545 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
546 // "[vnfd:id = current()/../vnfd-id-ref]/" +
547 // "vnfd:connection-point/vnfd:name";
555 uses manotypes:ip-profile-list;
557 list initial-service-primitive {
559 "Initial set of service primitives for NSD.";
562 uses manotypes:event-config;
565 list terminate-service-primitive {
567 "Set of service primitives during
568 termination for NSD.";
571 uses manotypes:event-config;
574 uses manotypes:input-parameter-xpath;
576 list parameter-pool {
578 "Pool of parameter values which must be
579 pulled from during configuration";
584 "Name of the configuration value pool";
590 "Create a range of values to populate the pool with";
594 "Generated pool values start at this value";
601 "Generated pool values stop at this value";
610 description "Used to configure the list of public keys to be injected as part
611 of ns instantiation";
614 description "Name of this key pair";
619 description "Key associated with this key pair";
626 description "List of users to be added through cloud-config";
629 description "Name of the user ";
634 description "The user name's real name";
640 description "Used to configure the list of public keys to be injected as part
641 of ns instantiation";
644 description "Name of this key pair";
649 description "Key associated with this key pair";
654 } // nsd-descriptor-common
656 grouping nsd-vld-common {
657 /* Still having issues modelling this,
658 see the comments under vnfd-connection-point-ref
660 IMPORTANT: Change description fields
665 description "Extra parameters for VLD instantiation";
667 case vim-network-ref {
668 leaf vim-network-name {
670 "Name of network in VIM account. This is used to indicate
671 pre-provisioned network name in cloud account.";
676 case vim-network-profile {
677 leaf ip-profile-ref {
678 description "Named reference to IP-profile object";
680 path "../../ip-profiles/name";
688 grouping nsd-connection-point-common {
689 description "NSD connection point base";
690 //IMPORTANT: Change description fields
693 "Name of the connection point.";
697 leaf floating-ip-required {
699 "Boolean parameter to indicate whether the CP must be exposed.
700 A public IP address will be allocated to this CP if exposed is true.
701 The default is false meaning a floating IP address is not required.
702 It must be explicitly asked for a floating IP address to be allocated.";
705 } // nsd-connection-point-common
707 grouping vld-common {
709 "List of Virtual Link Descriptors.";
713 "Identifier for the VLD.";
719 "Virtual Link Descriptor (VLD) name.";
725 "Short name to appear as label in the UI";
730 description "Provider of the VLD.";
735 description "Description of the VLD.";
740 description "Version of the VLD";
745 type manotypes:virtual-link-type;
748 leaf root-bandwidth {
750 "For ELAN this is the aggregate bandwidth.";
754 leaf leaf-bandwidth {
756 "For ELAN this is the bandwidth of branches.";
760 // replicate for pnfd container here
761 uses manotypes:provider-network;
764 description "Flag indicating whether this network is a VIM management network";
770 grouping fgd-common {
774 "Identifier for the FGD.";
786 "Short name to appear as label in the UI";
791 description "Provider of the FGD.";
796 description "Description of the FGD.";
801 description "Version of the FGD";
806 grouping rsp-common {
810 "Identifier for the RSP.";
822 grouping classifier-common {
826 "Identifier for the classifier rule.";
832 "Name of the classifier.";
838 "A reference to the RSP.";
844 list match-attributes {
846 "List of match attributes.";
852 "Identifier for the classifier match attribute rule.";
862 leaf source-ip-address {
864 "Source IP address.";
865 type inet:ip-address;
868 leaf destination-ip-address {
870 "Destination IP address.";
871 type inet:ip-address;
876 "Source port number.";
877 type inet:port-number;
880 leaf destination-port {
882 "Destination port number.";
883 type inet:port-number;
885 //TODO: Add more match criteria
887 } // classifier-common
889 grouping monitoring-param-common {
891 "List of monitoring parameters from VNF's that should be
892 propogated up into NSR";
902 uses manotypes:monitoring-param-value;
903 uses manotypes:monitoring-param-ui-data;
904 uses manotypes:monitoring-param-aggregation;
905 } // monitoring-param-common