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-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";
521 "Location within the service path";
524 container connection-point-params {
526 type inet:ip-address;
538 type inet:ip-address;
541 type inet:port-number;
545 container service-function-forwarder {
548 "Service Function Forwarder name";
553 "Data Plane IP Address of the SFF";
554 type inet:ip-address;
558 "Data Plane Port of the SFF";
559 type inet:port-number;
570 "Identifier for the classifier rule.";
575 "Name of the classifier.";
578 leaf-list classifier-id {
580 "Returned Identifier for the classifier rule.";
585 "A reference to the RSP.";
597 "A reference to a vnfr id";
599 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
604 "A reference to a vnfr name";
606 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
609 leaf vnfr-connection-point-ref {
611 "A reference to a vnfr connection point.";
613 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
614 + "[vnfr:id = current()/../vnfr-id-ref]"
615 + "/vnfr:connection-point/vnfr:name";
634 augment "/rw-project:project" {
635 container ns-instance-opdata {
639 key "ns-instance-config-ref";
641 leaf ns-instance-config-ref {
643 path "../../../ns-instance-config/nsr/id";
649 description "Network service name reference";
651 path "../../../ns-instance-config/nsr" +
652 "[id=current()/../ns-instance-config-ref]" +
658 description "Network service descriptor id reference";
660 path "../../../ns-instance-config/nsr"
661 + "[id=current()/../ns-instance-config-ref]"
667 description "Network service descriptor name reference";
669 path "../../../ns-instance-config/nsr"
670 + "[id=current()/../ns-instance-config-ref]"
677 "Creation timestamp of this Network Service.
678 The timestamp is expressed as seconds
679 since unix epoch - 1970-01-01T00:00:00Z";
686 "Active period of this Network Service.
687 Uptime is expressed in seconds";
692 list connection-point {
694 "List for external connection points.
695 Each NS has one or more external connection points.
696 As the name implies that external connection points
697 are used for connecting the NS to other NS or to
698 external networks. Each NS exposes these connection
699 points to the orchestrator. The orchestrator can
700 construct network service chains by connecting the
701 connection points between different NS.";
706 "Name of the NS connection point.";
712 "Type of the connection point.";
713 type manotypes:connection-point-type;
721 "Reference to a VLR record in the VLR catalog";
723 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
728 list vnfr-connection-point-ref {
730 "A list of references to connection points.";
734 description "A reference to a vnfr";
736 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
740 leaf connection-point {
742 "A reference to a connection point name in a vnfr";
744 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
745 + "[vnfr:id = current()/../vnfr-id]"
746 + "/vnfr:connection-point/vnfr:name";
752 list constituent-vnfr-ref {
754 "List of VNFRs that are part of this
760 "Reference to the VNFR id
761 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
762 But due to confd bug (RIFT-9451), changing to string.";
767 list scaling-group-record {
768 description "List of scaling group records";
769 key "scaling-group-name-ref";
771 leaf scaling-group-name-ref {
772 description "name of the scaling group";
774 path "../../../../ns-instance-config/nsr"
775 + "[id=current()/../../ns-instance-config-ref]"
776 + "/nsd/scaling-group-descriptor/name";
781 description "Reference to scaling group instance record";
784 description "Scaling group instance id";
789 description "Flag indicating whether this instance was part of
790 default scaling group (and thus undeletable)";
796 "The operational status of the NS instance
797 init : The scaling group has just started.
798 vnf-init-phase : The VNFs in the scaling group are being instantiated.
799 running : The scaling group is in running state.
800 terminate : The scaling group is being terminated.
801 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
802 terminated : The scaling group is in the terminated state.
803 failed : The scaling group instantiation failed.
811 enum vnf-terminate-phase;
819 "The configuration status of the scaling group instance
820 configuring : At least one of the VNFs in this scaling group instance
821 is in configuring state
822 configured : All the VNFs in this scaling group instance are
823 configured or config-not-needed state
824 failed : Configuring this scaling group instance failed
831 "Reason for failure in configuration of this scaling instance";
837 "Creation timestamp of this scaling group record.
838 The timestamp is expressed as seconds
839 since unix epoch - 1970-01-01T00:00:00Z";
845 description "Reference to VNFR within the scale instance";
847 path "../../../constituent-vnfr-ref/vnfr-id";
855 leaf operational-status {
857 "The operational status of the NS instance
858 init : The network service has just started.
859 vl-init-phase : The VLs in the NS are being instantiated.
860 vnf-init-phase : The VNFs in the NS are being instantiated.
861 running : The NS is in running state.
862 terminate : The NS is being terminated.
863 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
864 vl-terminate-phase : The NS is terminating the VLs in the NS.
865 terminated : The NS is in the terminated state.
866 failed : The NS instantiation failed.
867 scaling-out : The NS is scaling out
868 scaling-in : The NS is scaling in
869 vl-instantiate : The NS is initiating a new VL
870 vl-terminate : The NS is terminating a VL
873 type ns-operational-status;
878 "The configuration status of the NS instance
879 configuring: At least one of the VNFs in this instance is in configuring state
880 configured: All the VNFs in this NS instance are configured or config-not-needed state
885 list service-primitive {
887 "Network service level service primitives.";
893 "Name of the service primitive.";
899 "List of parameters for the service primitive.";
902 uses manotypes:primitive-parameter;
905 uses manotypes:ui-primitive-group;
907 list vnf-primitive-group {
909 "Reference to member-vnf within constituent-vnfds";
911 key "member-vnf-index-ref";
912 leaf member-vnf-index-ref {
914 "Reference to member-vnf within constituent-vnfds";
920 "A reference to a vnfd. This is a
922 ../../../../nsd:constituent-vnfd
923 + [nsd:id = current()/../nsd:id-ref]
925 NOTE: An issue with confd is preventing the
926 use of xpath. Seems to be an issue with leafref
927 to leafref, whose target is in a different module.
928 Once that is resovled this will switched to use
944 description "Index of this primitive";
949 description "Name of the primitive in the VNF primitive ";
955 leaf user-defined-script {
957 "A user defined script.";
962 list initial-service-primitive {
964 "Initial set of service primitives for NSD.";
967 uses event-service-primitive;
970 list terminate-service-primitive {
972 "Set of service primitives to
973 execute during termination of NSD.";
976 uses event-service-primitive;
979 list monitoring-param {
981 "List of NS level params.";
984 uses manotypes:monitoring-param-value;
985 uses manotypes:monitoring-param-ui-data;
986 uses manotypes:monitoring-param-aggregation;
996 leaf nsd-mon-param-ref {
997 description "Reference to the NSD monitoring param descriptor
998 that produced this result";
1001 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1002 "[project-nsd:id = current()/../../nsd-ref]" +
1003 "/project-nsd:monitoring-param/project-nsd:id";
1007 list vnfr-mon-param-ref {
1008 description "A list of VNFR monitoring params associated with this monp";
1009 key "vnfr-id-ref vnfr-mon-param-ref";
1013 "A reference to a vnfr. This is a
1015 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1020 leaf vnfr-mon-param-ref {
1021 description "A reference to the VNFR monitoring param";
1023 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1024 + "[vnfr:id = current()/../vnfr-id-ref]"
1025 + "/vnfr:monitoring-param/vnfr:id";
1031 list config-agent-job {
1035 description "config agent job Identifier for the NS.";
1040 description "Config agent job name";
1046 "Job status to be set based on each VNF primitive execution,
1047 pending - if at least one VNF is in pending state
1048 and remaining VNFs are in success state.
1049 Success - if all VNF executions are in success state
1050 failure - if one of the VNF executions is failure";
1059 description "The primitive is triggered from NS or VNF level";
1065 "Creation timestamp of this Config Agent Job.
1066 The timestamp is expressed as seconds
1067 since unix epoch - 1970-01-01T00:00:00Z";
1072 leaf job-status-details {
1073 description "Config agent job status details, in case of errors";
1077 uses manotypes:primitive-parameter-value;
1079 list parameter-group {
1081 "List of NS Primitive parameter groups";
1085 "Name of the parameter.";
1089 uses manotypes:primitive-parameter-value;
1095 description "Identifier for the VNFR.";
1098 leaf vnf-job-status {
1100 "Job status to be set based on each VNF primitive execution,
1101 pending - if at least one primitive is in pending state
1102 and remaining primitives are in success state.
1103 Success - if all primitive executions are in success state
1104 failure - if one of the primitive executions is failure";
1115 description "the name of the primitive";
1119 uses manotypes:primitive-parameter-value;
1122 description "Execution id of the primitive";
1125 leaf execution-status {
1126 description "status of the Execution";
1133 leaf execution-error-details {
1134 description "Error details if execution-status is failure";
1144 grouping rpc-common {
1145 uses manotypes:rpc-project-name;
1148 description "Reference to NSR ID ref";
1150 path "/rw-project:project[rw-project:name=current()/.." +
1151 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1157 rpc get-ns-service-primitive-values {
1158 description "Get the service primitive parameter values";
1162 description "Name of the NS service primitive group";
1172 description "Automatically generated parameter";
1176 description "Parameter name which should be pulled from a parameter pool";
1180 description "Automatically generated value";
1185 list ns-parameter-group {
1186 description "Automatically generated parameters in parameter group";
1189 description "Parameter group name";
1193 description "Automatically generated group parameter";
1197 description "Parameter name which should be pulled from a parameter pool";
1201 description "Automatically generated value";
1207 list vnf-primitive-group {
1209 "List of service primitives grouped by VNF.";
1211 key "member-vnf-index-ref";
1212 leaf member-vnf-index-ref {
1214 "Reference to member-vnf within constituent-vnfds";
1220 "A reference to a vnfd. This is a
1222 ../../../../project-nsd:constituent-vnfd
1223 + [project-nsd:id = current()/../project-nsd:id-ref]
1224 + /project-nsd:vnfd-id-ref
1225 NOTE: An issue with confd is preventing the
1226 use of xpath. Seems to be an issue with leafref
1227 to leafref, whose target is in a different module.
1228 Once that is resolved this will switched to use
1237 description "Index of this primitive";
1242 description "Name of the primitive associated with a value pool";
1247 description "Automatically generated parameter";
1251 description "Parameter name which should be pulled from a parameter pool";
1255 description "Automatically generated value";
1264 rpc exec-ns-service-primitive {
1265 description "Executes a NS service primitive or script";
1269 description "Name of the primitive";
1276 description "The primitive is triggered from NS or VNF level";
1278 default ns-primitive;
1281 uses manotypes:primitive-parameter-value;
1283 list parameter-group {
1285 "List of NS Primitive parameter groups";
1289 "Name of the parameter.";
1293 uses manotypes:primitive-parameter-value;
1298 "List of VNFs whose primitives are being set.";
1299 key "member_vnf_index_ref";
1301 leaf member_vnf_index_ref {
1302 description "Member VNF index";
1308 "A reference to a vnfr. This is a
1313 list vnf-primitive {
1315 "List of service primitives supported by the
1316 configuration agent for this VNF.";
1321 "index of the service primitive.";
1326 "Name of the service primitive.";
1330 uses manotypes:primitive-parameter-value;
1333 leaf user-defined-script {
1335 "A user defined script.";
1341 description "Job identifier for this RPC";
1346 description "Name of the service primitive";
1353 description "The primitive is triggered from NS or VNF level";
1359 "Creation timestamp of this config agent JOB.
1360 The timestamp is expressed as seconds
1361 since unix epoch - 1970-01-01T00:00:00Z";
1366 leaf job-status-details {
1367 description "Job status details, in case of any errors";
1371 uses manotypes:primitive-parameter-value;
1373 list parameter-group {
1375 "List of NS Primitive parameter groups";
1379 "Name of the parameter.";
1383 uses manotypes:primitive-parameter-value;
1388 "List of VNFs whose primitives were set.";
1389 key "member_vnf_index_ref";
1391 leaf member_vnf_index_ref {
1392 description "Member VNF index";
1397 "A reference to a vnfr. This is a
1402 list vnf-out-primitive {
1404 "List of service primitives supported by the
1405 configuration agent for this VNF.";
1410 "index of the service primitive.";
1416 "Name of the service primitive.";
1420 uses manotypes:primitive-parameter-value;
1423 description "Execution id of this primitive";
1427 leaf execution-status {
1428 description "Status of the execution of this primitive";
1432 leaf execution-error-details {
1433 description "Error details if execution-status is failed";
1442 description "Executes scale out request";
1447 leaf scaling-group-name-ref {
1448 description "name of the scaling group";
1450 path "/rw-project:project[rw-project:name=current()/.." +
1451 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1452 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1453 "/nsr:scaling-group-descriptor/nsr:name";
1459 description "id of the scaling group";
1461 path "/rw-project:project[rw-project:name=current()/.." +
1462 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1463 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1464 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1465 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1474 description "id of the scaling group";
1480 rpc exec-scale-out {
1481 description "Executes scale out request";
1486 leaf scaling-group-name-ref {
1487 description "name of the scaling group";
1489 path "/rw-project:project[rw-project:name=current()/.." +
1490 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1491 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1492 "/nsr:scaling-group-descriptor/nsr:name";
1498 description "id of the scaling group";
1505 description "id of the scaling group";
1511 rpc start-network-service {
1512 description "Start the network service";
1516 description "Name of the Network Service";
1520 uses manotypes:rpc-project-name;
1523 description "Reference to NSD ID ref";
1525 path "/rw-project:project[rw-project:name=current()/.." +
1526 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1529 uses ns-instance-config-params-common;
1531 list vnfd-placement-group-maps {
1533 "Mapping from mano-placement groups construct from VNFD to cloud
1534 platform placement group construct";
1536 key "placement-group-ref vnfd-id-ref";
1540 "A reference to a vnfd. This is a
1542 ../../../../project-nsd:constituent-vnfd
1543 + [id = current()/../project-nsd:id-ref]
1544 + /project-nsd:vnfd-id-ref
1545 NOTE: An issue with confd is preventing the
1546 use of xpath. Seems to be an issue with leafref
1547 to leafref, whose target is in a different module.
1548 Once that is resovled this will switched to use
1553 leaf placement-group-ref {
1555 "A reference to VNFD placement group";
1557 path "/rw-project:project[rw-project:name=current()/" +
1558 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1559 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1563 uses manotypes:placement-group-input;
1565 list ssh-authorized-key {
1568 description "List of authorized ssh keys as part of cloud-config";
1571 description "A reference to the key pair entry in the global key pair table";
1573 path "/rw-project:project[rw-project:name=current()/../../../" +
1574 "project-name]/key-pair/name";
1582 description "List of users to be added through cloud-config";
1584 description "Name of the user ";
1588 description "The user name's real name";
1591 list ssh-authorized-key {
1594 description "Used to configure the list of public keys to be injected as part
1595 of ns instantiation";
1598 description "A reference to the key pair entry in the global key pair table";
1600 path "/rw-project:project[rw-project:name=current()/" +
1601 "../../../../project-name]/key-pair/name";
1611 description "Automatically generated parameter";