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/rwsdn: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";
618 "Active period of this Network Service.
619 Uptime is expressed in seconds";
624 list connection-point {
626 "List for external connection points.
627 Each NS has one or more external connection points.
628 As the name implies that external connection points
629 are used for connecting the NS to other NS or to
630 external networks. Each NS exposes these connection
631 points to the orchestrator. The orchestrator can
632 construct network service chains by connecting the
633 connection points between different NS.";
638 "Name of the NS connection point.";
644 "Type of the connection point.";
645 type manotypes:connection-point-type;
653 "Reference to a VLR record in the VLR catalog";
655 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
660 list vnfr-connection-point-ref {
662 "A list of references to connection points.";
666 description "A reference to a vnfr";
668 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
672 leaf connection-point {
674 "A reference to a connection point name in a vnfr";
676 path "/vnfr:vnfr-catalog/vnfr:vnfr"
677 + "[vnfr:id = current()/../nsr:vnfr-id]"
678 + "/vnfr:connection-point/vnfr:name";
684 list constituent-vnfr-ref {
686 "List of VNFRs that are part of this
692 "Reference to the VNFR id
693 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
694 But due to confd bug (RIFT-9451), changing to string.
700 list scaling-group-record {
701 description "List of scaling group records";
702 key "scaling-group-name-ref";
704 leaf scaling-group-name-ref {
705 description "name of the scaling group";
707 path "/ns-instance-config/nsr"
708 + "[id=current()/../../ns-instance-config-ref]"
709 + "/nsd/scaling-group-descriptor/name";
714 description "Reference to scaling group instance record";
717 description "Scaling group instance id";
722 description "Flag indicating whether this instance was part of
723 default scaling group (and thus undeletable)";
729 "The operational status of the NS instance
730 init : The scaling group has just started.
731 vnf-init-phase : The VNFs in the scaling group are being instantiated.
732 running : The scaling group is in running state.
733 terminate : The scaling group is being terminated.
734 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
735 terminated : The scaling group is in the terminated state.
736 failed : The scaling group instantiation failed.
744 enum vnf-terminate-phase;
752 "The configuration status of the scaling group instance
753 configuring : At least one of the VNFs in this scaling group instance
754 is in configuring state
755 configured : All the VNFs in this scaling group instance are
756 configured or config-not-needed state
757 failed : Configuring this scaling group instance failed
764 "Reason for failure in configuration of this scaling instance";
770 "Creation timestamp of this scaling group record.
771 The timestamp is expressed as seconds
772 since unix epoch - 1970-01-01T00:00:00Z";
778 description "Reference to VNFR within the scale instance";
780 path "../../../constituent-vnfr-ref/vnfr-id";
788 leaf operational-status {
790 "The operational status of the NS instance
791 init : The network service has just started.
792 vl-init-phase : The VLs in the NS are being instantiated.
793 vnf-init-phase : The VNFs in the NS are being instantiated.
794 running : The NS is in running state.
795 terminate : The NS is being terminated.
796 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
797 vl-terminate-phase : The NS is terminating the VLs in the NS.
798 terminated : The NS is in the terminated state.
799 failed : The NS instantiation failed.
800 scaling-out : The NS is scaling out
801 scaling-in : The NS is scaling in
802 vl-instantiate : The NS is initiating a new VL
803 vl-terminate : The NS is terminating a VL
812 enum vnf-terminate-phase;
813 enum vl-terminate-phase;
825 "The configuration status of the NS instance
826 configuring: At least one of the VNFs in this instance is in configuring state
827 configured: All the VNFs in this NS instance are configured or config-not-needed state
832 uses manotypes:ns-service-primitive;
834 list initial-config-primitive {
835 rwpb:msg-new NsrInitialConfigPrimitive;
837 "Initial set of configuration primitives for NSD.";
841 "Sequence number for the configuration primitive.";
847 "Name of the configuration primitive.";
852 leaf user-defined-script {
854 "A user defined script.";
871 list monitoring-param {
873 "List of NS level params.";
876 uses manotypes:monitoring-param-value;
877 uses manotypes:monitoring-param-ui-data;
878 uses manotypes:monitoring-param-aggregation;
888 leaf nsd-mon-param-ref {
889 description "Reference to the NSD monitoring param descriptor
890 that produced this result";
892 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
893 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
897 list vnfr-mon-param-ref {
898 description "A list of VNFR monitoring params associated with this monp";
899 key "vnfr-id-ref vnfr-mon-param-ref";
903 "A reference to a vnfr. This is a
905 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
910 leaf vnfr-mon-param-ref {
911 description "A reference to the VNFR monitoring param";
913 path "/vnfr:vnfr-catalog/vnfr:vnfr"
914 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
915 + "/vnfr:monitoring-param/vnfr:id";
921 list config-agent-job {
925 description "config agent job Identifier for the NS.";
930 description "Config agent job name";
936 "Job status to be set based on each VNF primitive execution,
937 pending - if at least one VNF is in pending state
938 and remaining VNFs are in success state.
939 Success - if all VNF executions are in success state
940 failure - if one of the VNF executions is failure";
949 description "The primitive is triggered from NS or VNF level";
955 "Creation timestamp of this Config Agent Job.
956 The timestamp is expressed as seconds
957 since unix epoch - 1970-01-01T00:00:00Z";
962 leaf job-status-details {
963 description "Config agent job status details, in case of errors";
967 uses manotypes:primitive-parameter-value;
969 list parameter-group {
971 "List of NS Primitive parameter groups";
975 "Name of the parameter.";
979 uses manotypes:primitive-parameter-value;
985 description "Identifier for the VNFR.";
988 leaf vnf-job-status {
990 "Job status to be set based on each VNF primitive execution,
991 pending - if at least one primitive is in pending state
992 and remaining primitives are in success state.
993 Success - if all primitive executions are in success state
994 failure - if one of the primitive executions is failure";
1005 description "the name of the primitive";
1009 uses manotypes:primitive-parameter-value;
1012 description "Execution id of the primitive";
1015 leaf execution-status {
1016 description "status of the Execution";
1023 leaf execution-error-details {
1024 description "Error details if execution-status is failure";
1033 rpc get-ns-service-primitive-values {
1034 description "Get the service primitive parameter values";
1037 description "Reference to NSR ID ref";
1040 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1045 description "Name of the NS service primitive group";
1053 description "Automatically generated parameter";
1057 description "Parameter name which should be pulled from a parameter pool";
1061 description "Automatically generated value";
1066 list ns-parameter-group {
1067 description "Automatically generated parameters in parameter group";
1070 description "Parameter group name";
1074 description "Automatically generated group parameter";
1078 description "Parameter name which should be pulled from a parameter pool";
1082 description "Automatically generated value";
1088 list vnf-primitive-group {
1090 "List of service primitives grouped by VNF.";
1092 key "member-vnf-index-ref";
1093 leaf member-vnf-index-ref {
1095 "Reference to member-vnf within constituent-vnfds";
1101 "A reference to a vnfd. This is a
1103 ../../../../nsd:constituent-vnfd
1104 + [nsd:id = current()/../nsd:id-ref]
1106 NOTE: An issue with confd is preventing the
1107 use of xpath. Seems to be an issue with leafref
1108 to leafref, whose target is in a different module.
1109 Once that is resovled this will switched to use
1118 description "Index of this primitive";
1123 description "Name of the primitive associated with a value pool";
1128 description "Automatically generated parameter";
1132 description "Parameter name which should be pulled from a parameter pool";
1136 description "Automatically generated value";
1145 rpc exec-ns-service-primitive {
1146 description "Executes a NS service primitive or script";
1150 description "Name of the primitive";
1155 description "Reference to NSR ID ref";
1157 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1162 description "The primitive is triggered from NS or VNF level";
1164 default ns-primitive;
1167 uses manotypes:primitive-parameter-value;
1169 list parameter-group {
1171 "List of NS Primitive parameter groups";
1175 "Name of the parameter.";
1179 uses manotypes:primitive-parameter-value;
1184 "List of VNFs whose primitives are being set.";
1185 key "member_vnf_index_ref";
1187 leaf member_vnf_index_ref {
1188 description "Member VNF index";
1194 "A reference to a vnfr. This is a
1199 list vnf-primitive {
1201 "List of service primitives supported by the
1202 configuration agent for this VNF.";
1207 "index of the service primitive.";
1212 "Name of the service primitive.";
1216 uses manotypes:primitive-parameter-value;
1219 leaf user-defined-script {
1221 "A user defined script.";
1227 description "Job identifier for this RPC";
1232 description "Name of the service primitive";
1237 description "Reference to NSR ID ref";
1239 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1244 description "The primitive is triggered from NS or VNF level";
1250 "Creation timestamp of this config agent JOB.
1251 The timestamp is expressed as seconds
1252 since unix epoch - 1970-01-01T00:00:00Z";
1257 leaf job-status-details {
1258 description "Job status details, in case of any errors";
1262 uses manotypes:primitive-parameter-value;
1264 list parameter-group {
1266 "List of NS Primitive parameter groups";
1270 "Name of the parameter.";
1274 uses manotypes:primitive-parameter-value;
1279 "List of VNFs whose primitives were set.";
1280 key "member_vnf_index_ref";
1282 leaf member_vnf_index_ref {
1283 description "Member VNF index";
1288 "A reference to a vnfr. This is a
1293 list vnf-out-primitive {
1295 "List of service primitives supported by the
1296 configuration agent for this VNF.";
1301 "index of the service primitive.";
1307 "Name of the service primitive.";
1311 uses manotypes:primitive-parameter-value;
1314 description "Execution id of this primitive";
1318 leaf execution-status {
1319 description "Status of the execution of this primitive";
1323 leaf execution-error-details {
1324 description "Error details if execution-status is failed";
1333 description "Executes scale out request";
1338 description "Reference to NSR ID ref";
1340 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1344 leaf scaling-group-name-ref {
1345 description "name of the scaling group";
1350 description "id of the scaling group";
1358 description "id of the scaling group";
1364 rpc exec-scale-out {
1365 description "Executes scale out request";
1370 description "Reference to NSR ID ref";
1372 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1376 leaf scaling-group-name-ref {
1377 description "name of the scaling group";
1382 description "id of the scaling group";
1389 description "id of the scaling group";