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 {
220 leaf schema-version {
221 description "Schema version for the NSR. If unspecified, it assumes v3.0";
227 description "Identifier for the NSR.";
232 description "NSR name.";
237 description "NSR short name.";
242 description "NSR description.";
248 "This is the administrative status of the NS instance";
257 description "NS descriptor used to instantiate this NS";
259 uses nsd-base:nsd-descriptor-common;
261 uses project-nsd:nsr-nsd-vld;
263 uses project-nsd:nsr-nsd-constituent-vnfd;
265 uses project-nsd:nsr-nsd-placement-groups;
267 uses project-nsd:nsr-nsd-vnf-dependency;
269 uses project-nsd:nsr-nsd-monitoring-param;
271 uses project-nsd:nsr-nsd-service-primitive;
273 uses ns-instance-config-params;
278 grouping ns-instance-config-params-common {
279 uses manotypes:input-parameter;
282 description "List of ns scaling group instances";
283 key "scaling-group-name-ref";
285 leaf scaling-group-name-ref {
286 description "name of the scaling group
287 leafref path ../nsd/scaling-group-descriptor/name";
292 description "The instance of the scaling group";
295 description "Scaling group instance uuid";
301 list nsd-placement-group-maps {
303 "Mapping from mano-placement groups construct from NSD to cloud
304 platform placement group construct";
306 key "placement-group-ref";
308 leaf placement-group-ref {
310 "Reference for NSD placement group";
312 // path "../../nsd/placement-groups/name";
316 uses manotypes:placement-group-input;
320 grouping ns-instance-config-params {
321 uses ns-instance-config-params-common;
323 list vnfd-placement-group-maps {
325 "Mapping from mano-placement groups construct from VNFD to cloud
326 platform placement group construct";
328 key "placement-group-ref vnfd-id-ref";
332 "A reference to a vnfd. This is a
334 ../../../../project-nsd:constituent-vnfd
335 + [id = current()/../id-ref]
336 + /project-nsd:vnfd-id-ref
337 NOTE: An issue with confd is preventing the
338 use of xpath. Seems to be an issue with leafref
339 to leafref, whose target is in a different module.
340 Once that is resolved this will switched to use
345 leaf placement-group-ref {
347 "A reference to VNFD placement group";
349 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
350 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
354 uses manotypes:placement-group-input;
366 description "Identifier for the VNFFGR.";
371 description "VNFFG descriptor id reference";
373 path "../../../../ns-instance-config/nsr"
374 + "[id=current()/../../ns-instance-config-ref]"
379 leaf vnffgd-name-ref {
380 description "VNFFG descriptor name reference";
382 path "../../../../ns-instance-config/nsr"
383 + "[id=current()/../../ns-instance-config-ref]"
385 + "[id=current()/../vnffgd-id-ref]"
392 "The SDN account to use when requesting resources for
398 description "Cloud Account in which NSR is instantiated";
402 leaf operational-status {
404 "The operational status of the VNFFGR instance
405 init : The VNFFGR has just started.
406 running : The VNFFGR is in running state.
407 terminate : The VNFFGR is being terminated.
408 terminated : The VNFFGR is in the terminated state.
409 failed : The VNFFGR instantiation failed
411 type vnffgr-operational-status;
419 "Identifier for the RSP.";
431 "Returned Identifier for the RSP.";
435 leaf vnffgd-rsp-id-ref {
437 "Identifier for the VNFFG Descriptor RSP reference";
439 path "../../../../../ns-instance-config/nsr"
440 + "[id=current()/../../../ns-instance-config-ref]"
442 + "[id=current()/../../vnffgd-id-ref]"
447 leaf vnffgd-rsp-name-ref {
449 "Name for the VNFFG Descriptor RSP reference";
451 path "../../../../../ns-instance-config/nsr"
452 + "[id=current()/../../../ns-instance-config-ref]"
454 + "[id=current()/../../vnffgd-id-ref]"
456 + "[id=current()/../vnffgd-rsp-id-ref]"
461 leaf classifier-name {
467 "Unique Identifier for the service path";
471 list vnfr-connection-point-ref {
475 "Monotonically increasing number to show service path hop
479 leaf service-function-type {
481 "Type of Service Function.
482 NOTE: This needs to map with Service Function Type in ODL to
483 support VNFFG. Service Function Type is mandatory param in ODL
484 SFC. This is temporarily set to string for ease of use";
488 leaf member-vnf-index-ref {
493 "Reference to VNF Descriptor Id";
498 "A reference to a vnfr id";
500 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
505 "A reference to a vnfr name";
507 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
510 leaf vnfr-ingress-connection-point-ref {
512 "A reference to a vnfr connection point.";
514 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
515 + "[vnfr:id = current()/../vnfr-id-ref]"
516 + "/vnfr:connection-point/vnfr:name";
519 leaf vnfr-egress-connection-point-ref {
521 "A reference to a vnfr connection point.";
523 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
524 + "[vnfr:id = current()/../vnfr-id-ref]"
525 + "/vnfr:connection-point/vnfr:name";
530 "Location within the service path";
533 container connection-point-params {
535 type inet:ip-address;
547 type inet:ip-address;
550 type inet:port-number;
554 container service-function-forwarder {
557 "Service Function Forwarder name";
562 "Data Plane IP Address of the SFF";
563 type inet:ip-address;
567 "Data Plane Port of the SFF";
568 type inet:port-number;
579 "Identifier for the classifier rule.";
584 "Name of the classifier.";
587 leaf-list classifier-id {
589 "Returned Identifier for the classifier rule.";
594 "A reference to the RSP.";
606 "A reference to a vnfr id";
608 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
613 "A reference to a vnfr name";
615 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
618 leaf vnfr-connection-point-ref {
620 "A reference to a vnfr connection point.";
622 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
623 + "[vnfr:id = current()/../vnfr-id-ref]"
624 + "/vnfr:connection-point/vnfr:name";
643 augment "/rw-project:project" {
644 container ns-instance-opdata {
648 key "ns-instance-config-ref";
650 leaf ns-instance-config-ref {
652 path "../../../ns-instance-config/nsr/id";
658 description "Network service name reference";
660 path "../../../ns-instance-config/nsr" +
661 "[id=current()/../ns-instance-config-ref]" +
667 description "Network service descriptor id reference";
669 path "../../../ns-instance-config/nsr"
670 + "[id=current()/../ns-instance-config-ref]"
676 description "Network service descriptor name reference";
678 path "../../../ns-instance-config/nsr"
679 + "[id=current()/../ns-instance-config-ref]"
686 "Creation timestamp of this Network Service.
687 The timestamp is expressed as seconds
688 since unix epoch - 1970-01-01T00:00:00Z";
695 "Active period of this Network Service.
696 Uptime is expressed in seconds";
701 list connection-point {
703 "List for external connection points.
704 Each NS has one or more external connection points.
705 As the name implies that external connection points
706 are used for connecting the NS to other NS or to
707 external networks. Each NS exposes these connection
708 points to the orchestrator. The orchestrator can
709 construct network service chains by connecting the
710 connection points between different NS.";
715 "Name of the NS connection point.";
721 "Type of the connection point.";
722 type manotypes:connection-point-type;
730 "Reference to a VLR record in the VLR catalog";
732 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
737 list vnfr-connection-point-ref {
739 "A list of references to connection points.";
743 description "A reference to a vnfr";
745 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
749 leaf connection-point {
751 "A reference to a connection point name in a vnfr";
753 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
754 + "[vnfr:id = current()/../vnfr-id]"
755 + "/vnfr:connection-point/vnfr:name";
761 list constituent-vnfr-ref {
763 "List of VNFRs that are part of this
769 "Reference to the VNFR id
770 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
771 But due to confd bug (RIFT-9451), changing to string.";
776 list scaling-group-record {
777 description "List of scaling group records";
778 key "scaling-group-name-ref";
780 leaf scaling-group-name-ref {
781 description "name of the scaling group";
783 path "../../../../ns-instance-config/nsr"
784 + "[id=current()/../../ns-instance-config-ref]"
785 + "/nsd/scaling-group-descriptor/name";
790 description "Reference to scaling group instance record";
793 description "Scaling group instance id";
798 description "Flag indicating whether this instance was part of
799 default scaling group (and thus undeletable)";
805 "The operational status of the NS instance
806 init : The scaling group has just started.
807 vnf-init-phase : The VNFs in the scaling group are being instantiated.
808 running : The scaling group is in running state.
809 terminate : The scaling group is being terminated.
810 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
811 terminated : The scaling group is in the terminated state.
812 failed : The scaling group instantiation failed.
820 enum vnf-terminate-phase;
828 "The configuration status of the scaling group instance
829 configuring : At least one of the VNFs in this scaling group instance
830 is in configuring state
831 configured : All the VNFs in this scaling group instance are
832 configured or config-not-needed state
833 failed : Configuring this scaling group instance failed
840 "Reason for failure in configuration of this scaling instance";
846 "Creation timestamp of this scaling group record.
847 The timestamp is expressed as seconds
848 since unix epoch - 1970-01-01T00:00:00Z";
854 description "Reference to VNFR within the scale instance";
856 path "../../../constituent-vnfr-ref/vnfr-id";
864 leaf operational-status {
866 "The operational status of the NS instance
867 init : The network service has just started.
868 vl-init-phase : The VLs in the NS are being instantiated.
869 vnf-init-phase : The VNFs in the NS are being instantiated.
870 running : The NS is in running state.
871 terminate : The NS is being terminated.
872 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
873 vl-terminate-phase : The NS is terminating the VLs in the NS.
874 terminated : The NS is in the terminated state.
875 failed : The NS instantiation failed.
876 scaling-out : The NS is scaling out
877 scaling-in : The NS is scaling in
878 vl-instantiate : The NS is initiating a new VL
879 vl-terminate : The NS is terminating a VL
882 type ns-operational-status;
887 "The configuration status of the NS instance
888 configuring: At least one of the VNFs in this instance is in configuring state
889 configured: All the VNFs in this NS instance are configured or config-not-needed state
894 list service-primitive {
896 "Network service level service primitives.";
902 "Name of the service primitive.";
908 "List of parameters for the service primitive.";
911 uses manotypes:primitive-parameter;
914 uses manotypes:ui-primitive-group;
916 list vnf-primitive-group {
918 "Reference to member-vnf within constituent-vnfds";
920 key "member-vnf-index-ref";
921 leaf member-vnf-index-ref {
923 "Reference to member-vnf within constituent-vnfds";
929 "A reference to a vnfd. This is a
931 ../../../../nsd:constituent-vnfd
932 + [nsd:id = current()/../nsd:id-ref]
934 NOTE: An issue with confd is preventing the
935 use of xpath. Seems to be an issue with leafref
936 to leafref, whose target is in a different module.
937 Once that is resovled this will switched to use
953 description "Index of this primitive";
958 description "Name of the primitive in the VNF primitive ";
964 leaf user-defined-script {
966 "A user defined script.";
971 list initial-service-primitive {
973 "Initial set of service primitives for NSD.";
976 uses event-service-primitive;
979 list terminate-service-primitive {
981 "Set of service primitives to
982 execute during termination of NSD.";
985 uses event-service-primitive;
988 list monitoring-param {
990 "List of NS level params.";
993 uses manotypes:monitoring-param-value;
994 uses manotypes:monitoring-param-ui-data;
995 uses manotypes:monitoring-param-aggregation;
1005 leaf nsd-mon-param-ref {
1006 description "Reference to the NSD monitoring param descriptor
1007 that produced this result";
1008 // TODO: Fix leafref
1010 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1011 "[project-nsd:id = current()/../../nsd-ref]" +
1012 "/project-nsd:monitoring-param/project-nsd:id";
1016 list vnfr-mon-param-ref {
1017 description "A list of VNFR monitoring params associated with this monp";
1018 key "vnfr-id-ref vnfr-mon-param-ref";
1022 "A reference to a vnfr. This is a
1024 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1029 leaf vnfr-mon-param-ref {
1030 description "A reference to the VNFR monitoring param";
1032 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1033 + "[vnfr:id = current()/../vnfr-id-ref]"
1034 + "/vnfr:monitoring-param/vnfr:id";
1040 list config-agent-job {
1044 description "config agent job Identifier for the NS.";
1049 description "Config agent job name";
1055 "Job status to be set based on each VNF primitive execution,
1056 pending - if at least one VNF is in pending state
1057 and remaining VNFs are in success state.
1058 Success - if all VNF executions are in success state
1059 failure - if one of the VNF executions is failure";
1068 description "The primitive is triggered from NS or VNF level";
1074 "Creation timestamp of this Config Agent Job.
1075 The timestamp is expressed as seconds
1076 since unix epoch - 1970-01-01T00:00:00Z";
1081 leaf job-status-details {
1082 description "Config agent job status details, in case of errors";
1086 uses manotypes:primitive-parameter-value;
1088 list parameter-group {
1090 "List of NS Primitive parameter groups";
1094 "Name of the parameter.";
1098 uses manotypes:primitive-parameter-value;
1104 description "Identifier for the VNFR.";
1107 leaf vnf-job-status {
1109 "Job status to be set based on each VNF primitive execution,
1110 pending - if at least one primitive is in pending state
1111 and remaining primitives are in success state.
1112 Success - if all primitive executions are in success state
1113 failure - if one of the primitive executions is failure";
1124 description "the name of the primitive";
1128 uses manotypes:primitive-parameter-value;
1131 description "Execution id of the primitive";
1134 leaf execution-status {
1135 description "status of the Execution";
1142 leaf execution-error-details {
1143 description "Error details if execution-status is failure";
1153 grouping rpc-common {
1154 uses manotypes:rpc-project-name;
1157 description "Reference to NSR ID ref";
1159 path "/rw-project:project[rw-project:name=current()/.." +
1160 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1166 rpc get-ns-service-primitive-values {
1167 description "Get the service primitive parameter values";
1171 description "Name of the NS service primitive group";
1181 description "Automatically generated parameter";
1185 description "Parameter name which should be pulled from a parameter pool";
1189 description "Automatically generated value";
1194 list ns-parameter-group {
1195 description "Automatically generated parameters in parameter group";
1198 description "Parameter group name";
1202 description "Automatically generated group parameter";
1206 description "Parameter name which should be pulled from a parameter pool";
1210 description "Automatically generated value";
1216 list vnf-primitive-group {
1218 "List of service primitives grouped by VNF.";
1220 key "member-vnf-index-ref";
1221 leaf member-vnf-index-ref {
1223 "Reference to member-vnf within constituent-vnfds";
1229 "A reference to a vnfd. This is a
1231 ../../../../project-nsd:constituent-vnfd
1232 + [project-nsd:id = current()/../project-nsd:id-ref]
1233 + /project-nsd:vnfd-id-ref
1234 NOTE: An issue with confd is preventing the
1235 use of xpath. Seems to be an issue with leafref
1236 to leafref, whose target is in a different module.
1237 Once that is resolved this will switched to use
1246 description "Index of this primitive";
1251 description "Name of the primitive associated with a value pool";
1256 description "Automatically generated parameter";
1260 description "Parameter name which should be pulled from a parameter pool";
1264 description "Automatically generated value";
1273 rpc exec-ns-service-primitive {
1274 description "Executes a NS service primitive or script";
1278 description "Name of the primitive";
1285 description "The primitive is triggered from NS or VNF level";
1287 default ns-primitive;
1290 uses manotypes:primitive-parameter-value;
1292 list parameter-group {
1294 "List of NS Primitive parameter groups";
1298 "Name of the parameter.";
1302 uses manotypes:primitive-parameter-value;
1307 "List of VNFs whose primitives are being set.";
1308 key "member_vnf_index_ref";
1310 leaf member_vnf_index_ref {
1311 description "Member VNF index";
1317 "A reference to a vnfr. This is a
1322 list vnf-primitive {
1324 "List of service primitives supported by the
1325 configuration agent for this VNF.";
1330 "index of the service primitive.";
1335 "Name of the service primitive.";
1339 uses manotypes:primitive-parameter-value;
1342 leaf user-defined-script {
1344 "A user defined script.";
1350 description "Job identifier for this RPC";
1355 description "Name of the service primitive";
1362 description "The primitive is triggered from NS or VNF level";
1368 "Creation timestamp of this config agent JOB.
1369 The timestamp is expressed as seconds
1370 since unix epoch - 1970-01-01T00:00:00Z";
1375 leaf job-status-details {
1376 description "Job status details, in case of any errors";
1380 uses manotypes:primitive-parameter-value;
1382 list parameter-group {
1384 "List of NS Primitive parameter groups";
1388 "Name of the parameter.";
1392 uses manotypes:primitive-parameter-value;
1397 "List of VNFs whose primitives were set.";
1398 key "member_vnf_index_ref";
1400 leaf member_vnf_index_ref {
1401 description "Member VNF index";
1406 "A reference to a vnfr. This is a
1411 list vnf-out-primitive {
1413 "List of service primitives supported by the
1414 configuration agent for this VNF.";
1419 "index of the service primitive.";
1425 "Name of the service primitive.";
1429 uses manotypes:primitive-parameter-value;
1432 description "Execution id of this primitive";
1436 leaf execution-status {
1437 description "Status of the execution of this primitive";
1441 leaf execution-error-details {
1442 description "Error details if execution-status is failed";
1451 description "Executes scale out request";
1456 leaf scaling-group-name-ref {
1457 description "name of the scaling group";
1459 path "/rw-project:project[rw-project:name=current()/.." +
1460 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1461 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1462 "/nsr:scaling-group-descriptor/nsr:name";
1468 description "id of the scaling group";
1470 path "/rw-project:project[rw-project:name=current()/.." +
1471 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1472 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1473 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1474 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1483 description "id of the scaling group";
1489 rpc exec-scale-out {
1490 description "Executes scale out request";
1495 leaf scaling-group-name-ref {
1496 description "name of the scaling group";
1498 path "/rw-project:project[rw-project:name=current()/.." +
1499 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1500 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1501 "/nsr:scaling-group-descriptor/nsr:name";
1507 description "id of the scaling group";
1514 description "id of the scaling group";
1520 rpc start-network-service {
1521 description "Start the network service";
1525 description "Name of the Network Service";
1529 uses manotypes:rpc-project-name;
1532 description "Reference to NSD ID ref";
1534 path "/rw-project:project[rw-project:name=current()/.." +
1535 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1538 uses ns-instance-config-params-common;
1540 list vnfd-placement-group-maps {
1542 "Mapping from mano-placement groups construct from VNFD to cloud
1543 platform placement group construct";
1545 key "placement-group-ref vnfd-id-ref";
1549 "A reference to a vnfd. This is a
1551 ../../../../project-nsd:constituent-vnfd
1552 + [id = current()/../project-nsd:id-ref]
1553 + /project-nsd:vnfd-id-ref
1554 NOTE: An issue with confd is preventing the
1555 use of xpath. Seems to be an issue with leafref
1556 to leafref, whose target is in a different module.
1557 Once that is resovled this will switched to use
1562 leaf placement-group-ref {
1564 "A reference to VNFD placement group";
1566 path "/rw-project:project[rw-project:name=current()/" +
1567 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1568 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1572 uses manotypes:placement-group-input;
1574 list ssh-authorized-key {
1577 description "List of authorized ssh keys as part of cloud-config";
1580 description "A reference to the key pair entry in the global key pair table";
1582 path "/rw-project:project[rw-project:name=current()/../../../" +
1583 "project-name]/key-pair/name";
1591 description "List of users to be added through cloud-config";
1593 description "Name of the user ";
1597 description "The user name's real name";
1600 list ssh-authorized-key {
1603 description "Used to configure the list of public keys to be injected as part
1604 of ns instantiation";
1607 description "A reference to the key pair entry in the global key pair table";
1609 path "/rw-project:project[rw-project:name=current()/" +
1610 "../../../../project-name]/key-pair/name";
1620 description "Automatically generated parameter";