4 * Copyright 2016 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";
50 import ietf-inet-types {
54 import ietf-yang-types {
68 "Initial revision. This YANG file defines
69 the Network Service Record (NSR)";
71 "Derived from earlier versions of base YANG files";
74 typedef config-states {
78 enum config_not_needed;
84 typedef trigger-type {
91 grouping cloud-config {
92 description "List of cloud config parameters";
94 list ssh-authorized-key {
97 description "List of authorized ssh keys as part of cloud-config";
100 description "A reference to the key pair entry in the global key pair table";
107 description "List of users to be added through cloud-config";
109 description "Name of the user ";
113 description "The user name's real name";
118 description "Used to configure the list of public keys to be injected as part
119 of ns instantiation";
122 description "Name of this key pair";
127 description "Key associated with this key pair";
136 description "Used to configure the list of public keys to be injected as part
137 of ns instantiation";
139 description "Name of this key pair";
144 description "Key associated with this key pair";
149 rpc start-network-service {
150 description "Start the network service";
154 description "Name of the Network Service";
158 description "Reference to NSR ID ref";
162 uses ns-instance-config-params;
167 description "Automatically generated parameter";
175 container ns-instance-config {
182 description "Identifier for the NSR.";
187 description "NSR name.";
192 description "NSR short name.";
197 description "NSR description.";
203 "This is the administrative status of the NS instance";
212 description "NS descriptor used to instantiate this NS";
213 uses nsd:nsd-descriptor;
216 uses ns-instance-config-params;
220 grouping ns-instance-config-params {
221 uses manotypes:input-parameter;
224 description "List of ns scaling group instances";
225 key "scaling-group-name-ref";
227 leaf scaling-group-name-ref {
228 description "name of the scaling group
229 leafref path ../../nsd/scaling-group-descriptor/name";
234 description "The instance of the scaling group";
237 description "Scaling group instance uuid";
243 list nsd-placement-group-maps {
245 "Mapping from mano-placement groups construct from NSD to cloud
246 platform placement group construct";
248 key "placement-group-ref";
250 leaf placement-group-ref {
251 description "Reference for NSD placement group
252 leafref path ../../nsd/placement-groups/name";
255 uses manotypes:placement-group-input;
258 list vnfd-placement-group-maps {
260 "Mapping from mano-placement groups construct from VNFD to cloud
261 platform placement group construct";
263 key "placement-group-ref vnfd-id-ref";
267 "A reference to a vnfd. This is a
269 ../../../../nsd:constituent-vnfd
270 + [nsr:id = current()/../nsd:id-ref]
272 NOTE: An issue with confd is preventing the
273 use of xpath. Seems to be an issue with leafref
274 to leafref, whose target is in a different module.
275 Once that is resovled this will switched to use
280 leaf placement-group-ref {
282 "A reference to VNFD placement group";
284 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
285 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
289 uses manotypes:placement-group-input;
300 description "Identifier for the VNFFGR.";
305 description "VNFFG descriptor id reference";
307 path "/nsr:ns-instance-config/nsr:nsr"
308 + "[nsr:id=current()/../../ns-instance-config-ref]"
309 + "/nsr:nsd/nsr:vnffgd/nsr:id";
313 leaf vnffgd-name-ref {
314 description "VNFFG descriptor name reference";
316 path "/ns-instance-config/nsr"
317 + "[id=current()/../../ns-instance-config-ref]"
318 + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
325 "The SDN account to use when requesting resources for
328 path "/rwsdn:sdn-account/rwsdn:name";
332 leaf operational-status {
334 "The operational status of the VNFFGR instance
335 init : The VNFFGR has just started.
336 running : The VNFFGR is in running state.
337 terminate : The VNFFGR is being terminated.
338 terminated : The VNFFGR is in the terminated state.
339 failed : The VNFFGR instantiation failed
343 rwpb:enum-type "VnffgrOperationalStatus";
357 "Identifier for the RSP.";
367 leaf vnffgd-rsp-id-ref {
369 "Identifier for the VNFFG Descriptor RSP reference";
371 path "/ns-instance-config/nsr"
372 + "[id=current()/../../../ns-instance-config-ref]"
374 + "[id=current()/../../vnffgd-id-ref]"
379 leaf vnffgd-rsp-name-ref {
381 "Name for the VNFFG Descriptor RSP reference";
383 path "/ns-instance-config/nsr:nsr"
384 + "[id=current()/../../../ns-instance-config-ref]"
386 + "[id=current()/../../vnffgd-id-ref]"
387 + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
392 leaf classifier-name {
398 "Unique Identifier for the service path";
402 list vnfr-connection-point-ref {
406 "Monotonically increasing number to show service path hop
410 leaf service-function-type {
412 "Type of Service Function.
413 NOTE: This needs to map with Service Function Type in ODL to
414 support VNFFG. Service Function Type is manadatory param in ODL
415 SFC. This is temporarily set to string for ease of use";
419 leaf member-vnf-index-ref {
424 "Reference to VNF Descriptor Id";
429 "A reference to a vnfr id";
431 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
436 "A reference to a vnfr name";
438 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
441 leaf vnfr-connection-point-ref {
443 "A reference to a vnfr connection point.";
445 path "/vnfr:vnfr-catalog/vnfr:vnfr"
446 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
447 + "/vnfr:connection-point/vnfr:name";
452 "Location within the service path";
455 container connection-point-params {
457 type inet:ip-address;
463 rwpb:field-inline "true";
464 rwpb:field-string-max 64;
468 rwpb:field-inline "true";
469 rwpb:field-string-max 64;
473 type inet:ip-address;
476 type inet:port-number;
480 container service-function-forwarder {
483 "Service Function Forwarder name";
488 "Data Plane IP Address of the SFF";
489 type inet:ip-address;
493 "Data Plane Port of the SFF";
494 type inet:port-number;
505 "Identifier for the classifier rule.";
510 "Name of the classifier.";
515 "A reference to the RSP.";
517 path "../../nsr:rsp/nsr:id";
527 "A reference to a vnfr id";
529 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
534 "A reference to a vnfr name";
536 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
539 leaf vnfr-connection-point-ref {
541 "A reference to a vnfr connection point.";
543 path "/vnfr:vnfr-catalog/vnfr:vnfr"
544 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
545 + "/vnfr:connection-point/vnfr:name";
549 rwpb:field-inline "true";
550 rwpb:field-string-max 64;
554 rwpb:field-inline "true";
555 rwpb:field-string-max 64;
568 container ns-instance-opdata {
572 key "ns-instance-config-ref";
574 leaf ns-instance-config-ref {
576 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
581 description "Network service name reference";
583 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
588 description "Network service descriptor id reference";
590 path "/ns-instance-config/nsr"
591 + "[id=current()/../ns-instance-config-ref]"
597 description "Network service descriptor name reference";
599 path "/ns-instance-config/nsr"
600 + "[id=current()/../ns-instance-config-ref]"
607 "Creation timestamp of this Network Service.
608 The timestamp is expressed as seconds
609 since unix epoch - 1970-01-01T00:00:00Z";
614 list connection-point {
616 "List for external connection points.
617 Each NS has one or more external connection points.
618 As the name implies that external connection points
619 are used for connecting the NS to other NS or to
620 external networks. Each NS exposes these connection
621 points to the orchestrator. The orchestrator can
622 construct network service chains by connecting the
623 connection points between different NS.";
628 "Name of the NS connection point.";
634 "Type of the connection point.";
635 type manotypes:connection-point-type;
643 "Reference to a VLR record in the VLR catalog";
645 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
650 list vnfr-connection-point-ref {
652 "A list of references to connection points.";
656 description "A reference to a vnfr";
658 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
662 leaf connection-point {
664 "A reference to a connection point name in a vnfr";
666 path "/vnfr:vnfr-catalog/vnfr:vnfr"
667 + "[vnfr:id = current()/../nsr:vnfr-id]"
668 + "/vnfr:connection-point/vnfr:name";
674 list constituent-vnfr-ref {
676 "List of VNFRs that are part of this
682 "Reference to the VNFR id
683 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
684 But due to confd bug (RIFT-9451), changing to string.
690 list scaling-group-record {
691 description "List of scaling group records";
692 key "scaling-group-name-ref";
694 leaf scaling-group-name-ref {
695 description "name of the scaling group";
697 path "/ns-instance-config/nsr"
698 + "[id=current()/../../ns-instance-config-ref]"
699 + "/nsd/scaling-group-descriptor/name";
704 description "Reference to scaling group instance record";
707 description "Scaling group instance id";
712 description "Flag indicating whether this instance was part of
713 default scaling group (and thus undeletable)";
719 "The operational status of the NS instance
720 init : The scaling group has just started.
721 vnf-init-phase : The VNFs in the scaling group are being instantiated.
722 running : The scaling group is in running state.
723 terminate : The scaling group is being terminated.
724 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
725 terminated : The scaling group is in the terminated state.
726 failed : The scaling group instantiation failed.
734 enum vnf-terminate-phase;
742 "The configuration status of the scaling group instance
743 configuring : At least one of the VNFs in this scaling group instance
744 is in configuring state
745 configured : All the VNFs in this scaling group instance are
746 configured or config-not-needed state
747 failed : Configuring this scaling group instance failed
754 "Reason for failure in configuration of this scaling instance";
760 "Creation timestamp of this scaling group record.
761 The timestamp is expressed as seconds
762 since unix epoch - 1970-01-01T00:00:00Z";
768 description "Reference to VNFR within the scale instance";
770 path "../../../constituent-vnfr-ref/vnfr-id";
778 leaf operational-status {
780 "The operational status of the NS instance
781 init : The network service has just started.
782 vl-init-phase : The VLs in the NS are being instantiated.
783 vnf-init-phase : The VNFs in the NS are being instantiated.
784 running : The NS is in running state.
785 terminate : The NS is being terminated.
786 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
787 vl-terminate-phase : The NS is terminating the VLs in the NS.
788 terminated : The NS is in the terminated state.
789 failed : The NS instantiation failed.
790 scaling-out : The NS is scaling out
791 scaling-in : The NS is scaling in
792 vl-instantiate : The NS is initiating a new VL
793 vl-terminate : The NS is terminating a VL
802 enum vnf-terminate-phase;
803 enum vl-terminate-phase;
815 "The configuration status of the NS instance
816 configuring: At least one of the VNFs in this instance is in configuring state
817 configured: All the VNFs in this NS instance are configured or config-not-needed state
822 uses manotypes:ns-service-primitive;
824 list initial-config-primitive {
825 rwpb:msg-new NsrInitialConfigPrimitive;
827 "Initial set of configuration primitives for NSD.";
831 "Sequence number for the configuration primitive.";
837 "Name of the configuration primitive.";
842 leaf user-defined-script {
844 "A user defined script.";
861 list monitoring-param {
863 "List of NS level params.";
866 uses manotypes:monitoring-param-value;
867 uses manotypes:monitoring-param-ui-data;
868 uses manotypes:monitoring-param-aggregation;
878 leaf nsd-mon-param-ref {
879 description "Reference to the NSD monitoring param descriptor
880 that produced this result";
882 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
883 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
887 list vnfr-mon-param-ref {
888 description "A list of VNFR monitoring params associated with this monp";
889 key "vnfr-id-ref vnfr-mon-param-ref";
893 "A reference to a vnfr. This is a
895 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
900 leaf vnfr-mon-param-ref {
901 description "A reference to the VNFR monitoring param";
903 path "/vnfr:vnfr-catalog/vnfr:vnfr"
904 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
905 + "/vnfr:monitoring-param/vnfr:id";
911 list config-agent-job {
915 description "config agent job Identifier for the NS.";
920 description "Config agent job name";
926 "Job status to be set based on each VNF primitive execution,
927 pending - if at least one VNF is in pending state
928 and remaining VNFs are in success state.
929 Success - if all VNF executions are in success state
930 failure - if one of the VNF executions is failure";
939 description "The primitive is triggered from NS or VNF level";
945 "Creation timestamp of this Config Agent Job.
946 The timestamp is expressed as seconds
947 since unix epoch - 1970-01-01T00:00:00Z";
952 leaf job-status-details {
953 description "Config agent job status details, in case of errors";
957 uses manotypes:primitive-parameter-value;
959 list parameter-group {
961 "List of NS Primitive parameter groups";
965 "Name of the parameter.";
969 uses manotypes:primitive-parameter-value;
975 description "Identifier for the VNFR.";
978 leaf vnf-job-status {
980 "Job status to be set based on each VNF primitive execution,
981 pending - if at least one primitive is in pending state
982 and remaining primitives are in success state.
983 Success - if all primitive executions are in success state
984 failure - if one of the primitive executions is failure";
995 description "the name of the primitive";
999 uses manotypes:primitive-parameter-value;
1002 description "Execution id of the primitive";
1005 leaf execution-status {
1006 description "status of the Execution";
1013 leaf execution-error-details {
1014 description "Error details if execution-status is failure";
1023 rpc get-ns-service-primitive-values {
1024 description "Get the service primitive parameter values";
1027 description "Reference to NSR ID ref";
1030 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1035 description "Name of the NS service primitive group";
1043 description "Automatically generated parameter";
1047 description "Parameter name which should be pulled from a parameter pool";
1051 description "Automatically generated value";
1056 list ns-parameter-group {
1057 description "Automatically generated parameters in parameter group";
1060 description "Parameter group name";
1064 description "Automatically generated group parameter";
1068 description "Parameter name which should be pulled from a parameter pool";
1072 description "Automatically generated value";
1078 list vnf-primitive-group {
1080 "List of service primitives grouped by VNF.";
1082 key "member-vnf-index-ref";
1083 leaf member-vnf-index-ref {
1085 "Reference to member-vnf within constituent-vnfds";
1091 "A reference to a vnfd. This is a
1093 ../../../../nsd:constituent-vnfd
1094 + [nsd:id = current()/../nsd:id-ref]
1096 NOTE: An issue with confd is preventing the
1097 use of xpath. Seems to be an issue with leafref
1098 to leafref, whose target is in a different module.
1099 Once that is resovled this will switched to use
1108 description "Index of this primitive";
1113 description "Name of the primitive associated with a value pool";
1118 description "Automatically generated parameter";
1122 description "Parameter name which should be pulled from a parameter pool";
1126 description "Automatically generated value";
1135 rpc exec-ns-service-primitive {
1136 description "Executes a NS service primitive or script";
1140 description "Name of the primitive";
1145 description "Reference to NSR ID ref";
1147 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1152 description "The primitive is triggered from NS or VNF level";
1154 default ns-primitive;
1157 uses manotypes:primitive-parameter-value;
1159 list parameter-group {
1161 "List of NS Primitive parameter groups";
1165 "Name of the parameter.";
1169 uses manotypes:primitive-parameter-value;
1174 "List of VNFs whose primitives are being set.";
1175 key "member_vnf_index_ref";
1177 leaf member_vnf_index_ref {
1178 description "Member VNF index";
1184 "A reference to a vnfr. This is a
1189 list vnf-primitive {
1191 "List of service primitives supported by the
1192 configuration agent for this VNF.";
1197 "index of the service primitive.";
1202 "Name of the service primitive.";
1206 uses manotypes:primitive-parameter-value;
1209 leaf user-defined-script {
1211 "A user defined script.";
1217 description "Job identifier for this RPC";
1222 description "Name of the service primitive";
1227 description "Reference to NSR ID ref";
1229 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1234 description "The primitive is triggered from NS or VNF level";
1240 "Creation timestamp of this config agent JOB.
1241 The timestamp is expressed as seconds
1242 since unix epoch - 1970-01-01T00:00:00Z";
1247 leaf job-status-details {
1248 description "Job status details, in case of any errors";
1252 uses manotypes:primitive-parameter-value;
1254 list parameter-group {
1256 "List of NS Primitive parameter groups";
1260 "Name of the parameter.";
1264 uses manotypes:primitive-parameter-value;
1269 "List of VNFs whose primitives were set.";
1270 key "member_vnf_index_ref";
1272 leaf member_vnf_index_ref {
1273 description "Member VNF index";
1278 "A reference to a vnfr. This is a
1283 list vnf-out-primitive {
1285 "List of service primitives supported by the
1286 configuration agent for this VNF.";
1291 "index of the service primitive.";
1297 "Name of the service primitive.";
1301 uses manotypes:primitive-parameter-value;
1304 description "Execution id of this primitive";
1308 leaf execution-status {
1309 description "Status of the execution of this primitive";
1313 leaf execution-error-details {
1314 description "Error details if execution-status is failed";
1323 description "Executes scale out request";
1328 description "Reference to NSR ID ref";
1330 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1334 leaf scaling-group-name-ref {
1335 description "name of the scaling group";
1340 description "id of the scaling group";
1348 description "id of the scaling group";
1354 rpc exec-scale-out {
1355 description "Executes scale out request";
1360 description "Reference to NSR ID ref";
1362 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1366 leaf scaling-group-name-ref {
1367 description "name of the scaling group";
1372 description "id of the scaling group";
1379 description "id of the scaling group";