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";
39 prefix "project-vnfd";
46 import ietf-inet-types {
50 import ietf-yang-types {
64 "Update model to support projects.";
69 "Initial revision. This YANG file defines
70 the Network Service Record (NSR)";
72 "Derived from earlier versions of base YANG files";
75 typedef vnffgr-operational-status {
85 typedef ns-operational-status {
92 enum vnf-terminate-phase;
93 enum vl-terminate-phase;
103 typedef config-states {
107 enum config_not_needed;
114 typedef trigger-type {
121 grouping cloud-config {
122 description "List of cloud config parameters";
124 list ssh-authorized-key {
127 description "List of authorized ssh keys as part of cloud-config";
130 description "A reference to the key pair entry in the global key pair table";
132 path "../../../../key-pair/name";
138 description "Used to configure the list of public keys to be injected as part
139 of ns instantiation";
141 description "Name of this key pair";
145 description "The user name's real name";
148 list ssh-authorized-key {
151 description "Used to configure the list of public keys to be injected as part
152 of ns instantiation";
155 description "A reference to the key pair entry in the global key pair table";
157 path "../../../../../key-pair/name";
164 augment "/rw-project:project" {
167 description "Used to configure the list of public keys to be injected as part
168 of ns instantiation";
170 description "Name of this key pair";
175 description "Key associated with this key pair";
181 grouping event-service-primitive {
184 "Sequence number for the service primitive.";
190 "Name of the service primitive.";
195 leaf user-defined-script {
197 "A user defined script.";
213 augment "/rw-project:project" {
214 container ns-instance-config {
221 description "Identifier for the NSR.";
226 description "NSR name.";
231 description "NSR short name.";
236 description "NSR description.";
242 "This is the administrative status of the NS instance";
251 description "NS descriptor used to instantiate this NS";
253 uses nsd-base:nsd-descriptor-common;
255 uses project-nsd:nsr-nsd-vld;
257 uses project-nsd:nsr-nsd-constituent-vnfd;
259 uses project-nsd:nsr-nsd-placement-groups;
261 uses project-nsd:nsr-nsd-vnf-dependency;
263 uses project-nsd:nsr-nsd-monitoring-param;
265 uses project-nsd:nsr-nsd-service-primitive;
267 uses ns-instance-config-params;
272 grouping ns-instance-config-params-common {
273 uses manotypes:input-parameter;
276 description "List of ns scaling group instances";
277 key "scaling-group-name-ref";
279 leaf scaling-group-name-ref {
280 description "name of the scaling group
281 leafref path ../nsd/scaling-group-descriptor/name";
286 description "The instance of the scaling group";
289 description "Scaling group instance uuid";
295 list nsd-placement-group-maps {
297 "Mapping from mano-placement groups construct from NSD to cloud
298 platform placement group construct";
300 key "placement-group-ref";
302 leaf placement-group-ref {
304 "Reference for NSD placement group";
306 // path "../../nsd/placement-groups/name";
310 uses manotypes:placement-group-input;
314 grouping ns-instance-config-params {
315 uses ns-instance-config-params-common;
317 list vnfd-placement-group-maps {
319 "Mapping from mano-placement groups construct from VNFD to cloud
320 platform placement group construct";
322 key "placement-group-ref vnfd-id-ref";
326 "A reference to a vnfd. This is a
328 ../../../../project-nsd:constituent-vnfd
329 + [id = current()/../id-ref]
330 + /project-nsd:vnfd-id-ref
331 NOTE: An issue with confd is preventing the
332 use of xpath. Seems to be an issue with leafref
333 to leafref, whose target is in a different module.
334 Once that is resolved this will switched to use
339 leaf placement-group-ref {
341 "A reference to VNFD placement group";
343 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
344 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
348 uses manotypes:placement-group-input;
360 description "Identifier for the VNFFGR.";
365 description "VNFFG descriptor id reference";
367 path "../../../../ns-instance-config/nsr"
368 + "[id=current()/../../ns-instance-config-ref]"
373 leaf vnffgd-name-ref {
374 description "VNFFG descriptor name reference";
376 path "../../../../ns-instance-config/nsr"
377 + "[id=current()/../../ns-instance-config-ref]"
379 + "[id=current()/../vnffgd-id-ref]"
386 "The SDN account to use when requesting resources for
392 description "Cloud Account in which NSR is instantiated";
396 leaf operational-status {
398 "The operational status of the VNFFGR instance
399 init : The VNFFGR has just started.
400 running : The VNFFGR is in running state.
401 terminate : The VNFFGR is being terminated.
402 terminated : The VNFFGR is in the terminated state.
403 failed : The VNFFGR instantiation failed
405 type vnffgr-operational-status;
413 "Identifier for the RSP.";
425 "Returned Identifier for the RSP.";
429 leaf vnffgd-rsp-id-ref {
431 "Identifier for the VNFFG Descriptor RSP reference";
433 path "../../../../../ns-instance-config/nsr"
434 + "[id=current()/../../../ns-instance-config-ref]"
436 + "[id=current()/../../vnffgd-id-ref]"
441 leaf vnffgd-rsp-name-ref {
443 "Name for the VNFFG Descriptor RSP reference";
445 path "../../../../../ns-instance-config/nsr"
446 + "[id=current()/../../../ns-instance-config-ref]"
448 + "[id=current()/../../vnffgd-id-ref]"
450 + "[id=current()/../vnffgd-rsp-id-ref]"
455 leaf classifier-name {
461 "Unique Identifier for the service path";
465 list vnfr-connection-point-ref {
469 "Monotonically increasing number to show service path hop
473 leaf service-function-type {
475 "Type of Service Function.
476 NOTE: This needs to map with Service Function Type in ODL to
477 support VNFFG. Service Function Type is mandatory param in ODL
478 SFC. This is temporarily set to string for ease of use";
482 leaf member-vnf-index-ref {
487 "Reference to VNF Descriptor Id";
492 "A reference to a vnfr id";
494 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
499 "A reference to a vnfr name";
501 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
504 leaf vnfr-connection-point-ref {
506 "A reference to a vnfr connection point.";
508 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
509 + "[vnfr:id = current()/../vnfr-id-ref]"
510 + "/vnfr:connection-point/vnfr:name";
515 "Location within the service path";
518 container connection-point-params {
520 type inet:ip-address;
532 type inet:ip-address;
535 type inet:port-number;
539 container service-function-forwarder {
542 "Service Function Forwarder name";
547 "Data Plane IP Address of the SFF";
548 type inet:ip-address;
552 "Data Plane Port of the SFF";
553 type inet:port-number;
564 "Identifier for the classifier rule.";
569 "Name of the classifier.";
572 leaf-list classifier-id {
574 "Returned Identifier for the classifier rule.";
579 "A reference to the RSP.";
591 "A reference to a vnfr id";
593 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
598 "A reference to a vnfr name";
600 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
603 leaf vnfr-connection-point-ref {
605 "A reference to a vnfr connection point.";
607 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
608 + "[vnfr:id = current()/../vnfr-id-ref]"
609 + "/vnfr:connection-point/vnfr:name";
628 augment "/rw-project:project" {
629 container ns-instance-opdata {
633 key "ns-instance-config-ref";
635 leaf ns-instance-config-ref {
637 path "../../../ns-instance-config/nsr/id";
643 description "Network service name reference";
645 path "../../../ns-instance-config/nsr" +
646 "[id=current()/../ns-instance-config-ref]" +
652 description "Network service descriptor id reference";
654 path "../../../ns-instance-config/nsr"
655 + "[id=current()/../ns-instance-config-ref]"
661 description "Network service descriptor name reference";
663 path "../../../ns-instance-config/nsr"
664 + "[id=current()/../ns-instance-config-ref]"
671 "Creation timestamp of this Network Service.
672 The timestamp is expressed as seconds
673 since unix epoch - 1970-01-01T00:00:00Z";
680 "Active period of this Network Service.
681 Uptime is expressed in seconds";
686 list connection-point {
688 "List for external connection points.
689 Each NS has one or more external connection points.
690 As the name implies that external connection points
691 are used for connecting the NS to other NS or to
692 external networks. Each NS exposes these connection
693 points to the orchestrator. The orchestrator can
694 construct network service chains by connecting the
695 connection points between different NS.";
700 "Name of the NS connection point.";
706 "Type of the connection point.";
707 type manotypes:connection-point-type;
715 "Reference to a VLR record in the VLR catalog";
717 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
722 list vnfr-connection-point-ref {
724 "A list of references to connection points.";
728 description "A reference to a vnfr";
730 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
734 leaf connection-point {
736 "A reference to a connection point name in a vnfr";
738 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
739 + "[vnfr:id = current()/../vnfr-id]"
740 + "/vnfr:connection-point/vnfr:name";
746 list constituent-vnfr-ref {
748 "List of VNFRs that are part of this
754 "Reference to the VNFR id
755 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
756 But due to confd bug (RIFT-9451), changing to string.";
761 list scaling-group-record {
762 description "List of scaling group records";
763 key "scaling-group-name-ref";
765 leaf scaling-group-name-ref {
766 description "name of the scaling group";
768 path "../../../../ns-instance-config/nsr"
769 + "[id=current()/../../ns-instance-config-ref]"
770 + "/nsd/scaling-group-descriptor/name";
775 description "Reference to scaling group instance record";
778 description "Scaling group instance id";
783 description "Flag indicating whether this instance was part of
784 default scaling group (and thus undeletable)";
790 "The operational status of the NS instance
791 init : The scaling group has just started.
792 vnf-init-phase : The VNFs in the scaling group are being instantiated.
793 running : The scaling group is in running state.
794 terminate : The scaling group is being terminated.
795 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
796 terminated : The scaling group is in the terminated state.
797 failed : The scaling group instantiation failed.
805 enum vnf-terminate-phase;
813 "The configuration status of the scaling group instance
814 configuring : At least one of the VNFs in this scaling group instance
815 is in configuring state
816 configured : All the VNFs in this scaling group instance are
817 configured or config-not-needed state
818 failed : Configuring this scaling group instance failed
825 "Reason for failure in configuration of this scaling instance";
831 "Creation timestamp of this scaling group record.
832 The timestamp is expressed as seconds
833 since unix epoch - 1970-01-01T00:00:00Z";
839 description "Reference to VNFR within the scale instance";
841 path "../../../constituent-vnfr-ref/vnfr-id";
849 leaf operational-status {
851 "The operational status of the NS instance
852 init : The network service has just started.
853 vl-init-phase : The VLs in the NS are being instantiated.
854 vnf-init-phase : The VNFs in the NS are being instantiated.
855 running : The NS is in running state.
856 terminate : The NS is being terminated.
857 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
858 vl-terminate-phase : The NS is terminating the VLs in the NS.
859 terminated : The NS is in the terminated state.
860 failed : The NS instantiation failed.
861 scaling-out : The NS is scaling out
862 scaling-in : The NS is scaling in
863 vl-instantiate : The NS is initiating a new VL
864 vl-terminate : The NS is terminating a VL
867 type ns-operational-status;
872 "The configuration status of the NS instance
873 configuring: At least one of the VNFs in this instance is in configuring state
874 configured: All the VNFs in this NS instance are configured or config-not-needed state
879 list service-primitive {
881 "Network service level service primitives.";
887 "Name of the service primitive.";
893 "List of parameters for the service primitive.";
896 uses manotypes:primitive-parameter;
899 uses manotypes:ui-primitive-group;
901 list vnf-primitive-group {
903 "Reference to member-vnf within constituent-vnfds";
905 key "member-vnf-index-ref";
906 leaf member-vnf-index-ref {
908 "Reference to member-vnf within constituent-vnfds";
914 "A reference to a vnfd. This is a
916 ../../../../nsd:constituent-vnfd
917 + [nsd:id = current()/../nsd:id-ref]
919 NOTE: An issue with confd is preventing the
920 use of xpath. Seems to be an issue with leafref
921 to leafref, whose target is in a different module.
922 Once that is resovled this will switched to use
938 description "Index of this primitive";
943 description "Name of the primitive in the VNF primitive ";
949 leaf user-defined-script {
951 "A user defined script.";
956 list initial-service-primitive {
958 "Initial set of service primitives for NSD.";
961 uses event-service-primitive;
964 list terminate-service-primitive {
966 "Set of service primitives to
967 execute during termination of NSD.";
970 uses event-service-primitive;
973 list monitoring-param {
975 "List of NS level params.";
978 uses manotypes:monitoring-param-value;
979 uses manotypes:monitoring-param-ui-data;
980 uses manotypes:monitoring-param-aggregation;
990 leaf nsd-mon-param-ref {
991 description "Reference to the NSD monitoring param descriptor
992 that produced this result";
995 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
996 "[project-nsd:id = current()/../../nsd-ref]" +
997 "/project-nsd:monitoring-param/project-nsd:id";
1001 list vnfr-mon-param-ref {
1002 description "A list of VNFR monitoring params associated with this monp";
1003 key "vnfr-id-ref vnfr-mon-param-ref";
1007 "A reference to a vnfr. This is a
1009 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1014 leaf vnfr-mon-param-ref {
1015 description "A reference to the VNFR monitoring param";
1017 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1018 + "[vnfr:id = current()/../vnfr-id-ref]"
1019 + "/vnfr:monitoring-param/vnfr:id";
1025 list config-agent-job {
1029 description "config agent job Identifier for the NS.";
1034 description "Config agent job name";
1040 "Job status to be set based on each VNF primitive execution,
1041 pending - if at least one VNF is in pending state
1042 and remaining VNFs are in success state.
1043 Success - if all VNF executions are in success state
1044 failure - if one of the VNF executions is failure";
1053 description "The primitive is triggered from NS or VNF level";
1059 "Creation timestamp of this Config Agent Job.
1060 The timestamp is expressed as seconds
1061 since unix epoch - 1970-01-01T00:00:00Z";
1066 leaf job-status-details {
1067 description "Config agent job status details, in case of errors";
1071 uses manotypes:primitive-parameter-value;
1073 list parameter-group {
1075 "List of NS Primitive parameter groups";
1079 "Name of the parameter.";
1083 uses manotypes:primitive-parameter-value;
1089 description "Identifier for the VNFR.";
1092 leaf vnf-job-status {
1094 "Job status to be set based on each VNF primitive execution,
1095 pending - if at least one primitive is in pending state
1096 and remaining primitives are in success state.
1097 Success - if all primitive executions are in success state
1098 failure - if one of the primitive executions is failure";
1109 description "the name of the primitive";
1113 uses manotypes:primitive-parameter-value;
1116 description "Execution id of the primitive";
1119 leaf execution-status {
1120 description "status of the Execution";
1127 leaf execution-error-details {
1128 description "Error details if execution-status is failure";
1138 grouping rpc-common {
1139 uses manotypes:rpc-project-name;
1142 description "Reference to NSR ID ref";
1144 path "/rw-project:project[rw-project:name=current()/.." +
1145 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1151 rpc get-ns-service-primitive-values {
1152 description "Get the service primitive parameter values";
1156 description "Name of the NS service primitive group";
1166 description "Automatically generated parameter";
1170 description "Parameter name which should be pulled from a parameter pool";
1174 description "Automatically generated value";
1179 list ns-parameter-group {
1180 description "Automatically generated parameters in parameter group";
1183 description "Parameter group name";
1187 description "Automatically generated group parameter";
1191 description "Parameter name which should be pulled from a parameter pool";
1195 description "Automatically generated value";
1201 list vnf-primitive-group {
1203 "List of service primitives grouped by VNF.";
1205 key "member-vnf-index-ref";
1206 leaf member-vnf-index-ref {
1208 "Reference to member-vnf within constituent-vnfds";
1214 "A reference to a vnfd. This is a
1216 ../../../../project-nsd:constituent-vnfd
1217 + [project-nsd:id = current()/../project-nsd:id-ref]
1218 + /project-nsd:vnfd-id-ref
1219 NOTE: An issue with confd is preventing the
1220 use of xpath. Seems to be an issue with leafref
1221 to leafref, whose target is in a different module.
1222 Once that is resolved this will switched to use
1231 description "Index of this primitive";
1236 description "Name of the primitive associated with a value pool";
1241 description "Automatically generated parameter";
1245 description "Parameter name which should be pulled from a parameter pool";
1249 description "Automatically generated value";
1258 rpc exec-ns-service-primitive {
1259 description "Executes a NS service primitive or script";
1263 description "Name of the primitive";
1270 description "The primitive is triggered from NS or VNF level";
1272 default ns-primitive;
1275 uses manotypes:primitive-parameter-value;
1277 list parameter-group {
1279 "List of NS Primitive parameter groups";
1283 "Name of the parameter.";
1287 uses manotypes:primitive-parameter-value;
1292 "List of VNFs whose primitives are being set.";
1293 key "member_vnf_index_ref";
1295 leaf member_vnf_index_ref {
1296 description "Member VNF index";
1302 "A reference to a vnfr. This is a
1307 list vnf-primitive {
1309 "List of service primitives supported by the
1310 configuration agent for this VNF.";
1315 "index of the service primitive.";
1320 "Name of the service primitive.";
1324 uses manotypes:primitive-parameter-value;
1327 leaf user-defined-script {
1329 "A user defined script.";
1335 description "Job identifier for this RPC";
1340 description "Name of the service primitive";
1347 description "The primitive is triggered from NS or VNF level";
1353 "Creation timestamp of this config agent JOB.
1354 The timestamp is expressed as seconds
1355 since unix epoch - 1970-01-01T00:00:00Z";
1360 leaf job-status-details {
1361 description "Job status details, in case of any errors";
1365 uses manotypes:primitive-parameter-value;
1367 list parameter-group {
1369 "List of NS Primitive parameter groups";
1373 "Name of the parameter.";
1377 uses manotypes:primitive-parameter-value;
1382 "List of VNFs whose primitives were set.";
1383 key "member_vnf_index_ref";
1385 leaf member_vnf_index_ref {
1386 description "Member VNF index";
1391 "A reference to a vnfr. This is a
1396 list vnf-out-primitive {
1398 "List of service primitives supported by the
1399 configuration agent for this VNF.";
1404 "index of the service primitive.";
1410 "Name of the service primitive.";
1414 uses manotypes:primitive-parameter-value;
1417 description "Execution id of this primitive";
1421 leaf execution-status {
1422 description "Status of the execution of this primitive";
1426 leaf execution-error-details {
1427 description "Error details if execution-status is failed";
1436 description "Executes scale out request";
1441 leaf scaling-group-name-ref {
1442 description "name of the scaling group";
1444 path "/rw-project:project[rw-project:name=current()/.." +
1445 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1446 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1447 "/nsr:scaling-group-descriptor/nsr:name";
1453 description "id of the scaling group";
1455 path "/rw-project:project[rw-project:name=current()/.." +
1456 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1457 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1458 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1459 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1468 description "id of the scaling group";
1474 rpc exec-scale-out {
1475 description "Executes scale out request";
1480 leaf scaling-group-name-ref {
1481 description "name of the scaling group";
1483 path "/rw-project:project[rw-project:name=current()/.." +
1484 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1485 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1486 "/nsr:scaling-group-descriptor/nsr:name";
1492 description "id of the scaling group";
1499 description "id of the scaling group";
1505 rpc start-network-service {
1506 description "Start the network service";
1510 description "Name of the Network Service";
1514 uses manotypes:rpc-project-name;
1517 description "Reference to NSD ID ref";
1519 path "/rw-project:project[rw-project:name=current()/.." +
1520 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1523 uses ns-instance-config-params-common;
1525 list vnfd-placement-group-maps {
1527 "Mapping from mano-placement groups construct from VNFD to cloud
1528 platform placement group construct";
1530 key "placement-group-ref vnfd-id-ref";
1534 "A reference to a vnfd. This is a
1536 ../../../../project-nsd:constituent-vnfd
1537 + [id = current()/../project-nsd:id-ref]
1538 + /project-nsd:vnfd-id-ref
1539 NOTE: An issue with confd is preventing the
1540 use of xpath. Seems to be an issue with leafref
1541 to leafref, whose target is in a different module.
1542 Once that is resovled this will switched to use
1547 leaf placement-group-ref {
1549 "A reference to VNFD placement group";
1551 path "/rw-project:project[rw-project:name=current()/" +
1552 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1553 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1557 uses manotypes:placement-group-input;
1559 list ssh-authorized-key {
1562 description "List of authorized ssh keys as part of cloud-config";
1565 description "A reference to the key pair entry in the global key pair table";
1567 path "/rw-project:project[rw-project:name=current()/../../../" +
1568 "project-name]/key-pair/name";
1576 description "List of users to be added through cloud-config";
1578 description "Name of the user ";
1582 description "The user name's real name";
1585 list ssh-authorized-key {
1588 description "Used to configure the list of public keys to be injected as part
1589 of ns instantiation";
1592 description "A reference to the key pair entry in the global key pair table";
1594 path "/rw-project:project[rw-project:name=current()/" +
1595 "../../../../project-name]/key-pair/name";
1605 description "Automatically generated parameter";