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";
153 uses ns-instance-config-params;
158 description "Automatically generated parameter";
164 container ns-instance-config {
171 description "Identifier for the NSR.";
176 description "NSR name.";
181 description "NSR short name.";
186 description "NSR description.";
192 "This is the administrative status of the NS instance";
201 description "NS descriptor used to instantiate this NS";
202 uses nsd:nsd-descriptor;
205 uses ns-instance-config-params;
209 grouping ns-instance-config-params {
210 uses manotypes:input-parameter;
213 description "List of ns scaling group instances";
214 key "scaling-group-name-ref";
216 leaf scaling-group-name-ref {
217 description "name of the scaling group
218 leafref path ../../nsd/scaling-group-descriptor/name";
223 description "The instance of the scaling group";
226 description "Scaling group instance uuid";
232 list nsd-placement-group-maps {
234 "Mapping from mano-placement groups construct from NSD to cloud
235 platform placement group construct";
237 key "placement-group-ref";
239 leaf placement-group-ref {
240 description "Reference for NSD placement group
241 leafref path ../../nsd/placement-groups/name";
244 uses manotypes:placement-group-input;
247 list vnfd-placement-group-maps {
249 "Mapping from mano-placement groups construct from VNFD to cloud
250 platform placement group construct";
252 key "placement-group-ref vnfd-id-ref";
256 "A reference to a vnfd. This is a
258 ../../../../nsd:constituent-vnfd
259 + [nsr:id = current()/../nsd:id-ref]
261 NOTE: An issue with confd is preventing the
262 use of xpath. Seems to be an issue with leafref
263 to leafref, whose target is in a different module.
264 Once that is resovled this will switched to use
269 leaf placement-group-ref {
271 "A reference to VNFD placement group";
273 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
274 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
278 uses manotypes:placement-group-input;
289 description "Identifier for the VNFFGR.";
294 description "VNFFG descriptor id reference";
296 path "/nsr:ns-instance-config/nsr:nsr"
297 + "[nsr:id=current()/../../ns-instance-config-ref]"
298 + "/nsr:nsd/nsr:vnffgd/nsr:id";
302 leaf vnffgd-name-ref {
303 description "VNFFG descriptor name reference";
305 path "/ns-instance-config/nsr"
306 + "[id=current()/../../ns-instance-config-ref]"
307 + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
314 "The SDN account to use when requesting resources for
317 path "/rwsdn:sdn-account/rwsdn:name";
321 leaf operational-status {
323 "The operational status of the VNFFGR instance
324 init : The VNFFGR has just started.
325 running : The VNFFGR is in running state.
326 terminate : The VNFFGR is being terminated.
327 terminated : The VNFFGR is in the terminated state.
328 failed : The VNFFGR instantiation failed
332 rwpb:enum-type "VnffgrOperationalStatus";
346 "Identifier for the RSP.";
356 leaf vnffgd-rsp-id-ref {
358 "Identifier for the VNFFG Descriptor RSP reference";
360 path "/ns-instance-config/nsr"
361 + "[id=current()/../../../ns-instance-config-ref]"
363 + "[id=current()/../../vnffgd-id-ref]"
368 leaf vnffgd-rsp-name-ref {
370 "Name for the VNFFG Descriptor RSP reference";
372 path "/ns-instance-config/nsr:nsr"
373 + "[id=current()/../../../ns-instance-config-ref]"
375 + "[id=current()/../../vnffgd-id-ref]"
376 + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
381 leaf classifier-name {
387 "Unique Identifier for the service path";
391 list vnfr-connection-point-ref {
395 "Monotonically increasing number to show service path hop
399 leaf service-function-type {
401 "Type of Service Function.
402 NOTE: This needs to map with Service Function Type in ODL to
403 support VNFFG. Service Function Type is manadatory param in ODL
404 SFC. This is temporarily set to string for ease of use";
408 leaf member-vnf-index-ref {
413 "Reference to VNF Descriptor Id";
418 "A reference to a vnfr id";
420 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
425 "A reference to a vnfr name";
427 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
430 leaf vnfr-connection-point-ref {
432 "A reference to a vnfr connection point.";
434 path "/vnfr:vnfr-catalog/vnfr:vnfr"
435 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
436 + "/vnfr:connection-point/vnfr:name";
441 "Location within the service path";
444 container connection-point-params {
446 type inet:ip-address;
452 rwpb:field-inline "true";
453 rwpb:field-string-max 64;
457 rwpb:field-inline "true";
458 rwpb:field-string-max 64;
462 type inet:ip-address;
465 type inet:port-number;
469 container service-function-forwarder {
472 "Service Function Forwarder name";
477 "Data Plane IP Address of the SFF";
478 type inet:ip-address;
482 "Data Plane Port of the SFF";
483 type inet:port-number;
494 "Identifier for the classifier rule.";
499 "Name of the classifier.";
504 "A reference to the RSP.";
506 path "../../nsr:rsp/nsr:id";
516 "A reference to a vnfr id";
518 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
523 "A reference to a vnfr name";
525 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
528 leaf vnfr-connection-point-ref {
530 "A reference to a vnfr connection point.";
532 path "/vnfr:vnfr-catalog/vnfr:vnfr"
533 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
534 + "/vnfr:connection-point/vnfr:name";
538 rwpb:field-inline "true";
539 rwpb:field-string-max 64;
543 rwpb:field-inline "true";
544 rwpb:field-string-max 64;
557 container ns-instance-opdata {
561 key "ns-instance-config-ref";
563 leaf ns-instance-config-ref {
565 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
570 description "Network service name reference";
572 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
577 description "Network service descriptor id reference";
579 path "/ns-instance-config/nsr"
580 + "[id=current()/../ns-instance-config-ref]"
586 description "Network service descriptor name reference";
588 path "/ns-instance-config/nsr"
589 + "[id=current()/../ns-instance-config-ref]"
596 "Creation timestamp of this Network Service.
597 The timestamp is expressed as seconds
598 since unix epoch - 1970-01-01T00:00:00Z";
603 list connection-point {
605 "List for external connection points.
606 Each NS has one or more external connection points.
607 As the name implies that external connection points
608 are used for connecting the NS to other NS or to
609 external networks. Each NS exposes these connection
610 points to the orchestrator. The orchestrator can
611 construct network service chains by connecting the
612 connection points between different NS.";
617 "Name of the NS connection point.";
623 "Type of the connection point.";
624 type manotypes:connection-point-type;
632 "Reference to a VLR record in the VLR catalog";
634 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
639 list vnfr-connection-point-ref {
641 "A list of references to connection points.";
645 description "A reference to a vnfr";
647 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
651 leaf connection-point {
653 "A reference to a connection point name in a vnfr";
655 path "/vnfr:vnfr-catalog/vnfr:vnfr"
656 + "[vnfr:id = current()/../nsr:vnfr-id]"
657 + "/vnfr:connection-point/vnfr:name";
663 list constituent-vnfr-ref {
665 "List of VNFRs that are part of this
671 "Reference to the VNFR id
672 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
673 But due to confd bug (RIFT-9451), changing to string.
679 list scaling-group-record {
680 description "List of scaling group records";
681 key "scaling-group-name-ref";
683 leaf scaling-group-name-ref {
684 description "name of the scaling group";
686 path "/ns-instance-config/nsr"
687 + "[id=current()/../../ns-instance-config-ref]"
688 + "/nsd/scaling-group-descriptor/name";
693 description "Reference to scaling group instance record";
696 description "Scaling group instance id";
701 description "Flag indicating whether this instance was part of
702 default scaling group (and thus undeletable)";
708 "The operational status of the NS instance
709 init : The scaling group has just started.
710 vnf-init-phase : The VNFs in the scaling group are being instantiated.
711 running : The scaling group is in running state.
712 terminate : The scaling group is being terminated.
713 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
714 terminated : The scaling group is in the terminated state.
715 failed : The scaling group instantiation failed.
723 enum vnf-terminate-phase;
731 "The configuration status of the scaling group instance
732 configuring : At least one of the VNFs in this scaling group instance
733 is in configuring state
734 configured : All the VNFs in this scaling group instance are
735 configured or config-not-needed state
736 failed : Configuring this scaling group instance failed
743 "Reason for failure in configuration of this scaling instance";
749 "Creation timestamp of this scaling group record.
750 The timestamp is expressed as seconds
751 since unix epoch - 1970-01-01T00:00:00Z";
757 description "Reference to VNFR within the scale instance";
759 path "../../../constituent-vnfr-ref/vnfr-id";
767 leaf operational-status {
769 "The operational status of the NS instance
770 init : The network service has just started.
771 vl-init-phase : The VLs in the NS are being instantiated.
772 vnf-init-phase : The VNFs in the NS are being instantiated.
773 running : The NS is in running state.
774 terminate : The NS is being terminated.
775 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
776 vl-terminate-phase : The NS is terminating the VLs in the NS.
777 terminated : The NS is in the terminated state.
778 failed : The NS instantiation failed.
779 scaling-out : The NS is scaling out
780 scaling-in : The NS is scaling in
781 vl-instantiate : The NS is initiating a new VL
782 vl-terminate : The NS is terminating a VL
791 enum vnf-terminate-phase;
792 enum vl-terminate-phase;
804 "The configuration status of the NS instance
805 configuring: At least one of the VNFs in this instance is in configuring state
806 configured: All the VNFs in this NS instance are configured or config-not-needed state
811 uses manotypes:ns-service-primitive;
813 list initial-config-primitive {
814 rwpb:msg-new NsrInitialConfigPrimitive;
816 "Initial set of configuration primitives for NSD.";
820 "Sequence number for the configuration primitive.";
826 "Name of the configuration primitive.";
831 leaf user-defined-script {
833 "A user defined script.";
850 list monitoring-param {
852 "List of NS level params.";
855 uses manotypes:monitoring-param-value;
856 uses manotypes:monitoring-param-ui-data;
857 uses manotypes:monitoring-param-aggregation;
867 leaf nsd-mon-param-ref {
868 description "Reference to the NSD monitoring param descriptor
869 that produced this result";
871 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
872 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
876 list vnfr-mon-param-ref {
877 description "A list of VNFR monitoring params associated with this monp";
878 key "vnfr-id-ref vnfr-mon-param-ref";
882 "A reference to a vnfr. This is a
884 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
889 leaf vnfr-mon-param-ref {
890 description "A reference to the VNFR monitoring param";
892 path "/vnfr:vnfr-catalog/vnfr:vnfr"
893 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
894 + "/vnfr:monitoring-param/vnfr:id";
900 list config-agent-job {
904 description "config agent job Identifier for the NS.";
909 description "Config agent job name";
915 "Job status to be set based on each VNF primitive execution,
916 pending - if at least one VNF is in pending state
917 and remaining VNFs are in success state.
918 Success - if all VNF executions are in success state
919 failure - if one of the VNF executions is failure";
928 description "The primitive is triggered from NS or VNF level";
934 "Creation timestamp of this Config Agent Job.
935 The timestamp is expressed as seconds
936 since unix epoch - 1970-01-01T00:00:00Z";
941 leaf job-status-details {
942 description "Config agent job status details, in case of errors";
946 uses manotypes:primitive-parameter-value;
948 list parameter-group {
950 "List of NS Primitive parameter groups";
954 "Name of the parameter.";
958 uses manotypes:primitive-parameter-value;
964 description "Identifier for the VNFR.";
967 leaf vnf-job-status {
969 "Job status to be set based on each VNF primitive execution,
970 pending - if at least one primitive is in pending state
971 and remaining primitives are in success state.
972 Success - if all primitive executions are in success state
973 failure - if one of the primitive executions is failure";
984 description "the name of the primitive";
988 uses manotypes:primitive-parameter-value;
991 description "Execution id of the primitive";
994 leaf execution-status {
995 description "status of the Execution";
1002 leaf execution-error-details {
1003 description "Error details if execution-status is failure";
1012 rpc get-ns-service-primitive-values {
1013 description "Get the service primitive parameter values";
1016 description "Reference to NSR ID ref";
1019 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1024 description "Name of the NS service primitive group";
1032 description "Automatically generated parameter";
1036 description "Parameter name which should be pulled from a parameter pool";
1040 description "Automatically generated value";
1045 list ns-parameter-group {
1046 description "Automatically generated parameters in parameter group";
1049 description "Parameter group name";
1053 description "Automatically generated group parameter";
1057 description "Parameter name which should be pulled from a parameter pool";
1061 description "Automatically generated value";
1067 list vnf-primitive-group {
1069 "List of service primitives grouped by VNF.";
1071 key "member-vnf-index-ref";
1072 leaf member-vnf-index-ref {
1074 "Reference to member-vnf within constituent-vnfds";
1080 "A reference to a vnfd. This is a
1082 ../../../../nsd:constituent-vnfd
1083 + [nsd:id = current()/../nsd:id-ref]
1085 NOTE: An issue with confd is preventing the
1086 use of xpath. Seems to be an issue with leafref
1087 to leafref, whose target is in a different module.
1088 Once that is resovled this will switched to use
1097 description "Index of this primitive";
1102 description "Name of the primitive associated with a value pool";
1107 description "Automatically generated parameter";
1111 description "Parameter name which should be pulled from a parameter pool";
1115 description "Automatically generated value";
1124 rpc exec-ns-service-primitive {
1125 description "Executes a NS service primitive or script";
1129 description "Name of the primitive";
1134 description "Reference to NSR ID ref";
1136 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1141 description "The primitive is triggered from NS or VNF level";
1143 default ns-primitive;
1146 uses manotypes:primitive-parameter-value;
1148 list parameter-group {
1150 "List of NS Primitive parameter groups";
1154 "Name of the parameter.";
1158 uses manotypes:primitive-parameter-value;
1163 "List of VNFs whose primitives are being set.";
1164 key "member_vnf_index_ref";
1166 leaf member_vnf_index_ref {
1167 description "Member VNF index";
1173 "A reference to a vnfr. This is a
1178 list vnf-primitive {
1180 "List of service primitives supported by the
1181 configuration agent for this VNF.";
1186 "index of the service primitive.";
1191 "Name of the service primitive.";
1195 uses manotypes:primitive-parameter-value;
1198 leaf user-defined-script {
1200 "A user defined script.";
1206 description "Job identifier for this RPC";
1211 description "Name of the service primitive";
1216 description "Reference to NSR ID ref";
1218 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1223 description "The primitive is triggered from NS or VNF level";
1229 "Creation timestamp of this config agent JOB.
1230 The timestamp is expressed as seconds
1231 since unix epoch - 1970-01-01T00:00:00Z";
1236 leaf job-status-details {
1237 description "Job status details, in case of any errors";
1241 uses manotypes:primitive-parameter-value;
1243 list parameter-group {
1245 "List of NS Primitive parameter groups";
1249 "Name of the parameter.";
1253 uses manotypes:primitive-parameter-value;
1258 "List of VNFs whose primitives were set.";
1259 key "member_vnf_index_ref";
1261 leaf member_vnf_index_ref {
1262 description "Member VNF index";
1267 "A reference to a vnfr. This is a
1272 list vnf-out-primitive {
1274 "List of service primitives supported by the
1275 configuration agent for this VNF.";
1280 "index of the service primitive.";
1286 "Name of the service primitive.";
1290 uses manotypes:primitive-parameter-value;
1293 description "Execution id of this primitive";
1297 leaf execution-status {
1298 description "Status of the execution of this primitive";
1302 leaf execution-error-details {
1303 description "Error details if execution-status is failed";
1312 description "Executes scale out request";
1317 description "Reference to NSR ID ref";
1319 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1323 leaf scaling-group-name-ref {
1324 description "name of the scaling group";
1329 description "id of the scaling group";
1337 description "id of the scaling group";
1343 rpc exec-scale-out {
1344 description "Executes scale out request";
1349 description "Reference to NSR ID ref";
1351 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1355 leaf scaling-group-name-ref {
1356 description "name of the scaling group";
1361 description "id of the scaling group";
1368 description "id of the scaling group";