4 * Copyright 2016-2017 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 {
72 "Update model to support projects.";
77 "Initial revision. This YANG file defines
78 the Network Service Record (NSR)";
80 "Derived from earlier versions of base YANG files";
83 typedef config-states {
87 enum config_not_needed;
93 typedef trigger-type {
100 augment "/rw-project:project" {
103 description "Used to configure the list of public keys to be injected as part
104 of ns instantiation";
106 description "Name of this key pair";
111 description "Key associated with this key pair";
117 augment "/rw-project:project" {
118 container ns-instance-config {
125 description "Identifier for the NSR.";
130 description "NSR name.";
135 description "NSR short name.";
140 description "NSR description.";
146 "This is the administrative status of the NS instance";
155 description "NS descriptor used to instantiate this NS";
157 uses nsd:nsd-descriptor-common;
159 uses nsd:nsr-nsd-vld;
161 uses nsd:nsr-nsd-constituent-vnfd;
163 uses nsd:nsr-nsd-placement-groups;
165 uses nsd:nsr-nsd-vnf-dependency;
167 uses nsd:nsr-nsd-monitoring-param;
170 uses ns-instance-config-params;
175 grouping ns-instance-config-params-common {
176 uses manotypes:input-parameter;
179 description "List of ns scaling group instances";
180 key "scaling-group-name-ref";
182 leaf scaling-group-name-ref {
183 description "name of the scaling group
184 leafref path ../../nsd/scaling-group-descriptor/name";
189 description "The instance of the scaling group";
192 description "Scaling group instance uuid";
198 list nsd-placement-group-maps {
200 "Mapping from mano-placement groups construct from NSD to cloud
201 platform placement group construct";
203 key "placement-group-ref";
205 leaf placement-group-ref {
206 description "Reference for NSD placement group
207 leafref path ../../nsd/placement-groups/name";
210 uses manotypes:placement-group-input;
214 grouping ns-instance-config-params {
215 uses ns-instance-config-params-common;
217 list vnfd-placement-group-maps {
219 "Mapping from mano-placement groups construct from VNFD to cloud
220 platform placement group construct";
222 key "placement-group-ref vnfd-id-ref";
226 "A reference to a vnfd. This is a
228 ../../../../nsd:constituent-vnfd
229 + [id = current()/../id-ref]
231 NOTE: An issue with confd is preventing the
232 use of xpath. Seems to be an issue with leafref
233 to leafref, whose target is in a different module.
234 Once that is resovled this will switched to use
239 leaf placement-group-ref {
241 "A reference to VNFD placement group";
243 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = " +
244 "current()/../vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
248 uses manotypes:placement-group-input;
251 list ssh-authorized-key {
254 description "List of authorized ssh keys as part of cloud-config";
257 description "A reference to the key pair entry in the global key pair table";
259 path "../../../../key-pair/name";
266 description "List of users to be added through cloud-config";
268 description "Name of the user ";
273 description "The user name's real name";
277 list ssh-authorized-key {
280 description "Used to configure the list of public keys to be injected as part
281 of ns instantiation";
284 description "A reference to the key pair entry in the global key pair table";
286 path "../../../../../key-pair/name";
299 description "Identifier for the VNFFGR.";
304 description "VNFFG descriptor id reference";
307 path "../../../../ns-instance-config/nsr"
308 // + "[id=current()/../../ns-instance-config-ref]"
313 leaf vnffgd-name-ref {
314 description "VNFFG descriptor name reference";
317 path "../../../../ns-instance-config/nsr"
318 // + "[id=current()/../../ns-instance-config-ref]"
320 // + "[id=current()/../vnffgd-id-ref]"
327 "The SDN account to use when requesting resources for
330 path "../../../../rw-sdn:sdn/rw-sdn:account/rw-sdn: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";
374 path "../../../../../ns-instance-config/nsr"
375 // + "[id=current()/../../../ns-instance-config-ref]"
377 // + "[id=current()/../../vnffgd-id-ref]"
382 leaf vnffgd-rsp-name-ref {
384 "Name for the VNFFG Descriptor RSP reference";
387 path "../../../../../ns-instance-config/nsr"
388 // + "[id=current()/../../../ns-instance-config-ref]"
390 // + "[id=current()/../../vnffgd-id-ref]"
392 // + "[id=current()/../vnffgd-rsp-id-ref]"
397 leaf classifier-name {
403 "Unique Identifier for the service path";
407 list vnfr-connection-point-ref {
411 "Monotonically increasing number to show service path hop
415 leaf service-function-type {
417 "Type of Service Function.
418 NOTE: This needs to map with Service Function Type in ODL to
419 support VNFFG. Service Function Type is manadatory param in ODL
420 SFC. This is temporarily set to string for ease of use";
424 leaf member-vnf-index-ref {
429 "Reference to VNF Descriptor Id";
434 "A reference to a vnfr id";
436 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
441 "A reference to a vnfr name";
443 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
446 leaf vnfr-connection-point-ref {
448 "A reference to a vnfr connection point.";
450 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
451 + "[vnfr:id = current()/../vnfr-id-ref]"
452 + "/vnfr:connection-point/vnfr:name";
457 "Location within the service path";
460 container connection-point-params {
462 type inet:ip-address;
468 rwpb:field-inline "true";
469 rwpb:field-string-max 64;
473 rwpb:field-inline "true";
474 rwpb:field-string-max 64;
478 type inet:ip-address;
481 type inet:port-number;
485 container service-function-forwarder {
488 "Service Function Forwarder name";
493 "Data Plane IP Address of the SFF";
494 type inet:ip-address;
498 "Data Plane Port of the SFF";
499 type inet:port-number;
510 "Identifier for the classifier rule.";
515 "Name of the classifier.";
520 "A reference to the RSP.";
532 "A reference to a vnfr id";
534 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
539 "A reference to a vnfr name";
541 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
544 leaf vnfr-connection-point-ref {
546 "A reference to a vnfr connection point.";
548 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
549 + "[vnfr:id = current()/../vnfr-id-ref]"
550 + "/vnfr:connection-point/vnfr:name";
554 rwpb:field-inline "true";
555 rwpb:field-string-max 64;
559 rwpb:field-inline "true";
560 rwpb:field-string-max 64;
573 augment "/rw-project:project" {
574 container ns-instance-opdata {
578 key "ns-instance-config-ref";
580 leaf ns-instance-config-ref {
582 path "../../../ns-instance-config/nsr/id";
588 description "Network service name reference";
591 path "../../../ns-instance-config/nsr" +
592 // "[id=current()/../ns-instance-config-ref]" +
598 description "Network service descriptor id reference";
601 path "../../../ns-instance-config/nsr"
602 // + "[id=current()/../ns-instance-config-ref]"
608 description "Network service descriptor name reference";
611 path "../../../ns-instance-config/nsr"
612 // + "[id=current()/../ns-instance-config-ref]"
619 "Creation timestamp of this Network Service.
620 The timestamp is expressed as seconds
621 since unix epoch - 1970-01-01T00:00:00Z";
628 "Active period of this Network Service.
629 Uptime is expressed in seconds";
634 list connection-point {
636 "List for external connection points.
637 Each NS has one or more external connection points.
638 As the name implies that external connection points
639 are used for connecting the NS to other NS or to
640 external networks. Each NS exposes these connection
641 points to the orchestrator. The orchestrator can
642 construct network service chains by connecting the
643 connection points between different NS.";
648 "Name of the NS connection point.";
654 "Type of the connection point.";
655 type manotypes:connection-point-type;
663 "Reference to a VLR record in the VLR catalog";
665 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
670 list vnfr-connection-point-ref {
672 "A list of references to connection points.";
676 description "A reference to a vnfr";
678 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
682 leaf connection-point {
684 "A reference to a connection point name in a vnfr";
686 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
687 + "[vnfr:id = current()/../vnfr-id]"
688 + "/vnfr:connection-point/vnfr:name";
694 list constituent-vnfr-ref {
696 "List of VNFRs that are part of this
702 "Reference to the VNFR id
703 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
704 But due to confd bug (RIFT-9451), changing to string.";
709 list scaling-group-record {
710 description "List of scaling group records";
711 key "scaling-group-name-ref";
713 leaf scaling-group-name-ref {
714 description "name of the scaling group";
717 path "../../../../ns-instance-config/nsr"
718 // + "[id=current()/../../ns-instance-config-ref]"
719 + "/nsd/scaling-group-descriptor/name";
724 description "Reference to scaling group instance record";
727 description "Scaling group instance id";
732 description "Flag indicating whether this instance was part of
733 default scaling group (and thus undeletable)";
739 "The operational status of the NS instance
740 init : The scaling group has just started.
741 vnf-init-phase : The VNFs in the scaling group are being instantiated.
742 running : The scaling group is in running state.
743 terminate : The scaling group is being terminated.
744 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
745 terminated : The scaling group is in the terminated state.
746 failed : The scaling group instantiation failed.
754 enum vnf-terminate-phase;
762 "The configuration status of the scaling group instance
763 configuring : At least one of the VNFs in this scaling group instance
764 is in configuring state
765 configured : All the VNFs in this scaling group instance are
766 configured or config-not-needed state
767 failed : Configuring this scaling group instance failed
774 "Reason for failure in configuration of this scaling instance";
780 "Creation timestamp of this scaling group record.
781 The timestamp is expressed as seconds
782 since unix epoch - 1970-01-01T00:00:00Z";
788 description "Reference to VNFR within the scale instance";
790 path "../../../constituent-vnfr-ref/vnfr-id";
798 leaf operational-status {
800 "The operational status of the NS instance
801 init : The network service has just started.
802 vl-init-phase : The VLs in the NS are being instantiated.
803 vnf-init-phase : The VNFs in the NS are being instantiated.
804 running : The NS is in running state.
805 terminate : The NS is being terminated.
806 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
807 vl-terminate-phase : The NS is terminating the VLs in the NS.
808 terminated : The NS is in the terminated state.
809 failed : The NS instantiation failed.
810 scaling-out : The NS is scaling out
811 scaling-in : The NS is scaling in
812 vl-instantiate : The NS is initiating a new VL
813 vl-terminate : The NS is terminating a VL
822 enum vnf-terminate-phase;
823 enum vl-terminate-phase;
835 "The configuration status of the NS instance
836 configuring: At least one of the VNFs in this instance is in configuring state
837 configured: All the VNFs in this NS instance are configured or config-not-needed state
842 uses manotypes:ns-service-primitive;
844 list initial-config-primitive {
845 rwpb:msg-new NsrInitialConfigPrimitive;
847 "Initial set of configuration primitives for NSD.";
851 "Sequence number for the configuration primitive.";
857 "Name of the configuration primitive.";
862 leaf user-defined-script {
864 "A user defined script.";
881 list monitoring-param {
883 "List of NS level params.";
886 uses manotypes:monitoring-param-value;
887 uses manotypes:monitoring-param-ui-data;
888 uses manotypes:monitoring-param-aggregation;
898 leaf nsd-mon-param-ref {
899 description "Reference to the NSD monitoring param descriptor
900 that produced this result";
903 path "../../../../nsd:nsd-catalog/nsd:nsd" +
904 "[nsd:id = current()/../../nsd-ref]" +
905 "/nsd:monitoring-param/nsd:id";
909 list vnfr-mon-param-ref {
910 description "A list of VNFR monitoring params associated with this monp";
911 key "vnfr-id-ref vnfr-mon-param-ref";
915 "A reference to a vnfr. This is a
917 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
922 leaf vnfr-mon-param-ref {
923 description "A reference to the VNFR monitoring param";
925 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
926 + "[vnfr:id = current()/../vnfr-id-ref]"
927 + "/vnfr:monitoring-param/vnfr:id";
933 list config-agent-job {
937 description "config agent job Identifier for the NS.";
942 description "Config agent job name";
948 "Job status to be set based on each VNF primitive execution,
949 pending - if at least one VNF is in pending state
950 and remaining VNFs are in success state.
951 Success - if all VNF executions are in success state
952 failure - if one of the VNF executions is failure";
961 description "The primitive is triggered from NS or VNF level";
967 "Creation timestamp of this Config Agent Job.
968 The timestamp is expressed as seconds
969 since unix epoch - 1970-01-01T00:00:00Z";
974 leaf job-status-details {
975 description "Config agent job status details, in case of errors";
979 uses manotypes:primitive-parameter-value;
981 list parameter-group {
983 "List of NS Primitive parameter groups";
987 "Name of the parameter.";
991 uses manotypes:primitive-parameter-value;
997 description "Identifier for the VNFR.";
1000 leaf vnf-job-status {
1002 "Job status to be set based on each VNF primitive execution,
1003 pending - if at least one primitive is in pending state
1004 and remaining primitives are in success state.
1005 Success - if all primitive executions are in success state
1006 failure - if one of the primitive executions is failure";
1017 description "the name of the primitive";
1021 uses manotypes:primitive-parameter-value;
1024 description "Execution id of the primitive";
1027 leaf execution-status {
1028 description "status of the Execution";
1035 leaf execution-error-details {
1036 description "Error details if execution-status is failure";
1046 grouping rpc-common {
1047 uses manotypes:rpc-project-name;
1050 description "Reference to NSR ID ref";
1052 path "/rw-project:project[rw-project:name=current()/.." +
1053 "/project-name]/ns-instance-config/nsr/id";
1058 rpc get-ns-service-primitive-values {
1059 description "Get the service primitive parameter values";
1063 description "Name of the NS service primitive group";
1073 description "Automatically generated parameter";
1077 description "Parameter name which should be pulled from a parameter pool";
1081 description "Automatically generated value";
1086 list ns-parameter-group {
1087 description "Automatically generated parameters in parameter group";
1090 description "Parameter group name";
1094 description "Automatically generated group parameter";
1098 description "Parameter name which should be pulled from a parameter pool";
1102 description "Automatically generated value";
1108 list vnf-primitive-group {
1110 "List of service primitives grouped by VNF.";
1112 key "member-vnf-index-ref";
1113 leaf member-vnf-index-ref {
1115 "Reference to member-vnf within constituent-vnfds";
1121 "A reference to a vnfd. This is a
1123 ../../../../nsd:constituent-vnfd
1124 + [nsd:id = current()/../nsd:id-ref]
1126 NOTE: An issue with confd is preventing the
1127 use of xpath. Seems to be an issue with leafref
1128 to leafref, whose target is in a different module.
1129 Once that is resovled this will switched to use
1138 description "Index of this primitive";
1143 description "Name of the primitive associated with a value pool";
1148 description "Automatically generated parameter";
1152 description "Parameter name which should be pulled from a parameter pool";
1156 description "Automatically generated value";
1165 rpc exec-ns-service-primitive {
1166 description "Executes a NS service primitive or script";
1170 description "Name of the primitive";
1177 description "The primitive is triggered from NS or VNF level";
1179 default ns-primitive;
1182 uses manotypes:primitive-parameter-value;
1184 list parameter-group {
1186 "List of NS Primitive parameter groups";
1190 "Name of the parameter.";
1194 uses manotypes:primitive-parameter-value;
1199 "List of VNFs whose primitives are being set.";
1200 key "member_vnf_index_ref";
1202 leaf member_vnf_index_ref {
1203 description "Member VNF index";
1209 "A reference to a vnfr. This is a
1214 list vnf-primitive {
1216 "List of service primitives supported by the
1217 configuration agent for this VNF.";
1222 "index of the service primitive.";
1227 "Name of the service primitive.";
1231 uses manotypes:primitive-parameter-value;
1234 leaf user-defined-script {
1236 "A user defined script.";
1242 description "Job identifier for this RPC";
1247 description "Name of the service primitive";
1254 description "The primitive is triggered from NS or VNF level";
1260 "Creation timestamp of this config agent JOB.
1261 The timestamp is expressed as seconds
1262 since unix epoch - 1970-01-01T00:00:00Z";
1267 leaf job-status-details {
1268 description "Job status details, in case of any errors";
1272 uses manotypes:primitive-parameter-value;
1274 list parameter-group {
1276 "List of NS Primitive parameter groups";
1280 "Name of the parameter.";
1284 uses manotypes:primitive-parameter-value;
1289 "List of VNFs whose primitives were set.";
1290 key "member_vnf_index_ref";
1292 leaf member_vnf_index_ref {
1293 description "Member VNF index";
1298 "A reference to a vnfr. This is a
1303 list vnf-out-primitive {
1305 "List of service primitives supported by the
1306 configuration agent for this VNF.";
1311 "index of the service primitive.";
1317 "Name of the service primitive.";
1321 uses manotypes:primitive-parameter-value;
1324 description "Execution id of this primitive";
1328 leaf execution-status {
1329 description "Status of the execution of this primitive";
1333 leaf execution-error-details {
1334 description "Error details if execution-status is failed";
1343 description "Executes scale out request";
1348 leaf scaling-group-name-ref {
1349 description "name of the scaling group";
1354 description "id of the scaling group";
1362 description "id of the scaling group";
1368 rpc exec-scale-out {
1369 description "Executes scale out request";
1374 leaf scaling-group-name-ref {
1375 description "name of the scaling group";
1380 description "id of the scaling group";
1387 description "id of the scaling group";
1393 rpc start-network-service {
1394 description "Start the network service";
1398 description "Name of the Network Service";
1404 uses ns-instance-config-params-common;
1406 list vnfd-placement-group-maps {
1408 "Mapping from mano-placement groups construct from VNFD to cloud
1409 platform placement group construct";
1411 key "placement-group-ref vnfd-id-ref";
1415 "A reference to a vnfd. This is a
1417 ../../../../nsd:constituent-vnfd
1418 + [id = current()/../nsd:id-ref]
1420 NOTE: An issue with confd is preventing the
1421 use of xpath. Seems to be an issue with leafref
1422 to leafref, whose target is in a different module.
1423 Once that is resovled this will switched to use
1428 leaf placement-group-ref {
1430 "A reference to VNFD placement group";
1432 path "/rw-project:project[rw-project:name=current()/" +
1433 "../../project-name]/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = " +
1434 "current()/../vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
1438 uses manotypes:placement-group-input;
1440 list ssh-authorized-key {
1443 description "List of authorized ssh keys as part of cloud-config";
1446 description "A reference to the key pair entry in the global key pair table";
1448 path "/rw-project:project[rw-project:name=current()/../../../" +
1449 "project-name]/key-pair/name";
1457 description "List of users to be added through cloud-config";
1459 description "Name of the user ";
1463 description "The user name's real name";
1466 list ssh-authorized-key {
1469 description "Used to configure the list of public keys to be injected as part
1470 of ns instantiation";
1473 description "A reference to the key pair entry in the global key pair table";
1475 path "/rw-project:project[rw-project:name=current()/" +
1476 "../../../../project-name]/key-pair/name";
1486 description "Automatically generated parameter";