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";
118 list ssh-authorized-key {
121 description "Used to configure the list of public keys to be injected as part
122 of ns instantiation";
125 description "A reference to the key pair entry in the global key pair table";
127 path "/nsr:key-pair/nsr:name";
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";
161 path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
164 uses ns-instance-config-params;
169 description "Automatically generated parameter";
177 container ns-instance-config {
184 description "Identifier for the NSR.";
189 description "NSR name.";
194 description "NSR short name.";
199 description "NSR description.";
205 "This is the administrative status of the NS instance";
214 description "NS descriptor used to instantiate this NS";
215 uses nsd:nsd-descriptor;
218 uses ns-instance-config-params;
222 grouping ns-instance-config-params {
223 uses manotypes:input-parameter;
226 description "List of ns scaling group instances";
227 key "scaling-group-name-ref";
229 leaf scaling-group-name-ref {
230 description "name of the scaling group
231 leafref path ../../nsd/scaling-group-descriptor/name";
236 description "The instance of the scaling group";
239 description "Scaling group instance uuid";
245 list nsd-placement-group-maps {
247 "Mapping from mano-placement groups construct from NSD to cloud
248 platform placement group construct";
250 key "placement-group-ref";
252 leaf placement-group-ref {
253 description "Reference for NSD placement group
254 leafref path ../../nsd/placement-groups/name";
257 uses manotypes:placement-group-input;
260 list vnfd-placement-group-maps {
262 "Mapping from mano-placement groups construct from VNFD to cloud
263 platform placement group construct";
265 key "placement-group-ref vnfd-id-ref";
269 "A reference to a vnfd. This is a
271 ../../../../nsd:constituent-vnfd
272 + [nsr:id = current()/../nsd:id-ref]
274 NOTE: An issue with confd is preventing the
275 use of xpath. Seems to be an issue with leafref
276 to leafref, whose target is in a different module.
277 Once that is resovled this will switched to use
282 leaf placement-group-ref {
284 "A reference to VNFD placement group";
286 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
287 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
291 uses manotypes:placement-group-input;
302 description "Identifier for the VNFFGR.";
307 description "VNFFG descriptor id reference";
309 path "/nsr:ns-instance-config/nsr:nsr"
310 + "[nsr:id=current()/../../ns-instance-config-ref]"
311 + "/nsr:nsd/nsr:vnffgd/nsr:id";
315 leaf vnffgd-name-ref {
316 description "VNFFG descriptor name reference";
318 path "/ns-instance-config/nsr"
319 + "[id=current()/../../ns-instance-config-ref]"
320 + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
327 "The SDN account to use when requesting resources for
330 path "/rwsdn:sdn-account/rwsdn:name";
334 leaf operational-status {
336 "The operational status of the VNFFGR instance
337 init : The VNFFGR has just started.
338 running : The VNFFGR is in running state.
339 terminate : The VNFFGR is being terminated.
340 terminated : The VNFFGR is in the terminated state.
341 failed : The VNFFGR instantiation failed
345 rwpb:enum-type "VnffgrOperationalStatus";
359 "Identifier for the RSP.";
369 leaf vnffgd-rsp-id-ref {
371 "Identifier for the VNFFG Descriptor RSP reference";
373 path "/ns-instance-config/nsr"
374 + "[id=current()/../../../ns-instance-config-ref]"
376 + "[id=current()/../../vnffgd-id-ref]"
381 leaf vnffgd-rsp-name-ref {
383 "Name for the VNFFG Descriptor RSP reference";
385 path "/ns-instance-config/nsr:nsr"
386 + "[id=current()/../../../ns-instance-config-ref]"
388 + "[id=current()/../../vnffgd-id-ref]"
389 + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
394 leaf classifier-name {
400 "Unique Identifier for the service path";
404 list vnfr-connection-point-ref {
408 "Monotonically increasing number to show service path hop
412 leaf service-function-type {
414 "Type of Service Function.
415 NOTE: This needs to map with Service Function Type in ODL to
416 support VNFFG. Service Function Type is manadatory param in ODL
417 SFC. This is temporarily set to string for ease of use";
421 leaf member-vnf-index-ref {
426 "Reference to VNF Descriptor Id";
431 "A reference to a vnfr id";
433 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
438 "A reference to a vnfr name";
440 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
443 leaf vnfr-connection-point-ref {
445 "A reference to a vnfr connection point.";
447 path "/vnfr:vnfr-catalog/vnfr:vnfr"
448 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
449 + "/vnfr:connection-point/vnfr:name";
454 "Location within the service path";
457 container connection-point-params {
459 type inet:ip-address;
465 rwpb:field-inline "true";
466 rwpb:field-string-max 64;
470 rwpb:field-inline "true";
471 rwpb:field-string-max 64;
475 type inet:ip-address;
478 type inet:port-number;
482 container service-function-forwarder {
485 "Service Function Forwarder name";
490 "Data Plane IP Address of the SFF";
491 type inet:ip-address;
495 "Data Plane Port of the SFF";
496 type inet:port-number;
507 "Identifier for the classifier rule.";
512 "Name of the classifier.";
517 "A reference to the RSP.";
519 path "../../nsr:rsp/nsr:id";
529 "A reference to a vnfr id";
531 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
536 "A reference to a vnfr name";
538 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
541 leaf vnfr-connection-point-ref {
543 "A reference to a vnfr connection point.";
545 path "/vnfr:vnfr-catalog/vnfr:vnfr"
546 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
547 + "/vnfr:connection-point/vnfr:name";
551 rwpb:field-inline "true";
552 rwpb:field-string-max 64;
556 rwpb:field-inline "true";
557 rwpb:field-string-max 64;
570 container ns-instance-opdata {
574 key "ns-instance-config-ref";
576 leaf ns-instance-config-ref {
578 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
583 description "Network service name reference";
585 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
590 description "Network service descriptor id reference";
592 path "/ns-instance-config/nsr"
593 + "[id=current()/../ns-instance-config-ref]"
599 description "Network service descriptor name reference";
601 path "/ns-instance-config/nsr"
602 + "[id=current()/../ns-instance-config-ref]"
609 "Creation timestamp of this Network Service.
610 The timestamp is expressed as seconds
611 since unix epoch - 1970-01-01T00:00:00Z";
616 list connection-point {
618 "List for external connection points.
619 Each NS has one or more external connection points.
620 As the name implies that external connection points
621 are used for connecting the NS to other NS or to
622 external networks. Each NS exposes these connection
623 points to the orchestrator. The orchestrator can
624 construct network service chains by connecting the
625 connection points between different NS.";
630 "Name of the NS connection point.";
636 "Type of the connection point.";
637 type manotypes:connection-point-type;
645 "Reference to a VLR record in the VLR catalog";
647 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
652 list vnfr-connection-point-ref {
654 "A list of references to connection points.";
658 description "A reference to a vnfr";
660 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
664 leaf connection-point {
666 "A reference to a connection point name in a vnfr";
668 path "/vnfr:vnfr-catalog/vnfr:vnfr"
669 + "[vnfr:id = current()/../nsr:vnfr-id]"
670 + "/vnfr:connection-point/vnfr:name";
676 list constituent-vnfr-ref {
678 "List of VNFRs that are part of this
684 "Reference to the VNFR id
685 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
686 But due to confd bug (RIFT-9451), changing to string.
692 list scaling-group-record {
693 description "List of scaling group records";
694 key "scaling-group-name-ref";
696 leaf scaling-group-name-ref {
697 description "name of the scaling group";
699 path "/ns-instance-config/nsr"
700 + "[id=current()/../../ns-instance-config-ref]"
701 + "/nsd/scaling-group-descriptor/name";
706 description "Reference to scaling group instance record";
709 description "Scaling group instance id";
714 description "Flag indicating whether this instance was part of
715 default scaling group (and thus undeletable)";
721 "The operational status of the NS instance
722 init : The scaling group has just started.
723 vnf-init-phase : The VNFs in the scaling group are being instantiated.
724 running : The scaling group is in running state.
725 terminate : The scaling group is being terminated.
726 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
727 terminated : The scaling group is in the terminated state.
728 failed : The scaling group instantiation failed.
736 enum vnf-terminate-phase;
744 "The configuration status of the scaling group instance
745 configuring : At least one of the VNFs in this scaling group instance
746 is in configuring state
747 configured : All the VNFs in this scaling group instance are
748 configured or config-not-needed state
749 failed : Configuring this scaling group instance failed
756 "Reason for failure in configuration of this scaling instance";
762 "Creation timestamp of this scaling group record.
763 The timestamp is expressed as seconds
764 since unix epoch - 1970-01-01T00:00:00Z";
770 description "Reference to VNFR within the scale instance";
772 path "../../../constituent-vnfr-ref/vnfr-id";
780 leaf operational-status {
782 "The operational status of the NS instance
783 init : The network service has just started.
784 vl-init-phase : The VLs in the NS are being instantiated.
785 vnf-init-phase : The VNFs in the NS are being instantiated.
786 running : The NS is in running state.
787 terminate : The NS is being terminated.
788 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
789 vl-terminate-phase : The NS is terminating the VLs in the NS.
790 terminated : The NS is in the terminated state.
791 failed : The NS instantiation failed.
792 scaling-out : The NS is scaling out
793 scaling-in : The NS is scaling in
794 vl-instantiate : The NS is initiating a new VL
795 vl-terminate : The NS is terminating a VL
804 enum vnf-terminate-phase;
805 enum vl-terminate-phase;
817 "The configuration status of the NS instance
818 configuring: At least one of the VNFs in this instance is in configuring state
819 configured: All the VNFs in this NS instance are configured or config-not-needed state
824 uses manotypes:ns-service-primitive;
826 list initial-config-primitive {
827 rwpb:msg-new NsrInitialConfigPrimitive;
829 "Initial set of configuration primitives for NSD.";
833 "Sequence number for the configuration primitive.";
839 "Name of the configuration primitive.";
844 leaf user-defined-script {
846 "A user defined script.";
863 list monitoring-param {
865 "List of NS level params.";
868 uses manotypes:monitoring-param-value;
869 uses manotypes:monitoring-param-ui-data;
870 uses manotypes:monitoring-param-aggregation;
880 leaf nsd-mon-param-ref {
881 description "Reference to the NSD monitoring param descriptor
882 that produced this result";
884 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
885 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
889 list vnfr-mon-param-ref {
890 description "A list of VNFR monitoring params associated with this monp";
891 key "vnfr-id-ref vnfr-mon-param-ref";
895 "A reference to a vnfr. This is a
897 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
902 leaf vnfr-mon-param-ref {
903 description "A reference to the VNFR monitoring param";
905 path "/vnfr:vnfr-catalog/vnfr:vnfr"
906 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
907 + "/vnfr:monitoring-param/vnfr:id";
913 list config-agent-job {
917 description "config agent job Identifier for the NS.";
922 description "Config agent job name";
928 "Job status to be set based on each VNF primitive execution,
929 pending - if at least one VNF is in pending state
930 and remaining VNFs are in success state.
931 Success - if all VNF executions are in success state
932 failure - if one of the VNF executions is failure";
941 description "The primitive is triggered from NS or VNF level";
947 "Creation timestamp of this Config Agent Job.
948 The timestamp is expressed as seconds
949 since unix epoch - 1970-01-01T00:00:00Z";
954 leaf job-status-details {
955 description "Config agent job status details, in case of errors";
959 uses manotypes:primitive-parameter-value;
961 list parameter-group {
963 "List of NS Primitive parameter groups";
967 "Name of the parameter.";
971 uses manotypes:primitive-parameter-value;
977 description "Identifier for the VNFR.";
980 leaf vnf-job-status {
982 "Job status to be set based on each VNF primitive execution,
983 pending - if at least one primitive is in pending state
984 and remaining primitives are in success state.
985 Success - if all primitive executions are in success state
986 failure - if one of the primitive executions is failure";
997 description "the name of the primitive";
1001 uses manotypes:primitive-parameter-value;
1004 description "Execution id of the primitive";
1007 leaf execution-status {
1008 description "status of the Execution";
1015 leaf execution-error-details {
1016 description "Error details if execution-status is failure";
1025 rpc get-ns-service-primitive-values {
1026 description "Get the service primitive parameter values";
1029 description "Reference to NSR ID ref";
1032 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1037 description "Name of the NS service primitive group";
1045 description "Automatically generated parameter";
1049 description "Parameter name which should be pulled from a parameter pool";
1053 description "Automatically generated value";
1058 list ns-parameter-group {
1059 description "Automatically generated parameters in parameter group";
1062 description "Parameter group name";
1066 description "Automatically generated group parameter";
1070 description "Parameter name which should be pulled from a parameter pool";
1074 description "Automatically generated value";
1080 list vnf-primitive-group {
1082 "List of service primitives grouped by VNF.";
1084 key "member-vnf-index-ref";
1085 leaf member-vnf-index-ref {
1087 "Reference to member-vnf within constituent-vnfds";
1093 "A reference to a vnfd. This is a
1095 ../../../../nsd:constituent-vnfd
1096 + [nsd:id = current()/../nsd:id-ref]
1098 NOTE: An issue with confd is preventing the
1099 use of xpath. Seems to be an issue with leafref
1100 to leafref, whose target is in a different module.
1101 Once that is resovled this will switched to use
1110 description "Index of this primitive";
1115 description "Name of the primitive associated with a value pool";
1120 description "Automatically generated parameter";
1124 description "Parameter name which should be pulled from a parameter pool";
1128 description "Automatically generated value";
1137 rpc exec-ns-service-primitive {
1138 description "Executes a NS service primitive or script";
1142 description "Name of the primitive";
1147 description "Reference to NSR ID ref";
1149 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1154 description "The primitive is triggered from NS or VNF level";
1156 default ns-primitive;
1159 uses manotypes:primitive-parameter-value;
1161 list parameter-group {
1163 "List of NS Primitive parameter groups";
1167 "Name of the parameter.";
1171 uses manotypes:primitive-parameter-value;
1176 "List of VNFs whose primitives are being set.";
1177 key "member_vnf_index_ref";
1179 leaf member_vnf_index_ref {
1180 description "Member VNF index";
1186 "A reference to a vnfr. This is a
1191 list vnf-primitive {
1193 "List of service primitives supported by the
1194 configuration agent for this VNF.";
1199 "index of the service primitive.";
1204 "Name of the service primitive.";
1208 uses manotypes:primitive-parameter-value;
1211 leaf user-defined-script {
1213 "A user defined script.";
1219 description "Job identifier for this RPC";
1224 description "Name of the service primitive";
1229 description "Reference to NSR ID ref";
1231 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1236 description "The primitive is triggered from NS or VNF level";
1242 "Creation timestamp of this config agent JOB.
1243 The timestamp is expressed as seconds
1244 since unix epoch - 1970-01-01T00:00:00Z";
1249 leaf job-status-details {
1250 description "Job status details, in case of any errors";
1254 uses manotypes:primitive-parameter-value;
1256 list parameter-group {
1258 "List of NS Primitive parameter groups";
1262 "Name of the parameter.";
1266 uses manotypes:primitive-parameter-value;
1271 "List of VNFs whose primitives were set.";
1272 key "member_vnf_index_ref";
1274 leaf member_vnf_index_ref {
1275 description "Member VNF index";
1280 "A reference to a vnfr. This is a
1285 list vnf-out-primitive {
1287 "List of service primitives supported by the
1288 configuration agent for this VNF.";
1293 "index of the service primitive.";
1299 "Name of the service primitive.";
1303 uses manotypes:primitive-parameter-value;
1306 description "Execution id of this primitive";
1310 leaf execution-status {
1311 description "Status of the execution of this primitive";
1315 leaf execution-error-details {
1316 description "Error details if execution-status is failed";
1325 description "Executes scale out request";
1330 description "Reference to NSR ID ref";
1332 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1336 leaf scaling-group-name-ref {
1337 description "name of the scaling group";
1342 description "id of the scaling group";
1350 description "id of the scaling group";
1356 rpc exec-scale-out {
1357 description "Executes scale out request";
1362 description "Reference to NSR ID ref";
1364 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1368 leaf scaling-group-name-ref {
1369 description "name of the scaling group";
1374 description "id of the scaling group";
1381 description "id of the scaling group";