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";
43 prefix "project-vnfd";
50 import ietf-inet-types {
54 import ietf-yang-types {
72 "Update model to support projects.";
77 "Initial revision. This YANG file defines
78 the Network Service Record (NSR)";
80 "Derived from earlier versions of base YANG files";
83 typedef vnffgr-operational-status {
93 typedef ns-operational-status {
100 enum vnf-terminate-phase;
101 enum vl-terminate-phase;
111 typedef config-states {
115 enum config_not_needed;
122 typedef trigger-type {
129 grouping cloud-config {
130 description "List of cloud config parameters";
132 list ssh-authorized-key {
135 description "List of authorized ssh keys as part of cloud-config";
138 description "A reference to the key pair entry in the global key pair table";
140 path "../../../../key-pair/name";
146 description "Used to configure the list of public keys to be injected as part
147 of ns instantiation";
149 description "Name of this key pair";
153 description "The user name's real name";
156 list ssh-authorized-key {
159 description "Used to configure the list of public keys to be injected as part
160 of ns instantiation";
163 description "A reference to the key pair entry in the global key pair table";
165 path "../../../../../key-pair/name";
172 augment "/rw-project:project" {
175 description "Used to configure the list of public keys to be injected as part
176 of ns instantiation";
178 description "Name of this key pair";
183 description "Key associated with this key pair";
189 grouping event-service-primitive {
192 "Sequence number for the service primitive.";
198 "Name of the service primitive.";
203 leaf user-defined-script {
205 "A user defined script.";
221 augment "/rw-project:project" {
222 container ns-instance-config {
229 description "Identifier for the NSR.";
234 description "NSR name.";
239 description "NSR short name.";
244 description "NSR description.";
250 "This is the administrative status of the NS instance";
259 description "NS descriptor used to instantiate this NS";
261 uses nsd-base:nsd-descriptor-common;
263 uses project-nsd:nsr-nsd-vld;
265 uses project-nsd:nsr-nsd-constituent-vnfd;
267 uses project-nsd:nsr-nsd-placement-groups;
269 uses project-nsd:nsr-nsd-vnf-dependency;
271 uses project-nsd:nsr-nsd-monitoring-param;
273 uses project-nsd:nsr-nsd-service-primitive;
275 uses ns-instance-config-params;
280 grouping ns-instance-config-params-common {
281 uses manotypes:input-parameter;
284 description "List of ns scaling group instances";
285 key "scaling-group-name-ref";
287 leaf scaling-group-name-ref {
288 description "name of the scaling group
289 leafref path ../nsd/scaling-group-descriptor/name";
294 description "The instance of the scaling group";
297 description "Scaling group instance uuid";
303 list nsd-placement-group-maps {
305 "Mapping from mano-placement groups construct from NSD to cloud
306 platform placement group construct";
308 key "placement-group-ref";
310 leaf placement-group-ref {
312 "Reference for NSD placement group";
314 // path "../../nsd/placement-groups/name";
318 uses manotypes:placement-group-input;
322 grouping ns-instance-config-params {
323 uses ns-instance-config-params-common;
325 list vnfd-placement-group-maps {
327 "Mapping from mano-placement groups construct from VNFD to cloud
328 platform placement group construct";
330 key "placement-group-ref vnfd-id-ref";
334 "A reference to a vnfd. This is a
336 ../../../../project-nsd:constituent-vnfd
337 + [id = current()/../id-ref]
338 + /project-nsd:vnfd-id-ref
339 NOTE: An issue with confd is preventing the
340 use of xpath. Seems to be an issue with leafref
341 to leafref, whose target is in a different module.
342 Once that is resolved this will switched to use
347 leaf placement-group-ref {
349 "A reference to VNFD placement group";
351 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
352 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
356 uses manotypes:placement-group-input;
368 description "Identifier for the VNFFGR.";
373 description "VNFFG descriptor id reference";
375 path "../../../../ns-instance-config/nsr"
376 + "[id=current()/../../ns-instance-config-ref]"
381 leaf vnffgd-name-ref {
382 description "VNFFG descriptor name reference";
384 path "../../../../ns-instance-config/nsr"
385 + "[id=current()/../../ns-instance-config-ref]"
387 + "[id=current()/../vnffgd-id-ref]"
394 "The SDN account to use when requesting resources for
397 path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
402 description "Cloud Account in which NSR is instantiated";
406 leaf operational-status {
408 "The operational status of the VNFFGR instance
409 init : The VNFFGR has just started.
410 running : The VNFFGR is in running state.
411 terminate : The VNFFGR is being terminated.
412 terminated : The VNFFGR is in the terminated state.
413 failed : The VNFFGR instantiation failed
415 type vnffgr-operational-status;
423 "Identifier for the RSP.";
435 "Returned Identifier for the RSP.";
439 leaf vnffgd-rsp-id-ref {
441 "Identifier for the VNFFG Descriptor RSP reference";
443 path "../../../../../ns-instance-config/nsr"
444 + "[id=current()/../../../ns-instance-config-ref]"
446 + "[id=current()/../../vnffgd-id-ref]"
451 leaf vnffgd-rsp-name-ref {
453 "Name for the VNFFG Descriptor RSP reference";
455 path "../../../../../ns-instance-config/nsr"
456 + "[id=current()/../../../ns-instance-config-ref]"
458 + "[id=current()/../../vnffgd-id-ref]"
460 + "[id=current()/../vnffgd-rsp-id-ref]"
465 leaf classifier-name {
471 "Unique Identifier for the service path";
475 list vnfr-connection-point-ref {
479 "Monotonically increasing number to show service path hop
483 leaf service-function-type {
485 "Type of Service Function.
486 NOTE: This needs to map with Service Function Type in ODL to
487 support VNFFG. Service Function Type is mandatory param in ODL
488 SFC. This is temporarily set to string for ease of use";
492 leaf member-vnf-index-ref {
497 "Reference to VNF Descriptor Id";
502 "A reference to a vnfr id";
504 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
509 "A reference to a vnfr name";
511 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
514 leaf vnfr-connection-point-ref {
516 "A reference to a vnfr connection point.";
518 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
519 + "[vnfr:id = current()/../vnfr-id-ref]"
520 + "/vnfr:connection-point/vnfr:name";
525 "Location within the service path";
528 container connection-point-params {
530 type inet:ip-address;
542 type inet:ip-address;
545 type inet:port-number;
549 container service-function-forwarder {
552 "Service Function Forwarder name";
557 "Data Plane IP Address of the SFF";
558 type inet:ip-address;
562 "Data Plane Port of the SFF";
563 type inet:port-number;
574 "Identifier for the classifier rule.";
579 "Name of the classifier.";
582 leaf-list classifier-id {
584 "Returned Identifier for the classifier rule.";
589 "A reference to the RSP.";
601 "A reference to a vnfr id";
603 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
608 "A reference to a vnfr name";
610 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
613 leaf vnfr-connection-point-ref {
615 "A reference to a vnfr connection point.";
617 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
618 + "[vnfr:id = current()/../vnfr-id-ref]"
619 + "/vnfr:connection-point/vnfr:name";
638 augment "/rw-project:project" {
639 container ns-instance-opdata {
643 key "ns-instance-config-ref";
645 leaf ns-instance-config-ref {
647 path "../../../ns-instance-config/nsr/id";
653 description "Network service name reference";
655 path "../../../ns-instance-config/nsr" +
656 "[id=current()/../ns-instance-config-ref]" +
662 description "Network service descriptor id reference";
664 path "../../../ns-instance-config/nsr"
665 + "[id=current()/../ns-instance-config-ref]"
671 description "Network service descriptor name reference";
673 path "../../../ns-instance-config/nsr"
674 + "[id=current()/../ns-instance-config-ref]"
681 "Creation timestamp of this Network Service.
682 The timestamp is expressed as seconds
683 since unix epoch - 1970-01-01T00:00:00Z";
690 "Active period of this Network Service.
691 Uptime is expressed in seconds";
696 list connection-point {
698 "List for external connection points.
699 Each NS has one or more external connection points.
700 As the name implies that external connection points
701 are used for connecting the NS to other NS or to
702 external networks. Each NS exposes these connection
703 points to the orchestrator. The orchestrator can
704 construct network service chains by connecting the
705 connection points between different NS.";
710 "Name of the NS connection point.";
716 "Type of the connection point.";
717 type manotypes:connection-point-type;
725 "Reference to a VLR record in the VLR catalog";
727 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
732 list vnfr-connection-point-ref {
734 "A list of references to connection points.";
738 description "A reference to a vnfr";
740 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
744 leaf connection-point {
746 "A reference to a connection point name in a vnfr";
748 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
749 + "[vnfr:id = current()/../vnfr-id]"
750 + "/vnfr:connection-point/vnfr:name";
756 list constituent-vnfr-ref {
758 "List of VNFRs that are part of this
764 "Reference to the VNFR id
765 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
766 But due to confd bug (RIFT-9451), changing to string.";
771 list scaling-group-record {
772 description "List of scaling group records";
773 key "scaling-group-name-ref";
775 leaf scaling-group-name-ref {
776 description "name of the scaling group";
778 path "../../../../ns-instance-config/nsr"
779 + "[id=current()/../../ns-instance-config-ref]"
780 + "/nsd/scaling-group-descriptor/name";
785 description "Reference to scaling group instance record";
788 description "Scaling group instance id";
793 description "Flag indicating whether this instance was part of
794 default scaling group (and thus undeletable)";
800 "The operational status of the NS instance
801 init : The scaling group has just started.
802 vnf-init-phase : The VNFs in the scaling group are being instantiated.
803 running : The scaling group is in running state.
804 terminate : The scaling group is being terminated.
805 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
806 terminated : The scaling group is in the terminated state.
807 failed : The scaling group instantiation failed.
815 enum vnf-terminate-phase;
823 "The configuration status of the scaling group instance
824 configuring : At least one of the VNFs in this scaling group instance
825 is in configuring state
826 configured : All the VNFs in this scaling group instance are
827 configured or config-not-needed state
828 failed : Configuring this scaling group instance failed
835 "Reason for failure in configuration of this scaling instance";
841 "Creation timestamp of this scaling group record.
842 The timestamp is expressed as seconds
843 since unix epoch - 1970-01-01T00:00:00Z";
849 description "Reference to VNFR within the scale instance";
851 path "../../../constituent-vnfr-ref/vnfr-id";
859 leaf operational-status {
861 "The operational status of the NS instance
862 init : The network service has just started.
863 vl-init-phase : The VLs in the NS are being instantiated.
864 vnf-init-phase : The VNFs in the NS are being instantiated.
865 running : The NS is in running state.
866 terminate : The NS is being terminated.
867 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
868 vl-terminate-phase : The NS is terminating the VLs in the NS.
869 terminated : The NS is in the terminated state.
870 failed : The NS instantiation failed.
871 scaling-out : The NS is scaling out
872 scaling-in : The NS is scaling in
873 vl-instantiate : The NS is initiating a new VL
874 vl-terminate : The NS is terminating a VL
877 type ns-operational-status;
882 "The configuration status of the NS instance
883 configuring: At least one of the VNFs in this instance is in configuring state
884 configured: All the VNFs in this NS instance are configured or config-not-needed state
889 list service-primitive {
891 "Network service level service primitives.";
897 "Name of the service primitive.";
903 "List of parameters for the service primitive.";
906 uses manotypes:primitive-parameter;
909 uses manotypes:ui-primitive-group;
911 list vnf-primitive-group {
913 "Reference to member-vnf within constituent-vnfds";
915 key "member-vnf-index-ref";
916 leaf member-vnf-index-ref {
918 "Reference to member-vnf within constituent-vnfds";
924 "A reference to a vnfd. This is a
926 ../../../../nsd:constituent-vnfd
927 + [nsd:id = current()/../nsd:id-ref]
929 NOTE: An issue with confd is preventing the
930 use of xpath. Seems to be an issue with leafref
931 to leafref, whose target is in a different module.
932 Once that is resovled this will switched to use
948 description "Index of this primitive";
953 description "Name of the primitive in the VNF primitive ";
959 leaf user-defined-script {
961 "A user defined script.";
966 list initial-service-primitive {
968 "Initial set of service primitives for NSD.";
971 uses event-service-primitive;
974 list terminate-service-primitive {
976 "Set of service primitives to
977 execute during termination of NSD.";
980 uses event-service-primitive;
983 list monitoring-param {
985 "List of NS level params.";
988 uses manotypes:monitoring-param-value;
989 uses manotypes:monitoring-param-ui-data;
990 uses manotypes:monitoring-param-aggregation;
1000 leaf nsd-mon-param-ref {
1001 description "Reference to the NSD monitoring param descriptor
1002 that produced this result";
1003 // TODO: Fix leafref
1005 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1006 "[project-nsd:id = current()/../../nsd-ref]" +
1007 "/project-nsd:monitoring-param/project-nsd:id";
1011 list vnfr-mon-param-ref {
1012 description "A list of VNFR monitoring params associated with this monp";
1013 key "vnfr-id-ref vnfr-mon-param-ref";
1017 "A reference to a vnfr. This is a
1019 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1024 leaf vnfr-mon-param-ref {
1025 description "A reference to the VNFR monitoring param";
1027 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1028 + "[vnfr:id = current()/../vnfr-id-ref]"
1029 + "/vnfr:monitoring-param/vnfr:id";
1035 list config-agent-job {
1039 description "config agent job Identifier for the NS.";
1044 description "Config agent job name";
1050 "Job status to be set based on each VNF primitive execution,
1051 pending - if at least one VNF is in pending state
1052 and remaining VNFs are in success state.
1053 Success - if all VNF executions are in success state
1054 failure - if one of the VNF executions is failure";
1063 description "The primitive is triggered from NS or VNF level";
1069 "Creation timestamp of this Config Agent Job.
1070 The timestamp is expressed as seconds
1071 since unix epoch - 1970-01-01T00:00:00Z";
1076 leaf job-status-details {
1077 description "Config agent job status details, in case of errors";
1081 uses manotypes:primitive-parameter-value;
1083 list parameter-group {
1085 "List of NS Primitive parameter groups";
1089 "Name of the parameter.";
1093 uses manotypes:primitive-parameter-value;
1099 description "Identifier for the VNFR.";
1102 leaf vnf-job-status {
1104 "Job status to be set based on each VNF primitive execution,
1105 pending - if at least one primitive is in pending state
1106 and remaining primitives are in success state.
1107 Success - if all primitive executions are in success state
1108 failure - if one of the primitive executions is failure";
1119 description "the name of the primitive";
1123 uses manotypes:primitive-parameter-value;
1126 description "Execution id of the primitive";
1129 leaf execution-status {
1130 description "status of the Execution";
1137 leaf execution-error-details {
1138 description "Error details if execution-status is failure";
1148 grouping rpc-common {
1149 uses manotypes:rpc-project-name;
1152 description "Reference to NSR ID ref";
1154 path "/rw-project:project[rw-project:name=current()/.." +
1155 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1161 rpc get-ns-service-primitive-values {
1162 description "Get the service primitive parameter values";
1166 description "Name of the NS service primitive group";
1176 description "Automatically generated parameter";
1180 description "Parameter name which should be pulled from a parameter pool";
1184 description "Automatically generated value";
1189 list ns-parameter-group {
1190 description "Automatically generated parameters in parameter group";
1193 description "Parameter group name";
1197 description "Automatically generated group parameter";
1201 description "Parameter name which should be pulled from a parameter pool";
1205 description "Automatically generated value";
1211 list vnf-primitive-group {
1213 "List of service primitives grouped by VNF.";
1215 key "member-vnf-index-ref";
1216 leaf member-vnf-index-ref {
1218 "Reference to member-vnf within constituent-vnfds";
1224 "A reference to a vnfd. This is a
1226 ../../../../project-nsd:constituent-vnfd
1227 + [project-nsd:id = current()/../project-nsd:id-ref]
1228 + /project-nsd:vnfd-id-ref
1229 NOTE: An issue with confd is preventing the
1230 use of xpath. Seems to be an issue with leafref
1231 to leafref, whose target is in a different module.
1232 Once that is resolved this will switched to use
1241 description "Index of this primitive";
1246 description "Name of the primitive associated with a value pool";
1251 description "Automatically generated parameter";
1255 description "Parameter name which should be pulled from a parameter pool";
1259 description "Automatically generated value";
1268 rpc exec-ns-service-primitive {
1269 description "Executes a NS service primitive or script";
1273 description "Name of the primitive";
1280 description "The primitive is triggered from NS or VNF level";
1282 default ns-primitive;
1285 uses manotypes:primitive-parameter-value;
1287 list parameter-group {
1289 "List of NS Primitive parameter groups";
1293 "Name of the parameter.";
1297 uses manotypes:primitive-parameter-value;
1302 "List of VNFs whose primitives are being set.";
1303 key "member_vnf_index_ref";
1305 leaf member_vnf_index_ref {
1306 description "Member VNF index";
1312 "A reference to a vnfr. This is a
1317 list vnf-primitive {
1319 "List of service primitives supported by the
1320 configuration agent for this VNF.";
1325 "index of the service primitive.";
1330 "Name of the service primitive.";
1334 uses manotypes:primitive-parameter-value;
1337 leaf user-defined-script {
1339 "A user defined script.";
1345 description "Job identifier for this RPC";
1350 description "Name of the service primitive";
1357 description "The primitive is triggered from NS or VNF level";
1363 "Creation timestamp of this config agent JOB.
1364 The timestamp is expressed as seconds
1365 since unix epoch - 1970-01-01T00:00:00Z";
1370 leaf job-status-details {
1371 description "Job status details, in case of any errors";
1375 uses manotypes:primitive-parameter-value;
1377 list parameter-group {
1379 "List of NS Primitive parameter groups";
1383 "Name of the parameter.";
1387 uses manotypes:primitive-parameter-value;
1392 "List of VNFs whose primitives were set.";
1393 key "member_vnf_index_ref";
1395 leaf member_vnf_index_ref {
1396 description "Member VNF index";
1401 "A reference to a vnfr. This is a
1406 list vnf-out-primitive {
1408 "List of service primitives supported by the
1409 configuration agent for this VNF.";
1414 "index of the service primitive.";
1420 "Name of the service primitive.";
1424 uses manotypes:primitive-parameter-value;
1427 description "Execution id of this primitive";
1431 leaf execution-status {
1432 description "Status of the execution of this primitive";
1436 leaf execution-error-details {
1437 description "Error details if execution-status is failed";
1446 description "Executes scale out request";
1451 leaf scaling-group-name-ref {
1452 description "name of the scaling group";
1454 path "/rw-project:project[rw-project:name=current()/.." +
1455 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1456 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1457 "/nsr:scaling-group-descriptor/nsr:name";
1463 description "id of the scaling group";
1465 path "/rw-project:project[rw-project:name=current()/.." +
1466 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1467 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1468 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1469 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1478 description "id of the scaling group";
1484 rpc exec-scale-out {
1485 description "Executes scale out request";
1490 leaf scaling-group-name-ref {
1491 description "name of the scaling group";
1493 path "/rw-project:project[rw-project:name=current()/.." +
1494 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1495 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1496 "/nsr:scaling-group-descriptor/nsr:name";
1502 description "id of the scaling group";
1509 description "id of the scaling group";
1515 rpc start-network-service {
1516 description "Start the network service";
1520 description "Name of the Network Service";
1524 uses manotypes:rpc-project-name;
1527 description "Reference to NSD ID ref";
1529 path "/rw-project:project[rw-project:name=current()/.." +
1530 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1533 uses ns-instance-config-params-common;
1535 list vnfd-placement-group-maps {
1537 "Mapping from mano-placement groups construct from VNFD to cloud
1538 platform placement group construct";
1540 key "placement-group-ref vnfd-id-ref";
1544 "A reference to a vnfd. This is a
1546 ../../../../project-nsd:constituent-vnfd
1547 + [id = current()/../project-nsd:id-ref]
1548 + /project-nsd:vnfd-id-ref
1549 NOTE: An issue with confd is preventing the
1550 use of xpath. Seems to be an issue with leafref
1551 to leafref, whose target is in a different module.
1552 Once that is resovled this will switched to use
1557 leaf placement-group-ref {
1559 "A reference to VNFD placement group";
1561 path "/rw-project:project[rw-project:name=current()/" +
1562 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1563 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1567 uses manotypes:placement-group-input;
1569 list ssh-authorized-key {
1572 description "List of authorized ssh keys as part of cloud-config";
1575 description "A reference to the key pair entry in the global key pair table";
1577 path "/rw-project:project[rw-project:name=current()/../../../" +
1578 "project-name]/key-pair/name";
1586 description "List of users to be added through cloud-config";
1588 description "Name of the user ";
1592 description "The user name's real name";
1595 list ssh-authorized-key {
1598 description "Used to configure the list of public keys to be injected as part
1599 of ns instantiation";
1602 description "A reference to the key pair entry in the global key pair table";
1604 path "/rw-project:project[rw-project:name=current()/" +
1605 "../../../../project-name]/key-pair/name";
1615 description "Automatically generated parameter";