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";
46 import ietf-inet-types {
50 import ietf-yang-types {
64 "Initial revision. This YANG file defines
65 the Network Service Record (NSR)";
67 "Derived from earlier versions of base YANG files";
70 typedef config-states {
74 enum config_not_needed;
80 typedef trigger-type {
87 grouping cloud-config {
88 description "List of cloud config parameters";
90 list ssh-authorized-key {
93 description "List of authorized ssh keys as part of cloud-config";
96 description "A reference to the key pair entry in the global key pair table";
98 path "/nsr:key-pair/nsr:name";
105 description "List of users to be added through cloud-config";
107 description "Name of the user ";
111 description "The user name's real name";
114 list ssh-authorized-key {
117 description "Used to configure the list of public keys to be injected as part
118 of ns instantiation";
121 description "A reference to the key pair entry in the global key pair table";
123 path "/nsr:key-pair/nsr:name";
132 description "Used to configure the list of public keys to be injected as part
133 of ns instantiation";
135 description "Name of this key pair";
140 description "Key associated with this key pair";
145 rpc start-network-service {
146 description "Start the network service";
150 description "Name of the Network Service";
154 description "Reference to NSR ID ref";
157 path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
160 uses ns-instance-config-params;
165 description "Automatically generated parameter";
173 container ns-instance-config {
180 description "Identifier for the NSR.";
185 description "NSR name.";
190 description "NSR short name.";
195 description "NSR description.";
201 "This is the administrative status of the NS instance";
210 description "NS descriptor used to instantiate this NS";
211 uses nsd:nsd-descriptor;
214 uses ns-instance-config-params;
218 grouping ns-instance-config-params {
219 uses manotypes:input-parameter;
222 description "List of ns scaling group instances";
223 key "scaling-group-name-ref";
225 leaf scaling-group-name-ref {
226 description "name of the scaling group
227 leafref path ../../nsd/scaling-group-descriptor/name";
232 description "The instance of the scaling group";
235 description "Scaling group instance uuid";
241 list nsd-placement-group-maps {
243 "Mapping from mano-placement groups construct from NSD to cloud
244 platform placement group construct";
246 key "placement-group-ref";
248 leaf placement-group-ref {
249 description "Reference for NSD placement group
250 leafref path ../../nsd/placement-groups/name";
253 uses manotypes:placement-group-input;
256 list vnfd-placement-group-maps {
258 "Mapping from mano-placement groups construct from VNFD to cloud
259 platform placement group construct";
261 key "placement-group-ref vnfd-id-ref";
265 "A reference to a vnfd. This is a
267 ../../../../nsd:constituent-vnfd
268 + [nsr:id = current()/../nsd:id-ref]
270 NOTE: confd limitations prevent the use of xpath";
274 leaf placement-group-ref {
276 "A reference to VNFD placement group";
278 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
279 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
283 uses manotypes:placement-group-input;
294 description "Identifier for the VNFFGR.";
299 description "VNFFG descriptor id reference";
301 path "/nsr:ns-instance-config/nsr:nsr"
302 + "[nsr:id=current()/../../ns-instance-config-ref]"
303 + "/nsr:nsd/nsr:vnffgd/nsr:id";
307 leaf vnffgd-name-ref {
308 description "VNFFG descriptor name reference";
310 path "/ns-instance-config/nsr"
311 + "[id=current()/../../ns-instance-config-ref]"
312 + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
319 "The SDN account to use when requesting resources for
322 path "/rwsdn:sdn/rwsdn:account/rwsdn:name";
326 leaf operational-status {
328 "The operational status of the VNFFGR instance
329 init : The VNFFGR has just started.
330 running : The VNFFGR is in running state.
331 terminate : The VNFFGR is being terminated.
332 terminated : The VNFFGR is in the terminated state.
333 failed : The VNFFGR instantiation failed
337 rwpb:enum-type "VnffgrOperationalStatus";
351 "Identifier for the RSP.";
361 leaf vnffgd-rsp-id-ref {
363 "Identifier for the VNFFG Descriptor RSP reference";
365 path "/ns-instance-config/nsr"
366 + "[id=current()/../../../ns-instance-config-ref]"
368 + "[id=current()/../../vnffgd-id-ref]"
373 leaf vnffgd-rsp-name-ref {
375 "Name for the VNFFG Descriptor RSP reference";
377 path "/ns-instance-config/nsr:nsr"
378 + "[id=current()/../../../ns-instance-config-ref]"
380 + "[id=current()/../../vnffgd-id-ref]"
381 + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
386 leaf classifier-name {
392 "Unique Identifier for the service path";
396 list vnfr-connection-point-ref {
400 "Monotonically increasing number to show service path hop
404 leaf service-function-type {
406 "Type of Service Function.
407 NOTE: This needs to map with Service Function Type in ODL to
408 support VNFFG. Service Function Type is mandatory param in ODL
409 SFC. This is temporarily set to string for ease of use";
413 leaf member-vnf-index-ref {
418 "Reference to VNF Descriptor Id";
423 "A reference to a vnfr id";
425 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
430 "A reference to a vnfr name";
432 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
435 leaf vnfr-connection-point-ref {
437 "A reference to a vnfr connection point.";
439 path "/vnfr:vnfr-catalog/vnfr:vnfr"
440 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
441 + "/vnfr:connection-point/vnfr:name";
446 "Location within the service path";
449 container connection-point-params {
451 type inet:ip-address;
457 rwpb:field-inline "true";
458 rwpb:field-string-max 64;
462 rwpb:field-inline "true";
463 rwpb:field-string-max 64;
467 type inet:ip-address;
470 type inet:port-number;
474 container service-function-forwarder {
477 "Service Function Forwarder name";
482 "Data Plane IP Address of the SFF";
483 type inet:ip-address;
487 "Data Plane Port of the SFF";
488 type inet:port-number;
499 "Identifier for the classifier rule.";
504 "Name of the classifier.";
509 "A reference to the RSP.";
511 path "../../nsr:rsp/nsr:id";
521 "A reference to a vnfr id";
523 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
528 "A reference to a vnfr name";
530 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
533 leaf vnfr-connection-point-ref {
535 "A reference to a vnfr connection point.";
537 path "/vnfr:vnfr-catalog/vnfr:vnfr"
538 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
539 + "/vnfr:connection-point/vnfr:name";
543 rwpb:field-inline "true";
544 rwpb:field-string-max 64;
548 rwpb:field-inline "true";
549 rwpb:field-string-max 64;
562 container ns-instance-opdata {
566 key "ns-instance-config-ref";
568 leaf ns-instance-config-ref {
570 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
575 description "Network service name reference";
577 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
582 description "Network service descriptor id reference";
584 path "/ns-instance-config/nsr"
585 + "[id=current()/../ns-instance-config-ref]"
591 description "Network service descriptor name reference";
593 path "/ns-instance-config/nsr"
594 + "[id=current()/../ns-instance-config-ref]"
601 "Creation timestamp of this Network Service.
602 The timestamp is expressed as seconds
603 since unix epoch - 1970-01-01T00:00:00Z";
610 "Active period of this Network Service.
611 Uptime is expressed in seconds";
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 list service-primitive {
826 "Network service level service primitives.";
832 "Name of the service primitive.";
838 "List of parameters for the service primitive.";
841 uses manotypes:primitive-parameter;
844 uses manotypes:ui-primitive-group;
846 list vnf-primitive-group {
848 "List of service primitives grouped by VNF.";
850 key "member-vnf-index-ref";
851 leaf member-vnf-index-ref {
853 "Reference to member-vnf within constituent-vnfds";
859 "A reference to a vnfd. This is a
861 ../../../../nsd:constituent-vnfd
862 + [nsd:id = current()/../nsd:id-ref]
864 NOTE: confd limitations prevent the use of xpath";
879 description "Index of this primitive";
884 description "Name of the primitive in the VNF primitive ";
890 leaf user-defined-script {
892 "A user defined script.";
897 list initial-config-primitive {
898 rwpb:msg-new NsrInitialConfigPrimitive;
900 "Initial set of configuration primitives for NSD.";
904 "Sequence number for the configuration primitive.";
910 "Name of the configuration primitive.";
915 leaf user-defined-script {
917 "A user defined script.";
923 "List of parameters for the initial config primitive";
926 description "Name of the intitial config parameter";
931 description "Value associated with the initial config
939 list monitoring-param {
941 "List of NS level params.";
944 uses manotypes:monitoring-param-value;
945 uses manotypes:monitoring-param-ui-data;
946 uses manotypes:monitoring-param-aggregation;
956 leaf nsd-mon-param-ref {
957 description "Reference to the NSD monitoring param descriptor
958 that produced this result";
960 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
961 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
965 list vnfr-mon-param-ref {
966 description "A list of VNFR monitoring params associated with this monp";
967 key "vnfr-id-ref vnfr-mon-param-ref";
971 "A reference to a vnfr. This is a
973 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
978 leaf vnfr-mon-param-ref {
979 description "A reference to the VNFR monitoring param";
981 path "/vnfr:vnfr-catalog/vnfr:vnfr"
982 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
983 + "/vnfr:monitoring-param/vnfr:id";
989 list config-agent-job {
993 description "config agent job Identifier for the NS.";
998 description "Config agent job name";
1004 "Job status to be set based on each VNF primitive execution,
1005 pending - if at least one VNF is in pending state
1006 and remaining VNFs are in success state.
1007 Success - if all VNF executions are in success state
1008 failure - if one of the VNF executions is failure";
1017 description "The primitive is triggered from NS or VNF level";
1023 "Creation timestamp of this Config Agent Job.
1024 The timestamp is expressed as seconds
1025 since unix epoch - 1970-01-01T00:00:00Z";
1030 leaf job-status-details {
1031 description "Config agent job status details, in case of errors";
1035 uses manotypes:primitive-parameter-value;
1037 list parameter-group {
1039 "List of NS Primitive parameter groups";
1043 "Name of the parameter.";
1047 uses manotypes:primitive-parameter-value;
1053 description "Identifier for the VNFR.";
1056 leaf vnf-job-status {
1058 "Job status to be set based on each VNF primitive execution,
1059 pending - if at least one primitive is in pending state
1060 and remaining primitives are in success state.
1061 Success - if all primitive executions are in success state
1062 failure - if one of the primitive executions is failure";
1073 description "the name of the primitive";
1077 uses manotypes:primitive-parameter-value;
1080 description "Execution id of the primitive";
1083 leaf execution-status {
1084 description "status of the Execution";
1091 leaf execution-error-details {
1092 description "Error details if execution-status is failure";
1101 rpc get-ns-service-primitive-values {
1102 description "Get the service primitive parameter values";
1105 description "Reference to NSR ID ref";
1108 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1113 description "Name of the NS service primitive group";
1121 description "Automatically generated parameter";
1125 description "Parameter name which should be pulled from a parameter pool";
1129 description "Automatically generated value";
1134 list ns-parameter-group {
1135 description "Automatically generated parameters in parameter group";
1138 description "Parameter group name";
1142 description "Automatically generated group parameter";
1146 description "Parameter name which should be pulled from a parameter pool";
1150 description "Automatically generated value";
1156 list vnf-primitive-group {
1158 "List of service primitives grouped by VNF.";
1160 key "member-vnf-index-ref";
1161 leaf member-vnf-index-ref {
1163 "Reference to member-vnf within constituent-vnfds";
1169 "A reference to a vnfd. This is a
1171 ../../../../nsd:constituent-vnfd
1172 + [nsd:id = current()/../nsd:id-ref]
1174 NOTE: confd limitations prevent the use of xpath";
1182 description "Index of this primitive";
1187 description "Name of the primitive associated with a value pool";
1192 description "Automatically generated parameter";
1196 description "Parameter name which should be pulled from a parameter pool";
1200 description "Automatically generated value";
1209 rpc exec-ns-service-primitive {
1210 description "Executes a NS service primitive or script";
1214 description "Name of the primitive";
1219 description "Reference to NSR ID ref";
1221 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1226 description "The primitive is triggered from NS or VNF level";
1228 default ns-primitive;
1231 uses manotypes:primitive-parameter-value;
1233 list parameter-group {
1235 "List of NS Primitive parameter groups";
1239 "Name of the parameter.";
1243 uses manotypes:primitive-parameter-value;
1248 "List of VNFs whose primitives are being set.";
1249 key "member_vnf_index_ref";
1251 leaf member_vnf_index_ref {
1252 description "Member VNF index";
1258 "A reference to a vnfr. This is a
1263 list vnf-primitive {
1265 "List of service primitives supported by the
1266 configuration agent for this VNF.";
1271 "index of the service primitive.";
1276 "Name of the service primitive.";
1280 uses manotypes:primitive-parameter-value;
1283 leaf user-defined-script {
1285 "A user defined script.";
1291 description "Job identifier for this RPC";
1296 description "Name of the service primitive";
1301 description "Reference to NSR ID ref";
1303 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1308 description "The primitive is triggered from NS or VNF level";
1314 "Creation timestamp of this config agent JOB.
1315 The timestamp is expressed as seconds
1316 since unix epoch - 1970-01-01T00:00:00Z";
1321 leaf job-status-details {
1322 description "Job status details, in case of any errors";
1326 uses manotypes:primitive-parameter-value;
1328 list parameter-group {
1330 "List of NS Primitive parameter groups";
1334 "Name of the parameter.";
1338 uses manotypes:primitive-parameter-value;
1343 "List of VNFs whose primitives were set.";
1344 key "member_vnf_index_ref";
1346 leaf member_vnf_index_ref {
1347 description "Member VNF index";
1352 "A reference to a vnfr. This is a
1357 list vnf-out-primitive {
1359 "List of service primitives supported by the
1360 configuration agent for this VNF.";
1365 "index of the service primitive.";
1371 "Name of the service primitive.";
1375 uses manotypes:primitive-parameter-value;
1378 description "Execution id of this primitive";
1382 leaf execution-status {
1383 description "Status of the execution of this primitive";
1387 leaf execution-error-details {
1388 description "Error details if execution-status is failed";
1397 description "Executes scale out request";
1402 description "Reference to NSR ID ref";
1404 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1408 leaf scaling-group-name-ref {
1409 description "name of the scaling group";
1414 description "id of the scaling group";
1422 description "id of the scaling group";
1428 rpc exec-scale-out {
1429 description "Executes scale out request";
1434 description "Reference to NSR ID ref";
1436 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1440 leaf scaling-group-name-ref {
1441 description "name of the scaling group";
1446 description "id of the scaling group";
1453 description "id of the scaling group";