2b48ee7dbf33ca3c01821c9a41e3da01753093f9
[osm/SO.git] / models / plugins / yang / nsd.yang
1
2 /*
3  * 
4  *   Copyright 2016-2017 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 nsd
22 {
23   namespace "urn:ietf:params:xml:ns:yang:nfvo:nsd";
24   prefix "nsd";
25
26   import rw-pb-ext {
27     prefix "rwpb";
28   }
29
30   import vld {
31     prefix "vld";
32   }
33
34   import vnfd {
35     prefix "vnfd";
36   }
37
38   import ietf-inet-types {
39     prefix "inet";
40   }
41
42   import ietf-yang-types {
43     prefix "yang";
44   }
45
46   import mano-types {
47     prefix "manotypes";
48   }
49
50   import rw-project {
51     prefix "rw-project";
52   }
53
54   revision 2017-02-08 {
55     description
56       "Update model to support projects.";
57   }
58
59   revision 2014-10-27 {
60     description
61       "Initial revision. This YANG file defines
62        the Network Service Descriptor (NSD)";
63     reference
64       "Derived from earlier versions of base YANG files";
65   }
66
67   typedef scaling-trigger {
68     type enumeration {
69       enum pre-scale-in {
70         value 1;
71       }
72       enum post-scale-in {
73         value 2;
74       }
75       enum pre-scale-out {
76         value 3;
77       }
78       enum post-scale-out {
79         value 4;
80       }
81     }
82   }
83
84   typedef scaling-policy-type {
85     type enumeration {
86       enum manual {
87         value 1;
88       }
89       enum automatic {
90         value 2;
91       }
92     }
93   }
94
95   typedef scaling-criteria-operation {
96     type enumeration {
97       enum AND {
98         value 1;
99       }
100       enum OR {
101         value 2;
102       }
103     }
104   }
105
106   grouping primitive-parameter {
107     leaf name {
108       description
109           "Name of the parameter.";
110       type string;
111     }
112
113     leaf data-type {
114       description
115           "Data type associated with the name.";
116       type manotypes:parameter-data-type;
117     }
118
119     leaf mandatory {
120       description "Is this field mandatory";
121       type boolean;
122       default false;
123     }
124
125     leaf default-value {
126       description "The default value for this field";
127       type string;
128     }
129
130     leaf parameter-pool {
131       description "NSD Parameter pool name to use for this paramter";
132       type string;
133     }
134   }
135
136   grouping nsd-descriptor-common {
137     leaf id {
138       description "Identifier for the NSD.";
139       type string;
140     }
141
142     leaf name {
143       description "NSD name.";
144       mandatory true;
145       type string;
146     }
147
148     leaf short-name {
149       description "NSD short name.";
150       type string;
151     }
152
153     leaf vendor {
154       description "Vendor of the NSD.";
155       type string;
156     }
157
158     leaf logo {
159       description
160         "File path for  the vendor specific logo. For example icons/mylogo.png.
161          The logo  should be part of the network service";
162       type string;
163     }
164
165     leaf description {
166       description "Description of the NSD.";
167       type string;
168     }
169
170     leaf version {
171       description "Version of the NSD";
172       type string;
173     }
174
175     list connection-point {
176       description
177           "List for external connection points.
178           Each NS has one or more external connection
179           points. As the name implies that external
180           connection points are used for connecting
181           the NS to other NS or to external networks.
182           Each NS exposes these connection points to
183           the orchestrator. The orchestrator can
184           construct network service chains by
185           connecting the connection points between
186           different NS.";
187
188       key "name";
189       leaf name {
190         description
191             "Name of the NS connection point.";
192         type string;
193       }
194
195       leaf type {
196         description
197             "Type of the connection point.";
198         type manotypes:connection-point-type;
199       }
200     }
201
202     list scaling-group-descriptor {
203       description
204           "scaling group descriptor within this network service.
205            The scaling group defines a group of VNFs,
206            and the ratio of VNFs in the network service
207            that is used as target for scaling action";
208
209       key "name";
210
211       leaf name {
212         description "Name of this scaling group.";
213         type string;
214       }
215
216       list scaling-policy {
217
218         key "name";
219
220         leaf name {
221           description
222               "Name of the scaling policy";
223           type string;
224         }
225
226         leaf scaling-type {
227           description
228               "Type of scaling";
229           type scaling-policy-type;
230         }
231
232         leaf enabled {
233           description
234             "Specifies if the scaling policy can be applied";
235           type boolean;
236           default true;
237         }
238
239         leaf scale-in-operation-type {
240           description
241               "Operation to be applied to check between scaling criterias to
242                check if the scale in threshold condition has been met.
243                Defaults to AND";
244           type scaling-criteria-operation;
245           default AND;
246         }
247
248         leaf scale-out-operation-type {
249           description
250               "Operation to be applied to check between scaling criterias to
251                check if the scale out threshold condition has been met.
252                Defauls to OR";
253           type scaling-criteria-operation;
254           default OR;
255         }
256
257         leaf threshold-time {
258           description
259             "The duration for which the criteria must hold true";
260           type uint32;
261           mandatory true;
262         }
263
264         leaf cooldown-time {
265           description
266             "The duration after a scaling-in/scaling-out action has been
267             triggered, for which there will be no further optional";
268           type uint32;
269           mandatory true;
270         }
271
272         list scaling-criteria {
273           description
274               "list of conditions to be met for generating scaling
275                  requests";
276           key "name";
277
278           leaf name {
279             type string;
280           }
281
282           leaf scale-in-threshold {
283             description
284                 "Value below which scale-in requests are generated";
285             type uint64;
286           }
287
288           leaf scale-out-threshold {
289             description
290                 "Value above which scale-out requests are generated";
291             type uint64;
292           }
293
294           leaf ns-monitoring-param-ref {
295             description
296                "Reference to the NS level monitoring parameter
297                 that is aggregated";
298             type leafref {
299               path "../../../../monitoring-param/id";
300             }
301           }
302         }
303       }
304
305       list vnfd-member {
306         description "List of VNFs in this scaling group";
307         key "member-vnf-index-ref";
308
309         leaf member-vnf-index-ref {
310           description "member VNF index of this member VNF";
311           type leafref {
312             path "../../../constituent-vnfd/member-vnf-index";
313           }
314         }
315
316         leaf count {
317           description
318             "count of this member VNF  within this scaling group.
319              The count allows to define  the number of instances
320              when a scaling action targets this scaling group";
321           type uint32;
322           default 1;
323         }
324       }
325
326       leaf min-instance-count {
327         description
328           "Minimum instances of the scaling group which are allowed.
329           These instances are created by default when the network service
330           is instantiated.";
331         type uint32;
332         default 0;
333       }
334
335       leaf max-instance-count {
336         description
337           "Maximum instances of this scaling group that are allowed
338            in a single network service. The network service scaling
339            will fail, when the number of service group instances
340            exceed the max-instance-count specified.";
341         type uint32;
342         default 10;
343       }
344
345       list scaling-config-action {
346         description "List of scaling config actions";
347         key "trigger";
348
349         leaf trigger {
350           description "scaling trigger";
351           type scaling-trigger;
352         }
353
354         leaf ns-config-primitive-name-ref {
355           description "Reference to the NS config name primitive";
356           type leafref {
357             path "../../../service-primitive/name";
358           }
359         }
360       }
361     }
362
363
364     list vnffgd {
365       description
366           "List of VNF Forwarding Graph Descriptors (VNFFGD).";
367
368       key "id";
369
370       leaf id {
371         description
372             "Identifier for the VNFFGD.";
373         type string;
374       }
375
376       leaf name {
377         description
378             "VNFFGD name.";
379         type string;
380       }
381
382       leaf short-name {
383         description
384             "Short name for VNFFGD for UI";
385         type string;
386       }
387
388       leaf vendor {
389         description "Provider of the VNFFGD.";
390         type string;
391       }
392
393       leaf description {
394         description "Description of the VNFFGD.";
395         type string;
396       }
397
398       leaf version {
399         description "Version of the VNFFGD";
400         type string;
401       }
402
403       list rsp {
404         description
405           "List of Rendered Service Paths (RSP).";
406
407         key "id";
408
409         leaf id {
410           description
411             "Identifier for the RSP.";
412           type string;
413         }
414
415         leaf name {
416           description
417             "RSP name.";
418           type string;
419         }
420
421         list vnfd-connection-point-ref {
422           description
423             "A list of references to connection points.";
424           key "member-vnf-index-ref";
425
426           leaf member-vnf-index-ref {
427             description "Reference to member-vnf within constituent-vnfds";
428             type leafref {
429               path "../../../../constituent-vnfd/member-vnf-index";
430             }
431           }
432
433           leaf order {
434             type uint8;
435             description
436               "A number that denotes the order of a VNF in a chain";
437           }
438
439           leaf vnfd-id-ref {
440             description
441               "A reference to a vnfd. This is a
442                   leafref to path:
443                       ../../../../nsd:constituent-vnfd
444                       + [nsd:id = current()/../nsd:id-ref]
445                       + /nsd:vnfd-id-ref
446                   NOTE: An issue with confd is preventing the
447                   use of xpath. Seems to be an issue with leafref
448                   to leafref, whose target is in a different module.
449                   Once that is resovled this will switched to use
450                   leafref";
451              type leafref {
452                 path "../../../../constituent-vnfd" +
453                      "[member-vnf-index = current()/../member-vnf-index-ref]" +
454                      "/vnfd-id-ref";
455              }
456            }
457
458           leaf vnfd-connection-point-ref {
459             description
460               "A reference to a connection point name
461                   in a vnfd. This is a leafref to path:
462                       /vnfd:vnfd-catalog/vnfd:vnfd
463                       + [vnfd:id = current()/../nsd:vnfd-id-ref]
464                       + /vnfd:connection-point/vnfd:name
465                   NOTE: An issue with confd is preventing the
466                   use of xpath. Seems to be an issue with leafref
467                   to leafref, whose target is in a different module.
468                   Once that is resovled this will switched to use
469                   leafref";
470             // TODO: Keeping as string as this needs to be
471             // diffenent lvel based of if it is nsd-catalog or
472             // in nsr.
473             // type leafref {
474             //   path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
475             //        "[vnfd:id = current()/../vnfd-id-ref]/" +
476             //        "vnfd:connection-point/vnfd:name";
477             // }
478             type string;
479           }
480         }
481       } //rsp
482
483       list classifier {
484         description
485             "List of classifier rules.";
486
487         key "id";
488
489         leaf id {
490           description
491               "Identifier for the classifier rule.";
492           type string;
493         }
494
495         leaf name {
496           description
497               "Name of the classifier.";
498           type string;
499         }
500
501         leaf rsp-id-ref {
502           description
503               "A reference to the RSP.";
504           type leafref {
505             path "../../rsp/id";
506           }
507         }
508
509         leaf member-vnf-index-ref {
510           description "Reference to member-vnf within constituent-vnfds";
511           type leafref {
512             path "../../../constituent-vnfd/member-vnf-index";
513           }
514         }
515
516         leaf vnfd-id-ref {
517           description
518               "A reference to a vnfd. This is a
519                   leafref to path:
520                       ../../../nsd:constituent-vnfd
521                       + [nsd:id = current()/../nsd:id-ref]
522                       + /nsd:vnfd-id-ref
523                   NOTE: An issue with confd is preventing the
524                   use of xpath. Seems to be an issue with leafref
525                   to leafref, whose target is in a different module.
526                   Once that is resovled this will switched to use
527                   leafref";
528           type leafref {
529               path "../../../constituent-vnfd" +
530                    "[member-vnf-index = current()/../member-vnf-index-ref]" +
531                    "/vnfd-id-ref";
532           }
533         }
534
535         leaf vnfd-connection-point-ref {
536           description
537               "A reference to a connection point name
538                   in a vnfd. This is a leafref to path:
539                       /vnfd:vnfd-catalog/vnfd:vnfd
540                       + [vnfd:id = current()/../nsd:vnfd-id-ref]
541                       + /vnfd:connection-point/vnfd:name
542                   NOTE: An issue with confd is preventing the
543                   use of xpath. Seems to be an issue with leafref
544                   to leafref, whose target is in a different module.
545                   Once that is resovled this will switched to use
546                   leafref";
547           // TODO: Keeping as string as this needs to be
548           // diffenent lvel based of if it is nsd-catalog or
549           // in nsr.
550           // type leafref {
551           //     path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
552           //          "[vnfd:id = current()/../vnfd-id-ref]/" +
553           //          "vnfd:connection-point/vnfd:name";
554           // }
555           type string;
556         }
557
558         list match-attributes {
559           description
560               "List of match attributes.";
561
562           key "id";
563
564           leaf id {
565             description
566                 "Identifier for the classifier match attribute rule.";
567             type string;
568           }
569
570           leaf ip-proto {
571             description
572                 "IP Protocol.";
573             type uint8;
574           }
575
576           leaf source-ip-address {
577             description
578                 "Source IP address.";
579             type inet:ip-address;
580           }
581
582           leaf destination-ip-address {
583             description
584                 "Destination IP address.";
585             type inet:ip-address;
586           }
587
588           leaf source-port {
589             description
590                 "Source port number.";
591             type inet:port-number;
592           }
593
594           leaf destination-port {
595             description
596                 "Destination port number.";
597             type inet:port-number;
598           }
599           //TODO: Add more match criteria
600         } //match-attributes
601       } // classifier
602     } // vnffgd
603
604     uses manotypes:ip-profile-list;
605
606     uses manotypes:ns-service-primitive;
607
608     list initial-config-primitive {
609       rwpb:msg-new NsdInitialConfigPrimitive;
610       description
611         "Initial set of configuration primitives for NSD.";
612       key "seq";
613
614       uses manotypes:initial-config;
615     }
616
617     uses manotypes:input-parameter-xpath;
618
619     list parameter-pool {
620       description
621         "Pool of parameter values which must be
622          pulled from during configuration";
623       key "name";
624
625       leaf name {
626         description
627             "Name of the configuration value pool";
628         type string;
629       }
630
631       container range {
632         description
633             "Create a range of values to populate the pool with";
634
635         leaf start-value {
636           description
637               "Generated pool values start at this value";
638           type uint32;
639           mandatory true;
640         }
641
642         leaf end-value {
643           description
644               "Generated pool values stop at this value";
645           type uint32;
646           mandatory true;
647         }
648       }
649     }
650
651     list key-pair {
652       key "name";
653       description "Used to configure the list of public keys to be injected as part
654           of ns instantiation";
655
656       leaf name {
657         description "Name of this key pair";
658         type string;
659       }
660
661       leaf key {
662         description "Key associated with this key pair";
663         type string;
664       }
665     }
666
667     list user {
668       key "name";
669       description "List of users to be added through cloud-config";
670
671       leaf name {
672         description "Name of the user ";
673         type string;
674       }
675
676       leaf user-info {
677         description "The user name's real name";
678         type string;
679       }
680
681       list key-pair {
682         key "name";
683         description "Used to configure the list of public keys to be injected as part
684             of ns instantiation";
685
686         leaf name {
687           description "Name of this key pair";
688           type string;
689         }
690
691         leaf key {
692           description "Key associated with this key pair";
693           type string;
694         }
695       }
696     }
697   }
698
699   grouping nsd-vld-common {
700     /* Still having issues modelling this,
701        see the comments under vnfd-connection-point-ref
702     */
703     description
704       "List of Virtual Link Descriptors.";
705
706     leaf id {
707       description
708         "Identifier for the VLD.";
709       type string;
710     }
711
712     leaf name {
713       description
714         "Virtual Link Descriptor (VLD) name.";
715       type string;
716     }
717
718     leaf short-name {
719       description
720         "Short name for VLD for UI";
721       type string;
722     }
723
724     leaf vendor {
725       description "Provider of the VLD.";
726       type string;
727     }
728
729     leaf description {
730       description "Description of the VLD.";
731       type string;
732     }
733
734     leaf version {
735       description "Version of the VLD";
736       type string;
737     }
738
739     leaf type {
740       type manotypes:virtual-link-type;
741     }
742
743     leaf root-bandwidth {
744       description
745         "For ELAN this is the aggregate bandwidth.";
746       type uint64;
747     }
748
749     leaf leaf-bandwidth {
750       description
751         "For ELAN this is the bandwidth of branches.";
752       type uint64;
753     }
754
755     // replicate for pnfd container here
756     uses manotypes:provider-network;
757
758     leaf mgmt-network {
759       description "Flag indicating whether this network is a VIM management network";
760       type boolean;
761       default false;
762     }
763
764     choice init-params {
765       description "Extra parameters for VLD instantiation";
766
767       case vim-network-ref {
768         leaf vim-network-name {
769           description
770             "Name of network in VIM account. This is used to indicate
771                    pre-provisioned network name in cloud account.";
772           type string;
773         }
774       }
775
776       case vim-network-profile {
777         leaf ip-profile-ref {
778           description "Named reference to IP-profile object";
779           type string;
780         }
781       }
782
783     }
784   }
785
786   grouping nsd-vld {
787     list vld {
788
789       key "id";
790
791       uses nsd-vld-common;
792
793       list vnfd-connection-point-ref {
794         description
795             "A list of references to connection points.";
796         key "member-vnf-index-ref vnfd-connection-point-ref";
797
798         leaf member-vnf-index-ref {
799           description "Reference to member-vnf within constituent-vnfds";
800           type leafref {
801             path "../../../constituent-vnfd/member-vnf-index";
802           }
803         }
804
805         leaf vnfd-id-ref {
806           description
807               "A reference to a vnfd. This is a
808                leafref to path:
809                    ../../nsd:constituent-vnfd
810                    + [nsd:id = current()/../nsd:id-ref]
811                    + /nsd:vnfd-id-ref
812                NOTE: An issue with confd is preventing the
813                use of xpath. Seems to be an issue with leafref
814                to leafref, whose target is in a different module.
815                Once that is resovled this will switched to use
816                leafref";
817           type string;
818         }
819
820         leaf vnfd-connection-point-ref {
821           description "A reference to a connection point name";
822           type leafref {
823             path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
824                  "[vnfd:id = current()/../vnfd-id-ref]/" +
825                  "vnfd:connection-point/vnfd:name";
826           }
827         }
828       }
829     }
830   }
831
832   grouping nsr-nsd-vld {
833     list vld {
834
835       key "id";
836
837       uses nsd-vld-common;
838
839       list vnfd-connection-point-ref {
840         description
841             "A list of references to connection points.";
842         key "member-vnf-index-ref vnfd-connection-point-ref";
843
844         leaf member-vnf-index-ref {
845           description "Reference to member-vnf within constituent-vnfds";
846           // TODO (Philip): Fix this
847           // type leafref {
848           //   path "../../../constituent-vnfd/member-vnf-index";
849           // }
850           type uint64;
851         }
852
853         leaf vnfd-id-ref {
854           description
855               "A reference to a vnfd. This is a
856                leafref to path:
857                    ../../nsd:constituent-vnfd
858                    + [nsd:id = current()/../nsd:id-ref]
859                    + /nsd:vnfd-id-ref
860                NOTE: An issue with confd is preventing the
861                use of xpath. Seems to be an issue with leafref
862                to leafref, whose target is in a different module.
863                Once that is resovled this will switched to use
864                leafref";
865           type string;
866         }
867
868         leaf vnfd-connection-point-ref {
869           description "A reference to a connection point name";
870           // TODO (Philip): Fix this
871           // type leafref {
872           //   path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
873           //        "[vnfd:id = current()/../vnfd-id-ref]/" +
874           //        "vnfd:connection-point/vnfd:name";
875           // }
876           type string;
877         }
878       }
879     }
880   }
881
882   grouping nsd-constituent-vnfd {
883     list constituent-vnfd {
884       description
885           "List of VNFDs that are part of this
886           network service.";
887
888       key "member-vnf-index";
889
890       leaf member-vnf-index {
891         description
892           "Identifier/index for the VNFD. This separate id
893            is required to ensure that multiple VNFs can be
894            part of single NS";
895         type uint64;
896       }
897
898       leaf vnfd-id-ref {
899         description
900           "Identifier for the VNFD.";
901         type leafref {
902           path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
903         }
904       }
905
906       leaf start-by-default {
907         description
908           "VNFD is started as part of the NS instantiation";
909         type boolean;
910         default true;
911       }
912     }
913   }
914
915   grouping nsr-nsd-constituent-vnfd {
916     list constituent-vnfd {
917       description
918           "List of VNFDs that are part of this
919           network service.";
920
921       key "member-vnf-index";
922
923       leaf member-vnf-index {
924         description
925           "Identifier/index for the VNFD. This separate id
926            is required to ensure that multiple VNFs can be
927            part of single NS";
928         type uint64;
929       }
930
931       leaf vnfd-id-ref {
932         description
933           "Identifier for the VNFD.";
934         // TODO (Philip): Fix this
935         // type leafref {
936         //   path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
937         // }
938         type string;
939       }
940
941       leaf start-by-default {
942         description
943           "VNFD is started as part of the NS instantiation";
944         type boolean;
945         default true;
946       }
947     }
948   }
949
950   grouping nsd-placement-groups {
951     list placement-groups {
952       description "List of placement groups at NS level";
953
954       key "name";
955       uses manotypes:placement-group-info;
956
957       list member-vnfd {
958         description
959             "List of VNFDs that are part of this placement group";
960
961         key "member-vnf-index-ref";
962
963         leaf member-vnf-index-ref {
964           description "member VNF index of this member VNF";
965           type leafref {
966             path "../../../constituent-vnfd/member-vnf-index";
967           }
968         }
969
970         leaf vnfd-id-ref {
971           description
972               "Identifier for the VNFD.";
973           type leafref {
974             path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
975           }
976         }
977       }
978     }
979   }
980
981   grouping nsr-nsd-placement-groups {
982     list placement-groups {
983       description "List of placement groups at NS level";
984
985       key "name";
986       uses manotypes:placement-group-info;
987
988       list member-vnfd {
989         description
990             "List of VNFDs that are part of this placement group";
991
992         key "member-vnf-index-ref";
993
994         leaf member-vnf-index-ref {
995           description "member VNF index of this member VNF";
996           // TODO (Philip): Fix this
997           // type leafref {
998           //   path "../../../constituent-vnfd/member-vnf-index";
999           // }
1000           type uint64;
1001         }
1002
1003         leaf vnfd-id-ref {
1004           description
1005               "Identifier for the VNFD.";
1006           // TODO (Philip): Fix this
1007           // type leafref {
1008           //   path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1009           // }
1010           type string;
1011         }
1012       }
1013     }
1014   }
1015
1016   grouping nsd-vnf-dependency {
1017     list vnf-dependency {
1018       description
1019           "List of VNF dependencies.";
1020       key vnf-source-ref;
1021       leaf vnf-source-ref {
1022         type leafref {
1023           path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1024         }
1025       }
1026       leaf vnf-depends-on-ref {
1027         description
1028             "Reference to VNF that sorce VNF depends.";
1029         type leafref {
1030           path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1031         }
1032       }
1033     }
1034   }
1035
1036   grouping nsr-nsd-vnf-dependency {
1037     list vnf-dependency {
1038       description
1039           "List of VNF dependencies.";
1040       key vnf-source-ref;
1041       leaf vnf-source-ref {
1042         type leafref {
1043           path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1044         }
1045       }
1046       leaf vnf-depends-on-ref {
1047         description
1048             "Reference to VNF that sorce VNF depends.";
1049         type leafref {
1050           path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1051         }
1052       }
1053     }
1054   }
1055
1056   grouping monitoring-param-common {
1057     // list monitoring-param {
1058     description
1059       "List of monitoring parameters from VNF's that should be
1060         propogated up into NSR";
1061     leaf id {
1062       type string;
1063     }
1064
1065     leaf name {
1066       type string;
1067     }
1068
1069     uses manotypes:monitoring-param-value;
1070     uses manotypes:monitoring-param-ui-data;
1071     uses manotypes:monitoring-param-aggregation;
1072   }
1073
1074   grouping nsd-monitoring-param {
1075
1076     list monitoring-param {
1077       key "id";
1078
1079       uses monitoring-param-common;
1080
1081       list vnfd-monitoring-param {
1082         description "A list of VNFD monitoring params";
1083         key "vnfd-id-ref vnfd-monitoring-param-ref";
1084
1085         leaf vnfd-id-ref {
1086           description
1087             "A reference to a vnfd. This is a
1088               leafref to path:
1089                   ../../../../nsd:constituent-vnfd
1090                   + [nsd:id = current()/../nsd:id-ref]
1091                   + /nsd:vnfd-id-ref
1092               NOTE: An issue with confd is preventing the
1093               use of xpath. Seems to be an issue with leafref
1094               to leafref, whose target is in a different module.
1095               Once that is resolved this will switched to use
1096               leafref";
1097
1098           type yang:uuid;
1099         }
1100
1101         leaf vnfd-monitoring-param-ref {
1102           description "A reference to the VNFD monitoring param";
1103           type leafref {
1104             path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
1105               + "[vnfd:id = current()/../vnfd-id-ref]"
1106               + "/vnfd:monitoring-param/vnfd:id";
1107           }
1108         }
1109
1110         leaf-list member-vnf-index-ref {
1111           description
1112             "Optional reference to member-vnf within constituent-vnfds";
1113           type uint64;
1114         }
1115       }
1116     }
1117   }
1118
1119   grouping nsr-nsd-monitoring-param {
1120     list monitoring-param {
1121       key "id";
1122
1123       uses monitoring-param-common;
1124
1125       list vnfd-monitoring-param {
1126         description "A list of VNFD monitoring params";
1127         key "vnfd-id-ref vnfd-monitoring-param-ref";
1128
1129         leaf vnfd-id-ref {
1130           description
1131             "A reference to a vnfd. This is a
1132               leafref to path:
1133                   ../../../../nsd:constituent-vnfd
1134                   + [nsd:id = current()/../nsd:id-ref]
1135                   + /nsd:vnfd-id-ref
1136               NOTE: An issue with confd is preventing the
1137               use of xpath. Seems to be an issue with leafref
1138               to leafref, whose target is in a different module.
1139               Once that is resolved this will switched to use
1140               leafref";
1141
1142           type yang:uuid;
1143         }
1144
1145         leaf vnfd-monitoring-param-ref {
1146           description "A reference to the VNFD monitoring param";
1147           type leafref {
1148             path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
1149               + "[vnfd:id = current()/../vnfd-id-ref]"
1150               + "/vnfd:monitoring-param/vnfd:id";
1151           }
1152         }
1153
1154         leaf-list member-vnf-index-ref {
1155           description
1156             "Optional reference to member-vnf within constituent-vnfds";
1157           type uint64;
1158         }
1159       }
1160     }
1161   }
1162
1163
1164   augment "/rw-project:project" {
1165     container nsd-catalog {
1166
1167       list nsd {
1168         key "id";
1169
1170         uses nsd-descriptor-common;
1171
1172         uses nsd-vld;
1173
1174         uses nsd-constituent-vnfd;
1175
1176         uses nsd-placement-groups;
1177
1178         uses nsd-vnf-dependency;
1179
1180         uses nsd-monitoring-param;
1181       }
1182     }
1183   }
1184 }