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";
47 prefix "project-vnfd";
54 import ietf-inet-types {
58 import ietf-yang-types {
76 "Update model to support projects.";
81 "Initial revision. This YANG file defines
82 the Network Service Record (NSR)";
84 "Derived from earlier versions of base YANG files";
87 typedef config-states {
91 enum config_not_needed;
97 typedef trigger-type {
104 augment "/rw-project:project" {
107 description "Used to configure the list of public keys to be injected as part
108 of ns instantiation";
110 description "Name of this key pair";
115 description "Key associated with this key pair";
121 augment "/rw-project:project" {
122 container ns-instance-config {
129 description "Identifier for the NSR.";
134 description "NSR name.";
139 description "NSR short name.";
144 description "NSR description.";
150 "This is the administrative status of the NS instance";
159 description "NS descriptor used to instantiate this NS";
161 uses nsd-base:nsd-descriptor-common;
163 uses project-nsd:nsr-nsd-vld;
165 uses project-nsd:nsr-nsd-constituent-vnfd;
167 uses project-nsd:nsr-nsd-placement-groups;
169 uses project-nsd:nsr-nsd-vnf-dependency;
171 uses project-nsd:nsr-nsd-monitoring-param;
173 uses project-nsd:nsr-nsd-service-primitive;
176 uses ns-instance-config-params;
181 grouping ns-instance-config-params-common {
182 uses manotypes:input-parameter;
185 description "List of ns scaling group instances";
186 key "scaling-group-name-ref";
188 leaf scaling-group-name-ref {
189 description "name of the scaling group
190 leafref path ../../nsd/scaling-group-descriptor/name";
195 description "The instance of the scaling group";
198 description "Scaling group instance uuid";
204 list nsd-placement-group-maps {
206 "Mapping from mano-placement groups construct from NSD to cloud
207 platform placement group construct";
209 key "placement-group-ref";
211 leaf placement-group-ref {
212 description "Reference for NSD placement group
213 leafref path ../../nsd/placement-groups/name";
216 uses manotypes:placement-group-input;
220 grouping ns-instance-config-params {
221 uses ns-instance-config-params-common;
223 list vnfd-placement-group-maps {
225 "Mapping from mano-placement groups construct from VNFD to cloud
226 platform placement group construct";
228 key "placement-group-ref vnfd-id-ref";
232 "A reference to a vnfd. This is a
234 ../../../../project-nsd:constituent-vnfd
235 + [id = current()/../id-ref]
236 + /project-nsd:vnfd-id-ref
237 NOTE: An issue with confd is preventing the
238 use of xpath. Seems to be an issue with leafref
239 to leafref, whose target is in a different module.
240 Once that is resovled this will switched to use
245 leaf placement-group-ref {
247 "A reference to VNFD placement group";
249 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
250 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
254 uses manotypes:placement-group-input;
257 list ssh-authorized-key {
260 description "List of authorized ssh keys as part of cloud-config";
263 description "A reference to the key pair entry in the global key pair table";
265 path "../../../../key-pair/name";
272 description "List of users to be added through cloud-config";
274 description "Name of the user ";
279 description "The user name's real name";
283 list ssh-authorized-key {
286 description "Used to configure the list of public keys to be injected as part
287 of ns instantiation";
290 description "A reference to the key pair entry in the global key pair table";
292 path "../../../../../key-pair/name";
305 description "Identifier for the VNFFGR.";
310 description "VNFFG descriptor id reference";
313 path "../../../../ns-instance-config/nsr"
314 // + "[id=current()/../../ns-instance-config-ref]"
319 leaf vnffgd-name-ref {
320 description "VNFFG descriptor name reference";
323 path "../../../../ns-instance-config/nsr"
324 // + "[id=current()/../../ns-instance-config-ref]"
326 // + "[id=current()/../vnffgd-id-ref]"
333 "The SDN account to use when requesting resources for
336 path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
340 leaf operational-status {
342 "The operational status of the VNFFGR instance
343 init : The VNFFGR has just started.
344 running : The VNFFGR is in running state.
345 terminate : The VNFFGR is being terminated.
346 terminated : The VNFFGR is in the terminated state.
347 failed : The VNFFGR instantiation failed
351 rwpb:enum-type "VnffgrOperationalStatus";
365 "Identifier for the RSP.";
375 leaf vnffgd-rsp-id-ref {
377 "Identifier for the VNFFG Descriptor RSP reference";
380 path "../../../../../ns-instance-config/nsr"
381 // + "[id=current()/../../../ns-instance-config-ref]"
383 // + "[id=current()/../../vnffgd-id-ref]"
388 leaf vnffgd-rsp-name-ref {
390 "Name for the VNFFG Descriptor RSP reference";
393 path "../../../../../ns-instance-config/nsr"
394 // + "[id=current()/../../../ns-instance-config-ref]"
396 // + "[id=current()/../../vnffgd-id-ref]"
398 // + "[id=current()/../vnffgd-rsp-id-ref]"
403 leaf classifier-name {
409 "Unique Identifier for the service path";
413 list vnfr-connection-point-ref {
417 "Monotonically increasing number to show service path hop
421 leaf service-function-type {
423 "Type of Service Function.
424 NOTE: This needs to map with Service Function Type in ODL to
425 support VNFFG. Service Function Type is manadatory param in ODL
426 SFC. This is temporarily set to string for ease of use";
430 leaf member-vnf-index-ref {
435 "Reference to VNF Descriptor Id";
440 "A reference to a vnfr id";
442 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
447 "A reference to a vnfr name";
449 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
452 leaf vnfr-connection-point-ref {
454 "A reference to a vnfr connection point.";
456 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
457 + "[vnfr:id = current()/../vnfr-id-ref]"
458 + "/vnfr:connection-point/vnfr:name";
463 "Location within the service path";
466 container connection-point-params {
468 type inet:ip-address;
474 rwpb:field-inline "true";
475 rwpb:field-string-max 64;
479 rwpb:field-inline "true";
480 rwpb:field-string-max 64;
484 type inet:ip-address;
487 type inet:port-number;
491 container service-function-forwarder {
494 "Service Function Forwarder name";
499 "Data Plane IP Address of the SFF";
500 type inet:ip-address;
504 "Data Plane Port of the SFF";
505 type inet:port-number;
516 "Identifier for the classifier rule.";
521 "Name of the classifier.";
526 "A reference to the RSP.";
538 "A reference to a vnfr id";
540 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
545 "A reference to a vnfr name";
547 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
550 leaf vnfr-connection-point-ref {
552 "A reference to a vnfr connection point.";
554 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
555 + "[vnfr:id = current()/../vnfr-id-ref]"
556 + "/vnfr:connection-point/vnfr:name";
560 rwpb:field-inline "true";
561 rwpb:field-string-max 64;
565 rwpb:field-inline "true";
566 rwpb:field-string-max 64;
579 augment "/rw-project:project" {
580 container ns-instance-opdata {
584 key "ns-instance-config-ref";
586 leaf ns-instance-config-ref {
588 path "../../../ns-instance-config/nsr/id";
594 description "Network service name reference";
597 path "../../../ns-instance-config/nsr" +
598 // "[id=current()/../ns-instance-config-ref]" +
604 description "Network service descriptor id reference";
607 path "../../../ns-instance-config/nsr"
608 // + "[id=current()/../ns-instance-config-ref]"
614 description "Network service descriptor name reference";
617 path "../../../ns-instance-config/nsr"
618 // + "[id=current()/../ns-instance-config-ref]"
625 "Creation timestamp of this Network Service.
626 The timestamp is expressed as seconds
627 since unix epoch - 1970-01-01T00:00:00Z";
634 "Active period of this Network Service.
635 Uptime is expressed in seconds";
640 list connection-point {
642 "List for external connection points.
643 Each NS has one or more external connection points.
644 As the name implies that external connection points
645 are used for connecting the NS to other NS or to
646 external networks. Each NS exposes these connection
647 points to the orchestrator. The orchestrator can
648 construct network service chains by connecting the
649 connection points between different NS.";
654 "Name of the NS connection point.";
660 "Type of the connection point.";
661 type manotypes:connection-point-type;
669 "Reference to a VLR record in the VLR catalog";
671 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
676 list vnfr-connection-point-ref {
678 "A list of references to connection points.";
682 description "A reference to a vnfr";
684 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
688 leaf connection-point {
690 "A reference to a connection point name in a vnfr";
692 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
693 + "[vnfr:id = current()/../vnfr-id]"
694 + "/vnfr:connection-point/vnfr:name";
700 list constituent-vnfr-ref {
702 "List of VNFRs that are part of this
708 "Reference to the VNFR id
709 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
710 But due to confd bug (RIFT-9451), changing to string.";
715 list scaling-group-record {
716 description "List of scaling group records";
717 key "scaling-group-name-ref";
719 leaf scaling-group-name-ref {
720 description "name of the scaling group";
723 path "../../../../ns-instance-config/nsr"
724 // + "[id=current()/../../ns-instance-config-ref]"
725 + "/nsd/scaling-group-descriptor/name";
730 description "Reference to scaling group instance record";
733 description "Scaling group instance id";
738 description "Flag indicating whether this instance was part of
739 default scaling group (and thus undeletable)";
745 "The operational status of the NS instance
746 init : The scaling group has just started.
747 vnf-init-phase : The VNFs in the scaling group are being instantiated.
748 running : The scaling group is in running state.
749 terminate : The scaling group is being terminated.
750 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
751 terminated : The scaling group is in the terminated state.
752 failed : The scaling group instantiation failed.
760 enum vnf-terminate-phase;
768 "The configuration status of the scaling group instance
769 configuring : At least one of the VNFs in this scaling group instance
770 is in configuring state
771 configured : All the VNFs in this scaling group instance are
772 configured or config-not-needed state
773 failed : Configuring this scaling group instance failed
780 "Reason for failure in configuration of this scaling instance";
786 "Creation timestamp of this scaling group record.
787 The timestamp is expressed as seconds
788 since unix epoch - 1970-01-01T00:00:00Z";
794 description "Reference to VNFR within the scale instance";
796 path "../../../constituent-vnfr-ref/vnfr-id";
804 leaf operational-status {
806 "The operational status of the NS instance
807 init : The network service has just started.
808 vl-init-phase : The VLs in the NS are being instantiated.
809 vnf-init-phase : The VNFs in the NS are being instantiated.
810 running : The NS is in running state.
811 terminate : The NS is being terminated.
812 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
813 vl-terminate-phase : The NS is terminating the VLs in the NS.
814 terminated : The NS is in the terminated state.
815 failed : The NS instantiation failed.
816 scaling-out : The NS is scaling out
817 scaling-in : The NS is scaling in
818 vl-instantiate : The NS is initiating a new VL
819 vl-terminate : The NS is terminating a VL
828 enum vnf-terminate-phase;
829 enum vl-terminate-phase;
841 "The configuration status of the NS instance
842 configuring: At least one of the VNFs in this instance is in configuring state
843 configured: All the VNFs in this NS instance are configured or config-not-needed state
848 list service-primitive {
850 "Network service level service primitives.";
856 "Name of the service primitive.";
862 "List of parameters for the service primitive.";
865 uses manotypes:primitive-parameter;
868 uses manotypes:ui-primitive-group;
870 list vnf-primitive-group {
872 "List of service primitives grouped by VNF.";
874 key "member-vnf-index-ref";
875 leaf member-vnf-index-ref {
877 "Reference to member-vnf within constituent-vnfds";
883 "A reference to a vnfd. This is a
885 ../../../../nsd:constituent-vnfd
886 + [nsd:id = current()/../nsd:id-ref]
888 NOTE: An issue with confd is preventing the
889 use of xpath. Seems to be an issue with leafref
890 to leafref, whose target is in a different module.
891 Once that is resovled this will switched to use
907 description "Index of this primitive";
912 description "Name of the primitive in the VNF primitive ";
918 leaf user-defined-script {
920 "A user defined script.";
925 list initial-config-primitive {
926 rwpb:msg-new NsrInitialConfigPrimitive;
928 "Initial set of configuration primitives for NSD.";
932 "Sequence number for the configuration primitive.";
938 "Name of the configuration primitive.";
943 leaf user-defined-script {
945 "A user defined script.";
962 list monitoring-param {
964 "List of NS level params.";
967 uses manotypes:monitoring-param-value;
968 uses manotypes:monitoring-param-ui-data;
969 uses manotypes:monitoring-param-aggregation;
979 leaf nsd-mon-param-ref {
980 description "Reference to the NSD monitoring param descriptor
981 that produced this result";
984 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
985 "[project-nsd:id = current()/../../nsd-ref]" +
986 "/project-nsd:monitoring-param/project-nsd:id";
990 list vnfr-mon-param-ref {
991 description "A list of VNFR monitoring params associated with this monp";
992 key "vnfr-id-ref vnfr-mon-param-ref";
996 "A reference to a vnfr. This is a
998 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1003 leaf vnfr-mon-param-ref {
1004 description "A reference to the VNFR monitoring param";
1006 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1007 + "[vnfr:id = current()/../vnfr-id-ref]"
1008 + "/vnfr:monitoring-param/vnfr:id";
1014 list config-agent-job {
1018 description "config agent job Identifier for the NS.";
1023 description "Config agent job name";
1029 "Job status to be set based on each VNF primitive execution,
1030 pending - if at least one VNF is in pending state
1031 and remaining VNFs are in success state.
1032 Success - if all VNF executions are in success state
1033 failure - if one of the VNF executions is failure";
1042 description "The primitive is triggered from NS or VNF level";
1048 "Creation timestamp of this Config Agent Job.
1049 The timestamp is expressed as seconds
1050 since unix epoch - 1970-01-01T00:00:00Z";
1055 leaf job-status-details {
1056 description "Config agent job status details, in case of errors";
1060 uses manotypes:primitive-parameter-value;
1062 list parameter-group {
1064 "List of NS Primitive parameter groups";
1068 "Name of the parameter.";
1072 uses manotypes:primitive-parameter-value;
1078 description "Identifier for the VNFR.";
1081 leaf vnf-job-status {
1083 "Job status to be set based on each VNF primitive execution,
1084 pending - if at least one primitive is in pending state
1085 and remaining primitives are in success state.
1086 Success - if all primitive executions are in success state
1087 failure - if one of the primitive executions is failure";
1098 description "the name of the primitive";
1102 uses manotypes:primitive-parameter-value;
1105 description "Execution id of the primitive";
1108 leaf execution-status {
1109 description "status of the Execution";
1116 leaf execution-error-details {
1117 description "Error details if execution-status is failure";
1127 grouping rpc-common {
1128 uses manotypes:rpc-project-name;
1131 description "Reference to NSR ID ref";
1133 path "/rw-project:project[rw-project:name=current()/.." +
1134 "/project-name]/ns-instance-config/nsr/id";
1139 rpc get-ns-service-primitive-values {
1140 description "Get the service primitive parameter values";
1144 description "Name of the NS service primitive group";
1154 description "Automatically generated parameter";
1158 description "Parameter name which should be pulled from a parameter pool";
1162 description "Automatically generated value";
1167 list ns-parameter-group {
1168 description "Automatically generated parameters in parameter group";
1171 description "Parameter group name";
1175 description "Automatically generated group parameter";
1179 description "Parameter name which should be pulled from a parameter pool";
1183 description "Automatically generated value";
1189 list vnf-primitive-group {
1191 "List of service primitives grouped by VNF.";
1193 key "member-vnf-index-ref";
1194 leaf member-vnf-index-ref {
1196 "Reference to member-vnf within constituent-vnfds";
1202 "A reference to a vnfd. This is a
1204 ../../../../project-nsd:constituent-vnfd
1205 + [project-nsd:id = current()/../project-nsd:id-ref]
1206 + /project-nsd:vnfd-id-ref
1207 NOTE: An issue with confd is preventing the
1208 use of xpath. Seems to be an issue with leafref
1209 to leafref, whose target is in a different module.
1210 Once that is resovled this will switched to use
1219 description "Index of this primitive";
1224 description "Name of the primitive associated with a value pool";
1229 description "Automatically generated parameter";
1233 description "Parameter name which should be pulled from a parameter pool";
1237 description "Automatically generated value";
1246 rpc exec-ns-service-primitive {
1247 description "Executes a NS service primitive or script";
1251 description "Name of the primitive";
1258 description "The primitive is triggered from NS or VNF level";
1260 default ns-primitive;
1263 uses manotypes:primitive-parameter-value;
1265 list parameter-group {
1267 "List of NS Primitive parameter groups";
1271 "Name of the parameter.";
1275 uses manotypes:primitive-parameter-value;
1280 "List of VNFs whose primitives are being set.";
1281 key "member_vnf_index_ref";
1283 leaf member_vnf_index_ref {
1284 description "Member VNF index";
1290 "A reference to a vnfr. This is a
1295 list vnf-primitive {
1297 "List of service primitives supported by the
1298 configuration agent for this VNF.";
1303 "index of the service primitive.";
1308 "Name of the service primitive.";
1312 uses manotypes:primitive-parameter-value;
1315 leaf user-defined-script {
1317 "A user defined script.";
1323 description "Job identifier for this RPC";
1328 description "Name of the service primitive";
1335 description "The primitive is triggered from NS or VNF level";
1341 "Creation timestamp of this config agent JOB.
1342 The timestamp is expressed as seconds
1343 since unix epoch - 1970-01-01T00:00:00Z";
1348 leaf job-status-details {
1349 description "Job status details, in case of any errors";
1353 uses manotypes:primitive-parameter-value;
1355 list parameter-group {
1357 "List of NS Primitive parameter groups";
1361 "Name of the parameter.";
1365 uses manotypes:primitive-parameter-value;
1370 "List of VNFs whose primitives were set.";
1371 key "member_vnf_index_ref";
1373 leaf member_vnf_index_ref {
1374 description "Member VNF index";
1379 "A reference to a vnfr. This is a
1384 list vnf-out-primitive {
1386 "List of service primitives supported by the
1387 configuration agent for this VNF.";
1392 "index of the service primitive.";
1398 "Name of the service primitive.";
1402 uses manotypes:primitive-parameter-value;
1405 description "Execution id of this primitive";
1409 leaf execution-status {
1410 description "Status of the execution of this primitive";
1414 leaf execution-error-details {
1415 description "Error details if execution-status is failed";
1424 description "Executes scale out request";
1429 leaf scaling-group-name-ref {
1430 description "name of the scaling group";
1435 description "id of the scaling group";
1443 description "id of the scaling group";
1449 rpc exec-scale-out {
1450 description "Executes scale out request";
1455 leaf scaling-group-name-ref {
1456 description "name of the scaling group";
1461 description "id of the scaling group";
1468 description "id of the scaling group";
1474 rpc start-network-service {
1475 description "Start the network service";
1479 description "Name of the Network Service";
1485 uses ns-instance-config-params-common;
1487 list vnfd-placement-group-maps {
1489 "Mapping from mano-placement groups construct from VNFD to cloud
1490 platform placement group construct";
1492 key "placement-group-ref vnfd-id-ref";
1496 "A reference to a vnfd. This is a
1498 ../../../../project-nsd:constituent-vnfd
1499 + [id = current()/../project-nsd:id-ref]
1500 + /project-nsd:vnfd-id-ref
1501 NOTE: An issue with confd is preventing the
1502 use of xpath. Seems to be an issue with leafref
1503 to leafref, whose target is in a different module.
1504 Once that is resovled this will switched to use
1509 leaf placement-group-ref {
1511 "A reference to VNFD placement group";
1513 path "/rw-project:project[rw-project:name=current()/" +
1514 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1515 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1519 uses manotypes:placement-group-input;
1521 list ssh-authorized-key {
1524 description "List of authorized ssh keys as part of cloud-config";
1527 description "A reference to the key pair entry in the global key pair table";
1529 path "/rw-project:project[rw-project:name=current()/../../../" +
1530 "project-name]/key-pair/name";
1538 description "List of users to be added through cloud-config";
1540 description "Name of the user ";
1544 description "The user name's real name";
1547 list ssh-authorized-key {
1550 description "Used to configure the list of public keys to be injected as part
1551 of ns instantiation";
1554 description "A reference to the key pair entry in the global key pair table";
1556 path "/rw-project:project[rw-project:name=current()/" +
1557 "../../../../project-name]/key-pair/name";
1567 description "Automatically generated parameter";