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";
30 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;
184 list scaling-group-descriptor {
186 "scaling group descriptor within this network service.
187 The scaling group defines a group of VNFs,
188 and the ratio of VNFs in the network service
189 that is used as target for scaling action";
194 description "Name of this scaling group.";
198 list scaling-policy {
204 "Name of the scaling policy";
211 type scaling-policy-type;
216 "Specifies if the scaling policy can be applied";
221 leaf scale-in-operation-type {
223 "Operation to be applied to check between scaling criterias to
224 check if the scale in threshold condition has been met.
226 type scaling-criteria-operation;
230 leaf scale-out-operation-type {
232 "Operation to be applied to check between scaling criterias to
233 check if the scale out threshold condition has been met.
235 type scaling-criteria-operation;
239 leaf threshold-time {
241 "The duration for which the criteria must hold true";
248 "The duration after a scaling-in/scaling-out action has been
249 triggered, for which there will be no further optional";
254 list scaling-criteria {
256 "list of conditions to be met for generating scaling
264 leaf scale-in-threshold {
266 "Value below which scale-in requests are generated";
270 leaf scale-out-threshold {
272 "Value above which scale-out requests are generated";
276 leaf ns-monitoring-param-ref {
278 "Reference to the NS level monitoring parameter
281 path "../../../../monitoring-param/id";
288 description "List of VNFs in this scaling group";
289 key "member-vnf-index-ref";
291 leaf member-vnf-index-ref {
292 description "member VNF index of this member VNF";
294 path "../../../constituent-vnfd/member-vnf-index";
300 "count of this member VNF within this scaling group.
301 The count allows to define the number of instances
302 when a scaling action targets this scaling group";
308 leaf min-instance-count {
310 "Minimum instances of the scaling group which are allowed.
311 These instances are created by default when the network service
317 leaf max-instance-count {
319 "Maximum instances of this scaling group that are allowed
320 in a single network service. The network service scaling
321 will fail, when the number of service group instances
322 exceed the max-instance-count specified.";
327 list scaling-config-action {
328 description "List of scaling config actions";
332 description "scaling trigger";
333 type scaling-trigger;
336 leaf ns-service-primitive-name-ref {
337 description "Reference to the NS service primitive";
339 path "../../../service-primitive/name";
348 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
354 "Identifier for the VNFFGD.";
366 "Short name to appear as label in the UI";
371 description "Provider of the VNFFGD.";
376 description "Description of the VNFFGD.";
381 description "Version of the VNFFGD";
387 "List of Rendered Service Paths (RSP).";
393 "Identifier for the RSP.";
403 list vnfd-connection-point-ref {
405 "A list of references to connection points.";
406 key "member-vnf-index-ref";
408 leaf member-vnf-index-ref {
409 description "Reference to member-vnf within constituent-vnfds";
411 path "../../../../constituent-vnfd/member-vnf-index";
418 "A number that denotes the order of a VNF in a chain";
423 "A reference to a vnfd. This is a
425 ../../../../nsd:constituent-vnfd
426 + [nsd:id = current()/../nsd:id-ref]
430 path "../../../../constituent-vnfd" +
431 "[member-vnf-index = current()/../member-vnf-index-ref]" +
436 leaf vnfd-connection-point-ref {
438 "A reference to a connection point name
439 in a vnfd. This is a leafref to path:
440 /vnfd:vnfd-catalog/vnfd:vnfd
441 + [vnfd:id = current()/../nsd:vnfd-id-ref]
442 + /vnfd:connection-point/vnfd:name
443 NOTE: An issue with confd is preventing the
444 use of xpath. Seems to be an issue with leafref
445 to leafref, whose target is in a different module.
446 Once that is resolved this will switched to use
448 // TODO: Keeping as string as this needs to be
449 // diffenent lvel based of if it is nsd-catalog or
452 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
453 // "[vnfd:id = current()/../vnfd-id-ref]/" +
454 // "vnfd:connection-point/vnfd:name";
463 "List of classifier rules.";
469 "Identifier for the classifier rule.";
475 "Name of the classifier.";
481 "A reference to the RSP.";
487 leaf member-vnf-index-ref {
488 description "Reference to member-vnf within constituent-vnfds";
490 path "../../../constituent-vnfd/member-vnf-index";
496 "A reference to a vnfd. This is a
498 ../../../nsd:constituent-vnfd
499 + [nsd:id = current()/../nsd:id-ref]
503 path "../../../constituent-vnfd" +
504 "[member-vnf-index = current()/../member-vnf-index-ref]" +
509 leaf vnfd-connection-point-ref {
511 "A reference to a connection point name
512 in a vnfd. This is a leafref to path:
513 /vnfd:vnfd-catalog/vnfd:vnfd
514 + [vnfd:id = current()/../nsd:vnfd-id-ref]
515 + /vnfd:connection-point/vnfd:name
516 NOTE: An issue with confd is preventing the
517 use of xpath. Seems to be an issue with leafref
518 to leafref, whose target is in a different module.
519 Once that is resolved this will switched to use
521 // TODO: Keeping as string as this needs to be
522 // diffenent lvel based of if it is nsd-catalog or
525 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
526 // "[vnfd:id = current()/../vnfd-id-ref]/" +
527 // "vnfd:connection-point/vnfd:name";
532 list match-attributes {
534 "List of match attributes.";
540 "Identifier for the classifier match attribute rule.";
550 leaf source-ip-address {
552 "Source IP address.";
553 type inet:ip-address;
556 leaf destination-ip-address {
558 "Destination IP address.";
559 type inet:ip-address;
564 "Source port number.";
565 type inet:port-number;
568 leaf destination-port {
570 "Destination port number.";
571 type inet:port-number;
573 //TODO: Add more match criteria
578 uses manotypes:ip-profile-list;
580 list initial-service-primitive {
581 rwpb:msg-new NsdInitialServicePrimitive;
583 "Initial set of service primitives for NSD.";
586 uses manotypes:event-config;
589 list terminate-service-primitive {
590 rwpb:msg-new NsdTerminateServicePrimitive;
592 "Set of service primitives during
593 termination for NSD.";
596 uses manotypes:event-config;
599 uses manotypes:input-parameter-xpath;
601 list parameter-pool {
603 "Pool of parameter values which must be
604 pulled from during configuration";
609 "Name of the configuration value pool";
615 "Create a range of values to populate the pool with";
619 "Generated pool values start at this value";
626 "Generated pool values stop at this value";
635 description "Used to configure the list of public keys to be injected as part
636 of ns instantiation";
639 description "Name of this key pair";
644 description "Key associated with this key pair";
651 description "List of users to be added through cloud-config";
654 description "Name of the user ";
659 description "The user name's real name";
665 description "Used to configure the list of public keys to be injected as part
666 of ns instantiation";
669 description "Name of this key pair";
674 description "Key associated with this key pair";
681 grouping nsd-vld-common {
682 /* Still having issues modelling this,
683 see the comments under vnfd-connection-point-ref
686 "List of Virtual Link Descriptors.";
690 "Identifier for the VLD.";
696 "Virtual Link Descriptor (VLD) name.";
702 "Short name to appear as label in the UI";
707 description "Provider of the VLD.";
712 description "Description of the VLD.";
717 description "Version of the VLD";
722 type manotypes:virtual-link-type;
725 leaf root-bandwidth {
727 "For ELAN this is the aggregate bandwidth.";
731 leaf leaf-bandwidth {
733 "For ELAN this is the bandwidth of branches.";
737 // replicate for pnfd container here
738 uses manotypes:provider-network;
741 description "Flag indicating whether this network is a VIM management network";
746 leaf ipv4-nat-pool-name{
748 description "IPV4 nat pool name";
752 description "Extra parameters for VLD instantiation";
754 case vim-network-ref {
755 leaf vim-network-name {
757 "Name of network in VIM account. This is used to indicate
758 pre-provisioned network name in cloud account.";
763 case vim-network-profile {
764 leaf ip-profile-ref {
765 description "Named reference to IP-profile object";
767 path "../../ip-profiles/name";
775 grouping monitoring-param-common {
777 "List of monitoring parameters from VNF's that should be
778 propogated up into NSR";
788 uses manotypes:monitoring-param-value;
789 uses manotypes:monitoring-param-ui-data;
790 uses manotypes:monitoring-param-aggregation;