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 {
36 "Initial revision. This YANG file defines
37 the Network Service Descriptor (NSD)
40 "Derived from earlier versions of base YANG files";
43 typedef scaling-trigger {
60 typedef scaling-policy-type {
71 typedef scaling-criteria-operation {
82 grouping primitive-parameter {
85 "Name of the parameter.";
91 "Data type associated with the name.";
92 type manotypes:parameter-data-type;
96 description "Is this field mandatory";
102 description "The default value for this field";
106 leaf parameter-pool {
107 description "NSD parameter pool name to use for this parameter";
112 grouping nsd-descriptor-common {
114 description "Identifier for the NSD.";
121 description "NSD name.";
127 description "Short name to appear as label in the UI";
132 description "Vendor of the NSD.";
138 "File path for the vendor specific logo. For example icons/mylogo.png.
139 The logo should be part of the network service";
144 description "Description of the NSD.";
149 description "Version of the NSD";
153 list connection-point {
155 "List for external connection points.
156 Each NS has one or more external connection
157 points. As the name implies that external
158 connection points are used for connecting
159 the NS to other NS or to external networks.
160 Each NS exposes these connection points to
161 the orchestrator. The orchestrator can
162 construct network service chains by
163 connecting the connection points between
169 "Name of the NS connection point.";
175 "Type of the connection point.";
176 type manotypes:connection-point-type;
179 leaf floating-ip-required {
181 "Boolean parameter to indicate whether the CP must be exposed.
182 A public IP address will be allocated to this CP if exposed is true.
183 The default is false meaning a floating IP address is not required.
184 It must be explicitly asked for a floating IP address to be allocated.";
189 list scaling-group-descriptor {
191 "scaling group descriptor within this network service.
192 The scaling group defines a group of VNFs,
193 and the ratio of VNFs in the network service
194 that is used as target for scaling action";
199 description "Name of this scaling group.";
203 list scaling-policy {
209 "Name of the scaling policy";
216 type scaling-policy-type;
221 "Specifies if the scaling policy can be applied";
226 leaf scale-in-operation-type {
228 "Operation to be applied to check between scaling criterias to
229 check if the scale in threshold condition has been met.
231 type scaling-criteria-operation;
235 leaf scale-out-operation-type {
237 "Operation to be applied to check between scaling criterias to
238 check if the scale out threshold condition has been met.
240 type scaling-criteria-operation;
244 leaf threshold-time {
246 "The duration for which the criteria must hold true";
253 "The duration after a scaling-in/scaling-out action has been
254 triggered, for which there will be no further optional";
259 list scaling-criteria {
261 "list of conditions to be met for generating scaling
269 leaf scale-in-threshold {
271 "Value below which scale-in requests are generated";
275 leaf scale-out-threshold {
277 "Value above which scale-out requests are generated";
281 leaf ns-monitoring-param-ref {
283 "Reference to the NS level monitoring parameter
286 path "../../../../monitoring-param/id";
293 description "List of VNFs in this scaling group";
294 key "member-vnf-index-ref";
296 leaf member-vnf-index-ref {
297 description "member VNF index of this member VNF";
299 path "../../../constituent-vnfd/member-vnf-index";
305 "count of this member VNF within this scaling group.
306 The count allows to define the number of instances
307 when a scaling action targets this scaling group";
313 leaf min-instance-count {
315 "Minimum instances of the scaling group which are allowed.
316 These instances are created by default when the network service
322 leaf max-instance-count {
324 "Maximum instances of this scaling group that are allowed
325 in a single network service. The network service scaling
326 will fail, when the number of service group instances
327 exceed the max-instance-count specified.";
332 list scaling-config-action {
333 description "List of scaling config actions";
337 description "scaling trigger";
338 type scaling-trigger;
341 leaf ns-service-primitive-name-ref {
342 description "Reference to the NS service primitive";
344 path "../../../service-primitive/name";
353 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
359 "Identifier for the VNFFGD.";
371 "Short name to appear as label in the UI";
376 description "Provider of the VNFFGD.";
381 description "Description of the VNFFGD.";
386 description "Version of the VNFFGD";
392 "List of Rendered Service Paths (RSP).";
398 "Identifier for the RSP.";
408 list vnfd-connection-point-ref {
410 "A list of references to connection points.";
411 key "member-vnf-index-ref";
413 leaf member-vnf-index-ref {
414 description "Reference to member-vnf within constituent-vnfds";
416 path "../../../../constituent-vnfd/member-vnf-index";
423 "A number that denotes the order of a VNF in a chain";
428 "A reference to a vnfd. This is a
430 ../../../../nsd:constituent-vnfd
431 + [nsd:id = current()/../nsd:id-ref]
435 path "../../../../constituent-vnfd" +
436 "[member-vnf-index = current()/../member-vnf-index-ref]" +
441 leaf vnfd-connection-point-ref {
443 "A reference to a connection point name
444 in a vnfd. This is a leafref to path:
445 /vnfd:vnfd-catalog/vnfd:vnfd
446 + [vnfd:id = current()/../nsd:vnfd-id-ref]
447 + /vnfd:connection-point/vnfd:name
448 NOTE: An issue with confd is preventing the
449 use of xpath. Seems to be an issue with leafref
450 to leafref, whose target is in a different module.
451 Once that is resolved this will switched to use
453 // TODO: Keeping as string as this needs to be
454 // diffenent lvel based of if it is nsd-catalog or
457 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
458 // "[vnfd:id = current()/../vnfd-id-ref]/" +
459 // "vnfd:connection-point/vnfd:name";
468 "List of classifier rules.";
474 "Identifier for the classifier rule.";
480 "Name of the classifier.";
486 "A reference to the RSP.";
492 leaf member-vnf-index-ref {
493 description "Reference to member-vnf within constituent-vnfds";
495 path "../../../constituent-vnfd/member-vnf-index";
501 "A reference to a vnfd. This is a
503 ../../../nsd:constituent-vnfd
504 + [nsd:id = current()/../nsd:id-ref]
508 path "../../../constituent-vnfd" +
509 "[member-vnf-index = current()/../member-vnf-index-ref]" +
514 leaf vnfd-connection-point-ref {
516 "A reference to a connection point name
517 in a vnfd. This is a leafref to path:
518 /vnfd:vnfd-catalog/vnfd:vnfd
519 + [vnfd:id = current()/../nsd:vnfd-id-ref]
520 + /vnfd:connection-point/vnfd:name
521 NOTE: An issue with confd is preventing the
522 use of xpath. Seems to be an issue with leafref
523 to leafref, whose target is in a different module.
524 Once that is resolved this will switched to use
526 // TODO: Keeping as string as this needs to be
527 // diffenent lvel based of if it is nsd-catalog or
530 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
531 // "[vnfd:id = current()/../vnfd-id-ref]/" +
532 // "vnfd:connection-point/vnfd:name";
537 list match-attributes {
539 "List of match attributes.";
545 "Identifier for the classifier match attribute rule.";
555 leaf source-ip-address {
557 "Source IP address.";
558 type inet:ip-address;
561 leaf destination-ip-address {
563 "Destination IP address.";
564 type inet:ip-address;
569 "Source port number.";
570 type inet:port-number;
573 leaf destination-port {
575 "Destination port number.";
576 type inet:port-number;
578 //TODO: Add more match criteria
583 uses manotypes:ip-profile-list;
585 list initial-service-primitive {
587 "Initial set of service primitives for NSD.";
590 uses manotypes:event-config;
593 list terminate-service-primitive {
595 "Set of service primitives during
596 termination for NSD.";
599 uses manotypes:event-config;
602 uses manotypes:input-parameter-xpath;
604 list parameter-pool {
606 "Pool of parameter values which must be
607 pulled from during configuration";
612 "Name of the configuration value pool";
618 "Create a range of values to populate the pool with";
622 "Generated pool values start at this value";
629 "Generated pool values stop at this value";
638 description "Used to configure the list of public keys to be injected as part
639 of ns instantiation";
642 description "Name of this key pair";
647 description "Key associated with this key pair";
654 description "List of users to be added through cloud-config";
657 description "Name of the user ";
662 description "The user name's real name";
668 description "Used to configure the list of public keys to be injected as part
669 of ns instantiation";
672 description "Name of this key pair";
677 description "Key associated with this key pair";
684 grouping nsd-vld-common {
685 /* Still having issues modelling this,
686 see the comments under vnfd-connection-point-ref
689 "List of Virtual Link Descriptors.";
693 "Identifier for the VLD.";
699 "Virtual Link Descriptor (VLD) name.";
705 "Short name to appear as label in the UI";
710 description "Provider of the VLD.";
715 description "Description of the VLD.";
720 description "Version of the VLD";
725 type manotypes:virtual-link-type;
728 leaf root-bandwidth {
730 "For ELAN this is the aggregate bandwidth.";
734 leaf leaf-bandwidth {
736 "For ELAN this is the bandwidth of branches.";
740 // replicate for pnfd container here
741 uses manotypes:provider-network;
744 description "Flag indicating whether this network is a VIM management network";
750 description "Extra parameters for VLD instantiation";
752 case vim-network-ref {
753 leaf vim-network-name {
755 "Name of network in VIM account. This is used to indicate
756 pre-provisioned network name in cloud account.";
761 case vim-network-profile {
762 leaf ip-profile-ref {
763 description "Named reference to IP-profile object";
765 path "../../ip-profiles/name";
773 grouping monitoring-param-common {
775 "List of monitoring parameters from VNF's that should be
776 propogated up into NSR";
786 uses manotypes:monitoring-param-value;
787 uses manotypes:monitoring-param-ui-data;
788 uses manotypes:monitoring-param-aggregation;