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 parameter";
124 grouping nsd-descriptor-common {
126 description "Identifier for the NSD.";
133 description "NSD name.";
139 description "Short name to appear as label in the UI";
144 description "Vendor of the NSD.";
150 "File path for the vendor specific logo. For example icons/mylogo.png.
151 The logo should be part of the network service";
156 description "Description of the NSD.";
161 description "Version of the NSD";
165 list connection-point {
167 "List for external connection points.
168 Each NS has one or more external connection
169 points. As the name implies that external
170 connection points are used for connecting
171 the NS to other NS or to external networks.
172 Each NS exposes these connection points to
173 the orchestrator. The orchestrator can
174 construct network service chains by
175 connecting the connection points between
181 "Name of the NS connection point.";
187 "Type of the connection point.";
188 type manotypes:connection-point-type;
192 list scaling-group-descriptor {
194 "scaling group descriptor within this network service.
195 The scaling group defines a group of VNFs,
196 and the ratio of VNFs in the network service
197 that is used as target for scaling action";
202 description "Name of this scaling group.";
206 list scaling-policy {
212 "Name of the scaling policy";
219 type scaling-policy-type;
224 "Specifies if the scaling policy can be applied";
229 leaf scale-in-operation-type {
231 "Operation to be applied to check between scaling criterias to
232 check if the scale in threshold condition has been met.
234 type scaling-criteria-operation;
238 leaf scale-out-operation-type {
240 "Operation to be applied to check between scaling criterias to
241 check if the scale out threshold condition has been met.
243 type scaling-criteria-operation;
247 leaf threshold-time {
249 "The duration for which the criteria must hold true";
256 "The duration after a scaling-in/scaling-out action has been
257 triggered, for which there will be no further optional";
262 list scaling-criteria {
264 "list of conditions to be met for generating scaling
272 leaf scale-in-threshold {
274 "Value below which scale-in requests are generated";
278 leaf scale-out-threshold {
280 "Value above which scale-out requests are generated";
284 leaf ns-monitoring-param-ref {
286 "Reference to the NS level monitoring parameter
289 path "../../../../monitoring-param/id";
296 description "List of VNFs in this scaling group";
297 key "member-vnf-index-ref";
299 leaf member-vnf-index-ref {
300 description "member VNF index of this member VNF";
302 path "../../../constituent-vnfd/member-vnf-index";
308 "count of this member VNF within this scaling group.
309 The count allows to define the number of instances
310 when a scaling action targets this scaling group";
316 leaf min-instance-count {
318 "Minimum instances of the scaling group which are allowed.
319 These instances are created by default when the network service
325 leaf max-instance-count {
327 "Maximum instances of this scaling group that are allowed
328 in a single network service. The network service scaling
329 will fail, when the number of service group instances
330 exceed the max-instance-count specified.";
335 list scaling-config-action {
336 description "List of scaling config actions";
340 description "scaling trigger";
341 type scaling-trigger;
344 leaf ns-service-primitive-name-ref {
345 description "Reference to the NS service primitive";
347 path "../../../service-primitive/name";
356 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
362 "Identifier for the VNFFGD.";
374 "Short name to appear as label in the UI";
379 description "Provider of the VNFFGD.";
384 description "Description of the VNFFGD.";
389 description "Version of the VNFFGD";
395 "List of Rendered Service Paths (RSP).";
401 "Identifier for the RSP.";
411 list vnfd-connection-point-ref {
413 "A list of references to connection points.";
414 key "member-vnf-index-ref";
416 leaf member-vnf-index-ref {
417 description "Reference to member-vnf within constituent-vnfds";
419 path "../../../../constituent-vnfd/member-vnf-index";
426 "A number that denotes the order of a VNF in a chain";
431 "A reference to a vnfd. This is a
433 ../../../../nsd:constituent-vnfd
434 + [nsd:id = current()/../nsd:id-ref]
438 path "../../../../constituent-vnfd" +
439 "[member-vnf-index = current()/../member-vnf-index-ref]" +
444 leaf vnfd-connection-point-ref {
446 "A reference to a connection point name
447 in a vnfd. This is a leafref to path:
448 /vnfd:vnfd-catalog/vnfd:vnfd
449 + [vnfd:id = current()/../nsd:vnfd-id-ref]
450 + /vnfd:connection-point/vnfd:name
451 NOTE: An issue with confd is preventing the
452 use of xpath. Seems to be an issue with leafref
453 to leafref, whose target is in a different module.
454 Once that is resolved this will switched to use
456 // TODO: Keeping as string as this needs to be
457 // diffenent lvel based of if it is nsd-catalog or
460 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
461 // "[vnfd:id = current()/../vnfd-id-ref]/" +
462 // "vnfd:connection-point/vnfd:name";
471 "List of classifier rules.";
477 "Identifier for the classifier rule.";
483 "Name of the classifier.";
489 "A reference to the RSP.";
495 leaf member-vnf-index-ref {
496 description "Reference to member-vnf within constituent-vnfds";
498 path "../../../constituent-vnfd/member-vnf-index";
504 "A reference to a vnfd. This is a
506 ../../../nsd:constituent-vnfd
507 + [nsd:id = current()/../nsd:id-ref]
511 path "../../../constituent-vnfd" +
512 "[member-vnf-index = current()/../member-vnf-index-ref]" +
517 leaf vnfd-connection-point-ref {
519 "A reference to a connection point name
520 in a vnfd. This is a leafref to path:
521 /vnfd:vnfd-catalog/vnfd:vnfd
522 + [vnfd:id = current()/../nsd:vnfd-id-ref]
523 + /vnfd:connection-point/vnfd:name
524 NOTE: An issue with confd is preventing the
525 use of xpath. Seems to be an issue with leafref
526 to leafref, whose target is in a different module.
527 Once that is resolved this will switched to use
529 // TODO: Keeping as string as this needs to be
530 // diffenent lvel based of if it is nsd-catalog or
533 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
534 // "[vnfd:id = current()/../vnfd-id-ref]/" +
535 // "vnfd:connection-point/vnfd:name";
540 list match-attributes {
542 "List of match attributes.";
548 "Identifier for the classifier match attribute rule.";
558 leaf source-ip-address {
560 "Source IP address.";
561 type inet:ip-address;
564 leaf destination-ip-address {
566 "Destination IP address.";
567 type inet:ip-address;
572 "Source port number.";
573 type inet:port-number;
576 leaf destination-port {
578 "Destination port number.";
579 type inet:port-number;
581 //TODO: Add more match criteria
586 uses manotypes:ip-profile-list;
588 list initial-service-primitive {
590 "Initial set of service primitives for NSD.";
593 uses manotypes:event-config;
596 list terminate-service-primitive {
598 "Set of service primitives during
599 termination for NSD.";
602 uses manotypes:event-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 to appear as label in the 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";
768 path "../../ip-profiles/name";
776 grouping monitoring-param-common {
778 "List of monitoring parameters from VNF's that should be
779 propogated up into NSR";
789 uses manotypes:monitoring-param-value;
790 uses manotypes:monitoring-param-ui-data;
791 uses manotypes:monitoring-param-aggregation;