4 * Copyright 2016 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 "urn:ietf:params:xml:ns:yang:nfvo:nsd";
38 import ietf-inet-types {
42 import ietf-yang-types {
52 "Initial revision. This YANG file defines
53 the Network Service Descriptor (NSD)";
55 "Derived from earlier versions of base YANG files";
58 typedef scaling-trigger {
75 typedef scaling-policy-type {
86 typedef scaling-criteria-operation {
97 grouping primitive-parameter {
100 "Name of the parameter.";
106 "Data type associated with the name.";
107 type manotypes:parameter-data-type;
111 description "Is this field mandatory";
117 description "The default value for this field";
121 leaf parameter-pool {
122 description "NSD Parameter pool name to use for this paramter";
127 grouping nsd-descriptor {
129 description "Identifier for the NSD.";
134 description "NSD name.";
140 description "NSD short name.";
145 description "Vendor of the NSD.";
151 "File path for the vendor specific logo. For example icons/mylogo.png.
152 The logo should be part of the network service";
157 description "Description of the NSD.";
162 description "Version of the NSD";
166 list connection-point {
168 "List for external connection points.
169 Each NS has one or more external connection
170 points. As the name implies that external
171 connection points are used for connecting
172 the NS to other NS or to external networks.
173 Each NS exposes these connection points to
174 the orchestrator. The orchestrator can
175 construct network service chains by
176 connecting the connection points between
182 "Name of the NS connection point.";
188 "Type of the connection point.";
189 type manotypes:connection-point-type;
193 /* Still having issues modelling this,
194 see the comments under vnfd-connection-point-ref
198 "List of Virtual Link Descriptors.";
204 "Identifier for the VLD.";
210 "Virtual Link Descriptor (VLD) name.";
216 "Short name for VLD for UI";
221 description "Provider of the VLD.";
226 description "Description of the VLD.";
231 description "Version of the VLD";
236 type manotypes:virtual-link-type;
239 leaf root-bandwidth {
241 "For ELAN this is the aggregate bandwidth.";
245 leaf leaf-bandwidth {
247 "For ELAN this is the bandwidth of branches.";
251 list vnfd-connection-point-ref {
253 "A list of references to connection points.";
254 key "member-vnf-index-ref vnfd-connection-point-ref";
256 leaf member-vnf-index-ref {
257 description "Reference to member-vnf within constituent-vnfds";
259 path "../../../constituent-vnfd/member-vnf-index";
265 "A reference to a vnfd";
267 path "../../../constituent-vnfd" +
268 "[member-vnf-index = current()/../member-vnf-index-ref]" +
273 leaf vnfd-connection-point-ref {
274 description "A reference to a connection point name";
276 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
277 "[vnfd:id = current()/../vnfd-id-ref]/" +
278 "vnfd:connection-point/vnfd:name";
283 // replicate for pnfd container here
284 uses manotypes:provider-network;
287 description "Flag indicating whether this network is a VIM management network";
293 description "Extra parameters for VLD instantiation";
295 case vim-network-ref {
296 leaf vim-network-name {
298 "Name of network in VIM account. This is used to indicate
299 pre-provisioned network name in cloud account.";
304 case vim-network-profile {
305 leaf ip-profile-ref {
306 description "Named reference to IP-profile object";
314 list constituent-vnfd {
316 "List of VNFDs that are part of this
319 key "member-vnf-index";
321 leaf member-vnf-index {
323 "Identifier/index for the VNFD. This separate id
324 is required to ensure that multiple VNFs can be
331 "Identifier for the VNFD.";
333 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
337 leaf start-by-default {
339 "VNFD is started as part of the NS instantiation";
345 list scaling-group-descriptor {
347 "scaling group descriptor within this network service.
348 The scaling group defines a group of VNFs,
349 and the ratio of VNFs in the network service
350 that is used as target for scaling action";
355 description "Name of this scaling group.";
359 list scaling-policy {
365 "Name of the scaling policy";
372 type scaling-policy-type;
377 "Specifies if the scaling policy can be applied";
382 leaf scale-in-operation-type {
384 "Operation to be applied to check between scaling criterias to
385 check if the scale in threshold condition has been met.
387 type scaling-criteria-operation;
391 leaf scale-out-operation-type {
393 "Operation to be applied to check between scaling criterias to
394 check if the scale out threshold condition has been met.
396 type scaling-criteria-operation;
400 leaf threshold-time {
402 "The duration for which the criteria must hold true";
409 "The duration after a scaling-in/scaling-out action has been
410 triggered, for which there will be no further optional";
415 list scaling-criteria {
417 "list of conditions to be met for generating scaling
425 leaf scale-in-threshold {
427 "Value below which scale-in requests are generated";
431 leaf scale-out-threshold {
433 "Value above which scale-out requests are generated";
437 leaf ns-monitoring-param-ref {
439 "Reference to the NS level monitoring parameter
442 path "../../../../monitoring-param/id";
449 description "List of VNFs in this scaling group";
450 key "member-vnf-index-ref";
452 leaf member-vnf-index-ref {
453 description "member VNF index of this member VNF";
455 path "../../../constituent-vnfd/member-vnf-index";
461 "count of this member VNF within this scaling group.
462 The count allows to define the number of instances
463 when a scaling action targets this scaling group";
469 leaf min-instance-count {
471 "Minimum instances of the scaling group which are allowed.
472 These instances are created by default when the network service
478 leaf max-instance-count {
480 "Maximum instances of this scaling group that are allowed
481 in a single network service. The network service scaling
482 will fail, when the number of service group instances
483 exceed the max-instance-count specified.";
488 list scaling-config-action {
489 description "List of scaling config actions";
493 description "scaling trigger";
494 type scaling-trigger;
497 leaf ns-config-primitive-name-ref {
498 description "Reference to the NS config name primitive";
500 path "../../../service-primitive/name";
506 list placement-groups {
507 description "List of placement groups at NS level";
510 uses manotypes:placement-group-info;
514 "List of VNFDs that are part of this placement group";
516 key "member-vnf-index-ref";
518 leaf member-vnf-index-ref {
519 description "member VNF index of this member VNF";
521 path "../../../constituent-vnfd/member-vnf-index";
527 "Identifier for the VNFD.";
529 path "../../../constituent-vnfd" +
530 "[member-vnf-index = current()/../member-vnf-index-ref]" +
537 uses manotypes:ip-profile-list;
539 list vnf-dependency {
541 "List of VNF dependencies.";
543 leaf vnf-source-ref {
545 path "../../constituent-vnfd/vnfd-id-ref";
548 leaf vnf-depends-on-ref {
550 "Reference to VNF that sorce VNF depends.";
552 path "../../constituent-vnfd/vnfd-id-ref";
559 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
565 "Identifier for the VNFFGD.";
577 "Short name for VNFFGD for UI";
582 description "Provider of the VNFFGD.";
587 description "Description of the VNFFGD.";
592 description "Version of the VNFFGD";
598 "List of Rendered Service Paths (RSP).";
604 "Identifier for the RSP.";
614 list vnfd-connection-point-ref {
616 "A list of references to connection points.";
617 key "member-vnf-index-ref";
619 leaf member-vnf-index-ref {
620 description "Reference to member-vnf within constituent-vnfds";
622 path "../../../../constituent-vnfd/member-vnf-index";
629 "A number that denotes the order of a VNF in a chain";
634 "A reference to a vnfd";
636 path "../../../../constituent-vnfd" +
637 "[member-vnf-index = current()/../member-vnf-index-ref]" +
642 leaf vnfd-connection-point-ref {
644 "A reference to a connection point name";
646 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
647 "[vnfd:id = current()/../vnfd-id-ref]/" +
648 "vnfd:connection-point/vnfd:name";
656 "List of classifier rules.";
662 "Identifier for the classifier rule.";
668 "Name of the classifier.";
674 "A reference to the RSP.";
680 leaf member-vnf-index-ref {
681 description "Reference to member-vnf within constituent-vnfds";
683 path "../../../constituent-vnfd/member-vnf-index";
689 "A reference to a vnfd";
691 path "../../../constituent-vnfd" +
692 "[member-vnf-index = current()/../member-vnf-index-ref]" +
697 leaf vnfd-connection-point-ref {
699 "A reference to a connection point name";
701 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
702 "[vnfd:id = current()/../vnfd-id-ref]/" +
703 "vnfd:connection-point/vnfd:name";
707 list match-attributes {
709 "List of match attributes.";
715 "Identifier for the classifier match attribute rule.";
725 leaf source-ip-address {
727 "Source IP address.";
728 type inet:ip-address;
731 leaf destination-ip-address {
733 "Destination IP address.";
734 type inet:ip-address;
739 "Source port number.";
740 type inet:port-number;
743 leaf destination-port {
745 "Destination port number.";
746 type inet:port-number;
748 //TODO: Add more match criteria
753 list monitoring-param {
755 "List of monitoring parameters from VNF's that should be
756 propogated up into NSR";
767 uses manotypes:monitoring-param-value;
768 uses manotypes:monitoring-param-ui-data;
769 uses manotypes:monitoring-param-aggregation;
771 list vnfd-monitoring-param {
772 description "A list of VNFD monitoring params";
773 key "member-vnf-index-ref vnfd-monitoring-param-ref";
777 "A reference to a vnfd. This is a leafref";
780 path "../../../constituent-vnfd" +
781 "[member-vnf-index = current()/../member-vnf-index-ref]" +
786 leaf vnfd-monitoring-param-ref {
787 description "A reference to the VNFD monitoring param";
789 path "/vnfd:vnfd-catalog/vnfd:vnfd"
790 + "[vnfd:id = current()/../vnfd-id-ref]"
791 + "/vnfd:monitoring-param/vnfd:id";
795 leaf member-vnf-index-ref {
797 "Mandatory reference to member-vnf within constituent-vnfds";
799 path "../../../constituent-vnfd/member-vnf-index";
805 uses manotypes:input-parameter-xpath;
807 list parameter-pool {
809 "Pool of parameter values which must be
810 pulled from during configuration";
815 "Name of the configuration value pool";
821 "Create a range of values to populate the pool with";
825 "Generated pool values start at this value";
832 "Generated pool values stop at this value";
839 list service-primitive {
841 "Network service level service primitives.";
847 "Name of the service primitive.";
853 "List of parameters for the service primitive.";
856 uses manotypes:primitive-parameter;
859 uses manotypes:ui-primitive-group;
861 list vnf-primitive-group {
863 "List of service primitives grouped by VNF.";
865 key "member-vnf-index-ref";
866 leaf member-vnf-index-ref {
868 "Reference to member-vnf within constituent-vnfds";
870 path "../../../constituent-vnfd/member-vnf-index";
876 "A reference to a vnfd. This is a leafref";
879 path "../../../constituent-vnfd" +
880 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
888 path "/vnfd:vnfd-catalog/vnfd:vnfd"
889 + "[vnfd:id = current()/../vnfd-id-ref]"
898 description "Index of this primitive";
903 description "Name of the primitive in the VNF primitive ";
909 leaf user-defined-script {
911 "A user defined script.";
916 list initial-config-primitive {
917 rwpb:msg-new NsdInitialConfigPrimitive;
919 "Initial set of configuration primitives for NSD.";
922 uses manotypes:initial-config;
927 description "Used to configure the list of public keys to be injected as part
928 of ns instantiation";
931 description "Name of this key pair";
936 description "Key associated with this key pair";
943 description "List of users to be added through cloud-config";
946 description "Name of the user ";
951 description "The user name's real name";
957 description "Used to configure the list of public keys to be injected as part
958 of ns instantiation";
961 description "Name of this key pair";
966 description "Key associated with this key pair";
974 container nsd-catalog {