4 * Copyright 2016-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 "urn:ietf:params:xml:ns:yang:nfvo:nsr";
47 prefix "project-vnfd";
54 import ietf-inet-types {
58 import ietf-yang-types {
76 "Update model to support projects.";
81 "Initial revision. This YANG file defines
82 the Network Service Record (NSR)";
84 "Derived from earlier versions of base YANG files";
87 typedef config-states {
91 enum config_not_needed;
97 typedef trigger-type {
104 grouping cloud-config {
105 description "List of cloud config parameters";
107 list ssh-authorized-key {
110 description "List of authorized ssh keys as part of cloud-config";
113 description "A reference to the key pair entry in the global key pair table";
115 path "/nsr:key-pair/nsr:name";
122 description "List of users to be added through cloud-config";
124 description "Name of the user ";
128 description "The user name's real name";
131 list ssh-authorized-key {
134 description "Used to configure the list of public keys to be injected as part
135 of ns instantiation";
138 description "A reference to the key pair entry in the global key pair table";
140 path "/nsr:key-pair/nsr:name";
149 description "Used to configure the list of public keys to be injected as part
150 of ns instantiation";
152 description "Name of this key pair";
157 description "Key associated with this key pair";
162 augment "/rw-project:project" {
165 description "Used to configure the list of public keys to be injected as part
166 of ns instantiation";
168 description "Name of this key pair";
173 description "Key associated with this key pair";
179 augment "/rw-project:project" {
180 container ns-instance-config {
187 description "Identifier for the NSR.";
192 description "NSR name.";
197 description "NSR short name.";
202 description "NSR description.";
208 "This is the administrative status of the NS instance";
217 description "NS descriptor used to instantiate this NS";
219 uses nsd-base:nsd-descriptor-common;
221 uses project-nsd:nsr-nsd-vld;
223 uses project-nsd:nsr-nsd-constituent-vnfd;
225 uses project-nsd:nsr-nsd-placement-groups;
227 uses project-nsd:nsr-nsd-vnf-dependency;
229 uses project-nsd:nsr-nsd-monitoring-param;
231 uses project-nsd:nsr-nsd-service-primitive;
234 uses ns-instance-config-params;
239 grouping ns-instance-config-params-common {
240 uses manotypes:input-parameter;
243 description "List of ns scaling group instances";
244 key "scaling-group-name-ref";
246 leaf scaling-group-name-ref {
247 description "name of the scaling group
248 leafref path ../../nsd/scaling-group-descriptor/name";
253 description "The instance of the scaling group";
256 description "Scaling group instance uuid";
262 list nsd-placement-group-maps {
264 "Mapping from mano-placement groups construct from NSD to cloud
265 platform placement group construct";
267 key "placement-group-ref";
269 leaf placement-group-ref {
270 description "Reference for NSD placement group
271 leafref path ../../nsd/placement-groups/name";
274 uses manotypes:placement-group-input;
278 grouping ns-instance-config-params {
279 uses ns-instance-config-params-common;
281 list vnfd-placement-group-maps {
283 "Mapping from mano-placement groups construct from VNFD to cloud
284 platform placement group construct";
286 key "placement-group-ref vnfd-id-ref";
290 "A reference to a vnfd. This is a
292 ../../../../project-nsd:constituent-vnfd
293 + [id = current()/../id-ref]
294 + /project-nsd:vnfd-id-ref
295 NOTE: An issue with confd is preventing the
296 use of xpath. Seems to be an issue with leafref
297 to leafref, whose target is in a different module.
298 Once that is resolved this will switched to use
303 leaf placement-group-ref {
305 "A reference to VNFD placement group";
307 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
308 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
312 uses manotypes:placement-group-input;
324 description "Identifier for the VNFFGR.";
329 description "VNFFG descriptor id reference";
332 path "../../../../ns-instance-config/nsr"
333 // + "[id=current()/../../ns-instance-config-ref]"
338 leaf vnffgd-name-ref {
339 description "VNFFG descriptor name reference";
342 path "../../../../ns-instance-config/nsr"
343 // + "[id=current()/../../ns-instance-config-ref]"
345 // + "[id=current()/../vnffgd-id-ref]"
352 "The SDN account to use when requesting resources for
355 path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
359 leaf operational-status {
361 "The operational status of the VNFFGR instance
362 init : The VNFFGR has just started.
363 running : The VNFFGR is in running state.
364 terminate : The VNFFGR is being terminated.
365 terminated : The VNFFGR is in the terminated state.
366 failed : The VNFFGR instantiation failed
370 rwpb:enum-type "VnffgrOperationalStatus";
384 "Identifier for the RSP.";
394 leaf vnffgd-rsp-id-ref {
396 "Identifier for the VNFFG Descriptor RSP reference";
399 path "../../../../../ns-instance-config/nsr"
400 // + "[id=current()/../../../ns-instance-config-ref]"
402 // + "[id=current()/../../vnffgd-id-ref]"
407 leaf vnffgd-rsp-name-ref {
409 "Name for the VNFFG Descriptor RSP reference";
412 path "../../../../../ns-instance-config/nsr"
413 // + "[id=current()/../../../ns-instance-config-ref]"
415 // + "[id=current()/../../vnffgd-id-ref]"
417 // + "[id=current()/../vnffgd-rsp-id-ref]"
422 leaf classifier-name {
428 "Unique Identifier for the service path";
432 list vnfr-connection-point-ref {
436 "Monotonically increasing number to show service path hop
440 leaf service-function-type {
442 "Type of Service Function.
443 NOTE: This needs to map with Service Function Type in ODL to
444 support VNFFG. Service Function Type is mandatory param in ODL
445 SFC. This is temporarily set to string for ease of use";
449 leaf member-vnf-index-ref {
454 "Reference to VNF Descriptor Id";
459 "A reference to a vnfr id";
461 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
466 "A reference to a vnfr name";
468 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
471 leaf vnfr-connection-point-ref {
473 "A reference to a vnfr connection point.";
475 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
476 + "[vnfr:id = current()/../vnfr-id-ref]"
477 + "/vnfr:connection-point/vnfr:name";
482 "Location within the service path";
485 container connection-point-params {
487 type inet:ip-address;
493 rwpb:field-inline "true";
494 rwpb:field-string-max 64;
498 rwpb:field-inline "true";
499 rwpb:field-string-max 64;
503 type inet:ip-address;
506 type inet:port-number;
510 container service-function-forwarder {
513 "Service Function Forwarder name";
518 "Data Plane IP Address of the SFF";
519 type inet:ip-address;
523 "Data Plane Port of the SFF";
524 type inet:port-number;
535 "Identifier for the classifier rule.";
540 "Name of the classifier.";
545 "A reference to the RSP.";
557 "A reference to a vnfr id";
559 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
564 "A reference to a vnfr name";
566 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
569 leaf vnfr-connection-point-ref {
571 "A reference to a vnfr connection point.";
573 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
574 + "[vnfr:id = current()/../vnfr-id-ref]"
575 + "/vnfr:connection-point/vnfr:name";
579 rwpb:field-inline "true";
580 rwpb:field-string-max 64;
584 rwpb:field-inline "true";
585 rwpb:field-string-max 64;
598 augment "/rw-project:project" {
599 container ns-instance-opdata {
603 key "ns-instance-config-ref";
605 leaf ns-instance-config-ref {
607 path "../../../ns-instance-config/nsr/id";
613 description "Network service name reference";
616 path "../../../ns-instance-config/nsr" +
617 // "[id=current()/../ns-instance-config-ref]" +
623 description "Network service descriptor id reference";
626 path "../../../ns-instance-config/nsr"
627 // + "[id=current()/../ns-instance-config-ref]"
633 description "Network service descriptor name reference";
636 path "../../../ns-instance-config/nsr"
637 // + "[id=current()/../ns-instance-config-ref]"
644 "Creation timestamp of this Network Service.
645 The timestamp is expressed as seconds
646 since unix epoch - 1970-01-01T00:00:00Z";
653 "Active period of this Network Service.
654 Uptime is expressed in seconds";
659 list connection-point {
661 "List for external connection points.
662 Each NS has one or more external connection points.
663 As the name implies that external connection points
664 are used for connecting the NS to other NS or to
665 external networks. Each NS exposes these connection
666 points to the orchestrator. The orchestrator can
667 construct network service chains by connecting the
668 connection points between different NS.";
673 "Name of the NS connection point.";
679 "Type of the connection point.";
680 type manotypes:connection-point-type;
688 "Reference to a VLR record in the VLR catalog";
690 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
695 list vnfr-connection-point-ref {
697 "A list of references to connection points.";
701 description "A reference to a vnfr";
703 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
707 leaf connection-point {
709 "A reference to a connection point name in a vnfr";
711 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
712 + "[vnfr:id = current()/../vnfr-id]"
713 + "/vnfr:connection-point/vnfr:name";
719 list constituent-vnfr-ref {
721 "List of VNFRs that are part of this
727 "Reference to the VNFR id
728 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
729 But due to confd bug (RIFT-9451), changing to string.";
734 list scaling-group-record {
735 description "List of scaling group records";
736 key "scaling-group-name-ref";
738 leaf scaling-group-name-ref {
739 description "name of the scaling group";
742 path "../../../../ns-instance-config/nsr"
743 // + "[id=current()/../../ns-instance-config-ref]"
744 + "/nsd/scaling-group-descriptor/name";
749 description "Reference to scaling group instance record";
752 description "Scaling group instance id";
757 description "Flag indicating whether this instance was part of
758 default scaling group (and thus undeletable)";
764 "The operational status of the NS instance
765 init : The scaling group has just started.
766 vnf-init-phase : The VNFs in the scaling group are being instantiated.
767 running : The scaling group is in running state.
768 terminate : The scaling group is being terminated.
769 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
770 terminated : The scaling group is in the terminated state.
771 failed : The scaling group instantiation failed.
779 enum vnf-terminate-phase;
787 "The configuration status of the scaling group instance
788 configuring : At least one of the VNFs in this scaling group instance
789 is in configuring state
790 configured : All the VNFs in this scaling group instance are
791 configured or config-not-needed state
792 failed : Configuring this scaling group instance failed
799 "Reason for failure in configuration of this scaling instance";
805 "Creation timestamp of this scaling group record.
806 The timestamp is expressed as seconds
807 since unix epoch - 1970-01-01T00:00:00Z";
813 description "Reference to VNFR within the scale instance";
815 path "../../../constituent-vnfr-ref/vnfr-id";
823 leaf operational-status {
825 "The operational status of the NS instance
826 init : The network service has just started.
827 vl-init-phase : The VLs in the NS are being instantiated.
828 vnf-init-phase : The VNFs in the NS are being instantiated.
829 running : The NS is in running state.
830 terminate : The NS is being terminated.
831 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
832 vl-terminate-phase : The NS is terminating the VLs in the NS.
833 terminated : The NS is in the terminated state.
834 failed : The NS instantiation failed.
835 scaling-out : The NS is scaling out
836 scaling-in : The NS is scaling in
837 vl-instantiate : The NS is initiating a new VL
838 vl-terminate : The NS is terminating a VL
847 enum vnf-terminate-phase;
848 enum vl-terminate-phase;
860 "The configuration status of the NS instance
861 configuring: At least one of the VNFs in this instance is in configuring state
862 configured: All the VNFs in this NS instance are configured or config-not-needed state
867 list service-primitive {
869 "Network service level service primitives.";
875 "Name of the service primitive.";
881 "List of parameters for the service primitive.";
884 uses manotypes:primitive-parameter;
887 uses manotypes:ui-primitive-group;
889 list vnf-primitive-group {
891 "Reference to member-vnf within constituent-vnfds";
893 key "member-vnf-index-ref";
894 leaf member-vnf-index-ref {
896 "Reference to member-vnf within constituent-vnfds";
902 "A reference to a vnfd. This is a
904 ../../../../nsd:constituent-vnfd
905 + [nsd:id = current()/../nsd:id-ref]
907 NOTE: An issue with confd is preventing the
908 use of xpath. Seems to be an issue with leafref
909 to leafref, whose target is in a different module.
910 Once that is resovled this will switched to use
926 description "Index of this primitive";
931 description "Name of the primitive in the VNF primitive ";
937 leaf user-defined-script {
939 "A user defined script.";
944 list initial-config-primitive {
945 rwpb:msg-new NsrInitialConfigPrimitive;
947 "Initial set of configuration primitives for NSD.";
951 "Sequence number for the configuration primitive.";
957 "Name of the configuration primitive.";
962 leaf user-defined-script {
964 "A user defined script.";
981 list monitoring-param {
983 "List of NS level params.";
986 uses manotypes:monitoring-param-value;
987 uses manotypes:monitoring-param-ui-data;
988 uses manotypes:monitoring-param-aggregation;
998 leaf nsd-mon-param-ref {
999 description "Reference to the NSD monitoring param descriptor
1000 that produced this result";
1001 // TODO: Fix leafref
1003 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1004 "[project-nsd:id = current()/../../nsd-ref]" +
1005 "/project-nsd:monitoring-param/project-nsd:id";
1009 list vnfr-mon-param-ref {
1010 description "A list of VNFR monitoring params associated with this monp";
1011 key "vnfr-id-ref vnfr-mon-param-ref";
1015 "A reference to a vnfr. This is a
1017 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1022 leaf vnfr-mon-param-ref {
1023 description "A reference to the VNFR monitoring param";
1025 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1026 + "[vnfr:id = current()/../vnfr-id-ref]"
1027 + "/vnfr:monitoring-param/vnfr:id";
1033 list config-agent-job {
1037 description "config agent job Identifier for the NS.";
1042 description "Config agent job name";
1048 "Job status to be set based on each VNF primitive execution,
1049 pending - if at least one VNF is in pending state
1050 and remaining VNFs are in success state.
1051 Success - if all VNF executions are in success state
1052 failure - if one of the VNF executions is failure";
1061 description "The primitive is triggered from NS or VNF level";
1067 "Creation timestamp of this Config Agent Job.
1068 The timestamp is expressed as seconds
1069 since unix epoch - 1970-01-01T00:00:00Z";
1074 leaf job-status-details {
1075 description "Config agent job status details, in case of errors";
1079 uses manotypes:primitive-parameter-value;
1081 list parameter-group {
1083 "List of NS Primitive parameter groups";
1087 "Name of the parameter.";
1091 uses manotypes:primitive-parameter-value;
1097 description "Identifier for the VNFR.";
1100 leaf vnf-job-status {
1102 "Job status to be set based on each VNF primitive execution,
1103 pending - if at least one primitive is in pending state
1104 and remaining primitives are in success state.
1105 Success - if all primitive executions are in success state
1106 failure - if one of the primitive executions is failure";
1117 description "the name of the primitive";
1121 uses manotypes:primitive-parameter-value;
1124 description "Execution id of the primitive";
1127 leaf execution-status {
1128 description "status of the Execution";
1135 leaf execution-error-details {
1136 description "Error details if execution-status is failure";
1146 grouping rpc-common {
1147 uses manotypes:rpc-project-name;
1150 description "Reference to NSR ID ref";
1152 path "/rw-project:project[rw-project:name=current()/.." +
1153 "/project-name]/ns-instance-config/nsr/id";
1158 rpc get-ns-service-primitive-values {
1159 description "Get the service primitive parameter values";
1163 description "Name of the NS service primitive group";
1173 description "Automatically generated parameter";
1177 description "Parameter name which should be pulled from a parameter pool";
1181 description "Automatically generated value";
1186 list ns-parameter-group {
1187 description "Automatically generated parameters in parameter group";
1190 description "Parameter group name";
1194 description "Automatically generated group parameter";
1198 description "Parameter name which should be pulled from a parameter pool";
1202 description "Automatically generated value";
1208 list vnf-primitive-group {
1210 "List of service primitives grouped by VNF.";
1212 key "member-vnf-index-ref";
1213 leaf member-vnf-index-ref {
1215 "Reference to member-vnf within constituent-vnfds";
1221 "A reference to a vnfd. This is a
1223 ../../../../project-nsd:constituent-vnfd
1224 + [project-nsd:id = current()/../project-nsd:id-ref]
1225 + /project-nsd:vnfd-id-ref
1226 NOTE: An issue with confd is preventing the
1227 use of xpath. Seems to be an issue with leafref
1228 to leafref, whose target is in a different module.
1229 Once that is resolved this will switched to use
1238 description "Index of this primitive";
1243 description "Name of the primitive associated with a value pool";
1248 description "Automatically generated parameter";
1252 description "Parameter name which should be pulled from a parameter pool";
1256 description "Automatically generated value";
1265 rpc exec-ns-service-primitive {
1266 description "Executes a NS service primitive or script";
1270 description "Name of the primitive";
1277 description "The primitive is triggered from NS or VNF level";
1279 default ns-primitive;
1282 uses manotypes:primitive-parameter-value;
1284 list parameter-group {
1286 "List of NS Primitive parameter groups";
1290 "Name of the parameter.";
1294 uses manotypes:primitive-parameter-value;
1299 "List of VNFs whose primitives are being set.";
1300 key "member_vnf_index_ref";
1302 leaf member_vnf_index_ref {
1303 description "Member VNF index";
1309 "A reference to a vnfr. This is a
1314 list vnf-primitive {
1316 "List of service primitives supported by the
1317 configuration agent for this VNF.";
1322 "index of the service primitive.";
1327 "Name of the service primitive.";
1331 uses manotypes:primitive-parameter-value;
1334 leaf user-defined-script {
1336 "A user defined script.";
1342 description "Job identifier for this RPC";
1347 description "Name of the service primitive";
1354 description "The primitive is triggered from NS or VNF level";
1360 "Creation timestamp of this config agent JOB.
1361 The timestamp is expressed as seconds
1362 since unix epoch - 1970-01-01T00:00:00Z";
1367 leaf job-status-details {
1368 description "Job status details, in case of any errors";
1372 uses manotypes:primitive-parameter-value;
1374 list parameter-group {
1376 "List of NS Primitive parameter groups";
1380 "Name of the parameter.";
1384 uses manotypes:primitive-parameter-value;
1389 "List of VNFs whose primitives were set.";
1390 key "member_vnf_index_ref";
1392 leaf member_vnf_index_ref {
1393 description "Member VNF index";
1398 "A reference to a vnfr. This is a
1403 list vnf-out-primitive {
1405 "List of service primitives supported by the
1406 configuration agent for this VNF.";
1411 "index of the service primitive.";
1417 "Name of the service primitive.";
1421 uses manotypes:primitive-parameter-value;
1424 description "Execution id of this primitive";
1428 leaf execution-status {
1429 description "Status of the execution of this primitive";
1433 leaf execution-error-details {
1434 description "Error details if execution-status is failed";
1443 description "Executes scale out request";
1448 leaf scaling-group-name-ref {
1449 description "name of the scaling group";
1454 description "id of the scaling group";
1462 description "id of the scaling group";
1468 rpc exec-scale-out {
1469 description "Executes scale out request";
1474 leaf scaling-group-name-ref {
1475 description "name of the scaling group";
1480 description "id of the scaling group";
1487 description "id of the scaling group";
1493 rpc start-network-service {
1494 description "Start the network service";
1498 description "Name of the Network Service";
1504 uses ns-instance-config-params-common;
1506 list vnfd-placement-group-maps {
1508 "Mapping from mano-placement groups construct from VNFD to cloud
1509 platform placement group construct";
1511 key "placement-group-ref vnfd-id-ref";
1515 "A reference to a vnfd. This is a
1517 ../../../../project-nsd:constituent-vnfd
1518 + [id = current()/../project-nsd:id-ref]
1519 + /project-nsd:vnfd-id-ref
1520 NOTE: An issue with confd is preventing the
1521 use of xpath. Seems to be an issue with leafref
1522 to leafref, whose target is in a different module.
1523 Once that is resovled this will switched to use
1528 leaf placement-group-ref {
1530 "A reference to VNFD placement group";
1532 path "/rw-project:project[rw-project:name=current()/" +
1533 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1534 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1538 uses manotypes:placement-group-input;
1540 list ssh-authorized-key {
1543 description "List of authorized ssh keys as part of cloud-config";
1546 description "A reference to the key pair entry in the global key pair table";
1548 path "/rw-project:project[rw-project:name=current()/../../../" +
1549 "project-name]/key-pair/name";
1557 description "List of users to be added through cloud-config";
1559 description "Name of the user ";
1563 description "The user name's real name";
1566 list ssh-authorized-key {
1569 description "Used to configure the list of public keys to be injected as part
1570 of ns instantiation";
1573 description "A reference to the key pair entry in the global key pair table";
1575 path "/rw-project:project[rw-project:name=current()/" +
1576 "../../../../project-name]/key-pair/name";
1586 description "Automatically generated parameter";