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 container ns-instance-config {
91 description "Identifier for the NSR.";
96 description "NSR name.";
101 description "NSR short name.";
106 description "NSR description.";
111 description "Reference to NSD";
113 path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
119 "This is the administrative status of the NS instance";
127 uses manotypes:input-parameter;
130 description "List of ns scaling group instances";
131 key "scaling-group-name-ref";
133 leaf scaling-group-name-ref {
134 description "name of the scaling group";
136 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
137 "../../nsr:nsd-ref]/nsd:scaling-group-descriptor/nsd:name";
142 description "The instance of the scaling group";
145 description "Scaling group instance uuid";
152 list nsd-placement-group-maps {
154 "Mapping from mano-placement groups construct from NSD to cloud
155 platform placement group construct";
157 key "placement-group-ref";
159 leaf placement-group-ref {
160 description "Reference for NSD placement group";
162 path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
163 "../../nsr:nsd-ref]/nsd:placement-groups/nsd:name";
166 uses manotypes:placement-group-input;
169 list vnfd-placement-group-maps {
171 "Mapping from mano-placement groups construct from VNFD to cloud
172 platform placement group construct";
174 key "placement-group-ref vnfd-id-ref";
178 "A reference to a vnfd. This is a
180 ../../../../nsd:constituent-vnfd
181 + [nsr:id = current()/../nsd:id-ref]
183 NOTE: An issue with confd is preventing the
184 use of xpath. Seems to be an issue with leafref
185 to leafref, whose target is in a different module.
186 Once that is resovled this will switched to use
191 leaf placement-group-ref {
193 "A reference to VNFD placement group";
195 path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
196 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
200 uses manotypes:placement-group-input;
211 description "Identifier for the VNFFGR.";
217 "Network sevice descriptor ID reference";
219 path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
225 description "VNFFG descriptor id reference";
227 path "/nsd:nsd-catalog/nsd:nsd"
228 + "[nsd:id = current()/../nsr:nsd-id]"
229 + "/nsd:vnffgd/nsd:id";
233 leaf vnffgd-name-ref {
234 description "VNFFG descriptor name reference";
236 path "/nsd:nsd-catalog/nsd:nsd"
237 + "[nsd:id = current()/../nsr:nsd-id]"
238 + "/nsd:vnffgd[nsd:id = current()/../vnffgd-id-ref]"
245 "The SDN account to use when requesting resources for
248 path "/rwsdn:sdn-account/rwsdn:name";
252 leaf operational-status {
254 "The operational status of the VNFFGR instance
255 init : The VNFFGR has just started.
256 running : The VNFFGR is in running state.
257 terminate : The VNFFGR is being terminated.
258 terminated : The VNFFGR is in the terminated state.
259 failed : The VNFFGR instantiation failed
263 //rwpb:enum-type "VnffgrOperationalStatus";
277 "Identifier for the RSP.";
287 leaf vnffgd-rsp-id-ref {
289 "Identifier for the VNFFG Descriptor RSP reference";
291 path "/nsd:nsd-catalog/nsd:nsd/nsd:vnffgd"
292 + "[nsd:id = current()/../../nsr:vnffgd-id-ref]"
297 leaf vnffgd-rsp-name-ref {
299 "Name for the VNFFG Descriptor RSP reference";
301 path "/nsd:nsd-catalog/nsd:nsd/nsd:vnffgd"
302 + "[nsd:id = current()/../../nsr:vnffgd-id-ref]"
303 + "/nsd:rsp[nsd:id=current()/../vnffgd-rsp-id-ref]"
308 leaf classifier-name {
314 "Unique Identifier for the service path";
318 list vnfr-connection-point-ref {
322 "Monotonically increasing number to show service path hop
326 leaf service-function-type {
328 "Type of Service Function.
329 NOTE: This needs to map with Service Function Type in ODL to
330 support VNFFG. Service Function Type is manadatory param in ODL
331 SFC. This is temporarily set to string for ease of use";
335 leaf member-vnf-index-ref {
340 "Reference to VNF Descriptor Id";
345 "A reference to a vnfr id";
347 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
352 "A reference to a vnfr name";
354 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
357 leaf vnfr-connection-point-ref {
359 "A reference to a vnfr connection point.";
361 path "/vnfr:vnfr-catalog/vnfr:vnfr"
362 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
363 + "/vnfr:connection-point/vnfr:name";
368 "Location within the service path";
371 container connection-point-params {
373 type inet:ip-address;
379 //rwpb:field-inline "true";
380 //rwpb:field-string-max 64;
384 //rwpb:field-inline "true";
385 //rwpb:field-string-max 64;
389 type inet:ip-address;
392 type inet:port-number;
396 container service-function-forwarder {
399 "Service Function Forwarder name";
404 "Data Plane IP Address of the SFF";
405 type inet:ip-address;
409 "Data Plane Port of the SFF";
410 type inet:port-number;
421 "Identifier for the classifier rule.";
426 "Name of the classifier.";
431 "A reference to the RSP.";
433 path "../../nsr:rsp/nsr:id";
443 "A reference to a vnfr id";
445 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
450 "A reference to a vnfr name";
452 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
455 leaf vnfr-connection-point-ref {
457 "A reference to a vnfr connection point.";
459 path "/vnfr:vnfr-catalog/vnfr:vnfr"
460 + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
461 + "/vnfr:connection-point/vnfr:name";
465 //rwpb:field-inline "true";
466 //rwpb:field-string-max 64;
470 //rwpb:field-inline "true";
471 //rwpb:field-string-max 64;
484 container ns-instance-opdata {
488 key "ns-instance-config-ref";
490 leaf ns-instance-config-ref {
492 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
497 description "Network service name reference";
499 path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
504 description "Network service descriptor id reference";
506 path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
511 description "Network service descriptor name reference";
513 path "/nsd:nsd-catalog/nsd:nsd/nsd:name";
519 "Creation timestamp of this Network Service.
520 The timestamp is expressed as seconds
521 since unix epoch - 1970-01-01T00:00:00Z";
526 list connection-point {
528 "List for external connection points.
529 Each NS has one or more external connection points.
530 As the name implies that external connection points
531 are used for connecting the NS to other NS or to
532 external networks. Each NS exposes these connection
533 points to the orchestrator. The orchestrator can
534 construct network service chains by connecting the
535 connection points between different NS.";
540 "Name of the NS connection point.";
546 "Type of the connection point.";
547 type manotypes:connection-point-type;
555 "Reference to a VLR record in the VLR catalog";
557 path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
562 list vnfr-connection-point-ref {
564 "A list of references to connection points.";
568 description "A reference to a vnfr";
570 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
574 leaf connection-point {
576 "A reference to a connection point name in a vnfr";
578 path "/vnfr:vnfr-catalog/vnfr:vnfr"
579 + "[vnfr:id = current()/../nsr:vnfr-id]"
580 + "/vnfr:connection-point/vnfr:name";
586 list constituent-vnfr-ref {
588 "List of VNFRs that are part of this
593 description "Reference to the VNFR id";
595 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
600 list scaling-group-record {
601 description "List of scaling group records";
602 key "scaling-group-name-ref";
604 leaf scaling-group-name-ref {
605 description "name of the scaling group";
607 path "/nsd:nsd-catalog/nsd:nsd"+
608 "[nsd:id = current()/../../nsr:nsd-ref]" +
609 "/nsd:scaling-group-descriptor/nsd:name";
614 description "Reference to scaling group instance record";
617 description "Scaling group instance id";
622 description "Flag indicating whether this instance was part of
623 default scaling group (and thus undeletable)";
629 "The operational status of the NS instance
630 init : The scaling group has just started.
631 vnf-init-phase : The VNFs in the scaling group are being instantiated.
632 running : The scaling group is in running state.
633 terminate : The scaling group is being terminated.
634 vnf-terminate-phase : The VNFs in the scaling group are being terminated.
635 terminated : The scaling group is in the terminated state.
636 failed : The scaling group instantiation failed.
644 enum vnf-terminate-phase;
652 "The configuration status of the scaling group instance
653 configuring : At least one of the VNFs in this scaling group instance
654 is in configuring state
655 configured : All the VNFs in this scaling group instance are
656 configured or config-not-needed state
657 failed : Configuring this scaling group instance failed
664 "Reason for failure in configuration of this scaling instance";
670 "Creation timestamp of this scaling group record.
671 The timestamp is expressed as seconds
672 since unix epoch - 1970-01-01T00:00:00Z";
678 description "Reference to VNFR within the scale instance";
680 path "../../../constituent-vnfr-ref/vnfr-id";
688 leaf operational-status {
690 "The operational status of the NS instance
691 init : The network service has just started.
692 vl-init-phase : The VLs in the NS are being instantiated.
693 vnf-init-phase : The VNFs in the NS are being instantiated.
694 running : The NS is in running state.
695 terminate : The NS is being terminated.
696 vnf-terminate-phase : The NS is terminating the VNFs in the NS.
697 vl-terminate-phase : The NS is terminating the VLs in the NS.
698 terminated : The NS is in the terminated state.
699 failed : The NS instantiation failed.
700 scaling-out : The NS is scaling out
701 scaling-in : The NS is scaling in
710 enum vnf-terminate-phase;
711 enum vl-terminate-phase;
721 "The configuration status of the NS instance
722 configuring: At least one of the VNFs in this instance is in configuring state
723 configured: All the VNFs in this NS instance are configured or config-not-needed state
728 uses manotypes:monitoring-param;
729 uses manotypes:config-primitive;
731 list vnf-monitoring-param {
733 "List of VNF monitoring params.";
739 "Reference to vnfr-id";
741 path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
745 uses manotypes:monitoring-param;
748 list config-agent-job {
752 description "config agent job Identifier for the NS.";
757 description "Config agent job name";
763 "Job status to be set based on each VNF primitive execution,
764 pending - if at least one VNF is in pending state
765 and remaining VNFs are in success state.
766 Success - if all VNF executions are in success state
767 failure - if one of the VNF executions is failure";
778 description "Identifier for the VNFR.";
781 leaf vnf-job-status {
783 "Job status to be set based on each VNF primitive execution,
784 pending - if at least one primitive is in pending state
785 and remaining primitives are in success state.
786 Success - if all primitive executions are in success state
787 failure - if one of the primitive executions is failure";
797 description "the name of the primitive";
801 description "Execution id of the primitive";
804 leaf execution-status {
805 description "status of the Execution";
812 leaf execution-error-details {
813 description "Error details if execution-status is failure";
822 rpc get-ns-config-primitive-values {
823 description "Executes a VNF configuration primitive";
826 description "Reference to NSR ID ref";
829 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
834 description "Name of the NS config primitive group";
842 description "Automatically generated parameter";
846 description "Parameter name which should be pulled from a parameter pool";
850 description "Automatically generated value";
855 list ns-parameter-group {
856 description "Automatically generated parameters in parameter group";
859 description "Parameter group name";
863 description "Automatically generated group parameter";
867 description "Parameter name which should be pulled from a parameter pool";
871 description "Automatically generated value";
877 list vnf-primitive-group {
879 "List of configuration primitives grouped by VNF.";
881 key "member-vnf-index-ref";
882 leaf member-vnf-index-ref {
884 "Reference to member-vnf within constituent-vnfds";
890 "A reference to a vnfd. This is a
892 ../../../../nsd:constituent-vnfd
893 + [nsd:id = current()/../nsd:id-ref]
895 NOTE: An issue with confd is preventing the
896 use of xpath. Seems to be an issue with leafref
897 to leafref, whose target is in a different module.
898 Once that is resovled this will switched to use
907 description "Index of this primitive";
912 description "Name of the primitive associated with a value pool";
917 description "Automatically generated parameter";
921 description "Parameter name which should be pulled from a parameter pool";
925 description "Automatically generated value";
934 rpc exec-ns-config-primitive {
935 description "Executes a NS configuration primitive or script";
939 description "Name of the primitive";
944 description "Reference to NSR ID ref";
946 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
952 "List of NS Primitive parameters";
956 "Name of the parameter.";
962 "Value associated with the name.";
967 list parameter-group {
969 "List of NS Primitive parameter groups";
973 "Name of the parameter.";
979 "List of NS parameter group parameters";
983 "Name of the parameter.";
989 "Value associated with the name.";
997 "List of VNFs whose primitives are being set.";
998 key "member_vnf_index_ref";
1000 leaf member_vnf_index_ref {
1001 description "Member VNF index";
1007 "A reference to a vnfr. This is a
1012 list vnf-primitive {
1014 "List of configuration primitives supported by the
1015 configuration agent for this VNF.";
1020 "index of the configuration primitive.";
1025 "Name of the configuration primitive.";
1031 "List of parameters to the configuration primitive.";
1035 "Name of the parameter.";
1041 "Value associated with the name.";
1047 leaf user-defined-script {
1049 "A user defined script.";
1055 description "Job identifier for this RPC";
1060 description "Name of the config";
1065 description "Reference to NSR ID ref";
1067 path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1073 "List of VNFs whose primitives were set.";
1074 key "member_vnf_index_ref";
1076 leaf member_vnf_index_ref {
1077 description "Member VNF index";
1082 "A reference to a vnfr. This is a
1087 list vnf-out-primitive {
1089 "List of configuration primitives supported by the
1090 configuration agent for this VNF.";
1095 "index of the configuration primitive.";
1101 "Name of the configuration primitive.";
1106 description "Execution id of this primitive";
1110 leaf execution-status {
1111 description "Status of the execution of this primitive";