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 list service-primitive {
834 "Network service level service primitives.";
840 "Name of the service primitive.";
846 "List of parameters for the service primitive.";
849 uses manotypes:primitive-parameter;
852 uses manotypes:ui-primitive-group;
854 list vnf-primitive-group {
856 "List of service primitives grouped by VNF.";
858 key "member-vnf-index-ref";
859 leaf member-vnf-index-ref {
861 "Reference to member-vnf within constituent-vnfds";
867 "A reference to a vnfd. This is a
869 ../../../../nsd:constituent-vnfd
870 + [nsd:id = current()/../nsd:id-ref]
872 NOTE: An issue with confd is preventing the
873 use of xpath. Seems to be an issue with leafref
874 to leafref, whose target is in a different module.
875 Once that is resovled this will switched to use
891 description "Index of this primitive";
896 description "Name of the primitive in the VNF primitive ";
902 leaf user-defined-script {
904 "A user defined script.";
909 list initial-config-primitive {
910 rwpb:msg-new NsrInitialConfigPrimitive;
912 "Initial set of configuration primitives for NSD.";
916 "Sequence number for the configuration primitive.";
922 "Name of the configuration primitive.";
927 leaf user-defined-script {
929 "A user defined script.";
946 list monitoring-param {
948 "List of NS level params.";
951 uses manotypes:monitoring-param-value;
952 uses manotypes:monitoring-param-ui-data;
953 uses manotypes:monitoring-param-aggregation;
963 leaf nsd-mon-param-ref {
964 description "Reference to the NSD monitoring param descriptor
965 that produced this result";
967 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
968 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
972 list vnfr-mon-param-ref {
973 description "A list of VNFR monitoring params associated with this monp";
974 key "vnfr-id-ref vnfr-mon-param-ref";
978 "A reference to a vnfr. This is a
980 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
985 leaf vnfr-mon-param-ref {
986 description "A reference to the VNFR monitoring param";
988 path "/vnfr:vnfr-catalog/vnfr:vnfr"
989 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
990 + "/vnfr:monitoring-param/vnfr:id";
996 list config-agent-job {
1000 description "config agent job Identifier for the NS.";
1005 description "Config agent job name";
1011 "Job status to be set based on each VNF primitive execution,
1012 pending - if at least one VNF is in pending state
1013 and remaining VNFs are in success state.
1014 Success - if all VNF executions are in success state
1015 failure - if one of the VNF executions is failure";
1024 description "The primitive is triggered from NS or VNF level";
1030 "Creation timestamp of this Config Agent Job.
1031 The timestamp is expressed as seconds
1032 since unix epoch - 1970-01-01T00:00:00Z";
1037 leaf job-status-details {
1038 description "Config agent job status details, in case of errors";
1042 uses manotypes:primitive-parameter-value;
1044 list parameter-group {
1046 "List of NS Primitive parameter groups";
1050 "Name of the parameter.";
1054 uses manotypes:primitive-parameter-value;
1060 description "Identifier for the VNFR.";
1063 leaf vnf-job-status {
1065 "Job status to be set based on each VNF primitive execution,
1066 pending - if at least one primitive is in pending state
1067 and remaining primitives are in success state.
1068 Success - if all primitive executions are in success state
1069 failure - if one of the primitive executions is failure";
1080 description "the name of the primitive";
1084 uses manotypes:primitive-parameter-value;
1087 description "Execution id of the primitive";
1090 leaf execution-status {
1091 description "status of the Execution";
1098 leaf execution-error-details {
1099 description "Error details if execution-status is failure";
1108 rpc get-ns-service-primitive-values {
1109 description "Get the service primitive parameter values";
1112 description "Reference to NSR ID ref";
1115 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1120 description "Name of the NS service primitive group";
1128 description "Automatically generated parameter";
1132 description "Parameter name which should be pulled from a parameter pool";
1136 description "Automatically generated value";
1141 list ns-parameter-group {
1142 description "Automatically generated parameters in parameter group";
1145 description "Parameter group name";
1149 description "Automatically generated group parameter";
1153 description "Parameter name which should be pulled from a parameter pool";
1157 description "Automatically generated value";
1163 list vnf-primitive-group {
1165 "List of service primitives grouped by VNF.";
1167 key "member-vnf-index-ref";
1168 leaf member-vnf-index-ref {
1170 "Reference to member-vnf within constituent-vnfds";
1176 "A reference to a vnfd. This is a
1178 ../../../../nsd:constituent-vnfd
1179 + [nsd:id = current()/../nsd:id-ref]
1181 NOTE: An issue with confd is preventing the
1182 use of xpath. Seems to be an issue with leafref
1183 to leafref, whose target is in a different module.
1184 Once that is resovled this will switched to use
1193 description "Index of this primitive";
1198 description "Name of the primitive associated with a value pool";
1203 description "Automatically generated parameter";
1207 description "Parameter name which should be pulled from a parameter pool";
1211 description "Automatically generated value";
1220 rpc exec-ns-service-primitive {
1221 description "Executes a NS service primitive or script";
1225 description "Name of the primitive";
1230 description "Reference to NSR ID ref";
1232 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1237 description "The primitive is triggered from NS or VNF level";
1239 default ns-primitive;
1242 uses manotypes:primitive-parameter-value;
1244 list parameter-group {
1246 "List of NS Primitive parameter groups";
1250 "Name of the parameter.";
1254 uses manotypes:primitive-parameter-value;
1259 "List of VNFs whose primitives are being set.";
1260 key "member_vnf_index_ref";
1262 leaf member_vnf_index_ref {
1263 description "Member VNF index";
1269 "A reference to a vnfr. This is a
1274 list vnf-primitive {
1276 "List of service primitives supported by the
1277 configuration agent for this VNF.";
1282 "index of the service primitive.";
1287 "Name of the service primitive.";
1291 uses manotypes:primitive-parameter-value;
1294 leaf user-defined-script {
1296 "A user defined script.";
1302 description "Job identifier for this RPC";
1307 description "Name of the service primitive";
1312 description "Reference to NSR ID ref";
1314 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1319 description "The primitive is triggered from NS or VNF level";
1325 "Creation timestamp of this config agent JOB.
1326 The timestamp is expressed as seconds
1327 since unix epoch - 1970-01-01T00:00:00Z";
1332 leaf job-status-details {
1333 description "Job status details, in case of any errors";
1337 uses manotypes:primitive-parameter-value;
1339 list parameter-group {
1341 "List of NS Primitive parameter groups";
1345 "Name of the parameter.";
1349 uses manotypes:primitive-parameter-value;
1354 "List of VNFs whose primitives were set.";
1355 key "member_vnf_index_ref";
1357 leaf member_vnf_index_ref {
1358 description "Member VNF index";
1363 "A reference to a vnfr. This is a
1368 list vnf-out-primitive {
1370 "List of service primitives supported by the
1371 configuration agent for this VNF.";
1376 "index of the service primitive.";
1382 "Name of the service primitive.";
1386 uses manotypes:primitive-parameter-value;
1389 description "Execution id of this primitive";
1393 leaf execution-status {
1394 description "Status of the execution of this primitive";
1398 leaf execution-error-details {
1399 description "Error details if execution-status is failed";