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: confd limitations prevent the use of xpath";
278 leaf placement-group-ref {
280 "A reference to VNFD placement group";
282 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
283 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
287 uses manotypes:placement-group-input;
298 description "Identifier for the VNFFGR.";
303 description "VNFFG descriptor id reference";
305 path "/nsr:ns-instance-config/nsr:nsr"
306 + "[nsr:id=current()/../../ns-instance-config-ref]"
307 + "/nsr:nsd/nsr:vnffgd/nsr:id";
311 leaf vnffgd-name-ref {
312 description "VNFFG descriptor name reference";
314 path "/ns-instance-config/nsr"
315 + "[id=current()/../../ns-instance-config-ref]"
316 + "/nsd/vnffgd[nsr:id = current()/../vnffgd-id-ref]"
323 "The SDN account to use when requesting resources for
326 path "/rwsdn:sdn/rwsdn:account/rwsdn:name";
330 leaf operational-status {
332 "The operational status of the VNFFGR instance
333 init : The VNFFGR has just started.
334 running : The VNFFGR is in running state.
335 terminate : The VNFFGR is being terminated.
336 terminated : The VNFFGR is in the terminated state.
337 failed : The VNFFGR instantiation failed
341 rwpb:enum-type "VnffgrOperationalStatus";
355 "Identifier for the RSP.";
365 leaf vnffgd-rsp-id-ref {
367 "Identifier for the VNFFG Descriptor RSP reference";
369 path "/ns-instance-config/nsr"
370 + "[id=current()/../../../ns-instance-config-ref]"
372 + "[id=current()/../../vnffgd-id-ref]"
377 leaf vnffgd-rsp-name-ref {
379 "Name for the VNFFG Descriptor RSP reference";
381 path "/ns-instance-config/nsr:nsr"
382 + "[id=current()/../../../ns-instance-config-ref]"
384 + "[id=current()/../../vnffgd-id-ref]"
385 + "/rsp[id=current()/../vnffgd-rsp-id-ref]"
390 leaf classifier-name {
396 "Unique Identifier for the service path";
400 list vnfr-connection-point-ref {
404 "Monotonically increasing number to show service path hop
408 leaf service-function-type {
410 "Type of Service Function.
411 NOTE: This needs to map with Service Function Type in ODL to
412 support VNFFG. Service Function Type is mandatory param in ODL
413 SFC. This is temporarily set to string for ease of use";
417 leaf member-vnf-index-ref {
422 "Reference to VNF Descriptor Id";
427 "A reference to a vnfr id";
429 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
434 "A reference to a vnfr name";
436 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
439 leaf vnfr-connection-point-ref {
441 "A reference to a vnfr connection point.";
443 path "/vnfr:vnfr-catalog/vnfr:vnfr"
444 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
445 + "/vnfr:connection-point/vnfr:name";
450 "Location within the service path";
453 container connection-point-params {
455 type inet:ip-address;
461 rwpb:field-inline "true";
462 rwpb:field-string-max 64;
466 rwpb:field-inline "true";
467 rwpb:field-string-max 64;
471 type inet:ip-address;
474 type inet:port-number;
478 container service-function-forwarder {
481 "Service Function Forwarder name";
486 "Data Plane IP Address of the SFF";
487 type inet:ip-address;
491 "Data Plane Port of the SFF";
492 type inet:port-number;
503 "Identifier for the classifier rule.";
508 "Name of the classifier.";
513 "A reference to the RSP.";
515 path "../../nsr:rsp/nsr:id";
525 "A reference to a vnfr id";
527 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
532 "A reference to a vnfr name";
534 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
537 leaf vnfr-connection-point-ref {
539 "A reference to a vnfr connection point.";
541 path "/vnfr:vnfr-catalog/vnfr:vnfr"
542 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
543 + "/vnfr:connection-point/vnfr:name";
547 rwpb:field-inline "true";
548 rwpb:field-string-max 64;
552 rwpb:field-inline "true";
553 rwpb:field-string-max 64;
566 container ns-instance-opdata {
570 key "ns-instance-config-ref";
572 leaf ns-instance-config-ref {
574 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
579 description "Network service name reference";
581 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
586 description "Network service descriptor id reference";
588 path "/ns-instance-config/nsr"
589 + "[id=current()/../ns-instance-config-ref]"
595 description "Network service descriptor name reference";
597 path "/ns-instance-config/nsr"
598 + "[id=current()/../ns-instance-config-ref]"
605 "Creation timestamp of this Network Service.
606 The timestamp is expressed as seconds
607 since unix epoch - 1970-01-01T00:00:00Z";
614 "Active period of this Network Service.
615 Uptime is expressed in seconds";
620 list connection-point {
622 "List for external connection points.
623 Each NS has one or more external connection points.
624 As the name implies that external connection points
625 are used for connecting the NS to other NS or to
626 external networks. Each NS exposes these connection
627 points to the orchestrator. The orchestrator can
628 construct network service chains by connecting the
629 connection points between different NS.";
634 "Name of the NS connection point.";
640 "Type of the connection point.";
641 type manotypes:connection-point-type;
649 "Reference to a VLR record in the VLR catalog";
651 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
656 list vnfr-connection-point-ref {
658 "A list of references to connection points.";
662 description "A reference to a vnfr";
664 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
668 leaf connection-point {
670 "A reference to a connection point name in a vnfr";
672 path "/vnfr:vnfr-catalog/vnfr:vnfr"
673 + "[vnfr:id = current()/../nsr:vnfr-id]"
674 + "/vnfr:connection-point/vnfr:name";
680 list constituent-vnfr-ref {
682 "List of VNFRs that are part of this
688 "Reference to the VNFR id
689 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
690 But due to confd bug (RIFT-9451), changing to string.
696 list scaling-group-record {
697 description "List of scaling group records";
698 key "scaling-group-name-ref";
700 leaf scaling-group-name-ref {
701 description "name of the scaling group";
703 path "/ns-instance-config/nsr"
704 + "[id=current()/../../ns-instance-config-ref]"
705 + "/nsd/scaling-group-descriptor/name";
710 description "Reference to scaling group instance record";
713 description "Scaling group instance id";
718 description "Flag indicating whether this instance was part of
719 default scaling group (and thus undeletable)";
725 "The operational status of the NS instance
726 init : The scaling group has just started.
727 vnf-init-phase : The VNFs in the scaling group are being instantiated.
728 running : The scaling group is in running state.
729 terminate : The scaling group is being terminated.
730 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
731 terminated : The scaling group is in the terminated state.
732 failed : The scaling group instantiation failed.
740 enum vnf-terminate-phase;
748 "The configuration status of the scaling group instance
749 configuring : At least one of the VNFs in this scaling group instance
750 is in configuring state
751 configured : All the VNFs in this scaling group instance are
752 configured or config-not-needed state
753 failed : Configuring this scaling group instance failed
760 "Reason for failure in configuration of this scaling instance";
766 "Creation timestamp of this scaling group record.
767 The timestamp is expressed as seconds
768 since unix epoch - 1970-01-01T00:00:00Z";
774 description "Reference to VNFR within the scale instance";
776 path "../../../constituent-vnfr-ref/vnfr-id";
784 leaf operational-status {
786 "The operational status of the NS instance
787 init : The network service has just started.
788 vl-init-phase : The VLs in the NS are being instantiated.
789 vnf-init-phase : The VNFs in the NS are being instantiated.
790 running : The NS is in running state.
791 terminate : The NS is being terminated.
792 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
793 vl-terminate-phase : The NS is terminating the VLs in the NS.
794 terminated : The NS is in the terminated state.
795 failed : The NS instantiation failed.
796 scaling-out : The NS is scaling out
797 scaling-in : The NS is scaling in
798 vl-instantiate : The NS is initiating a new VL
799 vl-terminate : The NS is terminating a VL
808 enum vnf-terminate-phase;
809 enum vl-terminate-phase;
821 "The configuration status of the NS instance
822 configuring: At least one of the VNFs in this instance is in configuring state
823 configured: All the VNFs in this NS instance are configured or config-not-needed state
828 list service-primitive {
830 "Network service level service primitives.";
836 "Name of the service primitive.";
842 "List of parameters for the service primitive.";
845 uses manotypes:primitive-parameter;
848 uses manotypes:ui-primitive-group;
850 list vnf-primitive-group {
852 "List of service primitives grouped by VNF.";
854 key "member-vnf-index-ref";
855 leaf member-vnf-index-ref {
857 "Reference to member-vnf within constituent-vnfds";
863 "A reference to a vnfd. This is a
865 ../../../../nsd:constituent-vnfd
866 + [nsd:id = current()/../nsd:id-ref]
868 NOTE: confd limitations prevent the use of xpath";
883 description "Index of this primitive";
888 description "Name of the primitive in the VNF primitive ";
894 leaf user-defined-script {
896 "A user defined script.";
901 list initial-config-primitive {
902 rwpb:msg-new NsrInitialConfigPrimitive;
904 "Initial set of configuration primitives for NSD.";
908 "Sequence number for the configuration primitive.";
914 "Name of the configuration primitive.";
919 leaf user-defined-script {
921 "A user defined script.";
927 "List of parameters for the initial config primitive";
930 description "Name of the intitial config parameter";
935 description "Value associated with the initial config
943 list monitoring-param {
945 "List of NS level params.";
948 uses manotypes:monitoring-param-value;
949 uses manotypes:monitoring-param-ui-data;
950 uses manotypes:monitoring-param-aggregation;
960 leaf nsd-mon-param-ref {
961 description "Reference to the NSD monitoring param descriptor
962 that produced this result";
964 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
965 "../../nsr:nsd-ref]/nsd:monitoring-param/nsd:id";
969 list vnfr-mon-param-ref {
970 description "A list of VNFR monitoring params associated with this monp";
971 key "vnfr-id-ref vnfr-mon-param-ref";
975 "A reference to a vnfr. This is a
977 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
982 leaf vnfr-mon-param-ref {
983 description "A reference to the VNFR monitoring param";
985 path "/vnfr:vnfr-catalog/vnfr:vnfr"
986 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
987 + "/vnfr:monitoring-param/vnfr:id";
993 list config-agent-job {
997 description "config agent job Identifier for the NS.";
1002 description "Config agent job name";
1008 "Job status to be set based on each VNF primitive execution,
1009 pending - if at least one VNF is in pending state
1010 and remaining VNFs are in success state.
1011 Success - if all VNF executions are in success state
1012 failure - if one of the VNF executions is failure";
1021 description "The primitive is triggered from NS or VNF level";
1027 "Creation timestamp of this Config Agent Job.
1028 The timestamp is expressed as seconds
1029 since unix epoch - 1970-01-01T00:00:00Z";
1034 leaf job-status-details {
1035 description "Config agent job status details, in case of errors";
1039 uses manotypes:primitive-parameter-value;
1041 list parameter-group {
1043 "List of NS Primitive parameter groups";
1047 "Name of the parameter.";
1051 uses manotypes:primitive-parameter-value;
1057 description "Identifier for the VNFR.";
1060 leaf vnf-job-status {
1062 "Job status to be set based on each VNF primitive execution,
1063 pending - if at least one primitive is in pending state
1064 and remaining primitives are in success state.
1065 Success - if all primitive executions are in success state
1066 failure - if one of the primitive executions is failure";
1077 description "the name of the primitive";
1081 uses manotypes:primitive-parameter-value;
1084 description "Execution id of the primitive";
1087 leaf execution-status {
1088 description "status of the Execution";
1095 leaf execution-error-details {
1096 description "Error details if execution-status is failure";
1105 rpc get-ns-service-primitive-values {
1106 description "Get the service primitive parameter values";
1109 description "Reference to NSR ID ref";
1112 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1117 description "Name of the NS service primitive group";
1125 description "Automatically generated parameter";
1129 description "Parameter name which should be pulled from a parameter pool";
1133 description "Automatically generated value";
1138 list ns-parameter-group {
1139 description "Automatically generated parameters in parameter group";
1142 description "Parameter group name";
1146 description "Automatically generated group parameter";
1150 description "Parameter name which should be pulled from a parameter pool";
1154 description "Automatically generated value";
1160 list vnf-primitive-group {
1162 "List of service primitives grouped by VNF.";
1164 key "member-vnf-index-ref";
1165 leaf member-vnf-index-ref {
1167 "Reference to member-vnf within constituent-vnfds";
1173 "A reference to a vnfd. This is a
1175 ../../../../nsd:constituent-vnfd
1176 + [nsd:id = current()/../nsd:id-ref]
1178 NOTE: confd limitations prevent the use of xpath";
1186 description "Index of this primitive";
1191 description "Name of the primitive associated with a value pool";
1196 description "Automatically generated parameter";
1200 description "Parameter name which should be pulled from a parameter pool";
1204 description "Automatically generated value";
1213 rpc exec-ns-service-primitive {
1214 description "Executes a NS service primitive or script";
1218 description "Name of the primitive";
1223 description "Reference to NSR ID ref";
1225 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1230 description "The primitive is triggered from NS or VNF level";
1232 default ns-primitive;
1235 uses manotypes:primitive-parameter-value;
1237 list parameter-group {
1239 "List of NS Primitive parameter groups";
1243 "Name of the parameter.";
1247 uses manotypes:primitive-parameter-value;
1252 "List of VNFs whose primitives are being set.";
1253 key "member_vnf_index_ref";
1255 leaf member_vnf_index_ref {
1256 description "Member VNF index";
1262 "A reference to a vnfr. This is a
1267 list vnf-primitive {
1269 "List of service primitives supported by the
1270 configuration agent for this VNF.";
1275 "index of the service primitive.";
1280 "Name of the service primitive.";
1284 uses manotypes:primitive-parameter-value;
1287 leaf user-defined-script {
1289 "A user defined script.";
1295 description "Job identifier for this RPC";
1300 description "Name of the service primitive";
1305 description "Reference to NSR ID ref";
1307 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1312 description "The primitive is triggered from NS or VNF level";
1318 "Creation timestamp of this config agent JOB.
1319 The timestamp is expressed as seconds
1320 since unix epoch - 1970-01-01T00:00:00Z";
1325 leaf job-status-details {
1326 description "Job status details, in case of any errors";
1330 uses manotypes:primitive-parameter-value;
1332 list parameter-group {
1334 "List of NS Primitive parameter groups";
1338 "Name of the parameter.";
1342 uses manotypes:primitive-parameter-value;
1347 "List of VNFs whose primitives were set.";
1348 key "member_vnf_index_ref";
1350 leaf member_vnf_index_ref {
1351 description "Member VNF index";
1356 "A reference to a vnfr. This is a
1361 list vnf-out-primitive {
1363 "List of service primitives supported by the
1364 configuration agent for this VNF.";
1369 "index of the service primitive.";
1375 "Name of the service primitive.";
1379 uses manotypes:primitive-parameter-value;
1382 description "Execution id of this primitive";
1386 leaf execution-status {
1387 description "Status of the execution of this primitive";
1391 leaf execution-error-details {
1392 description "Error details if execution-status is failed";
1401 description "Executes scale out request";
1406 description "Reference to NSR ID ref";
1408 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1412 leaf scaling-group-name-ref {
1413 description "name of the scaling group";
1418 description "id of the scaling group";
1426 description "id of the scaling group";
1432 rpc exec-scale-out {
1433 description "Executes scale out request";
1438 description "Reference to NSR ID ref";
1440 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1444 leaf scaling-group-name-ref {
1445 description "name of the scaling group";
1450 description "id of the scaling group";
1457 description "id of the scaling group";