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:etsi:osm:yang:nsr";
39 prefix "project-vnfd";
46 import ietf-inet-types {
50 import ietf-yang-types {
64 "Update model to support projects.";
69 "Initial revision. This YANG file defines
70 the Network Service Record (NSR)";
72 "Derived from earlier versions of base YANG files";
75 typedef vnffgr-operational-status {
85 typedef ns-operational-status {
92 enum vnf-terminate-phase;
93 enum vl-terminate-phase;
103 typedef config-states {
107 enum config_not_needed;
114 typedef trigger-type {
121 grouping cloud-config {
122 description "List of cloud config parameters";
124 list ssh-authorized-key {
127 description "List of authorized ssh keys as part of cloud-config";
130 description "A reference to the key pair entry in the global key pair table";
132 path "../../../../key-pair/name";
138 description "Used to configure the list of public keys to be injected as part
139 of ns instantiation";
141 description "Name of this key pair";
145 description "The user name's real name";
148 list ssh-authorized-key {
151 description "Used to configure the list of public keys to be injected as part
152 of ns instantiation";
155 description "A reference to the key pair entry in the global key pair table";
157 path "../../../../../key-pair/name";
164 augment "/osm-project:project" {
167 description "Used to configure the list of public keys to be injected as part
168 of ns instantiation";
170 description "Name of this key pair";
175 description "Key associated with this key pair";
181 grouping event-config-primitive {
184 "Sequence number for the config primitive.";
190 "Name of the primitive.";
195 leaf user-defined-script {
197 "A user defined script.";
213 augment "/osm-project:project" {
214 container ns-instance-config {
220 leaf schema-version {
221 description "Schema version for the NSR. If unspecified, it assumes v3.0";
227 description "Identifier for the NSR.";
232 description "NSR name.";
237 description "NSR short name.";
242 description "NSR description.";
248 "This is the administrative status of the NS instance";
257 description "NS descriptor used to instantiate this NS";
259 uses nsd-base:nsd-descriptor-common;
261 uses project-nsd:nsr-nsd-vld;
263 uses project-nsd:nsr-nsd-constituent-vnfd;
265 uses project-nsd:nsr-nsd-placement-groups;
267 uses project-nsd:nsr-nsd-vnf-dependency;
269 uses project-nsd:nsr-nsd-monitoring-param;
271 uses ns-instance-config-params;
276 grouping ns-instance-config-params-common {
277 uses manotypes:input-parameter;
280 description "List of ns scaling group instances";
281 key "scaling-group-name-ref";
283 leaf scaling-group-name-ref {
284 description "name of the scaling group
285 leafref path ../nsd/scaling-group-descriptor/name";
290 description "The instance of the scaling group";
293 description "Scaling group instance uuid";
299 list nsd-placement-group-maps {
301 "Mapping from mano-placement groups construct from NSD to cloud
302 platform placement group construct";
304 key "placement-group-ref";
306 leaf placement-group-ref {
308 "Reference for NSD placement group";
310 // path "../../nsd/placement-groups/name";
314 uses manotypes:placement-group-input;
318 grouping ns-instance-config-params {
319 uses ns-instance-config-params-common;
321 list vnfd-placement-group-maps {
323 "Mapping from mano-placement groups construct from VNFD to cloud
324 platform placement group construct";
326 key "placement-group-ref vnfd-id-ref";
330 "A reference to a vnfd. This is a
332 ../../../../project-nsd:constituent-vnfd
333 + [id = current()/../id-ref]
334 + /project-nsd:vnfd-id-ref
335 NOTE: An issue with confd is preventing the
336 use of xpath. Seems to be an issue with leafref
337 to leafref, whose target is in a different module.
338 Once that is resolved this will switched to use
343 leaf placement-group-ref {
345 "A reference to VNFD placement group";
347 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
348 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
352 uses manotypes:placement-group-input;
364 description "Identifier for the VNFFGR.";
369 description "VNFFG descriptor id reference";
371 path "../../../../ns-instance-config/nsr"
372 + "[id=current()/../../ns-instance-config-ref]"
377 leaf vnffgd-name-ref {
378 description "VNFFG descriptor name reference";
380 path "../../../../ns-instance-config/nsr"
381 + "[id=current()/../../ns-instance-config-ref]"
383 + "[id=current()/../vnffgd-id-ref]"
390 "The SDN account to use when requesting resources for
396 description "Cloud Account in which NSR is instantiated";
400 leaf operational-status {
402 "The operational status of the VNFFGR instance
403 init : The VNFFGR has just started.
404 running : The VNFFGR is in running state.
405 terminate : The VNFFGR is being terminated.
406 terminated : The VNFFGR is in the terminated state.
407 failed : The VNFFGR instantiation failed
409 type vnffgr-operational-status;
417 "Identifier for the RSP.";
429 "Returned Identifier for the RSP.";
433 leaf vnffgd-rsp-id-ref {
435 "Identifier for the VNFFG Descriptor RSP reference";
437 path "../../../../../ns-instance-config/nsr"
438 + "[id=current()/../../../ns-instance-config-ref]"
440 + "[id=current()/../../vnffgd-id-ref]"
445 leaf vnffgd-rsp-name-ref {
447 "Name for the VNFFG Descriptor RSP reference";
449 path "../../../../../ns-instance-config/nsr"
450 + "[id=current()/../../../ns-instance-config-ref]"
452 + "[id=current()/../../vnffgd-id-ref]"
454 + "[id=current()/../vnffgd-rsp-id-ref]"
459 leaf classifier-name {
465 "Unique Identifier for the service path";
469 list vnfr-connection-point-ref {
473 "Monotonically increasing number to show service path hop
477 leaf service-function-type {
479 "Type of Service Function.
480 NOTE: This needs to map with Service Function Type in ODL to
481 support VNFFG. Service Function Type is mandatory param in ODL
482 SFC. This is temporarily set to string for ease of use";
486 leaf member-vnf-index-ref {
491 "Reference to VNF Descriptor Id";
496 "A reference to a vnfr id";
498 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
503 "A reference to a vnfr name";
505 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
508 leaf vnfr-ingress-connection-point-ref {
510 "A reference to a vnfr connection point.";
512 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
513 + "[vnfr:id = current()/../vnfr-id-ref]"
514 + "/vnfr:connection-point/vnfr:name";
517 leaf vnfr-egress-connection-point-ref {
519 "A reference to a vnfr connection point.";
521 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
522 + "[vnfr:id = current()/../vnfr-id-ref]"
523 + "/vnfr:connection-point/vnfr:name";
528 "Location within the service path";
531 container connection-point-params {
533 type inet:ip-address;
545 type inet:ip-address;
548 type inet:port-number;
552 container service-function-forwarder {
555 "Service Function Forwarder name";
560 "Data Plane IP Address of the SFF";
561 type inet:ip-address;
565 "Data Plane Port of the SFF";
566 type inet:port-number;
577 "Identifier for the classifier rule.";
582 "Name of the classifier.";
585 leaf-list classifier-id {
587 "Returned Identifier for the classifier rule.";
592 "A reference to the RSP.";
604 "A reference to a vnfr id";
606 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
611 "A reference to a vnfr name";
613 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
616 leaf vnfr-connection-point-ref {
618 "A reference to a vnfr connection point.";
620 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
621 + "[vnfr:id = current()/../vnfr-id-ref]"
622 + "/vnfr:connection-point/vnfr:name";
641 augment "/osm-project:project" {
642 container ns-instance-opdata {
646 key "ns-instance-config-ref";
648 leaf ns-instance-config-ref {
650 path "../../../ns-instance-config/nsr/id";
656 description "Network service name reference";
658 path "../../../ns-instance-config/nsr" +
659 "[id=current()/../ns-instance-config-ref]" +
665 description "Network service descriptor id reference";
667 path "../../../ns-instance-config/nsr"
668 + "[id=current()/../ns-instance-config-ref]"
674 description "Network service descriptor name reference";
676 path "../../../ns-instance-config/nsr"
677 + "[id=current()/../ns-instance-config-ref]"
684 "Creation timestamp of this Network Service.
685 The timestamp is expressed as seconds
686 since unix epoch - 1970-01-01T00:00:00Z";
693 "Active period of this Network Service.
694 Uptime is expressed in seconds";
699 list connection-point {
701 "List for external connection points.
702 Each NS has one or more external connection points.
703 As the name implies that external connection points
704 are used for connecting the NS to other NS or to
705 external networks. Each NS exposes these connection
706 points to the orchestrator. The orchestrator can
707 construct network service chains by connecting the
708 connection points between different NS.";
713 "Name of the NS connection point.";
719 "Type of the connection point.";
720 type manotypes:connection-point-type;
728 "Reference to a VLR record in the VLR catalog";
730 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
735 list vnfr-connection-point-ref {
737 "A list of references to connection points.";
741 description "A reference to a vnfr";
743 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
747 leaf connection-point {
749 "A reference to a connection point name in a vnfr";
751 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
752 + "[vnfr:id = current()/../vnfr-id]"
753 + "/vnfr:connection-point/vnfr:name";
759 list constituent-vnfr-ref {
761 "List of VNFRs that are part of this
767 "Reference to the VNFR id
768 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
769 But due to confd bug (RIFT-9451), changing to string.";
774 list scaling-group-record {
775 description "List of scaling group records";
776 key "scaling-group-name-ref";
778 leaf scaling-group-name-ref {
779 description "name of the scaling group";
781 path "../../../../ns-instance-config/nsr"
782 + "[id=current()/../../ns-instance-config-ref]"
783 + "/nsd/scaling-group-descriptor/name";
788 description "Reference to scaling group instance record";
791 description "Scaling group instance id";
796 description "Flag indicating whether this instance was part of
797 default scaling group (and thus undeletable)";
803 "The operational status of the NS instance
804 init : The scaling group has just started.
805 vnf-init-phase : The VNFs in the scaling group are being instantiated.
806 running : The scaling group is in running state.
807 terminate : The scaling group is being terminated.
808 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
809 terminated : The scaling group is in the terminated state.
810 failed : The scaling group instantiation failed.
818 enum vnf-terminate-phase;
826 "The configuration status of the scaling group instance
827 configuring : At least one of the VNFs in this scaling group instance
828 is in configuring state
829 configured : All the VNFs in this scaling group instance are
830 configured or config-not-needed state
831 failed : Configuring this scaling group instance failed
838 "Reason for failure in configuration of this scaling instance";
844 "Creation timestamp of this scaling group record.
845 The timestamp is expressed as seconds
846 since unix epoch - 1970-01-01T00:00:00Z";
852 description "Reference to VNFR within the scale instance";
854 path "../../../constituent-vnfr-ref/vnfr-id";
862 leaf operational-status {
864 "The operational status of the NS instance
865 init : The network service has just started.
866 vl-init-phase : The VLs in the NS are being instantiated.
867 vnf-init-phase : The VNFs in the NS are being instantiated.
868 running : The NS is in running state.
869 terminate : The NS is being terminated.
870 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
871 vl-terminate-phase : The NS is terminating the VLs in the NS.
872 terminated : The NS is in the terminated state.
873 failed : The NS instantiation failed.
874 scaling-out : The NS is scaling out
875 scaling-in : The NS is scaling in
876 vl-instantiate : The NS is initiating a new VL
877 vl-terminate : The NS is terminating a VL
880 type ns-operational-status;
883 container ns-configuration {
884 uses manotypes:vca-configuration;
889 "The configuration status of the NS instance
890 configuring: At least one of the VNFs in this instance is in configuring state
891 configured: All the VNFs in this NS instance are configured or config-not-needed state
896 list monitoring-param {
898 "List of NS level params.";
901 uses manotypes:monitoring-param-value;
902 uses manotypes:monitoring-param-ui-data;
903 uses manotypes:monitoring-param-aggregation;
913 leaf nsd-mon-param-ref {
914 description "Reference to the NSD monitoring param descriptor
915 that produced this result";
918 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
919 "[project-nsd:id = current()/../../nsd-ref]" +
920 "/project-nsd:monitoring-param/project-nsd:id";
924 list vnfr-mon-param-ref {
925 description "A list of VNFR monitoring params associated with this monp";
926 key "vnfr-id-ref vnfr-mon-param-ref";
930 "A reference to a vnfr. This is a
932 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
937 leaf vnfr-mon-param-ref {
938 description "A reference to the VNFR monitoring param";
940 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
941 + "[vnfr:id = current()/../vnfr-id-ref]"
942 + "/vnfr:monitoring-param/vnfr:id";
948 list config-agent-job {
952 description "config agent job Identifier for the NS.";
957 description "Config agent job name";
963 "Job status to be set based on each VNF primitive execution,
964 pending - if at least one VNF is in pending state
965 and remaining VNFs are in success state.
966 Success - if all VNF executions are in success state
967 failure - if one of the VNF executions is failure";
976 description "The primitive is triggered from NS or VNF level";
982 "Creation timestamp of this Config Agent Job.
983 The timestamp is expressed as seconds
984 since unix epoch - 1970-01-01T00:00:00Z";
989 leaf job-status-details {
990 description "Config agent job status details, in case of errors";
994 uses manotypes:primitive-parameter-value;
996 list parameter-group {
998 "List of NS Primitive parameter groups";
1002 "Name of the parameter.";
1006 uses manotypes:primitive-parameter-value;
1012 description "Identifier for the VNFR.";
1015 leaf vnf-job-status {
1017 "Job status to be set based on each VNF primitive execution,
1018 pending - if at least one primitive is in pending state
1019 and remaining primitives are in success state.
1020 Success - if all primitive executions are in success state
1021 failure - if one of the primitive executions is failure";
1032 description "the name of the primitive";
1036 uses manotypes:primitive-parameter-value;
1039 description "Execution id of the primitive";
1042 leaf execution-status {
1043 description "status of the Execution";
1050 leaf execution-error-details {
1051 description "Error details if execution-status is failure";
1061 grouping rpc-common {
1062 uses manotypes:rpc-project-name;
1065 description "Reference to NSR ID ref";
1067 path "/osm-project:project[osm-project:name=current()/.." +
1068 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1074 rpc get-ns-config-primitive-values {
1075 description "Get the config primitive parameter values";
1079 description "Name of the NS config primitive group";
1089 description "Automatically generated parameter";
1093 description "Parameter name which should be pulled from a parameter pool";
1097 description "Automatically generated value";
1102 list ns-parameter-group {
1103 description "Automatically generated parameters in parameter group";
1106 description "Parameter group name";
1110 description "Automatically generated group parameter";
1114 description "Parameter name which should be pulled from a parameter pool";
1118 description "Automatically generated value";
1124 list vnf-primitive-group {
1126 "List of service primitives grouped by VNF.";
1128 key "member-vnf-index-ref";
1129 leaf member-vnf-index-ref {
1131 "Reference to member-vnf within constituent-vnfds";
1137 "A reference to a vnfd. This is a
1139 ../../../../project-nsd:constituent-vnfd
1140 + [project-nsd:id = current()/../project-nsd:id-ref]
1141 + /project-nsd:vnfd-id-ref
1142 NOTE: An issue with confd is preventing the
1143 use of xpath. Seems to be an issue with leafref
1144 to leafref, whose target is in a different module.
1145 Once that is resolved this will switched to use
1154 description "Index of this primitive";
1159 description "Name of the primitive associated with a value pool";
1164 description "Automatically generated parameter";
1168 description "Parameter name which should be pulled from a parameter pool";
1172 description "Automatically generated value";
1181 rpc exec-ns-config-primitive {
1182 description "Executes a NS config primitive or script";
1186 description "Name of the primitive";
1193 description "The primitive is triggered from NS or VNF level";
1195 default ns-primitive;
1198 uses manotypes:primitive-parameter-value;
1200 list parameter-group {
1202 "List of NS Primitive parameter groups";
1206 "Name of the parameter.";
1210 uses manotypes:primitive-parameter-value;
1215 "List of VNFs whose primitives are being set.";
1216 key "member_vnf_index_ref";
1218 leaf member_vnf_index_ref {
1219 description "Member VNF index";
1225 "A reference to a vnfr. This is a
1230 list vnf-primitive {
1232 "List of service primitives supported by the
1233 configuration agent for this VNF.";
1238 "index of the service primitive.";
1243 "Name of the service primitive.";
1247 uses manotypes:primitive-parameter-value;
1250 leaf user-defined-script {
1252 "A user defined script.";
1258 description "Job identifier for this RPC";
1263 description "Name of the service primitive";
1270 description "The primitive is triggered from NS or VNF level";
1276 "Creation timestamp of this config agent JOB.
1277 The timestamp is expressed as seconds
1278 since unix epoch - 1970-01-01T00:00:00Z";
1283 leaf job-status-details {
1284 description "Job status details, in case of any errors";
1288 uses manotypes:primitive-parameter-value;
1290 list parameter-group {
1292 "List of NS Primitive parameter groups";
1296 "Name of the parameter.";
1300 uses manotypes:primitive-parameter-value;
1305 "List of VNFs whose primitives were set.";
1306 key "member_vnf_index_ref";
1308 leaf member_vnf_index_ref {
1309 description "Member VNF index";
1314 "A reference to a vnfr. This is a
1319 list vnf-out-primitive {
1321 "List of service primitives supported by the
1322 configuration agent for this VNF.";
1327 "index of the service primitive.";
1333 "Name of the service primitive.";
1337 uses manotypes:primitive-parameter-value;
1340 description "Execution id of this primitive";
1344 leaf execution-status {
1345 description "Status of the execution of this primitive";
1349 leaf execution-error-details {
1350 description "Error details if execution-status is failed";
1359 description "Executes scale out request";
1364 leaf scaling-group-name-ref {
1365 description "name of the scaling group";
1367 path "/osm-project:project[osm-project:name=current()/.." +
1368 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1369 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1370 "/nsr:scaling-group-descriptor/nsr:name";
1376 description "id of the scaling group";
1378 path "/osm-project:project[osm-project:name=current()/.." +
1379 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1380 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1381 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1382 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1391 description "id of the scaling group";
1397 rpc exec-scale-out {
1398 description "Executes scale out request";
1403 leaf scaling-group-name-ref {
1404 description "name of the scaling group";
1406 path "/osm-project:project[osm-project:name=current()/.." +
1407 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1408 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1409 "/nsr:scaling-group-descriptor/nsr:name";
1415 description "id of the scaling group";
1422 description "id of the scaling group";
1428 rpc start-network-service {
1429 description "Start the network service";
1433 description "Name of the Network Service";
1437 uses manotypes:rpc-project-name;
1440 description "Reference to NSD ID ref";
1442 path "/osm-project:project[osm-project:name=current()/.." +
1443 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1446 uses ns-instance-config-params-common;
1448 list vnfd-placement-group-maps {
1450 "Mapping from mano-placement groups construct from VNFD to cloud
1451 platform placement group construct";
1453 key "placement-group-ref vnfd-id-ref";
1457 "A reference to a vnfd. This is a
1459 ../../../../project-nsd:constituent-vnfd
1460 + [id = current()/../project-nsd:id-ref]
1461 + /project-nsd:vnfd-id-ref
1462 NOTE: An issue with confd is preventing the
1463 use of xpath. Seems to be an issue with leafref
1464 to leafref, whose target is in a different module.
1465 Once that is resovled this will switched to use
1470 leaf placement-group-ref {
1472 "A reference to VNFD placement group";
1474 path "/osm-project:project[osm-project:name=current()/" +
1475 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1476 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1480 uses manotypes:placement-group-input;
1482 list ssh-authorized-key {
1485 description "List of authorized ssh keys as part of cloud-config";
1488 description "A reference to the key pair entry in the global key pair table";
1490 path "/osm-project:project[osm-project:name=current()/../../../" +
1491 "project-name]/key-pair/name";
1499 description "List of users to be added through cloud-config";
1501 description "Name of the user ";
1505 description "The user name's real name";
1508 list ssh-authorized-key {
1511 description "Used to configure the list of public keys to be injected as part
1512 of ns instantiation";
1515 description "A reference to the key pair entry in the global key pair table";
1517 path "/osm-project:project[osm-project:name=current()/" +
1518 "../../../../project-name]/key-pair/name";
1528 description "Automatically generated parameter";