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";
34 import ietf-inet-types {
38 import ietf-yang-types {
48 "Initial revision. This YANG file defines
49 the Network Service Descriptor (NSD)
52 "Derived from earlier versions of base YANG files";
55 typedef scaling-trigger {
72 typedef scaling-policy-type {
83 typedef scaling-criteria-operation {
94 grouping primitive-parameter {
97 "Name of the parameter.";
103 "Data type associated with the name.";
104 type manotypes:parameter-data-type;
108 description "Is this field mandatory";
114 description "The default value for this field";
118 leaf parameter-pool {
119 description "NSD Parameter pool name to use for this paramter";
124 grouping nsd-descriptor-common {
126 description "Identifier for the NSD.";
131 description "NSD name.";
137 description "NSD short name.";
142 description "Vendor of the NSD.";
148 "File path for the vendor specific logo. For example icons/mylogo.png.
149 The logo should be part of the network service";
154 description "Description of the NSD.";
159 description "Version of the NSD";
163 list connection-point {
165 "List for external connection points.
166 Each NS has one or more external connection
167 points. As the name implies that external
168 connection points are used for connecting
169 the NS to other NS or to external networks.
170 Each NS exposes these connection points to
171 the orchestrator. The orchestrator can
172 construct network service chains by
173 connecting the connection points between
179 "Name of the NS connection point.";
185 "Type of the connection point.";
186 type manotypes:connection-point-type;
190 list scaling-group-descriptor {
192 "scaling group descriptor within this network service.
193 The scaling group defines a group of VNFs,
194 and the ratio of VNFs in the network service
195 that is used as target for scaling action";
200 description "Name of this scaling group.";
204 list scaling-policy {
210 "Name of the scaling policy";
217 type scaling-policy-type;
222 "Specifies if the scaling policy can be applied";
227 leaf scale-in-operation-type {
229 "Operation to be applied to check between scaling criterias to
230 check if the scale in threshold condition has been met.
232 type scaling-criteria-operation;
236 leaf scale-out-operation-type {
238 "Operation to be applied to check between scaling criterias to
239 check if the scale out threshold condition has been met.
241 type scaling-criteria-operation;
245 leaf threshold-time {
247 "The duration for which the criteria must hold true";
254 "The duration after a scaling-in/scaling-out action has been
255 triggered, for which there will be no further optional";
260 list scaling-criteria {
262 "list of conditions to be met for generating scaling
270 leaf scale-in-threshold {
272 "Value below which scale-in requests are generated";
276 leaf scale-out-threshold {
278 "Value above which scale-out requests are generated";
282 leaf ns-monitoring-param-ref {
284 "Reference to the NS level monitoring parameter
287 path "../../../../monitoring-param/id";
294 description "List of VNFs in this scaling group";
295 key "member-vnf-index-ref";
297 leaf member-vnf-index-ref {
298 description "member VNF index of this member VNF";
300 path "../../../constituent-vnfd/member-vnf-index";
306 "count of this member VNF within this scaling group.
307 The count allows to define the number of instances
308 when a scaling action targets this scaling group";
314 leaf min-instance-count {
316 "Minimum instances of the scaling group which are allowed.
317 These instances are created by default when the network service
323 leaf max-instance-count {
325 "Maximum instances of this scaling group that are allowed
326 in a single network service. The network service scaling
327 will fail, when the number of service group instances
328 exceed the max-instance-count specified.";
333 list scaling-config-action {
334 description "List of scaling config actions";
338 description "scaling trigger";
339 type scaling-trigger;
342 leaf ns-config-primitive-name-ref {
343 description "Reference to the NS config name primitive";
345 path "../../../service-primitive/name";
354 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
360 "Identifier for the VNFFGD.";
372 "Short name for VNFFGD for UI";
377 description "Provider of the VNFFGD.";
382 description "Description of the VNFFGD.";
387 description "Version of the VNFFGD";
393 "List of Rendered Service Paths (RSP).";
399 "Identifier for the RSP.";
409 list vnfd-connection-point-ref {
411 "A list of references to connection points.";
412 key "member-vnf-index-ref";
414 leaf member-vnf-index-ref {
415 description "Reference to member-vnf within constituent-vnfds";
417 path "../../../../constituent-vnfd/member-vnf-index";
424 "A number that denotes the order of a VNF in a chain";
429 "A reference to a vnfd. This is a
431 ../../../../nsd:constituent-vnfd
432 + [nsd:id = current()/../nsd:id-ref]
434 NOTE: An issue with confd is preventing the
435 use of xpath. Seems to be an issue with leafref
436 to leafref, whose target is in a different module.
437 Once that is resovled this will switched to use
440 path "../../../../constituent-vnfd" +
441 "[member-vnf-index = current()/../member-vnf-index-ref]" +
446 leaf vnfd-connection-point-ref {
448 "A reference to a connection point name
449 in a vnfd. This is a leafref to path:
450 /vnfd:vnfd-catalog/vnfd:vnfd
451 + [vnfd:id = current()/../nsd:vnfd-id-ref]
452 + /vnfd:connection-point/vnfd:name
453 NOTE: An issue with confd is preventing the
454 use of xpath. Seems to be an issue with leafref
455 to leafref, whose target is in a different module.
456 Once that is resovled this will switched to use
458 // TODO: Keeping as string as this needs to be
459 // diffenent lvel based of if it is nsd-catalog or
462 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
463 // "[vnfd:id = current()/../vnfd-id-ref]/" +
464 // "vnfd:connection-point/vnfd:name";
473 "List of classifier rules.";
479 "Identifier for the classifier rule.";
485 "Name of the classifier.";
491 "A reference to the RSP.";
497 leaf member-vnf-index-ref {
498 description "Reference to member-vnf within constituent-vnfds";
500 path "../../../constituent-vnfd/member-vnf-index";
506 "A reference to a vnfd. This is a
508 ../../../nsd:constituent-vnfd
509 + [nsd:id = current()/../nsd:id-ref]
511 NOTE: An issue with confd is preventing the
512 use of xpath. Seems to be an issue with leafref
513 to leafref, whose target is in a different module.
514 Once that is resovled this will switched to use
517 path "../../../constituent-vnfd" +
518 "[member-vnf-index = current()/../member-vnf-index-ref]" +
523 leaf vnfd-connection-point-ref {
525 "A reference to a connection point name
526 in a vnfd. This is a leafref to path:
527 /vnfd:vnfd-catalog/vnfd:vnfd
528 + [vnfd:id = current()/../nsd:vnfd-id-ref]
529 + /vnfd:connection-point/vnfd:name
530 NOTE: An issue with confd is preventing the
531 use of xpath. Seems to be an issue with leafref
532 to leafref, whose target is in a different module.
533 Once that is resovled this will switched to use
535 // TODO: Keeping as string as this needs to be
536 // diffenent lvel based of if it is nsd-catalog or
539 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
540 // "[vnfd:id = current()/../vnfd-id-ref]/" +
541 // "vnfd:connection-point/vnfd:name";
546 list match-attributes {
548 "List of match attributes.";
554 "Identifier for the classifier match attribute rule.";
564 leaf source-ip-address {
566 "Source IP address.";
567 type inet:ip-address;
570 leaf destination-ip-address {
572 "Destination IP address.";
573 type inet:ip-address;
578 "Source port number.";
579 type inet:port-number;
582 leaf destination-port {
584 "Destination port number.";
585 type inet:port-number;
587 //TODO: Add more match criteria
592 uses manotypes:ip-profile-list;
594 uses manotypes:ns-service-primitive;
596 list initial-config-primitive {
597 rwpb:msg-new NsdInitialConfigPrimitive;
599 "Initial set of configuration primitives for NSD.";
602 uses manotypes:initial-config;
605 uses manotypes:input-parameter-xpath;
607 list parameter-pool {
609 "Pool of parameter values which must be
610 pulled from during configuration";
615 "Name of the configuration value pool";
621 "Create a range of values to populate the pool with";
625 "Generated pool values start at this value";
632 "Generated pool values stop at this value";
641 description "Used to configure the list of public keys to be injected as part
642 of ns instantiation";
645 description "Name of this key pair";
650 description "Key associated with this key pair";
657 description "List of users to be added through cloud-config";
660 description "Name of the user ";
665 description "The user name's real name";
671 description "Used to configure the list of public keys to be injected as part
672 of ns instantiation";
675 description "Name of this key pair";
680 description "Key associated with this key pair";
687 grouping nsd-vld-common {
688 /* Still having issues modelling this,
689 see the comments under vnfd-connection-point-ref
692 "List of Virtual Link Descriptors.";
696 "Identifier for the VLD.";
702 "Virtual Link Descriptor (VLD) name.";
708 "Short name for VLD for UI";
713 description "Provider of the VLD.";
718 description "Description of the VLD.";
723 description "Version of the VLD";
728 type manotypes:virtual-link-type;
731 leaf root-bandwidth {
733 "For ELAN this is the aggregate bandwidth.";
737 leaf leaf-bandwidth {
739 "For ELAN this is the bandwidth of branches.";
743 // replicate for pnfd container here
744 uses manotypes:provider-network;
747 description "Flag indicating whether this network is a VIM management network";
753 description "Extra parameters for VLD instantiation";
755 case vim-network-ref {
756 leaf vim-network-name {
758 "Name of network in VIM account. This is used to indicate
759 pre-provisioned network name in cloud account.";
764 case vim-network-profile {
765 leaf ip-profile-ref {
766 description "Named reference to IP-profile object";
774 grouping monitoring-param-common {
776 "List of monitoring parameters from VNF's that should be
777 propogated up into NSR";
787 uses manotypes:monitoring-param-value;
788 uses manotypes:monitoring-param-ui-data;
789 uses manotypes:monitoring-param-aggregation;