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 {
68 "Update model to support projects.";
73 "Initial revision. This YANG file defines
74 the Network Service Record (NSR)";
76 "Derived from earlier versions of base YANG files";
79 typedef config-states {
83 enum config_not_needed;
90 typedef trigger-type {
97 grouping cloud-config {
98 description "List of cloud config parameters";
100 list ssh-authorized-key {
103 description "List of authorized ssh keys as part of cloud-config";
106 description "A reference to the key pair entry in the global key pair table";
108 path "../../../../key-pair/name";
114 description "Used to configure the list of public keys to be injected as part
115 of ns instantiation";
117 description "Name of this key pair";
121 description "The user name's real name";
124 list ssh-authorized-key {
127 description "Used to configure the list of public keys to be injected as part
128 of ns instantiation";
131 description "A reference to the key pair entry in the global key pair table";
133 path "../../../../../key-pair/name";
140 augment "/rw-project:project" {
143 description "Used to configure the list of public keys to be injected as part
144 of ns instantiation";
146 description "Name of this key pair";
151 description "Key associated with this key pair";
157 grouping event-service-primitive {
160 "Sequence number for the service primitive.";
166 "Name of the service primitive.";
171 leaf user-defined-script {
173 "A user defined script.";
189 augment "/rw-project:project" {
190 container ns-instance-config {
197 description "Identifier for the NSR.";
202 description "NSR name.";
207 description "NSR short name.";
212 description "NSR description.";
218 "This is the administrative status of the NS instance";
227 description "NS descriptor used to instantiate this NS";
229 uses nsd-base:nsd-descriptor-common;
231 uses project-nsd:nsr-nsd-vld;
233 uses project-nsd:nsr-nsd-constituent-vnfd;
235 uses project-nsd:nsr-nsd-placement-groups;
237 uses project-nsd:nsr-nsd-vnf-dependency;
239 uses project-nsd:nsr-nsd-monitoring-param;
241 uses project-nsd:nsr-nsd-service-primitive;
243 uses ns-instance-config-params;
248 grouping ns-instance-config-params-common {
249 uses manotypes:input-parameter;
252 description "List of ns scaling group instances";
253 key "scaling-group-name-ref";
255 leaf scaling-group-name-ref {
256 description "name of the scaling group
257 leafref path ../nsd/scaling-group-descriptor/name";
262 description "The instance of the scaling group";
265 description "Scaling group instance uuid";
271 list nsd-placement-group-maps {
273 "Mapping from mano-placement groups construct from NSD to cloud
274 platform placement group construct";
276 key "placement-group-ref";
278 leaf placement-group-ref {
280 "Reference for NSD placement group";
282 // path "../../nsd/placement-groups/name";
286 uses manotypes:placement-group-input;
290 grouping ns-instance-config-params {
291 uses ns-instance-config-params-common;
293 list vnfd-placement-group-maps {
295 "Mapping from mano-placement groups construct from VNFD to cloud
296 platform placement group construct";
298 key "placement-group-ref vnfd-id-ref";
302 "A reference to a vnfd. This is a
304 ../../../../project-nsd:constituent-vnfd
305 + [id = current()/../id-ref]
306 + /project-nsd:vnfd-id-ref
307 NOTE: An issue with confd is preventing the
308 use of xpath. Seems to be an issue with leafref
309 to leafref, whose target is in a different module.
310 Once that is resolved this will switched to use
315 leaf placement-group-ref {
317 "A reference to VNFD placement group";
319 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
320 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
324 uses manotypes:placement-group-input;
336 description "Identifier for the VNFFGR.";
341 description "VNFFG descriptor id reference";
343 path "../../../../ns-instance-config/nsr"
344 + "[id=current()/../../ns-instance-config-ref]"
349 leaf vnffgd-name-ref {
350 description "VNFFG descriptor name reference";
352 path "../../../../ns-instance-config/nsr"
353 + "[id=current()/../../ns-instance-config-ref]"
355 + "[id=current()/../vnffgd-id-ref]"
362 "The SDN account to use when requesting resources for
368 description "Cloud Account in which NSR is instantiated";
372 leaf operational-status {
374 "The operational status of the VNFFGR instance
375 init : The VNFFGR has just started.
376 running : The VNFFGR is in running state.
377 terminate : The VNFFGR is being terminated.
378 terminated : The VNFFGR is in the terminated state.
379 failed : The VNFFGR instantiation failed
383 rwpb:enum-type "VnffgrOperationalStatus";
397 "Identifier for the RSP.";
409 "Returned Identifier for the RSP.";
413 leaf vnffgd-rsp-id-ref {
415 "Identifier for the VNFFG Descriptor RSP reference";
417 path "../../../../../ns-instance-config/nsr"
418 + "[id=current()/../../../ns-instance-config-ref]"
420 + "[id=current()/../../vnffgd-id-ref]"
425 leaf vnffgd-rsp-name-ref {
427 "Name for the VNFFG Descriptor RSP reference";
429 path "../../../../../ns-instance-config/nsr"
430 + "[id=current()/../../../ns-instance-config-ref]"
432 + "[id=current()/../../vnffgd-id-ref]"
434 + "[id=current()/../vnffgd-rsp-id-ref]"
439 leaf classifier-name {
445 "Unique Identifier for the service path";
449 list vnfr-connection-point-ref {
453 "Monotonically increasing number to show service path hop
457 leaf service-function-type {
459 "Type of Service Function.
460 NOTE: This needs to map with Service Function Type in ODL to
461 support VNFFG. Service Function Type is mandatory param in ODL
462 SFC. This is temporarily set to string for ease of use";
466 leaf member-vnf-index-ref {
471 "Reference to VNF Descriptor Id";
476 "A reference to a vnfr id";
478 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
483 "A reference to a vnfr name";
485 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
488 leaf vnfr-connection-point-ref {
490 "A reference to a vnfr connection point.";
492 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
493 + "[vnfr:id = current()/../vnfr-id-ref]"
494 + "/vnfr:connection-point/vnfr:name";
499 "Location within the service path";
502 container connection-point-params {
504 type inet:ip-address;
510 rwpb:field-inline "true";
511 rwpb:field-string-max 64;
515 rwpb:field-inline "true";
516 rwpb:field-string-max 64;
520 type inet:ip-address;
523 type inet:port-number;
527 container service-function-forwarder {
530 "Service Function Forwarder name";
535 "Data Plane IP Address of the SFF";
536 type inet:ip-address;
540 "Data Plane Port of the SFF";
541 type inet:port-number;
552 "Identifier for the classifier rule.";
557 "Name of the classifier.";
560 leaf-list classifier-id {
562 "Returned Identifier for the classifier rule.";
567 "A reference to the RSP.";
579 "A reference to a vnfr id";
581 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
586 "A reference to a vnfr name";
588 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
591 leaf vnfr-connection-point-ref {
593 "A reference to a vnfr connection point.";
595 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
596 + "[vnfr:id = current()/../vnfr-id-ref]"
597 + "/vnfr:connection-point/vnfr:name";
601 rwpb:field-inline "true";
602 rwpb:field-string-max 64;
606 rwpb:field-inline "true";
607 rwpb:field-string-max 64;
620 augment "/rw-project:project" {
621 container ns-instance-opdata {
625 key "ns-instance-config-ref";
627 leaf ns-instance-config-ref {
629 path "../../../ns-instance-config/nsr/id";
635 description "Network service name reference";
637 path "../../../ns-instance-config/nsr" +
638 "[id=current()/../ns-instance-config-ref]" +
644 description "Network service descriptor id reference";
646 path "../../../ns-instance-config/nsr"
647 + "[id=current()/../ns-instance-config-ref]"
653 description "Network service descriptor name reference";
655 path "../../../ns-instance-config/nsr"
656 + "[id=current()/../ns-instance-config-ref]"
663 "Creation timestamp of this Network Service.
664 The timestamp is expressed as seconds
665 since unix epoch - 1970-01-01T00:00:00Z";
672 "Active period of this Network Service.
673 Uptime is expressed in seconds";
678 list connection-point {
680 "List for external connection points.
681 Each NS has one or more external connection points.
682 As the name implies that external connection points
683 are used for connecting the NS to other NS or to
684 external networks. Each NS exposes these connection
685 points to the orchestrator. The orchestrator can
686 construct network service chains by connecting the
687 connection points between different NS.";
692 "Name of the NS connection point.";
698 "Type of the connection point.";
699 type manotypes:connection-point-type;
707 "Reference to a VLR record in the VLR catalog";
709 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
714 list vnfr-connection-point-ref {
716 "A list of references to connection points.";
720 description "A reference to a vnfr";
722 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
726 leaf connection-point {
728 "A reference to a connection point name in a vnfr";
730 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
731 + "[vnfr:id = current()/../vnfr-id]"
732 + "/vnfr:connection-point/vnfr:name";
738 list constituent-vnfr-ref {
740 "List of VNFRs that are part of this
746 "Reference to the VNFR id
747 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
748 But due to confd bug (RIFT-9451), changing to string.";
753 list scaling-group-record {
754 description "List of scaling group records";
755 key "scaling-group-name-ref";
757 leaf scaling-group-name-ref {
758 description "name of the scaling group";
760 path "../../../../ns-instance-config/nsr"
761 + "[id=current()/../../ns-instance-config-ref]"
762 + "/nsd/scaling-group-descriptor/name";
767 description "Reference to scaling group instance record";
770 description "Scaling group instance id";
775 description "Flag indicating whether this instance was part of
776 default scaling group (and thus undeletable)";
782 "The operational status of the NS instance
783 init : The scaling group has just started.
784 vnf-init-phase : The VNFs in the scaling group are being instantiated.
785 running : The scaling group is in running state.
786 terminate : The scaling group is being terminated.
787 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
788 terminated : The scaling group is in the terminated state.
789 failed : The scaling group instantiation failed.
797 enum vnf-terminate-phase;
805 "The configuration status of the scaling group instance
806 configuring : At least one of the VNFs in this scaling group instance
807 is in configuring state
808 configured : All the VNFs in this scaling group instance are
809 configured or config-not-needed state
810 failed : Configuring this scaling group instance failed
817 "Reason for failure in configuration of this scaling instance";
823 "Creation timestamp of this scaling group record.
824 The timestamp is expressed as seconds
825 since unix epoch - 1970-01-01T00:00:00Z";
831 description "Reference to VNFR within the scale instance";
833 path "../../../constituent-vnfr-ref/vnfr-id";
841 leaf operational-status {
843 "The operational status of the NS instance
844 init : The network service has just started.
845 vl-init-phase : The VLs in the NS are being instantiated.
846 vnf-init-phase : The VNFs in the NS are being instantiated.
847 running : The NS is in running state.
848 terminate : The NS is being terminated.
849 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
850 vl-terminate-phase : The NS is terminating the VLs in the NS.
851 terminated : The NS is in the terminated state.
852 failed : The NS instantiation failed.
853 scaling-out : The NS is scaling out
854 scaling-in : The NS is scaling in
855 vl-instantiate : The NS is initiating a new VL
856 vl-terminate : The NS is terminating a VL
865 enum vnf-terminate-phase;
866 enum vl-terminate-phase;
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 {
963 rwpb:msg-new NsrInitialServicePrimitive;
965 "Initial set of service primitives for NSD.";
968 uses event-service-primitive;
971 list terminate-service-primitive {
972 rwpb:msg-new NsrTerminateServicePrimitive;
974 "Set of service primitives to
975 execute during termination of NSD.";
978 uses event-service-primitive;
981 list monitoring-param {
983 "List of NS level params.";
986 uses manotypes:monitoring-param-value;
987 uses manotypes:monitoring-param-ui-data;
988 uses manotypes:monitoring-param-aggregation;
998 leaf nsd-mon-param-ref {
999 description "Reference to the NSD monitoring param descriptor
1000 that produced this result";
1001 // TODO: Fix leafref
1003 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1004 "[project-nsd:id = current()/../../nsd-ref]" +
1005 "/project-nsd:monitoring-param/project-nsd:id";
1009 list vnfr-mon-param-ref {
1010 description "A list of VNFR monitoring params associated with this monp";
1011 key "vnfr-id-ref vnfr-mon-param-ref";
1015 "A reference to a vnfr. This is a
1017 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1022 leaf vnfr-mon-param-ref {
1023 description "A reference to the VNFR monitoring param";
1025 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1026 + "[vnfr:id = current()/../vnfr-id-ref]"
1027 + "/vnfr:monitoring-param/vnfr:id";
1033 list config-agent-job {
1037 description "config agent job Identifier for the NS.";
1042 description "Config agent job name";
1048 "Job status to be set based on each VNF primitive execution,
1049 pending - if at least one VNF is in pending state
1050 and remaining VNFs are in success state.
1051 Success - if all VNF executions are in success state
1052 failure - if one of the VNF executions is failure";
1061 description "The primitive is triggered from NS or VNF level";
1067 "Creation timestamp of this Config Agent Job.
1068 The timestamp is expressed as seconds
1069 since unix epoch - 1970-01-01T00:00:00Z";
1074 leaf job-status-details {
1075 description "Config agent job status details, in case of errors";
1079 uses manotypes:primitive-parameter-value;
1081 list parameter-group {
1083 "List of NS Primitive parameter groups";
1087 "Name of the parameter.";
1091 uses manotypes:primitive-parameter-value;
1097 description "Identifier for the VNFR.";
1100 leaf vnf-job-status {
1102 "Job status to be set based on each VNF primitive execution,
1103 pending - if at least one primitive is in pending state
1104 and remaining primitives are in success state.
1105 Success - if all primitive executions are in success state
1106 failure - if one of the primitive executions is failure";
1117 description "the name of the primitive";
1121 uses manotypes:primitive-parameter-value;
1124 description "Execution id of the primitive";
1127 leaf execution-status {
1128 description "status of the Execution";
1135 leaf execution-error-details {
1136 description "Error details if execution-status is failure";
1146 grouping rpc-common {
1147 uses manotypes:rpc-project-name;
1150 description "Reference to NSR ID ref";
1152 path "/rw-project:project[rw-project:name=current()/.." +
1153 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1159 rpc get-ns-service-primitive-values {
1160 description "Get the service primitive parameter values";
1164 description "Name of the NS service primitive group";
1174 description "Automatically generated parameter";
1178 description "Parameter name which should be pulled from a parameter pool";
1182 description "Automatically generated value";
1187 list ns-parameter-group {
1188 description "Automatically generated parameters in parameter group";
1191 description "Parameter group name";
1195 description "Automatically generated group parameter";
1199 description "Parameter name which should be pulled from a parameter pool";
1203 description "Automatically generated value";
1209 list vnf-primitive-group {
1211 "List of service primitives grouped by VNF.";
1213 key "member-vnf-index-ref";
1214 leaf member-vnf-index-ref {
1216 "Reference to member-vnf within constituent-vnfds";
1222 "A reference to a vnfd. This is a
1224 ../../../../project-nsd:constituent-vnfd
1225 + [project-nsd:id = current()/../project-nsd:id-ref]
1226 + /project-nsd:vnfd-id-ref
1227 NOTE: An issue with confd is preventing the
1228 use of xpath. Seems to be an issue with leafref
1229 to leafref, whose target is in a different module.
1230 Once that is resolved this will switched to use
1239 description "Index of this primitive";
1244 description "Name of the primitive associated with a value pool";
1249 description "Automatically generated parameter";
1253 description "Parameter name which should be pulled from a parameter pool";
1257 description "Automatically generated value";
1266 rpc exec-ns-service-primitive {
1267 description "Executes a NS service primitive or script";
1271 description "Name of the primitive";
1278 description "The primitive is triggered from NS or VNF level";
1280 default ns-primitive;
1283 uses manotypes:primitive-parameter-value;
1285 list parameter-group {
1287 "List of NS Primitive parameter groups";
1291 "Name of the parameter.";
1295 uses manotypes:primitive-parameter-value;
1300 "List of VNFs whose primitives are being set.";
1301 key "member_vnf_index_ref";
1303 leaf member_vnf_index_ref {
1304 description "Member VNF index";
1310 "A reference to a vnfr. This is a
1315 list vnf-primitive {
1317 "List of service primitives supported by the
1318 configuration agent for this VNF.";
1323 "index of the service primitive.";
1328 "Name of the service primitive.";
1332 uses manotypes:primitive-parameter-value;
1335 leaf user-defined-script {
1337 "A user defined script.";
1343 description "Job identifier for this RPC";
1348 description "Name of the service primitive";
1355 description "The primitive is triggered from NS or VNF level";
1361 "Creation timestamp of this config agent JOB.
1362 The timestamp is expressed as seconds
1363 since unix epoch - 1970-01-01T00:00:00Z";
1368 leaf job-status-details {
1369 description "Job status details, in case of any errors";
1373 uses manotypes:primitive-parameter-value;
1375 list parameter-group {
1377 "List of NS Primitive parameter groups";
1381 "Name of the parameter.";
1385 uses manotypes:primitive-parameter-value;
1390 "List of VNFs whose primitives were set.";
1391 key "member_vnf_index_ref";
1393 leaf member_vnf_index_ref {
1394 description "Member VNF index";
1399 "A reference to a vnfr. This is a
1404 list vnf-out-primitive {
1406 "List of service primitives supported by the
1407 configuration agent for this VNF.";
1412 "index of the service primitive.";
1418 "Name of the service primitive.";
1422 uses manotypes:primitive-parameter-value;
1425 description "Execution id of this primitive";
1429 leaf execution-status {
1430 description "Status of the execution of this primitive";
1434 leaf execution-error-details {
1435 description "Error details if execution-status is failed";
1444 description "Executes scale out request";
1449 leaf scaling-group-name-ref {
1450 description "name of the scaling group";
1452 path "/rw-project:project[rw-project:name=current()/.." +
1453 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1454 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1455 "/nsr:scaling-group-descriptor/nsr:name";
1461 description "id of the scaling group";
1463 path "/rw-project:project[rw-project:name=current()/.." +
1464 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1465 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1466 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1467 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1476 description "id of the scaling group";
1482 rpc exec-scale-out {
1483 description "Executes scale out request";
1488 leaf scaling-group-name-ref {
1489 description "name of the scaling group";
1491 path "/rw-project:project[rw-project:name=current()/.." +
1492 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1493 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1494 "/nsr:scaling-group-descriptor/nsr:name";
1500 description "id of the scaling group";
1507 description "id of the scaling group";
1513 rpc start-network-service {
1514 description "Start the network service";
1518 description "Name of the Network Service";
1522 uses manotypes:rpc-project-name;
1525 description "Reference to NSD ID ref";
1527 path "/rw-project:project[rw-project:name=current()/.." +
1528 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1531 uses ns-instance-config-params-common;
1533 list vnfd-placement-group-maps {
1535 "Mapping from mano-placement groups construct from VNFD to cloud
1536 platform placement group construct";
1538 key "placement-group-ref vnfd-id-ref";
1542 "A reference to a vnfd. This is a
1544 ../../../../project-nsd:constituent-vnfd
1545 + [id = current()/../project-nsd:id-ref]
1546 + /project-nsd:vnfd-id-ref
1547 NOTE: An issue with confd is preventing the
1548 use of xpath. Seems to be an issue with leafref
1549 to leafref, whose target is in a different module.
1550 Once that is resovled this will switched to use
1555 leaf placement-group-ref {
1557 "A reference to VNFD placement group";
1559 path "/rw-project:project[rw-project:name=current()/" +
1560 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1561 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1565 uses manotypes:placement-group-input;
1567 list ssh-authorized-key {
1570 description "List of authorized ssh keys as part of cloud-config";
1573 description "A reference to the key pair entry in the global key pair table";
1575 path "/rw-project:project[rw-project:name=current()/../../../" +
1576 "project-name]/key-pair/name";
1584 description "List of users to be added through cloud-config";
1586 description "Name of the user ";
1590 description "The user name's real name";
1593 list ssh-authorized-key {
1596 description "Used to configure the list of public keys to be injected as part
1597 of ns instantiation";
1600 description "A reference to the key pair entry in the global key pair table";
1602 path "/rw-project:project[rw-project:name=current()/" +
1603 "../../../../project-name]/key-pair/name";
1613 description "Automatically generated parameter";