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;
174 uses ns-instance-config-params;
179 grouping ns-instance-config-params-common {
180 uses manotypes:input-parameter;
183 description "List of ns scaling group instances";
184 key "scaling-group-name-ref";
186 leaf scaling-group-name-ref {
187 description "name of the scaling group
188 leafref path ../../nsd/scaling-group-descriptor/name";
193 description "The instance of the scaling group";
196 description "Scaling group instance uuid";
202 list nsd-placement-group-maps {
204 "Mapping from mano-placement groups construct from NSD to cloud
205 platform placement group construct";
207 key "placement-group-ref";
209 leaf placement-group-ref {
210 description "Reference for NSD placement group
211 leafref path ../../nsd/placement-groups/name";
214 uses manotypes:placement-group-input;
218 grouping ns-instance-config-params {
219 uses ns-instance-config-params-common;
221 list vnfd-placement-group-maps {
223 "Mapping from mano-placement groups construct from VNFD to cloud
224 platform placement group construct";
226 key "placement-group-ref vnfd-id-ref";
230 "A reference to a vnfd. This is a
232 ../../../../project-nsd:constituent-vnfd
233 + [id = current()/../id-ref]
234 + /project-nsd:vnfd-id-ref
235 NOTE: An issue with confd is preventing the
236 use of xpath. Seems to be an issue with leafref
237 to leafref, whose target is in a different module.
238 Once that is resovled this will switched to use
243 leaf placement-group-ref {
245 "A reference to VNFD placement group";
247 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
248 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
252 uses manotypes:placement-group-input;
255 list ssh-authorized-key {
258 description "List of authorized ssh keys as part of cloud-config";
261 description "A reference to the key pair entry in the global key pair table";
263 path "../../../../key-pair/name";
270 description "List of users to be added through cloud-config";
272 description "Name of the user ";
277 description "The user name's real name";
281 list ssh-authorized-key {
284 description "Used to configure the list of public keys to be injected as part
285 of ns instantiation";
288 description "A reference to the key pair entry in the global key pair table";
290 path "../../../../../key-pair/name";
303 description "Identifier for the VNFFGR.";
308 description "VNFFG descriptor id reference";
311 path "../../../../ns-instance-config/nsr"
312 // + "[id=current()/../../ns-instance-config-ref]"
317 leaf vnffgd-name-ref {
318 description "VNFFG descriptor name reference";
321 path "../../../../ns-instance-config/nsr"
322 // + "[id=current()/../../ns-instance-config-ref]"
324 // + "[id=current()/../vnffgd-id-ref]"
331 "The SDN account to use when requesting resources for
334 path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn:name";
338 leaf operational-status {
340 "The operational status of the VNFFGR instance
341 init : The VNFFGR has just started.
342 running : The VNFFGR is in running state.
343 terminate : The VNFFGR is being terminated.
344 terminated : The VNFFGR is in the terminated state.
345 failed : The VNFFGR instantiation failed
349 rwpb:enum-type "VnffgrOperationalStatus";
363 "Identifier for the RSP.";
373 leaf vnffgd-rsp-id-ref {
375 "Identifier for the VNFFG Descriptor RSP reference";
378 path "../../../../../ns-instance-config/nsr"
379 // + "[id=current()/../../../ns-instance-config-ref]"
381 // + "[id=current()/../../vnffgd-id-ref]"
386 leaf vnffgd-rsp-name-ref {
388 "Name for the VNFFG Descriptor RSP reference";
391 path "../../../../../ns-instance-config/nsr"
392 // + "[id=current()/../../../ns-instance-config-ref]"
394 // + "[id=current()/../../vnffgd-id-ref]"
396 // + "[id=current()/../vnffgd-rsp-id-ref]"
401 leaf classifier-name {
407 "Unique Identifier for the service path";
411 list vnfr-connection-point-ref {
415 "Monotonically increasing number to show service path hop
419 leaf service-function-type {
421 "Type of Service Function.
422 NOTE: This needs to map with Service Function Type in ODL to
423 support VNFFG. Service Function Type is manadatory param in ODL
424 SFC. This is temporarily set to string for ease of use";
428 leaf member-vnf-index-ref {
433 "Reference to VNF Descriptor Id";
438 "A reference to a vnfr id";
440 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
445 "A reference to a vnfr name";
447 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
450 leaf vnfr-connection-point-ref {
452 "A reference to a vnfr connection point.";
454 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
455 + "[vnfr:id = current()/../vnfr-id-ref]"
456 + "/vnfr:connection-point/vnfr:name";
461 "Location within the service path";
464 container connection-point-params {
466 type inet:ip-address;
472 rwpb:field-inline "true";
473 rwpb:field-string-max 64;
477 rwpb:field-inline "true";
478 rwpb:field-string-max 64;
482 type inet:ip-address;
485 type inet:port-number;
489 container service-function-forwarder {
492 "Service Function Forwarder name";
497 "Data Plane IP Address of the SFF";
498 type inet:ip-address;
502 "Data Plane Port of the SFF";
503 type inet:port-number;
514 "Identifier for the classifier rule.";
519 "Name of the classifier.";
524 "A reference to the RSP.";
536 "A reference to a vnfr id";
538 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
543 "A reference to a vnfr name";
545 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
548 leaf vnfr-connection-point-ref {
550 "A reference to a vnfr connection point.";
552 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
553 + "[vnfr:id = current()/../vnfr-id-ref]"
554 + "/vnfr:connection-point/vnfr:name";
558 rwpb:field-inline "true";
559 rwpb:field-string-max 64;
563 rwpb:field-inline "true";
564 rwpb:field-string-max 64;
577 augment "/rw-project:project" {
578 container ns-instance-opdata {
582 key "ns-instance-config-ref";
584 leaf ns-instance-config-ref {
586 path "../../../ns-instance-config/nsr/id";
592 description "Network service name reference";
595 path "../../../ns-instance-config/nsr" +
596 // "[id=current()/../ns-instance-config-ref]" +
602 description "Network service descriptor id reference";
605 path "../../../ns-instance-config/nsr"
606 // + "[id=current()/../ns-instance-config-ref]"
612 description "Network service descriptor name reference";
615 path "../../../ns-instance-config/nsr"
616 // + "[id=current()/../ns-instance-config-ref]"
623 "Creation timestamp of this Network Service.
624 The timestamp is expressed as seconds
625 since unix epoch - 1970-01-01T00:00:00Z";
632 "Active period of this Network Service.
633 Uptime is expressed in seconds";
638 list connection-point {
640 "List for external connection points.
641 Each NS has one or more external connection points.
642 As the name implies that external connection points
643 are used for connecting the NS to other NS or to
644 external networks. Each NS exposes these connection
645 points to the orchestrator. The orchestrator can
646 construct network service chains by connecting the
647 connection points between different NS.";
652 "Name of the NS connection point.";
658 "Type of the connection point.";
659 type manotypes:connection-point-type;
667 "Reference to a VLR record in the VLR catalog";
669 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
674 list vnfr-connection-point-ref {
676 "A list of references to connection points.";
680 description "A reference to a vnfr";
682 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
686 leaf connection-point {
688 "A reference to a connection point name in a vnfr";
690 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
691 + "[vnfr:id = current()/../vnfr-id]"
692 + "/vnfr:connection-point/vnfr:name";
698 list constituent-vnfr-ref {
700 "List of VNFRs that are part of this
706 "Reference to the VNFR id
707 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
708 But due to confd bug (RIFT-9451), changing to string.";
713 list scaling-group-record {
714 description "List of scaling group records";
715 key "scaling-group-name-ref";
717 leaf scaling-group-name-ref {
718 description "name of the scaling group";
721 path "../../../../ns-instance-config/nsr"
722 // + "[id=current()/../../ns-instance-config-ref]"
723 + "/nsd/scaling-group-descriptor/name";
728 description "Reference to scaling group instance record";
731 description "Scaling group instance id";
736 description "Flag indicating whether this instance was part of
737 default scaling group (and thus undeletable)";
743 "The operational status of the NS instance
744 init : The scaling group has just started.
745 vnf-init-phase : The VNFs in the scaling group are being instantiated.
746 running : The scaling group is in running state.
747 terminate : The scaling group is being terminated.
748 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
749 terminated : The scaling group is in the terminated state.
750 failed : The scaling group instantiation failed.
758 enum vnf-terminate-phase;
766 "The configuration status of the scaling group instance
767 configuring : At least one of the VNFs in this scaling group instance
768 is in configuring state
769 configured : All the VNFs in this scaling group instance are
770 configured or config-not-needed state
771 failed : Configuring this scaling group instance failed
778 "Reason for failure in configuration of this scaling instance";
784 "Creation timestamp of this scaling group record.
785 The timestamp is expressed as seconds
786 since unix epoch - 1970-01-01T00:00:00Z";
792 description "Reference to VNFR within the scale instance";
794 path "../../../constituent-vnfr-ref/vnfr-id";
802 leaf operational-status {
804 "The operational status of the NS instance
805 init : The network service has just started.
806 vl-init-phase : The VLs in the NS are being instantiated.
807 vnf-init-phase : The VNFs in the NS are being instantiated.
808 running : The NS is in running state.
809 terminate : The NS is being terminated.
810 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
811 vl-terminate-phase : The NS is terminating the VLs in the NS.
812 terminated : The NS is in the terminated state.
813 failed : The NS instantiation failed.
814 scaling-out : The NS is scaling out
815 scaling-in : The NS is scaling in
816 vl-instantiate : The NS is initiating a new VL
817 vl-terminate : The NS is terminating a VL
826 enum vnf-terminate-phase;
827 enum vl-terminate-phase;
839 "The configuration status of the NS instance
840 configuring: At least one of the VNFs in this instance is in configuring state
841 configured: All the VNFs in this NS instance are configured or config-not-needed state
846 uses manotypes:ns-service-primitive;
848 list initial-config-primitive {
849 rwpb:msg-new NsrInitialConfigPrimitive;
851 "Initial set of configuration primitives for NSD.";
855 "Sequence number for the configuration primitive.";
861 "Name of the configuration primitive.";
866 leaf user-defined-script {
868 "A user defined script.";
885 list monitoring-param {
887 "List of NS level params.";
890 uses manotypes:monitoring-param-value;
891 uses manotypes:monitoring-param-ui-data;
892 uses manotypes:monitoring-param-aggregation;
902 leaf nsd-mon-param-ref {
903 description "Reference to the NSD monitoring param descriptor
904 that produced this result";
907 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
908 "[project-nsd:id = current()/../../nsd-ref]" +
909 "/project-nsd:monitoring-param/project-nsd:id";
913 list vnfr-mon-param-ref {
914 description "A list of VNFR monitoring params associated with this monp";
915 key "vnfr-id-ref vnfr-mon-param-ref";
919 "A reference to a vnfr. This is a
921 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
926 leaf vnfr-mon-param-ref {
927 description "A reference to the VNFR monitoring param";
929 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
930 + "[vnfr:id = current()/../vnfr-id-ref]"
931 + "/vnfr:monitoring-param/vnfr:id";
937 list config-agent-job {
941 description "config agent job Identifier for the NS.";
946 description "Config agent job name";
952 "Job status to be set based on each VNF primitive execution,
953 pending - if at least one VNF is in pending state
954 and remaining VNFs are in success state.
955 Success - if all VNF executions are in success state
956 failure - if one of the VNF executions is failure";
965 description "The primitive is triggered from NS or VNF level";
971 "Creation timestamp of this Config Agent Job.
972 The timestamp is expressed as seconds
973 since unix epoch - 1970-01-01T00:00:00Z";
978 leaf job-status-details {
979 description "Config agent job status details, in case of errors";
983 uses manotypes:primitive-parameter-value;
985 list parameter-group {
987 "List of NS Primitive parameter groups";
991 "Name of the parameter.";
995 uses manotypes:primitive-parameter-value;
1001 description "Identifier for the VNFR.";
1004 leaf vnf-job-status {
1006 "Job status to be set based on each VNF primitive execution,
1007 pending - if at least one primitive is in pending state
1008 and remaining primitives are in success state.
1009 Success - if all primitive executions are in success state
1010 failure - if one of the primitive executions is failure";
1021 description "the name of the primitive";
1025 uses manotypes:primitive-parameter-value;
1028 description "Execution id of the primitive";
1031 leaf execution-status {
1032 description "status of the Execution";
1039 leaf execution-error-details {
1040 description "Error details if execution-status is failure";
1050 grouping rpc-common {
1051 uses manotypes:rpc-project-name;
1054 description "Reference to NSR ID ref";
1056 path "/rw-project:project[rw-project:name=current()/.." +
1057 "/project-name]/ns-instance-config/nsr/id";
1062 rpc get-ns-service-primitive-values {
1063 description "Get the service primitive parameter values";
1067 description "Name of the NS service primitive group";
1077 description "Automatically generated parameter";
1081 description "Parameter name which should be pulled from a parameter pool";
1085 description "Automatically generated value";
1090 list ns-parameter-group {
1091 description "Automatically generated parameters in parameter group";
1094 description "Parameter group name";
1098 description "Automatically generated group parameter";
1102 description "Parameter name which should be pulled from a parameter pool";
1106 description "Automatically generated value";
1112 list vnf-primitive-group {
1114 "List of service primitives grouped by VNF.";
1116 key "member-vnf-index-ref";
1117 leaf member-vnf-index-ref {
1119 "Reference to member-vnf within constituent-vnfds";
1125 "A reference to a vnfd. This is a
1127 ../../../../project-nsd:constituent-vnfd
1128 + [project-nsd:id = current()/../project-nsd:id-ref]
1129 + /project-nsd:vnfd-id-ref
1130 NOTE: An issue with confd is preventing the
1131 use of xpath. Seems to be an issue with leafref
1132 to leafref, whose target is in a different module.
1133 Once that is resovled this will switched to use
1142 description "Index of this primitive";
1147 description "Name of the primitive associated with a value pool";
1152 description "Automatically generated parameter";
1156 description "Parameter name which should be pulled from a parameter pool";
1160 description "Automatically generated value";
1169 rpc exec-ns-service-primitive {
1170 description "Executes a NS service primitive or script";
1174 description "Name of the primitive";
1181 description "The primitive is triggered from NS or VNF level";
1183 default ns-primitive;
1186 uses manotypes:primitive-parameter-value;
1188 list parameter-group {
1190 "List of NS Primitive parameter groups";
1194 "Name of the parameter.";
1198 uses manotypes:primitive-parameter-value;
1203 "List of VNFs whose primitives are being set.";
1204 key "member_vnf_index_ref";
1206 leaf member_vnf_index_ref {
1207 description "Member VNF index";
1213 "A reference to a vnfr. This is a
1218 list vnf-primitive {
1220 "List of service primitives supported by the
1221 configuration agent for this VNF.";
1226 "index of the service primitive.";
1231 "Name of the service primitive.";
1235 uses manotypes:primitive-parameter-value;
1238 leaf user-defined-script {
1240 "A user defined script.";
1246 description "Job identifier for this RPC";
1251 description "Name of the service primitive";
1258 description "The primitive is triggered from NS or VNF level";
1264 "Creation timestamp of this config agent JOB.
1265 The timestamp is expressed as seconds
1266 since unix epoch - 1970-01-01T00:00:00Z";
1271 leaf job-status-details {
1272 description "Job status details, in case of any errors";
1276 uses manotypes:primitive-parameter-value;
1278 list parameter-group {
1280 "List of NS Primitive parameter groups";
1284 "Name of the parameter.";
1288 uses manotypes:primitive-parameter-value;
1293 "List of VNFs whose primitives were set.";
1294 key "member_vnf_index_ref";
1296 leaf member_vnf_index_ref {
1297 description "Member VNF index";
1302 "A reference to a vnfr. This is a
1307 list vnf-out-primitive {
1309 "List of service primitives supported by the
1310 configuration agent for this VNF.";
1315 "index of the service primitive.";
1321 "Name of the service primitive.";
1325 uses manotypes:primitive-parameter-value;
1328 description "Execution id of this primitive";
1332 leaf execution-status {
1333 description "Status of the execution of this primitive";
1337 leaf execution-error-details {
1338 description "Error details if execution-status is failed";
1347 description "Executes scale out request";
1352 leaf scaling-group-name-ref {
1353 description "name of the scaling group";
1358 description "id of the scaling group";
1366 description "id of the scaling group";
1372 rpc exec-scale-out {
1373 description "Executes scale out request";
1378 leaf scaling-group-name-ref {
1379 description "name of the scaling group";
1384 description "id of the scaling group";
1391 description "id of the scaling group";
1397 rpc start-network-service {
1398 description "Start the network service";
1402 description "Name of the Network Service";
1408 uses ns-instance-config-params-common;
1410 list vnfd-placement-group-maps {
1412 "Mapping from mano-placement groups construct from VNFD to cloud
1413 platform placement group construct";
1415 key "placement-group-ref vnfd-id-ref";
1419 "A reference to a vnfd. This is a
1421 ../../../../project-nsd:constituent-vnfd
1422 + [id = current()/../project-nsd:id-ref]
1423 + /project-nsd:vnfd-id-ref
1424 NOTE: An issue with confd is preventing the
1425 use of xpath. Seems to be an issue with leafref
1426 to leafref, whose target is in a different module.
1427 Once that is resovled this will switched to use
1432 leaf placement-group-ref {
1434 "A reference to VNFD placement group";
1436 path "/rw-project:project[rw-project:name=current()/" +
1437 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1438 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1442 uses manotypes:placement-group-input;
1444 list ssh-authorized-key {
1447 description "List of authorized ssh keys as part of cloud-config";
1450 description "A reference to the key pair entry in the global key pair table";
1452 path "/rw-project:project[rw-project:name=current()/../../../" +
1453 "project-name]/key-pair/name";
1461 description "List of users to be added through cloud-config";
1463 description "Name of the user ";
1467 description "The user name's real name";
1470 list ssh-authorized-key {
1473 description "Used to configure the list of public keys to be injected as part
1474 of ns instantiation";
1477 description "A reference to the key pair entry in the global key pair table";
1479 path "/rw-project:project[rw-project:name=current()/" +
1480 "../../../../project-name]/key-pair/name";
1490 description "Automatically generated parameter";