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-service-primitive {
184 "Sequence number for the service primitive.";
190 "Name of the service 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 project-nsd:nsr-nsd-service-primitive;
273 uses ns-instance-config-params;
278 grouping ns-instance-config-params-common {
279 uses manotypes:input-parameter;
282 description "List of ns scaling group instances";
283 key "scaling-group-name-ref";
285 leaf scaling-group-name-ref {
286 description "name of the scaling group
287 leafref path ../nsd/scaling-group-descriptor/name";
292 description "The instance of the scaling group";
295 description "Scaling group instance uuid";
301 list nsd-placement-group-maps {
303 "Mapping from mano-placement groups construct from NSD to cloud
304 platform placement group construct";
306 key "placement-group-ref";
308 leaf placement-group-ref {
310 "Reference for NSD placement group";
312 // path "../../nsd/placement-groups/name";
316 uses manotypes:placement-group-input;
320 grouping ns-instance-config-params {
321 uses ns-instance-config-params-common;
323 list vnfd-placement-group-maps {
325 "Mapping from mano-placement groups construct from VNFD to cloud
326 platform placement group construct";
328 key "placement-group-ref vnfd-id-ref";
332 "A reference to a vnfd. This is a
334 ../../../../project-nsd:constituent-vnfd
335 + [id = current()/../id-ref]
336 + /project-nsd:vnfd-id-ref
337 NOTE: An issue with confd is preventing the
338 use of xpath. Seems to be an issue with leafref
339 to leafref, whose target is in a different module.
340 Once that is resolved this will switched to use
345 leaf placement-group-ref {
347 "A reference to VNFD placement group";
349 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
350 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
354 uses manotypes:placement-group-input;
366 description "Identifier for the VNFFGR.";
371 description "VNFFG descriptor id reference";
373 path "../../../../ns-instance-config/nsr"
374 + "[id=current()/../../ns-instance-config-ref]"
379 leaf vnffgd-name-ref {
380 description "VNFFG descriptor name reference";
382 path "../../../../ns-instance-config/nsr"
383 + "[id=current()/../../ns-instance-config-ref]"
385 + "[id=current()/../vnffgd-id-ref]"
392 "The SDN account to use when requesting resources for
398 description "Cloud Account in which NSR is instantiated";
402 leaf operational-status {
404 "The operational status of the VNFFGR instance
405 init : The VNFFGR has just started.
406 running : The VNFFGR is in running state.
407 terminate : The VNFFGR is being terminated.
408 terminated : The VNFFGR is in the terminated state.
409 failed : The VNFFGR instantiation failed
411 type vnffgr-operational-status;
419 "Identifier for the RSP.";
431 "Returned Identifier for the RSP.";
435 leaf vnffgd-rsp-id-ref {
437 "Identifier for the VNFFG Descriptor RSP reference";
439 path "../../../../../ns-instance-config/nsr"
440 + "[id=current()/../../../ns-instance-config-ref]"
442 + "[id=current()/../../vnffgd-id-ref]"
447 leaf vnffgd-rsp-name-ref {
449 "Name for the VNFFG Descriptor RSP reference";
451 path "../../../../../ns-instance-config/nsr"
452 + "[id=current()/../../../ns-instance-config-ref]"
454 + "[id=current()/../../vnffgd-id-ref]"
456 + "[id=current()/../vnffgd-rsp-id-ref]"
461 leaf classifier-name {
467 "Unique Identifier for the service path";
471 list vnfr-connection-point-ref {
475 "Monotonically increasing number to show service path hop
479 leaf service-function-type {
481 "Type of Service Function.
482 NOTE: This needs to map with Service Function Type in ODL to
483 support VNFFG. Service Function Type is mandatory param in ODL
484 SFC. This is temporarily set to string for ease of use";
488 leaf member-vnf-index-ref {
493 "Reference to VNF Descriptor Id";
498 "A reference to a vnfr id";
500 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
505 "A reference to a vnfr name";
507 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
510 leaf vnfr-ingress-connection-point-ref {
512 "A reference to a vnfr connection point.";
514 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
515 + "[vnfr:id = current()/../vnfr-id-ref]"
516 + "/vnfr:connection-point/vnfr:name";
519 leaf vnfr-egress-connection-point-ref {
521 "A reference to a vnfr connection point.";
523 path "../../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
524 + "[vnfr:id = current()/../vnfr-id-ref]"
525 + "/vnfr:connection-point/vnfr:name";
530 "Location within the service path";
533 container connection-point-params {
535 type inet:ip-address;
547 type inet:ip-address;
550 type inet:port-number;
554 container service-function-forwarder {
557 "Service Function Forwarder name";
562 "Data Plane IP Address of the SFF";
563 type inet:ip-address;
567 "Data Plane Port of the SFF";
568 type inet:port-number;
579 "Identifier for the classifier rule.";
584 "Name of the classifier.";
587 leaf-list classifier-id {
589 "Returned Identifier for the classifier rule.";
594 "A reference to the RSP.";
606 "A reference to a vnfr id";
608 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
613 "A reference to a vnfr name";
615 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
618 leaf vnfr-connection-point-ref {
620 "A reference to a vnfr connection point.";
622 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
623 + "[vnfr:id = current()/../vnfr-id-ref]"
624 + "/vnfr:connection-point/vnfr:name";
643 augment "/osm-project:project" {
644 container ns-instance-opdata {
648 key "ns-instance-config-ref";
650 leaf ns-instance-config-ref {
652 path "../../../ns-instance-config/nsr/id";
658 description "Network service name reference";
660 path "../../../ns-instance-config/nsr" +
661 "[id=current()/../ns-instance-config-ref]" +
667 description "Network service descriptor id reference";
669 path "../../../ns-instance-config/nsr"
670 + "[id=current()/../ns-instance-config-ref]"
676 description "Network service descriptor name reference";
678 path "../../../ns-instance-config/nsr"
679 + "[id=current()/../ns-instance-config-ref]"
686 "Creation timestamp of this Network Service.
687 The timestamp is expressed as seconds
688 since unix epoch - 1970-01-01T00:00:00Z";
695 "Active period of this Network Service.
696 Uptime is expressed in seconds";
701 list connection-point {
703 "List for external connection points.
704 Each NS has one or more external connection points.
705 As the name implies that external connection points
706 are used for connecting the NS to other NS or to
707 external networks. Each NS exposes these connection
708 points to the orchestrator. The orchestrator can
709 construct network service chains by connecting the
710 connection points between different NS.";
715 "Name of the NS connection point.";
721 "Type of the connection point.";
722 type manotypes:connection-point-type;
730 "Reference to a VLR record in the VLR catalog";
732 path "../../../../vlr:vlr-catalog/vlr:vlr/vlr:id";
737 list vnfr-connection-point-ref {
739 "A list of references to connection points.";
743 description "A reference to a vnfr";
745 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
749 leaf connection-point {
751 "A reference to a connection point name in a vnfr";
753 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
754 + "[vnfr:id = current()/../vnfr-id]"
755 + "/vnfr:connection-point/vnfr:name";
761 list constituent-vnfr-ref {
763 "List of VNFRs that are part of this
769 "Reference to the VNFR id
770 This should be a leafref to /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id
771 But due to confd bug (RIFT-9451), changing to string.";
776 list scaling-group-record {
777 description "List of scaling group records";
778 key "scaling-group-name-ref";
780 leaf scaling-group-name-ref {
781 description "name of the scaling group";
783 path "../../../../ns-instance-config/nsr"
784 + "[id=current()/../../ns-instance-config-ref]"
785 + "/nsd/scaling-group-descriptor/name";
790 description "Reference to scaling group instance record";
793 description "Scaling group instance id";
798 description "Flag indicating whether this instance was part of
799 default scaling group (and thus undeletable)";
805 "The operational status of the NS instance
806 init : The scaling group has just started.
807 vnf-init-phase : The VNFs in the scaling group are being instantiated.
808 running : The scaling group is in running state.
809 terminate : The scaling group is being terminated.
810 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
811 terminated : The scaling group is in the terminated state.
812 failed : The scaling group instantiation failed.
820 enum vnf-terminate-phase;
828 "The configuration status of the scaling group instance
829 configuring : At least one of the VNFs in this scaling group instance
830 is in configuring state
831 configured : All the VNFs in this scaling group instance are
832 configured or config-not-needed state
833 failed : Configuring this scaling group instance failed
840 "Reason for failure in configuration of this scaling instance";
846 "Creation timestamp of this scaling group record.
847 The timestamp is expressed as seconds
848 since unix epoch - 1970-01-01T00:00:00Z";
854 description "Reference to VNFR within the scale instance";
856 path "../../../constituent-vnfr-ref/vnfr-id";
864 leaf operational-status {
866 "The operational status of the NS instance
867 init : The network service has just started.
868 vl-init-phase : The VLs in the NS are being instantiated.
869 vnf-init-phase : The VNFs in the NS are being instantiated.
870 running : The NS is in running state.
871 terminate : The NS is being terminated.
872 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
873 vl-terminate-phase : The NS is terminating the VLs in the NS.
874 terminated : The NS is in the terminated state.
875 failed : The NS instantiation failed.
876 scaling-out : The NS is scaling out
877 scaling-in : The NS is scaling in
878 vl-instantiate : The NS is initiating a new VL
879 vl-terminate : The NS is terminating a VL
882 type ns-operational-status;
885 container ns-configuration {
886 uses manotypes:vca-configuration;
891 "The configuration status of the NS instance
892 configuring: At least one of the VNFs in this instance is in configuring state
893 configured: All the VNFs in this NS instance are configured or config-not-needed state
898 list service-primitive {
900 "Network service level service primitives.";
906 "Name of the service primitive.";
912 "List of parameters for the service primitive.";
915 uses manotypes:primitive-parameter;
918 uses manotypes:ui-primitive-group;
920 list vnf-primitive-group {
922 "Reference to member-vnf within constituent-vnfds";
924 key "member-vnf-index-ref";
925 leaf member-vnf-index-ref {
927 "Reference to member-vnf within constituent-vnfds";
933 "A reference to a vnfd. This is a
935 ../../../../nsd:constituent-vnfd
936 + [nsd:id = current()/../nsd:id-ref]
938 NOTE: An issue with confd is preventing the
939 use of xpath. Seems to be an issue with leafref
940 to leafref, whose target is in a different module.
941 Once that is resovled this will switched to use
957 description "Index of this primitive";
962 description "Name of the primitive in the VNF primitive ";
968 leaf user-defined-script {
970 "A user defined script.";
975 list initial-service-primitive {
977 "Initial set of service primitives for NSD.";
980 uses event-service-primitive;
983 list terminate-service-primitive {
985 "Set of service primitives to
986 execute during termination of NSD.";
989 uses event-service-primitive;
992 list monitoring-param {
994 "List of NS level params.";
997 uses manotypes:monitoring-param-value;
998 uses manotypes:monitoring-param-ui-data;
999 uses manotypes:monitoring-param-aggregation;
1009 leaf nsd-mon-param-ref {
1010 description "Reference to the NSD monitoring param descriptor
1011 that produced this result";
1012 // TODO: Fix leafref
1014 path "../../../../project-nsd:nsd-catalog/project-nsd:nsd" +
1015 "[project-nsd:id = current()/../../nsd-ref]" +
1016 "/project-nsd:monitoring-param/project-nsd:id";
1020 list vnfr-mon-param-ref {
1021 description "A list of VNFR monitoring params associated with this monp";
1022 key "vnfr-id-ref vnfr-mon-param-ref";
1026 "A reference to a vnfr. This is a
1028 /vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
1033 leaf vnfr-mon-param-ref {
1034 description "A reference to the VNFR monitoring param";
1036 path "../../../../../vnfr:vnfr-catalog/vnfr:vnfr"
1037 + "[vnfr:id = current()/../vnfr-id-ref]"
1038 + "/vnfr:monitoring-param/vnfr:id";
1044 list config-agent-job {
1048 description "config agent job Identifier for the NS.";
1053 description "Config agent job name";
1059 "Job status to be set based on each VNF primitive execution,
1060 pending - if at least one VNF is in pending state
1061 and remaining VNFs are in success state.
1062 Success - if all VNF executions are in success state
1063 failure - if one of the VNF executions is failure";
1072 description "The primitive is triggered from NS or VNF level";
1078 "Creation timestamp of this Config Agent Job.
1079 The timestamp is expressed as seconds
1080 since unix epoch - 1970-01-01T00:00:00Z";
1085 leaf job-status-details {
1086 description "Config agent job status details, in case of errors";
1090 uses manotypes:primitive-parameter-value;
1092 list parameter-group {
1094 "List of NS Primitive parameter groups";
1098 "Name of the parameter.";
1102 uses manotypes:primitive-parameter-value;
1108 description "Identifier for the VNFR.";
1111 leaf vnf-job-status {
1113 "Job status to be set based on each VNF primitive execution,
1114 pending - if at least one primitive is in pending state
1115 and remaining primitives are in success state.
1116 Success - if all primitive executions are in success state
1117 failure - if one of the primitive executions is failure";
1128 description "the name of the primitive";
1132 uses manotypes:primitive-parameter-value;
1135 description "Execution id of the primitive";
1138 leaf execution-status {
1139 description "status of the Execution";
1146 leaf execution-error-details {
1147 description "Error details if execution-status is failure";
1157 grouping rpc-common {
1158 uses manotypes:rpc-project-name;
1161 description "Reference to NSR ID ref";
1163 path "/osm-project:project[osm-project:name=current()/.." +
1164 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr/nsr:id";
1170 rpc get-ns-service-primitive-values {
1171 description "Get the service primitive parameter values";
1175 description "Name of the NS service primitive group";
1185 description "Automatically generated parameter";
1189 description "Parameter name which should be pulled from a parameter pool";
1193 description "Automatically generated value";
1198 list ns-parameter-group {
1199 description "Automatically generated parameters in parameter group";
1202 description "Parameter group name";
1206 description "Automatically generated group parameter";
1210 description "Parameter name which should be pulled from a parameter pool";
1214 description "Automatically generated value";
1220 list vnf-primitive-group {
1222 "List of service primitives grouped by VNF.";
1224 key "member-vnf-index-ref";
1225 leaf member-vnf-index-ref {
1227 "Reference to member-vnf within constituent-vnfds";
1233 "A reference to a vnfd. This is a
1235 ../../../../project-nsd:constituent-vnfd
1236 + [project-nsd:id = current()/../project-nsd:id-ref]
1237 + /project-nsd:vnfd-id-ref
1238 NOTE: An issue with confd is preventing the
1239 use of xpath. Seems to be an issue with leafref
1240 to leafref, whose target is in a different module.
1241 Once that is resolved this will switched to use
1250 description "Index of this primitive";
1255 description "Name of the primitive associated with a value pool";
1260 description "Automatically generated parameter";
1264 description "Parameter name which should be pulled from a parameter pool";
1268 description "Automatically generated value";
1277 rpc exec-ns-service-primitive {
1278 description "Executes a NS service primitive or script";
1282 description "Name of the primitive";
1289 description "The primitive is triggered from NS or VNF level";
1291 default ns-primitive;
1294 uses manotypes:primitive-parameter-value;
1296 list parameter-group {
1298 "List of NS Primitive parameter groups";
1302 "Name of the parameter.";
1306 uses manotypes:primitive-parameter-value;
1311 "List of VNFs whose primitives are being set.";
1312 key "member_vnf_index_ref";
1314 leaf member_vnf_index_ref {
1315 description "Member VNF index";
1321 "A reference to a vnfr. This is a
1326 list vnf-primitive {
1328 "List of service primitives supported by the
1329 configuration agent for this VNF.";
1334 "index of the service primitive.";
1339 "Name of the service primitive.";
1343 uses manotypes:primitive-parameter-value;
1346 leaf user-defined-script {
1348 "A user defined script.";
1354 description "Job identifier for this RPC";
1359 description "Name of the service primitive";
1366 description "The primitive is triggered from NS or VNF level";
1372 "Creation timestamp of this config agent JOB.
1373 The timestamp is expressed as seconds
1374 since unix epoch - 1970-01-01T00:00:00Z";
1379 leaf job-status-details {
1380 description "Job status details, in case of any errors";
1384 uses manotypes:primitive-parameter-value;
1386 list parameter-group {
1388 "List of NS Primitive parameter groups";
1392 "Name of the parameter.";
1396 uses manotypes:primitive-parameter-value;
1401 "List of VNFs whose primitives were set.";
1402 key "member_vnf_index_ref";
1404 leaf member_vnf_index_ref {
1405 description "Member VNF index";
1410 "A reference to a vnfr. This is a
1415 list vnf-out-primitive {
1417 "List of service primitives supported by the
1418 configuration agent for this VNF.";
1423 "index of the service primitive.";
1429 "Name of the service primitive.";
1433 uses manotypes:primitive-parameter-value;
1436 description "Execution id of this primitive";
1440 leaf execution-status {
1441 description "Status of the execution of this primitive";
1445 leaf execution-error-details {
1446 description "Error details if execution-status is failed";
1455 description "Executes scale out request";
1460 leaf scaling-group-name-ref {
1461 description "name of the scaling group";
1463 path "/osm-project:project[osm-project:name=current()/.." +
1464 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1465 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1466 "/nsr:scaling-group-descriptor/nsr:name";
1472 description "id of the scaling group";
1474 path "/osm-project:project[osm-project:name=current()/.." +
1475 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1476 "[nsr:id=current()/../nsr:nsr_id_ref]" +
1477 "/nsr:scaling-group[nsr:scaling-group-name-ref=current()/.." +
1478 "/nsr:scaling-group-name-ref]/nsr:instance/nsr:id";
1487 description "id of the scaling group";
1493 rpc exec-scale-out {
1494 description "Executes scale out request";
1499 leaf scaling-group-name-ref {
1500 description "name of the scaling group";
1502 path "/osm-project:project[osm-project:name=current()/.." +
1503 "/nsr:project-name]/nsr:ns-instance-config/nsr:nsr" +
1504 "[nsr:id=current()/../nsr:nsr_id_ref]/nsr:nsd" +
1505 "/nsr:scaling-group-descriptor/nsr:name";
1511 description "id of the scaling group";
1518 description "id of the scaling group";
1524 rpc start-network-service {
1525 description "Start the network service";
1529 description "Name of the Network Service";
1533 uses manotypes:rpc-project-name;
1536 description "Reference to NSD ID ref";
1538 path "/osm-project:project[osm-project:name=current()/.." +
1539 "/project-name]/project-nsd:nsd-catalog/project-nsd:nsd/project-nsd:id";
1542 uses ns-instance-config-params-common;
1544 list vnfd-placement-group-maps {
1546 "Mapping from mano-placement groups construct from VNFD to cloud
1547 platform placement group construct";
1549 key "placement-group-ref vnfd-id-ref";
1553 "A reference to a vnfd. This is a
1555 ../../../../project-nsd:constituent-vnfd
1556 + [id = current()/../project-nsd:id-ref]
1557 + /project-nsd:vnfd-id-ref
1558 NOTE: An issue with confd is preventing the
1559 use of xpath. Seems to be an issue with leafref
1560 to leafref, whose target is in a different module.
1561 Once that is resovled this will switched to use
1566 leaf placement-group-ref {
1568 "A reference to VNFD placement group";
1570 path "/osm-project:project[osm-project:name=current()/" +
1571 "../../project-name]/project-vnfd:vnfd-catalog/project-vnfd:vnfd[project-vnfd:id = " +
1572 "current()/../vnfd-id-ref]/project-vnfd:placement-groups/project-vnfd:name";
1576 uses manotypes:placement-group-input;
1578 list ssh-authorized-key {
1581 description "List of authorized ssh keys as part of cloud-config";
1584 description "A reference to the key pair entry in the global key pair table";
1586 path "/osm-project:project[osm-project:name=current()/../../../" +
1587 "project-name]/key-pair/name";
1595 description "List of users to be added through cloud-config";
1597 description "Name of the user ";
1601 description "The user name's real name";
1604 list ssh-authorized-key {
1607 description "Used to configure the list of public keys to be injected as part
1608 of ns instantiation";
1611 description "A reference to the key pair entry in the global key pair table";
1613 path "/osm-project:project[osm-project:name=current()/" +
1614 "../../../../project-name]/key-pair/name";
1624 description "Automatically generated parameter";