Rift.IO OSM R1 Initial Submission
[osm/UI.git] / skyquake / plugins / composer / src / schemas / yang / nsr.yang.src
1
2 /*
3  * 
4  *   Copyright 2016 RIFT.IO Inc
5  *
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
9  *
10  *       http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  *
19  */
20
21 module nsr
22 {
23   namespace "urn:ietf:params:xml:ns:yang:nfvo:nsr";
24   prefix "nsr";
25
26   import rw-pb-ext {
27     prefix "rwpb";
28   }
29
30   import vlr {
31     prefix "vlr";
32   }
33
34   import vld {
35     prefix "vld";
36   }
37
38   import nsd {
39     prefix "nsd";
40   }
41
42   import vnfd {
43     prefix "vnfd";
44   }
45
46   import vnfr {
47     prefix "vnfr";
48   }
49
50   import ietf-inet-types {
51     prefix "inet";
52   }
53
54   import ietf-yang-types {
55     prefix "yang";
56   }
57
58   import mano-types {
59     prefix "manotypes";
60   }
61
62   import rw-sdn {
63     prefix "rwsdn";
64   }
65
66   revision 2015-09-10 {
67     description
68       "Initial revision. This YANG file defines
69        the Network Service Record (NSR)";
70     reference
71       "Derived from earlier versions of base YANG files";
72   }
73
74   typedef config-states {
75     type enumeration {
76       enum init;
77       enum configuring;
78       enum config_not_needed;
79       enum configured;
80       enum failed;
81     }
82   }
83
84   container ns-instance-config {
85
86     list nsr {
87       key "id";
88       unique "name";
89
90       leaf id {
91         description "Identifier for the NSR.";
92         type yang:uuid;
93       }
94
95       leaf name {
96         description "NSR name.";
97         type string;
98       }
99
100       leaf short-name {
101         description "NSR short name.";
102         type string;
103       }
104
105       leaf description {
106         description "NSR description.";
107         type string;
108       }
109
110       leaf nsd-ref {
111         description "Reference to NSD";
112         type leafref {
113           path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
114         }
115       }
116
117       leaf admin-status {
118         description
119           "This is the administrative status of the NS instance";
120
121         type enumeration {
122           enum ENABLED;
123           enum DISABLED;
124         }
125       }
126
127       uses manotypes:input-parameter;
128
129       list scaling-group {
130         description "List of ns scaling group instances";
131         key "scaling-group-name-ref";
132
133         leaf scaling-group-name-ref {
134           description "name of the scaling group";
135           type leafref {
136             path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
137                  "../../nsr:nsd-ref]/nsd:scaling-group-descriptor/nsd:name";
138           }
139         }
140
141         list instance {
142           description "The instance of the scaling group";
143           key "id";
144           leaf id {
145             description "Scaling group instance uuid";
146             type uint16;
147           }
148         }
149       }
150
151
152       list nsd-placement-group-maps {
153         description
154             "Mapping from mano-placement groups construct from NSD to cloud
155              platform placement group construct";
156
157         key "placement-group-ref";
158
159         leaf placement-group-ref {
160           description "Reference for NSD placement group";
161           type leafref {
162             path "/nsd:nsd-catalog/nsd:nsd[nsd:id = current()/" +
163                  "../../nsr:nsd-ref]/nsd:placement-groups/nsd:name";
164           }
165         }
166         uses manotypes:placement-group-input;
167       }
168
169       list vnfd-placement-group-maps {
170         description
171             "Mapping from mano-placement groups construct from VNFD to cloud
172              platform placement group construct";
173
174         key "placement-group-ref vnfd-id-ref";
175
176         leaf vnfd-id-ref {
177           description
178               "A reference to a vnfd. This is a
179                     leafref to path:
180                         ../../../../nsd:constituent-vnfd
181                         + [nsr:id = current()/../nsd:id-ref]
182                         + /nsd:vnfd-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
187                leafref";
188           type yang:uuid;
189         }
190
191         leaf placement-group-ref {
192           description
193               "A reference to VNFD placement group";
194           type leafref {
195             path "/vnfd:vnfd-catalog/vnfd:vnfd[vnfd:id = current()/" +
196                 "../nsr:vnfd-id-ref]/vnfd:placement-groups/vnfd:name";
197           }
198         }
199
200         uses manotypes:placement-group-input;
201       }
202     }
203   }
204
205   grouping vnffgr {
206
207     list vnffgr {
208       key "id";
209
210       leaf id {
211         description "Identifier for the VNFFGR.";
212         type yang:uuid;
213       }
214
215       leaf nsd-id {
216         description
217             "Network sevice descriptor ID reference";
218         type leafref {
219           path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
220         }
221       }
222
223
224       leaf vnffgd-id-ref {
225         description "VNFFG descriptor id reference";
226         type leafref {
227           path "/nsd:nsd-catalog/nsd:nsd"
228               + "[nsd:id = current()/../nsr:nsd-id]"
229               + "/nsd:vnffgd/nsd:id";
230         }
231       }
232
233       leaf vnffgd-name-ref {
234         description "VNFFG descriptor name reference";
235         type leafref {
236           path "/nsd:nsd-catalog/nsd:nsd"
237               + "[nsd:id = current()/../nsr:nsd-id]"
238               + "/nsd:vnffgd[nsd:id = current()/../vnffgd-id-ref]"
239               + "/nsd:name";
240         }
241       }
242
243       leaf sdn-account {
244         description
245             "The SDN account to use when requesting resources for
246             this vnffgr";
247         type leafref {
248           path "/rwsdn:sdn-account/rwsdn:name";
249         }
250       }
251
252       leaf operational-status {
253         description
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
260           ";
261
262         type enumeration {
263           //rwpb:enum-type "VnffgrOperationalStatus";
264           enum init;
265           enum running;
266           enum terminate;
267           enum terminated;
268           enum failed;
269         }
270       }
271
272       list rsp {
273         key "id";
274
275         leaf id {
276           description
277               "Identifier for the RSP.";
278           type yang:uuid;
279         }
280
281         leaf name {
282           description
283               "Name for the RSP";
284           type string;
285         }
286
287         leaf vnffgd-rsp-id-ref {
288           description
289               "Identifier for the VNFFG Descriptor RSP reference";
290           type leafref {
291             path "/nsd:nsd-catalog/nsd:nsd/nsd:vnffgd"
292                 + "[nsd:id = current()/../../nsr:vnffgd-id-ref]"
293                 + "/nsd:rsp/nsd:id";
294           }
295         }
296
297         leaf vnffgd-rsp-name-ref {
298           description
299               "Name for the VNFFG Descriptor RSP reference";
300           type leafref {
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]"
304                 + "/nsd:name";
305           }
306         }
307
308         leaf classifier-name {
309           type string;
310         }
311
312         leaf path-id {
313           description
314               "Unique Identifier for the service path";
315           type uint32;
316         }
317
318         list vnfr-connection-point-ref {
319           key "hop-number";
320           leaf hop-number {
321             description
322                 "Monotonically increasing number to show service path hop
323                 order";
324             type uint8;
325           }
326           leaf service-function-type {
327             description
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";
332             type string;
333           }
334
335           leaf member-vnf-index-ref {
336             type uint64;
337           }
338           leaf vnfd-id-ref {
339             description
340                 "Reference to VNF Descriptor Id";
341             type string;
342           }
343           leaf vnfr-id-ref {
344             description
345                 "A reference to a vnfr id";
346                 type leafref {
347                   path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
348                 }
349           }
350           leaf vnfr-name-ref {
351             description
352                 "A reference to a vnfr name";
353                 type leafref {
354                   path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
355                 }
356           }
357           leaf vnfr-connection-point-ref {
358             description
359                 "A reference to a vnfr connection point.";
360             type leafref {
361               path "/vnfr:vnfr-catalog/vnfr:vnfr"
362                  + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
363                  + "/vnfr:connection-point/vnfr:name";
364             }
365           }
366           leaf service-index {
367             description
368                 "Location within the service path";
369             type uint8;
370           }
371           container connection-point-params {
372             leaf mgmt-address {
373               type inet:ip-address;
374             }
375             leaf name {
376               type string;
377             }
378             leaf port-id {
379               //rwpb:field-inline "true";
380               //rwpb:field-string-max 64;
381               type string;
382             }
383             leaf vm-id {
384               //rwpb:field-inline "true";
385               //rwpb:field-string-max 64;
386               type string;
387             }
388             leaf address {
389               type inet:ip-address;
390             }
391             leaf port {
392               type inet:port-number;
393             }
394           }
395
396           container service-function-forwarder {
397             leaf name {
398               description
399                   "Service Function Forwarder name";
400               type string;
401             }
402             leaf ip-address {
403               description
404                   "Data Plane IP Address of the SFF";
405               type inet:ip-address;
406             }
407             leaf port {
408               description
409                   "Data Plane Port of the SFF";
410               type inet:port-number;
411             }
412           }
413         }
414       }
415
416       list classifier {
417           key "id";
418
419           leaf id {
420             description
421                 "Identifier for the classifier rule.";
422             type yang:uuid;
423           }
424           leaf name {
425             description
426                 "Name of the classifier.";
427             type string;
428           }
429           leaf rsp-id-ref {
430             description
431                 "A reference to the RSP.";
432             type leafref {
433               path "../../nsr:rsp/nsr:id";
434             }
435           }
436           leaf rsp-name {
437             description
438               "Name for the RSP";
439             type string;
440           }
441           leaf vnfr-id-ref {
442             description
443                 "A reference to a vnfr id";
444                 type leafref {
445                   path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
446                 }
447           }
448           leaf vnfr-name-ref {
449             description
450                 "A reference to a vnfr name";
451                 type leafref {
452                   path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:name";
453                 }
454           }
455           leaf vnfr-connection-point-ref {
456             description
457                 "A reference to a vnfr connection point.";
458             type leafref {
459               path "/vnfr:vnfr-catalog/vnfr:vnfr"
460                  + "[vnfr:id = current()/../nsr:vnfr-id-ref]"
461                  + "/vnfr:connection-point/vnfr:name";
462             }
463           }
464           leaf port-id {
465             //rwpb:field-inline "true";
466             //rwpb:field-string-max 64;
467             type string;
468           }
469           leaf vm-id {
470             //rwpb:field-inline "true";
471             //rwpb:field-string-max 64;
472             type string;
473           }
474           leaf ip-address {
475             type string;
476           }
477           leaf sff-name {
478             type string;
479           }
480       }
481     }
482   }
483
484   container ns-instance-opdata {
485     config false;
486
487     list nsr {
488       key "ns-instance-config-ref";
489
490       leaf ns-instance-config-ref {
491         type leafref {
492           path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
493         }
494       }
495
496       leaf name-ref {
497         description "Network service name reference";
498         type leafref {
499           path "/nsr:ns-instance-config/nsr:nsr/nsr:name";
500         }
501       }
502
503       leaf nsd-ref {
504         description "Network service descriptor id reference";
505         type leafref {
506           path "/nsd:nsd-catalog/nsd:nsd/nsd:id";
507         }
508       }
509
510       leaf nsd-name-ref {
511         description "Network service descriptor name reference";
512         type leafref {
513           path "/nsd:nsd-catalog/nsd:nsd/nsd:name";
514         }
515       }
516
517       leaf create-time {
518         description
519           "Creation timestamp of this Network Service.
520           The timestamp is expressed as seconds
521           since unix epoch - 1970-01-01T00:00:00Z";
522
523         type uint32;
524       }
525
526       list connection-point {
527         description
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.";
536
537         key "name";
538         leaf name {
539           description
540               "Name of the NS connection point.";
541           type string;
542         }
543
544         leaf type {
545           description
546               "Type of the connection point.";
547           type manotypes:connection-point-type;
548         }
549       }
550
551       list vlr {
552         key "vlr-ref";
553         leaf vlr-ref {
554           description
555               "Reference to a VLR record in the VLR catalog";
556           type leafref {
557             path "/vlr:vlr-catalog/vlr:vlr/vlr:id";
558           }
559         }
560
561
562         list vnfr-connection-point-ref {
563           description
564             "A list of references to connection points.";
565           key "vnfr-id";
566
567           leaf vnfr-id {
568             description "A reference to a vnfr";
569             type leafref {
570               path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
571             }
572           }
573
574           leaf connection-point {
575             description
576                 "A reference to a connection point name in a vnfr";
577             type leafref {
578               path "/vnfr:vnfr-catalog/vnfr:vnfr"
579                  + "[vnfr:id = current()/../nsr:vnfr-id]"
580                  + "/vnfr:connection-point/vnfr:name";
581             }
582           }
583         }
584       }
585
586       list constituent-vnfr-ref {
587         description
588             "List of VNFRs that are part of this
589              network service.";
590         key "vnfr-id";
591
592         leaf vnfr-id {
593           description "Reference to the VNFR id";
594           type leafref {
595             path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
596           }
597         }
598       }
599
600       list scaling-group-record {
601         description "List of scaling group records";
602         key "scaling-group-name-ref";
603
604         leaf scaling-group-name-ref {
605           description "name of the scaling group";
606           type leafref {
607             path "/nsd:nsd-catalog/nsd:nsd"+
608                  "[nsd:id = current()/../../nsr:nsd-ref]" +
609                  "/nsd:scaling-group-descriptor/nsd:name";
610           }
611         }
612
613         list instance {
614           description "Reference to scaling group instance record";
615           key "instance-id";
616           leaf instance-id {
617             description "Scaling group instance id";
618             type uint16;
619           }
620
621           leaf is-default {
622             description "Flag indicating whether this instance was part of
623                 default scaling group (and thus undeletable)";
624             type boolean;
625           }
626
627           leaf op-status {
628             description
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.
637               ";
638
639             type enumeration {
640               enum init;
641               enum vnf-init-phase;
642               enum running;
643               enum terminate;
644               enum vnf-terminate-phase;
645               enum terminated;
646               enum failed;
647             }
648           }
649
650           leaf config-status {
651             description
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
658               ";
659             type config-states;
660           }
661
662           leaf error-msg {
663             description
664               "Reason for failure in configuration of this scaling instance";
665             type string;
666           }
667
668           leaf create-time {
669             description
670               "Creation timestamp of this scaling group record.
671               The timestamp is expressed as seconds
672               since unix epoch - 1970-01-01T00:00:00Z";
673
674               type uint32;
675           }
676
677           leaf-list vnfrs {
678             description "Reference to VNFR within the scale instance";
679             type leafref {
680               path "../../../constituent-vnfr-ref/vnfr-id";
681             }
682           }
683         }
684       }
685
686       uses vnffgr;
687
688       leaf operational-status {
689         description
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
702           ";
703
704         type enumeration {
705           enum init;
706           enum vl-init-phase;
707           enum vnf-init-phase;
708           enum running;
709           enum terminate;
710           enum vnf-terminate-phase;
711           enum vl-terminate-phase;
712           enum terminated;
713           enum failed;
714           enum scaling-out;
715           enum scaling-in;
716         }
717       }
718
719       leaf config-status {
720         description
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
724           ";
725         type config-states;
726       }
727
728       uses manotypes:monitoring-param;
729       uses manotypes:config-primitive;
730
731       list vnf-monitoring-param {
732         description
733           "List of VNF monitoring params.";
734
735         key "vnfr-id-ref";
736
737         leaf vnfr-id-ref {
738           description
739             "Reference to vnfr-id";
740           type leafref {
741             path "/vnfr:vnfr-catalog/vnfr:vnfr/vnfr:id";
742           }
743         }
744
745         uses manotypes:monitoring-param;
746       }
747
748       list config-agent-job {
749         key "job-id";
750
751         leaf job-id {
752           description "config agent job Identifier for the NS.";
753           type uint64;
754         }
755
756         leaf job-name {
757           description "Config agent job name";
758           type string;
759         }
760
761         leaf job-status {
762           description
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";
768           type enumeration {
769             enum pending;
770             enum success;
771             enum failure;
772           }
773         }
774
775         list vnfr {
776           key "id";
777           leaf id {
778             description "Identifier for the VNFR.";
779             type yang:uuid;
780           }
781           leaf vnf-job-status {
782             description
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";
788             type enumeration {
789               enum pending;
790               enum success;
791               enum failure;
792             }
793           }
794           list primitive {
795             key "name";
796             leaf name {
797               description "the name of the primitive";
798               type string;
799             }
800             leaf execution-id {
801               description "Execution id of the primitive";
802               type string;
803             }
804             leaf execution-status {
805               description "status of the Execution";
806               type enumeration {
807                 enum pending;
808                 enum success;
809                 enum failure;
810               }
811             }
812             leaf execution-error-details {
813               description "Error details if execution-status is failure";
814               type string;
815             }
816           }
817         }
818       }
819     }
820   }
821
822   rpc get-ns-config-primitive-values {
823     description "Executes a VNF configuration primitive";
824     input {
825       leaf nsr_id_ref {
826         description "Reference to NSR ID ref";
827         mandatory true;
828         type leafref {
829           path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
830         }
831       }
832
833       leaf name {
834         description "Name of the NS config primitive group";
835         mandatory true;
836         type string;
837       }
838     }
839
840     output {
841       list ns-parameter {
842         description "Automatically generated parameter";
843         key "name";
844
845         leaf name {
846           description "Parameter name which should be pulled from a parameter pool";
847           type string;
848         }
849         leaf value {
850           description "Automatically generated value";
851           type string;
852         }
853       }
854
855       list ns-parameter-group {
856         description "Automatically generated parameters in parameter group";
857         key "name";
858         leaf name {
859           description "Parameter group name";
860           type string;
861         }
862         list parameter {
863           description "Automatically generated group parameter";
864           key "name";
865
866           leaf name {
867             description "Parameter name which should be pulled from a parameter pool";
868             type string;
869           }
870           leaf value {
871             description "Automatically generated value";
872             type string;
873           }
874         }
875       }
876
877       list vnf-primitive-group {
878         description
879             "List of configuration primitives grouped by VNF.";
880
881         key "member-vnf-index-ref";
882         leaf member-vnf-index-ref {
883           description
884               "Reference to member-vnf within constituent-vnfds";
885           type uint64;
886         }
887
888         leaf vnfd-id-ref {
889           description
890               "A reference to a vnfd. This is a
891                leafref to path:
892                    ../../../../nsd:constituent-vnfd
893                    + [nsd:id = current()/../nsd:id-ref]
894                    + /nsd:vnfd-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
899                leafref";
900
901           type string;
902         }
903
904         list primitive {
905           key "index";
906           leaf index {
907             description "Index of this primitive";
908             type uint32;
909           }
910
911           leaf name {
912             description "Name of the primitive associated with a value pool";
913             type string;
914           }
915
916           list parameter {
917             description "Automatically generated parameter";
918             key "name";
919
920             leaf name {
921               description "Parameter name which should be pulled from a parameter pool";
922               type string;
923             }
924             leaf value {
925               description "Automatically generated value";
926               type string;
927             }
928           }
929         }
930       }
931     }
932   }
933
934   rpc exec-ns-config-primitive {
935     description "Executes a NS configuration primitive or script";
936
937     input {
938       leaf name {
939         description "Name of the primitive";
940         type string;
941       }
942
943       leaf nsr_id_ref {
944         description "Reference to NSR ID ref";
945         type leafref {
946           path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
947         }
948       }
949
950       list parameter {
951         description
952             "List of NS Primitive parameters";
953         key "name";
954         leaf name {
955           description
956               "Name of the parameter.";
957           type string;
958         }
959
960         leaf value {
961           description
962               "Value associated with the name.";
963           type string;
964         }
965       }
966
967       list parameter-group {
968         description
969             "List of NS Primitive parameter groups";
970         key "name";
971         leaf name {
972           description
973               "Name of the parameter.";
974           type string;
975         }
976
977         list parameter {
978           description
979               "List of NS parameter group parameters";
980           key "name";
981           leaf name {
982             description
983                 "Name of the parameter.";
984             type string;
985           }
986
987           leaf value {
988             description
989                 "Value associated with the name.";
990             type string;
991           }
992         }
993       }
994
995       list vnf-list {
996         description
997             "List of VNFs whose primitives are being set.";
998         key "member_vnf_index_ref";
999
1000         leaf member_vnf_index_ref {
1001           description "Member VNF index";
1002           type uint64;
1003         }
1004
1005         leaf vnfr-id-ref {
1006           description
1007               "A reference to a vnfr. This is a
1008                leafref to path";
1009           type yang:uuid;
1010         }
1011
1012         list vnf-primitive {
1013           description
1014               "List of configuration primitives supported by the
1015             configuration agent for this VNF.";
1016           key "index";
1017
1018           leaf index {
1019             description
1020                 "index of the configuration primitive.";
1021             type uint32;
1022           }
1023           leaf name {
1024             description
1025                 "Name of the configuration primitive.";
1026             type string;
1027           }
1028
1029           list parameter {
1030             description
1031                 "List of parameters to the configuration primitive.";
1032             key "name";
1033             leaf name {
1034               description
1035                   "Name of the parameter.";
1036               type string;
1037             }
1038
1039             leaf value {
1040               description
1041                   "Value associated with the name.";
1042               type string;
1043             }
1044           }
1045         }
1046       }
1047       leaf user-defined-script {
1048         description
1049             "A user defined script.";
1050         type string;
1051       }
1052     }
1053     output {
1054       leaf job-id {
1055         description "Job identifier for this RPC";
1056         type uint64;
1057       }
1058
1059       leaf name {
1060         description "Name of the config";
1061         type string;
1062       }
1063
1064       leaf nsr_id_ref {
1065         description "Reference to NSR ID ref";
1066         type leafref {
1067           path "/nsr:ns-instance-config/nsr:nsr/nsr:id";
1068         }
1069       }
1070
1071       list vnf-out-list {
1072         description
1073             "List of VNFs whose primitives were set.";
1074         key "member_vnf_index_ref";
1075
1076         leaf member_vnf_index_ref {
1077           description "Member VNF index";
1078           type uint64;
1079         }
1080         leaf vnfr-id-ref {
1081           description
1082               "A reference to a vnfr. This is a
1083                leafref to path";
1084           type yang:uuid;
1085         }
1086
1087         list vnf-out-primitive {
1088           description
1089               "List of configuration primitives supported by the
1090             configuration agent for this VNF.";
1091           key "index";
1092
1093           leaf index {
1094             description
1095                 "index of the configuration primitive.";
1096             type uint32;
1097           }
1098
1099           leaf name {
1100             description
1101                 "Name of the configuration primitive.";
1102             type string;
1103           }
1104
1105           leaf execution-id {
1106             description "Execution id of this primitive";
1107             type string;
1108           }
1109
1110           leaf execution-status {
1111             description "Status of the execution of this primitive";
1112             type string;
1113           }
1114         }
1115       }
1116     }
1117   }
1118 }