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";
102 path "/nsr:key-pair/nsr:name";
109 description "List of users to be added through cloud-config";
111 description "Name of the user ";
115 description "The user name's real name";
119 description "The user password";
127 description "Used to configure the list of public keys to be injected as part
128 of ns instantiation";
130 description "Name of this key pair";
135 description "Key associated with this key pair";
140 rpc start-network-service {
141 description "Start the network service";
145 description "Name of the Network Service";
149 description "Reference to NSR ID ref";
152 path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
155 uses ns-instance-config-params;
160 description "Automatically generated parameter";
166 container ns-instance-config {
173 description "Identifier for the NSR.";
178 description "NSR name.";
183 description "NSR short name.";
188 description "NSR description.";
194 "This is the administrative status of the NS instance";
203 description "NS descriptor used to instantiate this NS";
204 uses nsd:nsd-descriptor;
207 uses ns-instance-config-params;
211 grouping ns-instance-config-params {
212 uses manotypes:input-parameter;
215 description "List of ns scaling group instances";
216 key "scaling-group-name-ref";
218 leaf scaling-group-name-ref {
219 description "name of the scaling group
220 leafref path ../../nsd/scaling-group-descriptor/name";
225 description "The instance of the scaling group";
228 description "Scaling group instance uuid";
234 list nsd-placement-group-maps {
236 "Mapping from mano-placement groups construct from NSD to cloud
237 platform placement group construct";
239 key "placement-group-ref";
241 leaf placement-group-ref {
242 description "Reference for NSD placement group
243 leafref path ../../nsd/placement-groups/name";
246 uses manotypes:placement-group-input;
249 list vnfd-placement-group-maps {
251 "Mapping from mano-placement groups construct from VNFD to cloud
252 platform placement group construct";
254 key "placement-group-ref vnfd-id-ref";
258 "A reference to a vnfd. This is a
260 ../../../../nsd:constituent-vnfd
261 + [nsr:id = current()/../nsd:id-ref]
263 NOTE: An issue with confd is preventing the
264 use of xpath. Seems to be an issue with leafref
265 to leafref, whose target is in a different module.
266 Once that is resovled this will switched to use
271 leaf placement-group-ref {
273 "A reference to VNFD placement group";
275 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
276 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
280 uses manotypes:placement-group-input;
291 description "Identifier for the VNFFGR.";
296 description "VNFFG descriptor id reference";
298 path "/nsr:ns-instance-config/nsr:nsr"
299 + "[nsr:id=current()/../../ns-instance-config-ref]"
300 + "/nsr:nsd/nsr:vnffgd/nsr:id";
304 leaf vnffgd-name-ref {
305 description "VNFFG descriptor name reference";
307 path "/ns-instance-config/nsr"
308 + "[id=current()/../../ns-instance-config-ref]"
309 + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
316 "The SDN account to use when requesting resources for
319 path "/rwsdn:sdn-account/rwsdn:name";
323 leaf operational-status {
325 "The operational status of the VNFFGR instance
326 init : The VNFFGR has just started.
327 running : The VNFFGR is in running state.
328 terminate : The VNFFGR is being terminated.
329 terminated : The VNFFGR is in the terminated state.
330 failed : The VNFFGR instantiation failed
334 rwpb:enum-type "VnffgrOperationalStatus";
348 "Identifier for the RSP.";
358 leaf vnffgd-rsp-id-ref {
360 "Identifier for the VNFFG Descriptor RSP reference";
362 path "/ns-instance-config/nsr"
363 + "[id=current()/../../../ns-instance-config-ref]"
365 + "[id=current()/../../vnffgd-id-ref]"
370 leaf vnffgd-rsp-name-ref {
372 "Name for the VNFFG Descriptor RSP reference";
374 path "/ns-instance-config/nsr:nsr"
375 + "[id=current()/../../../ns-instance-config-ref]"
377 + "[id=current()/../../vnffgd-id-ref]"
378 + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
383 leaf classifier-name {
389 "Unique Identifier for the service path";
393 list vnfr-connection-point-ref {
397 "Monotonically increasing number to show service path hop
401 leaf service-function-type {
403 "Type of Service Function.
404 NOTE: This needs to map with Service Function Type in ODL to
405 support VNFFG. Service Function Type is manadatory param in ODL
406 SFC. This is temporarily set to string for ease of use";
410 leaf member-vnf-index-ref {
415 "Reference to VNF Descriptor Id";
420 "A reference to a vnfr id";
422 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
427 "A reference to a vnfr name";
429 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
432 leaf vnfr-connection-point-ref {
434 "A reference to a vnfr connection point.";
436 path "/vnfr:vnfr-catalog/vnfr:vnfr"
437 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
438 + "/vnfr:connection-point/vnfr:name";
443 "Location within the service path";
446 container connection-point-params {
448 type inet:ip-address;
454 rwpb:field-inline "true";
455 rwpb:field-string-max 64;
459 rwpb:field-inline "true";
460 rwpb:field-string-max 64;
464 type inet:ip-address;
467 type inet:port-number;
471 container service-function-forwarder {
474 "Service Function Forwarder name";
479 "Data Plane IP Address of the SFF";
480 type inet:ip-address;
484 "Data Plane Port of the SFF";
485 type inet:port-number;
496 "Identifier for the classifier rule.";
501 "Name of the classifier.";
506 "A reference to the RSP.";
508 path "../../nsr:rsp/nsr:id";
518 "A reference to a vnfr id";
520 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
525 "A reference to a vnfr name";
527 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
530 leaf vnfr-connection-point-ref {
532 "A reference to a vnfr connection point.";
534 path "/vnfr:vnfr-catalog/vnfr:vnfr"
535 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
536 + "/vnfr:connection-point/vnfr:name";
540 rwpb:field-inline "true";
541 rwpb:field-string-max 64;
545 rwpb:field-inline "true";
546 rwpb:field-string-max 64;
559 container ns-instance-opdata {
563 key "ns-instance-config-ref";
565 leaf ns-instance-config-ref {
567 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
572 description "Network service name reference";
574 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
579 description "Network service descriptor id reference";
581 path "/ns-instance-config/nsr"
582 + "[id=current()/../ns-instance-config-ref]"
588 description "Network service descriptor name reference";
590 path "/ns-instance-config/nsr"
591 + "[id=current()/../ns-instance-config-ref]"
598 "Creation timestamp of this Network Service.
599 The timestamp is expressed as seconds
600 since unix epoch - 1970-01-01T00:00:00Z";
605 list connection-point {
607 "List for external connection points.
608 Each NS has one or more external connection points.
609 As the name implies that external connection points
610 are used for connecting the NS to other NS or to
611 external networks. Each NS exposes these connection
612 points to the orchestrator. The orchestrator can
613 construct network service chains by connecting the
614 connection points between different NS.";
619 "Name of the NS connection point.";
625 "Type of the connection point.";
626 type manotypes:connection-point-type;
634 "Reference to a VLR record in the VLR catalog";
636 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
641 list vnfr-connection-point-ref {
643 "A list of references to connection points.";
647 description "A reference to a vnfr";
649 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
653 leaf connection-point {
655 "A reference to a connection point name in a vnfr";
657 path "/vnfr:vnfr-catalog/vnfr:vnfr"
658 + "[vnfr:id = current()/../nsr:vnfr-id]"
659 + "/vnfr:connection-point/vnfr:name";
665 list constituent-vnfr-ref {
667 "List of VNFRs that are part of this
673 "Reference to the VNFR id
674 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
675 But due to confd bug (RIFT-9451), changing to string.
681 list scaling-group-record {
682 description "List of scaling group records";
683 key "scaling-group-name-ref";
685 leaf scaling-group-name-ref {
686 description "name of the scaling group";
688 path "/ns-instance-config/nsr"
689 + "[id=current()/../../ns-instance-config-ref]"
690 + "/nsd/scaling-group-descriptor/name";
695 description "Reference to scaling group instance record";
698 description "Scaling group instance id";
703 description "Flag indicating whether this instance was part of
704 default scaling group (and thus undeletable)";
710 "The operational status of the NS instance
711 init : The scaling group has just started.
712 vnf-init-phase : The VNFs in the scaling group are being instantiated.
713 running : The scaling group is in running state.
714 terminate : The scaling group is being terminated.
715 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
716 terminated : The scaling group is in the terminated state.
717 failed : The scaling group instantiation failed.
725 enum vnf-terminate-phase;
733 "The configuration status of the scaling group instance
734 configuring : At least one of the VNFs in this scaling group instance
735 is in configuring state
736 configured : All the VNFs in this scaling group instance are
737 configured or config-not-needed state
738 failed : Configuring this scaling group instance failed
745 "Reason for failure in configuration of this scaling instance";
751 "Creation timestamp of this scaling group record.
752 The timestamp is expressed as seconds
753 since unix epoch - 1970-01-01T00:00:00Z";
759 description "Reference to VNFR within the scale instance";
761 path "../../../constituent-vnfr-ref/vnfr-id";
769 leaf operational-status {
771 "The operational status of the NS instance
772 init : The network service has just started.
773 vl-init-phase : The VLs in the NS are being instantiated.
774 vnf-init-phase : The VNFs in the NS are being instantiated.
775 running : The NS is in running state.
776 terminate : The NS is being terminated.
777 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
778 vl-terminate-phase : The NS is terminating the VLs in the NS.
779 terminated : The NS is in the terminated state.
780 failed : The NS instantiation failed.
781 scaling-out : The NS is scaling out
782 scaling-in : The NS is scaling in
783 vl-instantiate : The NS is initiating a new VL
784 vl-terminate : The NS is terminating a VL
793 enum vnf-terminate-phase;
794 enum vl-terminate-phase;
806 "The configuration status of the NS instance
807 configuring: At least one of the VNFs in this instance is in configuring state
808 configured: All the VNFs in this NS instance are configured or config-not-needed state
813 uses manotypes:ns-service-primitive;
815 list initial-config-primitive {
816 rwpb:msg-new NsrInitialConfigPrimitive;
818 "Initial set of configuration primitives for NSD.";
822 "Sequence number for the configuration primitive.";
828 "Name of the configuration primitive.";
833 leaf user-defined-script {
835 "A user defined script.";
852 list monitoring-param {
854 "List of NS level params.";
857 uses manotypes:monitoring-param-value;
858 uses manotypes:monitoring-param-ui-data;
859 uses manotypes:monitoring-param-aggregation;
869 leaf nsd-mon-param-ref {
870 description "Reference to the NSD monitoring param descriptor
871 that produced this result";
873 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
874 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
878 list vnfr-mon-param-ref {
879 description "A list of VNFR monitoring params associated with this monp";
880 key "vnfr-id-ref vnfr-mon-param-ref";
884 "A reference to a vnfr. This is a
886 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
891 leaf vnfr-mon-param-ref {
892 description "A reference to the VNFR monitoring param";
894 path "/vnfr:vnfr-catalog/vnfr:vnfr"
895 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
896 + "/vnfr:monitoring-param/vnfr:id";
902 list config-agent-job {
906 description "config agent job Identifier for the NS.";
911 description "Config agent job name";
917 "Job status to be set based on each VNF primitive execution,
918 pending - if at least one VNF is in pending state
919 and remaining VNFs are in success state.
920 Success - if all VNF executions are in success state
921 failure - if one of the VNF executions is failure";
930 description "The primitive is triggered from NS or VNF level";
936 "Creation timestamp of this Config Agent Job.
937 The timestamp is expressed as seconds
938 since unix epoch - 1970-01-01T00:00:00Z";
943 leaf job-status-details {
944 description "Config agent job status details, in case of errors";
948 uses manotypes:primitive-parameter-value;
950 list parameter-group {
952 "List of NS Primitive parameter groups";
956 "Name of the parameter.";
960 uses manotypes:primitive-parameter-value;
966 description "Identifier for the VNFR.";
969 leaf vnf-job-status {
971 "Job status to be set based on each VNF primitive execution,
972 pending - if at least one primitive is in pending state
973 and remaining primitives are in success state.
974 Success - if all primitive executions are in success state
975 failure - if one of the primitive executions is failure";
986 description "the name of the primitive";
990 uses manotypes:primitive-parameter-value;
993 description "Execution id of the primitive";
996 leaf execution-status {
997 description "status of the Execution";
1004 leaf execution-error-details {
1005 description "Error details if execution-status is failure";
1014 rpc get-ns-service-primitive-values {
1015 description "Get the service primitive parameter values";
1018 description "Reference to NSR ID ref";
1021 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1026 description "Name of the NS service primitive group";
1034 description "Automatically generated parameter";
1038 description "Parameter name which should be pulled from a parameter pool";
1042 description "Automatically generated value";
1047 list ns-parameter-group {
1048 description "Automatically generated parameters in parameter group";
1051 description "Parameter group name";
1055 description "Automatically generated group parameter";
1059 description "Parameter name which should be pulled from a parameter pool";
1063 description "Automatically generated value";
1069 list vnf-primitive-group {
1071 "List of service primitives grouped by VNF.";
1073 key "member-vnf-index-ref";
1074 leaf member-vnf-index-ref {
1076 "Reference to member-vnf within constituent-vnfds";
1082 "A reference to a vnfd. This is a
1084 ../../../../nsd:constituent-vnfd
1085 + [nsd:id = current()/../nsd:id-ref]
1087 NOTE: An issue with confd is preventing the
1088 use of xpath. Seems to be an issue with leafref
1089 to leafref, whose target is in a different module.
1090 Once that is resovled this will switched to use
1099 description "Index of this primitive";
1104 description "Name of the primitive associated with a value pool";
1109 description "Automatically generated parameter";
1113 description "Parameter name which should be pulled from a parameter pool";
1117 description "Automatically generated value";
1126 rpc exec-ns-service-primitive {
1127 description "Executes a NS service primitive or script";
1131 description "Name of the primitive";
1136 description "Reference to NSR ID ref";
1138 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1143 description "The primitive is triggered from NS or VNF level";
1145 default ns-primitive;
1148 uses manotypes:primitive-parameter-value;
1150 list parameter-group {
1152 "List of NS Primitive parameter groups";
1156 "Name of the parameter.";
1160 uses manotypes:primitive-parameter-value;
1165 "List of VNFs whose primitives are being set.";
1166 key "member_vnf_index_ref";
1168 leaf member_vnf_index_ref {
1169 description "Member VNF index";
1175 "A reference to a vnfr. This is a
1180 list vnf-primitive {
1182 "List of service primitives supported by the
1183 configuration agent for this VNF.";
1188 "index of the service primitive.";
1193 "Name of the service primitive.";
1197 uses manotypes:primitive-parameter-value;
1200 leaf user-defined-script {
1202 "A user defined script.";
1208 description "Job identifier for this RPC";
1213 description "Name of the service primitive";
1218 description "Reference to NSR ID ref";
1220 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1225 description "The primitive is triggered from NS or VNF level";
1231 "Creation timestamp of this config agent JOB.
1232 The timestamp is expressed as seconds
1233 since unix epoch - 1970-01-01T00:00:00Z";
1238 leaf job-status-details {
1239 description "Job status details, in case of any errors";
1243 uses manotypes:primitive-parameter-value;
1245 list parameter-group {
1247 "List of NS Primitive parameter groups";
1251 "Name of the parameter.";
1255 uses manotypes:primitive-parameter-value;
1260 "List of VNFs whose primitives were set.";
1261 key "member_vnf_index_ref";
1263 leaf member_vnf_index_ref {
1264 description "Member VNF index";
1269 "A reference to a vnfr. This is a
1274 list vnf-out-primitive {
1276 "List of service primitives supported by the
1277 configuration agent for this VNF.";
1282 "index of the service primitive.";
1288 "Name of the service primitive.";
1292 uses manotypes:primitive-parameter-value;
1295 description "Execution id of this primitive";
1299 leaf execution-status {
1300 description "Status of the execution of this primitive";
1304 leaf execution-error-details {
1305 description "Error details if execution-status is failed";
1314 description "Executes scale out request";
1319 description "Reference to NSR ID ref";
1321 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1325 leaf scaling-group-name-ref {
1326 description "name of the scaling group";
1331 description "id of the scaling group";
1339 description "id of the scaling group";
1345 rpc exec-scale-out {
1346 description "Executes scale out request";
1351 description "Reference to NSR ID ref";
1353 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1357 leaf scaling-group-name-ref {
1358 description "name of the scaling group";
1363 description "id of the scaling group";
1370 description "id of the scaling group";