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;
180 list scaling-group-descriptor {
182 "scaling group descriptor within this network service.
183 The scaling group defines a group of VNFs,
184 and the ratio of VNFs in the network service
185 that is used as target for scaling action";
190 description "Name of this scaling group.";
194 list scaling-policy {
200 "Name of the scaling policy";
207 type scaling-policy-type;
212 "Specifies if the scaling policy can be applied";
217 leaf scale-in-operation-type {
219 "Operation to be applied to check between scaling criterias to
220 check if the scale in threshold condition has been met.
222 type scaling-criteria-operation;
226 leaf scale-out-operation-type {
228 "Operation to be applied to check between scaling criterias to
229 check if the scale out threshold condition has been met.
231 type scaling-criteria-operation;
235 leaf threshold-time {
237 "The duration for which the criteria must hold true";
244 "The duration after a scaling-in/scaling-out action has been
245 triggered, for which there will be no further optional";
250 list scaling-criteria {
252 "list of conditions to be met for generating scaling
260 leaf scale-in-threshold {
262 "Value below which scale-in requests are generated";
266 leaf scale-out-threshold {
268 "Value above which scale-out requests are generated";
272 leaf ns-monitoring-param-ref {
274 "Reference to the NS level monitoring parameter
277 path "../../../../monitoring-param/id";
284 description "List of VNFs in this scaling group";
285 key "member-vnf-index-ref";
287 leaf member-vnf-index-ref {
288 description "member VNF index of this member VNF";
290 path "../../../constituent-vnfd/member-vnf-index";
296 "count of this member VNF within this scaling group.
297 The count allows to define the number of instances
298 when a scaling action targets this scaling group";
304 leaf min-instance-count {
306 "Minimum instances of the scaling group which are allowed.
307 These instances are created by default when the network service
313 leaf max-instance-count {
315 "Maximum instances of this scaling group that are allowed
316 in a single network service. The network service scaling
317 will fail, when the number of service group instances
318 exceed the max-instance-count specified.";
323 list scaling-config-action {
324 description "List of scaling config actions";
328 description "scaling trigger";
329 type scaling-trigger;
332 leaf ns-service-primitive-name-ref {
333 description "Reference to the NS service primitive";
335 path "../../../service-primitive/name";
344 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
350 "Identifier for the VNFFGD.";
362 "Short name to appear as label in the UI";
367 description "Provider of the VNFFGD.";
372 description "Description of the VNFFGD.";
377 description "Version of the VNFFGD";
383 "List of Rendered Service Paths (RSP).";
389 "Identifier for the RSP.";
399 list vnfd-connection-point-ref {
401 "A list of references to connection points.";
402 key "member-vnf-index-ref";
404 leaf member-vnf-index-ref {
405 description "Reference to member-vnf within constituent-vnfds";
407 path "../../../../constituent-vnfd/member-vnf-index";
414 "A number that denotes the order of a VNF in a chain";
419 "A reference to a vnfd. This is a
421 ../../../../nsd:constituent-vnfd
422 + [nsd:id = current()/../nsd:id-ref]
426 path "../../../../constituent-vnfd" +
427 "[member-vnf-index = current()/../member-vnf-index-ref]" +
432 leaf vnfd-connection-point-ref {
434 "A reference to a connection point name
435 in a vnfd. This is a leafref to path:
436 /vnfd:vnfd-catalog/vnfd:vnfd
437 + [vnfd:id = current()/../nsd:vnfd-id-ref]
438 + /vnfd:connection-point/vnfd:name
439 NOTE: An issue with confd is preventing the
440 use of xpath. Seems to be an issue with leafref
441 to leafref, whose target is in a different module.
442 Once that is resolved this will switched to use
444 // TODO: Keeping as string as this needs to be
445 // diffenent lvel based of if it is nsd-catalog or
448 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
449 // "[vnfd:id = current()/../vnfd-id-ref]/" +
450 // "vnfd:connection-point/vnfd:name";
459 "List of classifier rules.";
465 "Identifier for the classifier rule.";
471 "Name of the classifier.";
477 "A reference to the RSP.";
483 leaf member-vnf-index-ref {
484 description "Reference to member-vnf within constituent-vnfds";
486 path "../../../constituent-vnfd/member-vnf-index";
492 "A reference to a vnfd. This is a
494 ../../../nsd:constituent-vnfd
495 + [nsd:id = current()/../nsd:id-ref]
499 path "../../../constituent-vnfd" +
500 "[member-vnf-index = current()/../member-vnf-index-ref]" +
505 leaf vnfd-connection-point-ref {
507 "A reference to a connection point name
508 in a vnfd. This is a leafref to path:
509 /vnfd:vnfd-catalog/vnfd:vnfd
510 + [vnfd:id = current()/../nsd:vnfd-id-ref]
511 + /vnfd:connection-point/vnfd:name
512 NOTE: An issue with confd is preventing the
513 use of xpath. Seems to be an issue with leafref
514 to leafref, whose target is in a different module.
515 Once that is resolved this will switched to use
517 // TODO: Keeping as string as this needs to be
518 // diffenent lvel based of if it is nsd-catalog or
521 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
522 // "[vnfd:id = current()/../vnfd-id-ref]/" +
523 // "vnfd:connection-point/vnfd:name";
528 list match-attributes {
530 "List of match attributes.";
536 "Identifier for the classifier match attribute rule.";
546 leaf source-ip-address {
548 "Source IP address.";
549 type inet:ip-address;
552 leaf destination-ip-address {
554 "Destination IP address.";
555 type inet:ip-address;
560 "Source port number.";
561 type inet:port-number;
564 leaf destination-port {
566 "Destination port number.";
567 type inet:port-number;
569 //TODO: Add more match criteria
574 uses manotypes:ip-profile-list;
576 list initial-service-primitive {
578 "Initial set of service primitives for NSD.";
581 uses manotypes:event-config;
584 list terminate-service-primitive {
586 "Set of service primitives during
587 termination for NSD.";
590 uses manotypes:event-config;
593 uses manotypes:input-parameter-xpath;
595 list parameter-pool {
597 "Pool of parameter values which must be
598 pulled from during configuration";
603 "Name of the configuration value pool";
609 "Create a range of values to populate the pool with";
613 "Generated pool values start at this value";
620 "Generated pool values stop at this value";
629 description "Used to configure the list of public keys to be injected as part
630 of ns instantiation";
633 description "Name of this key pair";
638 description "Key associated with this key pair";
645 description "List of users to be added through cloud-config";
648 description "Name of the user ";
653 description "The user name's real name";
659 description "Used to configure the list of public keys to be injected as part
660 of ns instantiation";
663 description "Name of this key pair";
668 description "Key associated with this key pair";
675 grouping nsd-vld-common {
676 /* Still having issues modelling this,
677 see the comments under vnfd-connection-point-ref
680 "List of Virtual Link Descriptors.";
684 "Identifier for the VLD.";
690 "Virtual Link Descriptor (VLD) name.";
696 "Short name to appear as label in the UI";
701 description "Provider of the VLD.";
706 description "Description of the VLD.";
711 description "Version of the VLD";
716 type manotypes:virtual-link-type;
719 leaf root-bandwidth {
721 "For ELAN this is the aggregate bandwidth.";
725 leaf leaf-bandwidth {
727 "For ELAN this is the bandwidth of branches.";
731 // replicate for pnfd container here
732 uses manotypes:provider-network;
735 description "Flag indicating whether this network is a VIM management network";
741 description "Extra parameters for VLD instantiation";
743 case vim-network-ref {
744 leaf vim-network-name {
746 "Name of network in VIM account. This is used to indicate
747 pre-provisioned network name in cloud account.";
752 case vim-network-profile {
753 leaf ip-profile-ref {
754 description "Named reference to IP-profile object";
756 path "../../ip-profiles/name";
764 grouping monitoring-param-common {
766 "List of monitoring parameters from VNF's that should be
767 propogated up into NSR";
777 uses manotypes:monitoring-param-value;
778 uses manotypes:monitoring-param-ui-data;
779 uses manotypes:monitoring-param-aggregation;