Merge from OSM SO master
[osm/SO.git] / models / plugins / yang / mano-types.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 mano-types
22 {
23   namespace "urn:ietf:params:xml:ns:yang:nfvo:mano-types";
24   prefix "manotypes";
25
26   import ietf-inet-types {
27     prefix "inet";
28   }
29
30   import rw-pb-ext {
31     prefix "rwpb";
32   }
33
34   import rw-project {
35     prefix "rw-project";
36   }
37
38   revision 2017-02-08 {
39     description
40       "Update model to support projects.";
41   }
42
43   revision 2015-04-23 {
44     description
45       "Initial revision. This YANG file defines
46        the reusable base types for VNF Management
47        and Orchestration (MANO).";
48     reference
49       "Derived from earlier versions of base YANG files";
50   }
51
52   typedef package-type {
53       description "Type of descriptor being on-boarded";
54       type enumeration {
55         enum NSD;
56         enum VNFD;
57       }
58     }
59
60   typedef parameter-data-type {
61     type enumeration {
62       enum STRING;
63       enum INTEGER;
64       enum BOOLEAN;
65     }
66   }
67
68   grouping primitive-parameter-value {
69     list parameter {
70       description
71           "List of parameters to the configuration primitive.";
72       key "name";
73       leaf name {
74         description
75             "Name of the parameter.";
76         type string;
77       }
78
79       leaf value {
80         description
81             "Value associated with the name.";
82         type string;
83       }
84     }
85   }
86
87   grouping primitive-parameter {
88     leaf name {
89       description
90           "Name of the parameter.";
91       type string;
92     }
93
94     leaf data-type {
95       description
96           "Data type associated with the name.";
97       type manotypes:parameter-data-type;
98     }
99
100     leaf mandatory {
101       description "Is this field mandatory";
102       type boolean;
103       default false;
104     }
105
106     leaf default-value {
107       description "The default value for this field";
108       type string;
109     }
110
111     leaf parameter-pool {
112       description "NSD parameter pool name to use for this parameter";
113       type string;
114     }
115
116     leaf read-only {
117       description
118         "The value should be dimmed by the UI.
119         Only applies to parameters with default values.";
120       type boolean;
121     }
122
123     leaf hidden {
124       description
125         "The value should be hidden by the UI.
126         Only applies to parameters with default values.";
127       type boolean;
128     }
129   }
130   
131   grouping ui-primitive-group {
132     list parameter-group {
133       description
134             "Grouping of parameters which are logically grouped in UI";
135       key "name";
136  
137       leaf name {
138         description
139             "Name of the parameter group";
140         type string;
141       }
142  
143       list parameter {
144         description
145             "List of parameters for the service primitive.";
146         key "name";
147         uses manotypes:primitive-parameter;
148       }
149  
150       leaf mandatory {
151         description "Is this parameter group mandatory";
152         type boolean;
153         default true;
154       }
155     }
156   }
157
158   grouping image-properties {
159     leaf image {
160       description
161             "Image name for the software image.
162              If the image name is found within the VNF package it will
163              be uploaded to all VIM accounts during onboarding process.
164              Otherwise, the image must be added to the VIM account with
165              the same name as entered here.
166             ";
167       type string;
168     }
169
170     leaf image-checksum {
171       description
172             "Image md5sum for the software image.
173             The md5sum, if provided, along with the image name uniquely
174             identifies an image uploaded to the CAL.
175             ";
176       type string;
177     } 
178   }
179   grouping initial-config {
180     leaf seq {
181       description
182           "Sequence number for the configuration primitive.";
183       type uint64;
184     }
185
186     leaf name {
187       description
188           "Name of the configuration primitive.";
189       type string;
190       mandatory "true";
191     }
192
193     leaf user-defined-script {
194       description
195           "A user defined script.";
196       type string;
197     }
198
199     list parameter {
200       key "name";
201       leaf name {
202         type string;
203       }
204
205       leaf value {
206         description "Value of the configuration primitive.";
207         type string;
208       }
209     }
210   }
211
212   grouping vnf-configuration {
213     container vnf-configuration {
214       rwpb:msg-new VnfConfiguration;
215       description
216           "Information about the VNF configuration. Note: 
217            If the NS contains multiple instances of the
218            same VNF, each instance could have a different
219            configuration.";
220
221       choice config-method {
222         description
223             "Defines the configuration method for the VNF.";
224         case netconf {
225           description
226               "Use NETCONF for configuring the VNF.";
227           container netconf {
228             leaf target {
229               description
230                   "Netconf configuration target";
231               type enumeration {
232                 enum running;
233                 enum candidate;
234               }
235             }
236
237             leaf protocol {
238               description
239                   "Protocol to use for NETCONF such as ssh";
240               type enumeration {
241                 enum None;
242                 enum ssh;
243               }
244             }
245
246             leaf port {
247               description
248                   "Port for the NETCONF server.";
249               type inet:port-number;
250             }
251           }
252         }
253
254         case rest {
255           description
256               "Use REST for configuring the VNF.";
257           container rest {
258             leaf port {
259               description
260                   "Port for the REST server.";
261               type inet:port-number;
262             }
263           }
264         }
265
266         case script {
267           description
268               "Use custom script for configuring the VNF.
269                This script is executed in the context of 
270                Orchestrator (The same system and environment
271                as the Launchpad).";
272           container script {
273             leaf script-type {
274               description
275                   "Script type - currently supported : bash, expect";
276               type enumeration {
277                 enum bash;
278                 enum expect;
279               }
280             }
281           }
282         }
283
284         case juju {
285           description
286             "Configure the VNF through Juju.";
287           container juju {
288             leaf charm {
289               description "Juju charm to use with the VNF.";
290               type string;
291             }
292           }
293         }
294       }
295
296       container config-access {
297         leaf mgmt-ip-address {
298           description
299               "IP address to be used to configure this VNF,
300                optional if it is possible to resolve dynamically.";
301           type inet:ip-address;
302         }
303
304         leaf username {
305           description 
306               "User name for configuration.";
307           type string;
308         }
309
310         leaf password {
311           description 
312               "Password for configuration access authentication.";
313           type string;
314         }
315       }
316
317       container config-attributes {
318         description
319             "Miscellaneous input parameters to be considered
320              while processing the NSD to apply configuration";
321
322         leaf config-priority {
323           description
324               "Configuration priority - order of configuration
325                to be applied to each VNF in this NS ,A low
326                number takes precedence over a high number";
327           type uint64;
328         }
329
330         leaf config-delay {
331           description 
332               "Wait (seconds) before applying the configuration to VNF";
333           type uint64;
334         }
335       }
336
337       list service-primitive {
338         rwpb:msg-new ServicePrimitive;
339         description
340           "List of service primitives supported by the
341           configuration agent for this VNF.";
342         key "name";
343
344         leaf name {
345           description
346             "Name of the service primitive.";
347           type string;
348         }
349
350         list parameter {
351           description
352             "List of parameters to the service primitive.";
353           key "name";
354           uses primitive-parameter;
355         }
356       }
357
358       list initial-config-primitive {
359         rwpb:msg-new InitialConfigPrimitive;
360         description
361           "Initial set of configuration primitives.";
362         key "seq";
363         uses initial-config;
364       }
365
366       leaf config-template {
367         description
368             "Configuration template for each VNF";
369         type string;
370       }
371     }
372   } // END - grouping vnf-configuration
373
374   typedef virtual-link-type {
375     description
376         "Type of virtual link
377          ELAN: A multipoint service connecting a set of VNFs
378          // ELINE: For a simple point to point connection
379          //        between a VNF and the existing network.
380          // ETREE: A multipoint service connecting one or
381          //        more roots and a set of leaves, but
382          //        preventing inter-leaf communication.";
383     type enumeration {
384       enum ELAN;
385       // enum ETREE;
386       // enum ELINE;
387     }
388   }
389
390   grouping named-value {
391     leaf name {
392       type string;
393     }
394
395     leaf value {
396       type string;
397     }
398   }
399
400   typedef http-method {
401     description
402       "Type of HTTP operation";
403
404     type enumeration {
405       enum POST;
406       enum PUT;
407       enum GET;
408       enum DELETE;
409       enum OPTIONS;
410       enum PATCH;
411     }
412   }
413
414   typedef api-type {
415     description
416       "Type of API to fetch monitoring parameters";
417
418     type enumeration {
419       enum HTTP;
420       enum NETCONF;
421       enum SOAP;
422     }
423   }
424
425   typedef json-query-method {
426     description
427       "The method to extract a value from a JSON response
428
429        NAMEKEY - Use the name as the key for a non-nested value.
430        JSONPATH - Use jsonpath-rw implementation to extract a value.
431        OBJECTPATH - Use objectpath implementation to extract a value.";
432       type enumeration {
433         enum NAMEKEY;
434         enum JSONPATH;
435         enum OBJECTPATH;
436       }
437   }
438
439   typedef param-value-type {
440     description
441       "The type of the parameter value";
442     type enumeration {
443        enum INT;
444        enum DECIMAL;
445        enum STRING;
446     }
447   }
448
449   typedef connection-point-type {
450     description
451         "Type of connection point
452         VPORT: Virtual Port
453         // VNIC_ADDR: Virtual NIC Address
454         // PNIC_ADDR: Physical NIC Address
455         // PPORT: Physical Port.";
456
457     type enumeration {
458       enum VPORT;
459     }
460   }
461
462   typedef widget-type {
463     description
464         "Type of the widget, typically used by the UI.";
465     type enumeration {
466       enum HISTOGRAM;
467       enum BAR;
468       enum GAUGE;
469       enum SLIDER;
470       enum COUNTER;
471       enum TEXTBOX;
472     }
473   }
474
475   typedef cpu-feature-type {
476     description
477         "Enumeration for CPU features.
478
479          AES: CPU supports advanced instruction set for
480          AES (Advanced Encryption Standard).
481
482          CAT: Cache Allocation Technology (CAT) allows
483          an Operating System, Hypervisor, or similar
484          system management agent to specify the amount
485          of L3 cache (currently the last-level cache
486          in most server and client platforms) space an
487          application can fill (as a hint to hardware
488          functionality, certain features such as power
489          management may override CAT settings).
490
491          CMT: Cache Monitoring Technology (CMT) allows
492          an Operating System, Hypervisor, or similar
493          system management agent to determine the
494          usage of cache based on applications running
495          on the platform. The implementation is
496          directed at L3 cache monitoring (currently
497          the last-level cache in most server and
498          client platforms).
499
500          DDIO: Intel Data Direct I/O (DDIO) enables
501          Ethernet server NICs and controllers talk
502          directly to the processor cache without a
503          detour via system memory. This enumeration
504          specifies if the VM requires a DDIO
505          capable host.";
506
507     type enumeration {
508       enum PREFER_AES;
509       enum REQUIRE_AES;
510       enum PREFER_CAT;
511       enum REQUIRE_CAT;
512       enum PREFER_CMT;
513       enum REQUIRE_CMT;
514       enum PREFER_DDIO;
515       enum REQUIRE_DDIO;
516       enum REQUIRE_VME;
517       enum PREFER_VME;
518       enum REQUIRE_DE;
519       enum PREFER_DE;
520       enum REQUIRE_PSE;
521       enum PREFER_PSE;
522       enum REQUIRE_TSC;
523       enum PREFER_TSC;
524       enum REQUIRE_MSR;
525       enum PREFER_MSR;
526       enum REQUIRE_PAE;
527       enum PREFER_PAE;
528       enum REQUIRE_MCE;
529       enum PREFER_MCE;
530       enum REQUIRE_CX8;
531       enum PREFER_CX8;
532       enum REQUIRE_APIC;
533       enum PREFER_APIC;
534       enum REQUIRE_SEP;
535       enum PREFER_SEP;
536       enum REQUIRE_MTRR;
537       enum PREFER_MTRR;
538       enum REQUIRE_PGE;
539       enum PREFER_PGE;
540       enum REQUIRE_MCA;
541       enum PREFER_MCA;
542       enum REQUIRE_CMOV;
543       enum PREFER_CMOV;
544       enum REQUIRE_PAT;
545       enum PREFER_PAT;
546       enum REQUIRE_PSE36;
547       enum PREFER_PSE36;
548       enum REQUIRE_CLFLUSH;
549       enum PREFER_CLFLUSH;
550       enum REQUIRE_DTS;
551       enum PREFER_DTS;
552       enum REQUIRE_ACPI;
553       enum PREFER_ACPI;
554       enum REQUIRE_MMX;
555       enum PREFER_MMX;
556       enum REQUIRE_FXSR;
557       enum PREFER_FXSR;
558       enum REQUIRE_SSE;
559       enum PREFER_SSE;
560       enum REQUIRE_SSE2;
561       enum PREFER_SSE2;
562       enum REQUIRE_SS;
563       enum PREFER_SS;
564       enum REQUIRE_HT;
565       enum PREFER_HT;
566       enum REQUIRE_TM;
567       enum PREFER_TM;
568       enum REQUIRE_IA64;
569       enum PREFER_IA64;
570       enum REQUIRE_PBE;
571       enum PREFER_PBE;
572       enum REQUIRE_RDTSCP;
573       enum PREFER_RDTSCP;
574       enum REQUIRE_PNI;
575       enum PREFER_PNI;
576       enum REQUIRE_PCLMULQDQ;
577       enum PREFER_PCLMULQDQ;
578       enum REQUIRE_DTES64;
579       enum PREFER_DTES64;
580       enum REQUIRE_MONITOR;
581       enum PREFER_MONITOR;
582       enum REQUIRE_DS_CPL;
583       enum PREFER_DS_CPL;
584       enum REQUIRE_VMX;
585       enum PREFER_VMX;
586       enum REQUIRE_SMX;
587       enum PREFER_SMX;
588       enum REQUIRE_EST;
589       enum PREFER_EST;
590       enum REQUIRE_TM2;
591       enum PREFER_TM2;
592       enum REQUIRE_SSSE3;
593       enum PREFER_SSSE3;
594       enum REQUIRE_CID;
595       enum PREFER_CID;
596       enum REQUIRE_FMA;
597       enum PREFER_FMA;
598       enum REQUIRE_CX16;
599       enum PREFER_CX16;
600       enum REQUIRE_XTPR;
601       enum PREFER_XTPR;
602       enum REQUIRE_PDCM;
603       enum PREFER_PDCM;
604       enum REQUIRE_PCID;
605       enum PREFER_PCID;
606       enum REQUIRE_DCA;
607       enum PREFER_DCA;
608       enum REQUIRE_SSE4_1;
609       enum PREFER_SSE4_1;
610       enum REQUIRE_SSE4_2;
611       enum PREFER_SSE4_2;
612       enum REQUIRE_X2APIC;
613       enum PREFER_X2APIC;
614       enum REQUIRE_MOVBE;
615       enum PREFER_MOVBE;
616       enum REQUIRE_POPCNT;
617       enum PREFER_POPCNT;
618       enum REQUIRE_TSC_DEADLINE_TIMER;
619       enum PREFER_TSC_DEADLINE_TIMER;
620       enum REQUIRE_XSAVE;
621       enum PREFER_XSAVE;
622       enum REQUIRE_AVX;
623       enum PREFER_AVX;
624       enum REQUIRE_F16C;
625       enum PREFER_F16C;
626       enum REQUIRE_RDRAND;
627       enum PREFER_RDRAND;
628       enum REQUIRE_FSGSBASE;
629       enum PREFER_FSGSBASE;
630       enum REQUIRE_BMI1;
631       enum PREFER_BMI1;
632       enum REQUIRE_HLE;
633       enum PREFER_HLE;
634       enum REQUIRE_AVX2;
635       enum PREFER_AVX2;
636       enum REQUIRE_SMEP;
637       enum PREFER_SMEP;
638       enum REQUIRE_BMI2;
639       enum PREFER_BMI2;
640       enum REQUIRE_ERMS;
641       enum PREFER_ERMS;
642       enum REQUIRE_INVPCID;
643       enum PREFER_INVPCID;
644       enum REQUIRE_RTM;
645       enum PREFER_RTM;
646       enum REQUIRE_MPX;
647       enum PREFER_MPX;
648       enum REQUIRE_RDSEED;
649       enum PREFER_RDSEED;
650       enum REQUIRE_ADX;
651       enum PREFER_ADX;
652       enum REQUIRE_SMAP;
653       enum PREFER_SMAP;
654     }
655   }
656
657   grouping vm-flavor {
658     container vm-flavor {
659       leaf vcpu-count {
660         description
661             "Number of VCPUs for the VM.";
662         type uint16;
663       }
664
665       leaf memory-mb {
666         description
667             "Amount of memory in MB.";
668         type uint64;
669       }
670
671       leaf storage-gb {
672         description
673             "Amount of disk space in GB.";
674         type uint64;
675       }
676     }
677   } //grouping vm-flavor
678
679   grouping vswitch-epa {
680     container vswitch-epa {
681       leaf ovs-acceleration {
682         description
683             "Specifies Open vSwitch acceleration mode.
684              MANDATORY: OVS acceleration is required
685              PREFERRED: OVS acceleration is preferred";
686         type enumeration {
687           enum MANDATORY;
688           enum PREFERRED;
689           enum DISABLED;
690         }
691       }
692
693       leaf ovs-offload {
694         description
695             "Specifies Open vSwitch hardware offload mode.
696              MANDATORY: OVS offload is required
697              PREFERRED: OVS offload is preferred";
698         type enumeration {
699           enum MANDATORY;
700           enum PREFERRED;
701           enum DISABLED;
702         }
703       }
704     }
705   }
706
707   grouping hypervisor-epa {
708     container hypervisor-epa {
709       leaf type {
710         description
711             "Specifies the type of hypervisor.
712              KVM: KVM
713              XEN: XEN";
714         type enumeration {
715           enum PREFER_KVM;
716           enum REQUIRE_KVM;
717         }
718       }
719       leaf version {
720         type string;
721       }
722     }
723   }
724
725   grouping host-epa {
726     container host-epa {
727       description "Specifies the host level EPA attributes.";
728       leaf cpu-model {
729         description
730             "Host CPU model. Examples include: SandyBridge,
731              IvyBridge";
732         type enumeration {
733           enum PREFER_WESTMERE;
734           enum REQUIRE_WESTMERE;
735           enum PREFER_SANDYBRIDGE;
736           enum REQUIRE_SANDYBRIDGE;
737           enum PREFER_IVYBRIDGE;
738           enum REQUIRE_IVYBRIDGE;
739           enum PREFER_HASWELL;
740           enum REQUIRE_HASWELL;
741           enum PREFER_BROADWELL;
742           enum REQUIRE_BROADWELL;
743           enum PREFER_NEHALEM;
744           enum REQUIRE_NEHALEM;
745           enum PREFER_PENRYN;
746           enum REQUIRE_PENRYN;
747           enum PREFER_CONROE;
748           enum REQUIRE_CONROE;
749           enum PREFER_CORE2DUO;
750           enum REQUIRE_CORE2DUO;
751         }
752       }
753
754       leaf cpu-arch {
755         description "Host CPU architecture.";
756         type enumeration {
757           enum PREFER_X86;
758           enum REQUIRE_X86;
759           enum PREFER_X86_64;
760           enum REQUIRE_X86_64;
761           enum PREFER_I686;
762           enum REQUIRE_I686;
763           enum PREFER_IA64;
764           enum REQUIRE_IA64;
765           enum PREFER_ARMV7;
766           enum REQUIRE_ARMV7;
767           enum PREFER_ARMV8;
768           enum REQUIRE_ARMV8;
769         }
770       }
771
772       leaf cpu-vendor {
773         description "Host CPU Vendor.";
774         type enumeration {
775           enum PREFER_INTEL;
776           enum REQUIRE_INTEL;
777           enum PREFER_AMD;
778           enum REQUIRE_AMD;
779         }
780       }
781
782       leaf cpu-socket-count {
783         description "Number of sockets on the host.";
784         type uint64;
785       }
786
787       leaf cpu-core-count {
788         description "Number of cores on the host.";
789         type uint64;
790       }
791
792       leaf cpu-core-thread-count {
793         description "Number of threads per cores on the host.";
794         type uint64;
795       }
796       
797       list cpu-feature {
798         key "feature";
799         description "List of CPU features.";
800         leaf feature {
801           description "CPU feature.";
802           type cpu-feature-type;
803         }
804       }
805
806       
807       leaf om-cpu-model-string {
808         description "OpenMANO CPU model string";
809         type string;
810       }
811
812       list om-cpu-feature {
813         key "feature";
814         description "List of OpenMANO CPU features";
815         leaf feature {
816           description "CPU feature";
817           type string;
818         }
819       }
820     }
821   }
822
823   grouping guest-epa {
824     description "EPA attributes for the guest";
825     container guest-epa {
826       leaf trusted-execution {
827         description "This VM should be allocated from trusted pool";
828         type boolean;
829       }
830
831       leaf mempage-size {
832         description
833             "Memory page allocation size. If a VM requires
834              hugepages, it should choose LARGE or SIZE_2MB
835              or SIZE_1GB. If the VM prefers hugepages it
836              should choose PREFER_LARGE.
837              LARGE        : Require hugepages (either 2MB or 1GB)
838              SMALL        : Doesn't require hugepages
839              SIZE_2MB     : Requires 2MB hugepages
840              SIZE_1GB     : Requires 1GB hugepages
841              PREFER_LARGE : Application prefers hugepages";
842         type enumeration {
843           enum LARGE;
844           enum SMALL;
845           enum SIZE_2MB;
846           enum SIZE_1GB;
847           enum PREFER_LARGE;
848         }
849       }
850
851       leaf cpu-pinning-policy {
852         description
853             "CPU pinning policy describes association
854              between virtual CPUs in guest and the
855              physical CPUs in the host.
856              DEDICATED : Virtual CPUs are pinned to
857                          physical CPUs
858              SHARED    : Multiple VMs may share the
859                          same physical CPUs.
860              ANY       : Any policy is acceptable for the VM";
861         type enumeration {
862           enum DEDICATED;
863           enum SHARED;
864           enum ANY;
865         }
866         default "ANY";
867       }
868
869       leaf cpu-thread-pinning-policy {
870           description
871             "CPU thread pinning policy describes how to
872              place the guest CPUs when the host supports
873              hyper threads:
874              AVOID   : Avoids placing a guest on a host
875                        with threads.
876              SEPARATE: Places vCPUs on separate cores,
877                        and avoids placing two vCPUs on
878                        two threads of same core.
879              ISOLATE : Places each vCPU on a different core,
880                        and places no vCPUs from a different
881                        guest on the same core.
882              PREFER  : Attempts to place vCPUs on threads
883                        of the same core.";
884         type enumeration {
885           enum AVOID;
886           enum SEPARATE;
887           enum ISOLATE;
888           enum PREFER;
889         }
890       }
891
892       list pcie-device {
893         description
894             "List of pcie passthrough devices.";
895         key device-id;
896         leaf device-id {
897           description
898               "Device identifier.";
899           type string;
900         }
901         leaf count {
902           description
903               "Number of devices to attach to the VM.";
904           type uint64;
905         }
906       }
907
908       choice numa-policy {
909         case numa-unaware {
910           leaf numa-unaware {
911             type empty;
912           }
913         }
914
915         case numa-aware {
916           container numa-node-policy {
917             description
918                 "This policy defines NUMA topology of the
919                  guest. Specifically identifies if the guest
920                  should be run on a host with one NUMA
921                  node or multiple NUMA nodes. As an example
922                  a guest might need 8 VCPUs and 4 GB of
923                  memory. However, it might need the VCPUs
924                  and memory distributed across multiple
925                  NUMA nodes. In this scenario, NUMA node
926                  1 could run with 6 VCPUs and 3GB, and
927                  NUMA node 2 could run with 2 VCPUs and
928                  1GB.";
929
930             leaf node-cnt {
931               description
932                   "The number of NUMA nodes to expose to the VM.";
933               type uint16;
934             }
935
936             leaf mem-policy {
937               description
938                   "This policy specifies how the memory should
939                    be allocated in a multi-node scenario.
940                    STRICT    : The memory must be allocated
941                                strictly from the memory attached
942                                to the NUMA node.
943                    PREFERRED : The memory should be allocated
944                                preferentially from the memory
945                                attached to the NUMA node";
946               type enumeration {
947                 enum STRICT;
948                 enum PREFERRED;
949               }
950             }
951
952            list node {
953               key id;
954               leaf id {
955                 description
956                     "NUMA node identification. Typically
957                      it's 0 or 1";
958                 type uint64;
959               }
960
961               list vcpu {
962                 key "id";
963                 description
964                     "List of VCPUs to allocate on
965                      this NUMA node.";
966                 leaf id {
967                   type uint64;
968                   description "List of VCPUs ids to allocate on
969                                this NUMA node";
970                 }
971               }
972
973               leaf memory-mb {
974                 description
975                     "Memory size expressed in MB
976                      for this NUMA node.";
977                 type uint64;
978               }
979
980               choice om-numa-type {
981                 description
982                     "OpenMANO Numa type selection";
983
984                 case cores {
985                   leaf num-cores {
986                     type uint8;
987                   }
988                 }
989
990                 case paired-threads {
991                   container paired-threads {
992                     leaf num-paired-threads {
993                       type uint8;
994                     }
995
996                     list paired-thread-ids {
997                       description
998                           "List of thread pairs to use in case of paired-thread NUMA";
999                       max-elements 16;
1000                       key thread-a;
1001
1002                       leaf thread-a {
1003                           type uint8;
1004                       }
1005
1006                       leaf thread-b {
1007                           type uint8;
1008                       }
1009                     }
1010                   }
1011                 }
1012                 case threads {
1013                   leaf num-threads {
1014                     type uint8;
1015                   }
1016                 }
1017               }
1018             }
1019
1020           }
1021         }
1022       }
1023     }
1024   }
1025
1026   grouping provider-network {
1027     container provider-network {
1028       description "Container for the provider network.";
1029       leaf physical-network {
1030         description
1031             "Name of the physical network on which the provider
1032              network is built.";
1033         type string;
1034       }
1035
1036       leaf overlay-type {
1037         description
1038             "Type of the overlay network.
1039              LOCAL - Provider network implemented in a single compute node
1040              FLAT - Provider network shared by all tenants 
1041              VLAN - Provider network implemented using 802.1Q tagging
1042              VXLAN - Provider networks implemented using RFC 7348
1043              GRE - Provider networks implemented using GRE tunnels";
1044         type enumeration {
1045           enum LOCAL;
1046           enum FLAT;
1047           enum VLAN;
1048           enum VXLAN;
1049           enum GRE;
1050         }
1051       }
1052       leaf segmentation_id {
1053         description
1054             "ID of segregated virtual networks";
1055             type uint32;
1056       }
1057     }
1058   }
1059
1060   grouping monitoring-param {
1061     list http-endpoint {
1062       description
1063           "List of http endpoints to be used by monitoring params";
1064       key path;
1065
1066       leaf path {
1067         description "The HTTP path on the management server";
1068         type string;
1069       }
1070
1071       leaf https {
1072         description "Pick HTTPS instead of HTTP , Default is false";
1073         type boolean;
1074         default "false";
1075       }
1076
1077       leaf port {
1078         description "The HTTP port to connect to";
1079         type inet:port-number;
1080       }
1081
1082       leaf username {
1083         description "The HTTP basic auth username";
1084         type string;
1085       }
1086
1087       leaf password {
1088         description "The HTTP basic auth password";
1089         type string;
1090       }
1091
1092       leaf polling-interval-secs {
1093         description "The HTTP polling interval in seconds";
1094         type uint8;
1095         default 2;
1096       }
1097
1098       leaf method {
1099         description
1100           "Method that the URI should perform.
1101            Deafult action is GET.";
1102
1103         type manotypes:http-method;
1104         default "GET";
1105       }
1106
1107       list headers {
1108         description "Custom HTTP headers to put on HTTP request";
1109         key key;
1110         leaf key{
1111           description "HTTP header key";
1112           type string;
1113         }
1114
1115         leaf value{
1116           description "HTTP header value";
1117           type string;
1118         }
1119       }
1120     }
1121
1122     list monitoring-param {
1123       description
1124           "List of monitoring parameters at the network service level";
1125       key id;
1126       leaf id {
1127         type string;
1128       }
1129
1130       leaf name {
1131         type string;
1132       }
1133
1134       leaf http-endpoint-ref {
1135         // TODO (Philip): Fix this
1136         // type leafref {
1137         //   path "../../http-endpoint/path";
1138         // }
1139         type string;
1140       }
1141
1142       leaf json-query-method {
1143         type json-query-method;
1144         default "NAMEKEY";
1145       }
1146
1147       container json-query-params {
1148         leaf json-path {
1149           description
1150             "The jsonpath to use to extract value from JSON structure";
1151           type string;
1152         }
1153         leaf object-path {
1154           description
1155             "The objectpath to use to extract value from JSON structure";
1156           type string;
1157         }
1158       }
1159
1160       uses monitoring-param-ui-data;
1161       uses monitoring-param-value;
1162
1163     }
1164   }
1165
1166   grouping monitoring-param-aggregation {
1167     typedef aggregation-type {
1168       description "aggregation-type";
1169       type enumeration {
1170         enum AVERAGE;
1171         enum MINIMUM;
1172         enum MAXIMUM;
1173         enum COUNT;
1174         enum SUM;
1175       }
1176     }
1177
1178     leaf aggregation-type {
1179       type aggregation-type;
1180     }
1181   }
1182
1183   grouping monitoring-param-ui-data {
1184       leaf description {
1185         type string;
1186       }
1187
1188       leaf group-tag {
1189         description "A tag to group monitoring parameters";
1190         type string;
1191       }
1192
1193
1194       leaf widget-type {
1195         description "Defines the UI Display variant of measured counters.";
1196         type manotypes:widget-type;
1197       }
1198
1199       leaf units {
1200         description "Measured Counter Units (e.g., Packets, Kbps, Mbps, etc.)";
1201         type string;
1202       }
1203   }
1204
1205   grouping monitoring-param-value {
1206       leaf value-type {
1207         type param-value-type;
1208         default "INT";
1209       }
1210
1211       container numeric-constraints {
1212         leaf min-value {
1213           description
1214               "Minimum value for the parameter";
1215           type uint64;
1216         }
1217         leaf max-value {
1218           description
1219               "Maximum value for the parameter";
1220           type uint64;
1221         }
1222       }
1223
1224       container text-constraints {
1225         leaf min-length {
1226           description
1227               "Minimum string length for the parameter";
1228           type uint8;
1229         }
1230         leaf max-length {
1231           description
1232               "Maximum string length for the parameter";
1233           type uint8;
1234         }
1235       }
1236
1237       leaf value-integer {
1238         description
1239             "Current value for an integer parameter";
1240         type int64;
1241       }
1242
1243       leaf value-decimal {
1244         description
1245             "Current value for a decimal parameter";
1246         type decimal64 {
1247           fraction-digits 4;
1248         }
1249       }
1250
1251       leaf value-string {
1252         description
1253             "Current value for a string parameter";
1254         type string;
1255       }
1256   }
1257
1258   grouping control-param {
1259     list control-param {
1260       description
1261           "List of control parameters to manage and
1262            update the running configuration of the VNF";
1263       key id;
1264
1265       leaf id {
1266         type string;
1267       }
1268
1269       leaf name {
1270         type string;
1271       }
1272
1273       leaf description {
1274         type string;
1275       }
1276
1277       leaf group-tag {
1278         description "A tag to group control parameters";
1279         type string;
1280       }
1281
1282       leaf min-value {
1283         description
1284             "Minimum value for the parameter";
1285         type uint64;
1286       }
1287
1288       leaf max-value {
1289         description
1290             "Maximum value for the parameter";
1291         type uint64;
1292       }
1293
1294       leaf current-value {
1295         description
1296             "Current value for the parameter";
1297         type uint64;
1298       }
1299
1300       leaf step-value {
1301         description
1302             "Step value for the parameter";
1303         type uint64;
1304       }
1305
1306       leaf units {
1307         type string;
1308       }
1309
1310       leaf widget-type {
1311         type manotypes:widget-type;
1312       }
1313
1314       leaf url {
1315         description
1316           "This is the URL where the operation should be performed.";
1317
1318         type inet:uri;
1319       }
1320
1321       leaf method {
1322         description
1323           "Method that the URI should perform.
1324            Default Action is POST";
1325
1326         type manotypes:http-method;
1327         default "POST";
1328       }
1329
1330       leaf payload {
1331         description
1332           "This is the operation payload or payload template as stringified
1333            JSON. This field provides the data  to be sent for this operation
1334            call";
1335
1336         type string;
1337       }
1338     }
1339   }
1340
1341   grouping action-param {
1342     list action-param {
1343       description
1344           "List of action parameters to
1345            control VNF";
1346       key id;
1347       leaf id {
1348         type string;
1349       }
1350
1351       leaf name {
1352         type string;
1353       }
1354
1355       leaf description {
1356         type string;
1357       }
1358
1359       leaf group-tag {
1360         description "A tag to group monitoring parameter";
1361         type string;
1362       }
1363
1364       leaf url {
1365         description
1366           "This is the URL where to perform the operation";
1367         type inet:uri;
1368       }
1369
1370       leaf method {
1371         description
1372           "This is the method to be performed at the uri.
1373            POST by default for action";
1374
1375         type manotypes:http-method;
1376         default "POST";
1377       }
1378
1379       leaf payload {
1380         description
1381           "This is the operation payload or payload template to be sent in
1382            the data for this operation call";
1383
1384         type string;
1385       }
1386     }
1387   }
1388
1389   grouping input-parameter {
1390     description "List of input parameters that can be specified when instantiating a network service.";
1391
1392     list input-parameter {
1393       description
1394           "List of input parameters";
1395
1396       key xpath;
1397
1398
1399       leaf xpath {
1400         description
1401           "An xpath that specfies which element in a descriptor is to be
1402           modified.";
1403         type string;
1404       }
1405
1406       leaf value {
1407         description
1408           "The value that the element specified by the xpath should take when a
1409           record is created.";
1410         type string;
1411       }
1412     }
1413   }
1414
1415   grouping input-parameter-xpath {
1416     list input-parameter-xpath {
1417       description
1418           "List of xpaths to parameters inside the NSD
1419            the can be customized during the instantiation.";
1420
1421       key "xpath";
1422       leaf xpath {
1423         description
1424             "An xpath that specifies the element in a descriptor.";
1425         type string;
1426       }
1427
1428       leaf label {
1429         description "A descriptive string";
1430         type string;
1431       }
1432
1433       leaf default-value {
1434         description "/nsd:nsd-catalog/nsd:nsd/nsd:vendor";
1435         type string;
1436       }
1437     }
1438   }
1439
1440   grouping nfvi-metrics {
1441     container vcpu {
1442       leaf label {
1443         description
1444           "Label to show in UI";
1445         type string;
1446         default "VCPU";
1447       }
1448
1449       leaf total {
1450         description
1451           "The total number of VCPUs available.";
1452         type uint64;
1453       }
1454
1455       leaf utilization {
1456         description
1457           "The VCPU utilization (percentage).";
1458         type decimal64 {
1459           fraction-digits 2;
1460           range "0 .. 100";
1461         }
1462       }
1463     }
1464
1465     container memory {
1466       leaf label {
1467         description
1468           "Label to show in UI";
1469         type string;
1470         default "MEMORY";
1471       }
1472
1473       leaf used {
1474         description
1475           "The amount of memory (bytes) currently in use.";
1476         type uint64;
1477       }
1478
1479       leaf total {
1480         description
1481           "The amount of memory (bytes) available.";
1482         type uint64;
1483       }
1484
1485       leaf utilization {
1486         description
1487           "The memory utilization (percentage).";
1488         type decimal64 {
1489           fraction-digits 2;
1490           range "0 .. 100";
1491         }
1492       }
1493     }
1494
1495     container storage {
1496       leaf label {
1497         description
1498           "Label to show in UI";
1499         type string;
1500         default "STORAGE";
1501       }
1502
1503       leaf used {
1504         description
1505           "The amount of storage (bytes) currently in use.";
1506         type uint64;
1507       }
1508
1509       leaf total {
1510         description
1511           "The amount of storage (bytes) available.";
1512         type uint64;
1513       }
1514
1515       leaf utilization {
1516         description
1517           "The storage utilization (percentage).";
1518         type decimal64 {
1519           fraction-digits 2;
1520           range "0 .. 100";
1521         }
1522       }
1523     }
1524
1525     container external-ports {
1526       leaf label {
1527         description
1528           "Label to show in UI";
1529         type string;
1530         default "EXTERNAL PORTS";
1531       }
1532
1533       leaf total {
1534         description
1535           "The total number of external ports.";
1536         type uint64;
1537       }
1538     }
1539
1540     container internal-ports {
1541       leaf label {
1542         description
1543           "Label to show in UI";
1544         type string;
1545         default "INTERNAL PORTS";
1546       }
1547
1548       leaf total {
1549         description
1550           "The total number of internal ports.";
1551         type uint64;
1552       }
1553     }
1554
1555     container network {
1556       leaf label {
1557         description
1558           "Label to show in UI";
1559         type string;
1560         default "NETWORK TRAFFIC";
1561       }
1562
1563       container incoming {
1564         leaf label {
1565           description
1566             "Label to show in UI";
1567           type string;
1568           default "INCOMING NETWORK TRAFFIC";
1569         }
1570
1571         leaf bytes {
1572           description
1573             "The cumulative number of incoming bytes.";
1574           type uint64;
1575         }
1576
1577         leaf packets {
1578           description
1579             "The cumulative number of incoming packets.";
1580           type uint64;
1581         }
1582
1583         leaf byte-rate {
1584           description
1585             "The current incoming byte-rate (bytes per second).";
1586           type decimal64 {
1587             fraction-digits 2;
1588           }
1589         }
1590
1591         leaf packet-rate {
1592           description
1593             "The current incoming packet (packets per second).";
1594           type decimal64 {
1595             fraction-digits 2;
1596           }
1597         }
1598       }
1599
1600       container outgoing {
1601         leaf label {
1602           description
1603             "Label to show in UI";
1604           type string;
1605           default "OUTGOING NETWORK TRAFFIC";
1606         }
1607
1608         leaf bytes {
1609           description
1610             "The cumulative number of outgoing bytes.";
1611           type uint64;
1612         }
1613
1614         leaf packets {
1615           description
1616             "The cumulative number of outgoing packets.";
1617           type uint64;
1618         }
1619
1620         leaf byte-rate {
1621           description
1622             "The current outgoing byte-rate (bytes per second).";
1623           type decimal64 {
1624             fraction-digits 2;
1625           }
1626         }
1627
1628         leaf packet-rate {
1629           description
1630             "The current outgoing packet (packets per second).";
1631           type decimal64 {
1632             fraction-digits 2;
1633           }
1634         }
1635       }
1636     }
1637   }
1638
1639   typedef alarm-severity-type {
1640     description "An indication of the importance or urgency of the alarm";
1641     type enumeration {
1642       enum LOW;
1643       enum MODERATE;
1644       enum CRITICAL;
1645     }
1646   }
1647
1648   typedef alarm-metric-type {
1649     description "The type of metrics to register the alarm for";
1650     type enumeration {
1651       enum CPU_UTILIZATION;
1652       enum MEMORY_UTILIZATION;
1653       enum STORAGE_UTILIZATION;
1654     }
1655   }
1656
1657   typedef alarm-statistic-type {
1658     description
1659         "Statistic type to use to determine threshold crossing
1660          for an alarm.";
1661     type enumeration {
1662       enum AVERAGE;
1663       enum MINIMUM;
1664       enum MAXIMUM;
1665       enum COUNT;
1666       enum SUM;
1667     }
1668   }
1669
1670   typedef alarm-operation-type {
1671     description
1672         "The relational operator used to define whether an alarm
1673         should be triggered in certain scenarios, such as if the
1674         metric statistic goes above or below a specified value.";
1675     type enumeration {
1676       enum GE; // greater than or equal
1677       enum LE; // less than or equal
1678       enum GT; // greater than
1679       enum LT; // less than
1680       enum EQ; // equal
1681     }
1682   }
1683
1684   grouping alarm {
1685     leaf alarm-id {
1686       description
1687           "This field is reserved for the identifier assigned by the VIM provider";
1688
1689       type string;
1690     }
1691
1692     leaf name {
1693       description "A human readable string to identify the alarm";
1694       type string;
1695     }
1696
1697     leaf description {
1698       description "A description of this alarm";
1699       type string;
1700     }
1701
1702     leaf vdur-id {
1703       description
1704           "The identifier of the VDUR that the alarm is associated with";
1705       type string;
1706     }
1707
1708     container actions {
1709       list ok {
1710         key "url";
1711         leaf url {
1712           type string;
1713         }
1714       }
1715
1716       list insufficient-data {
1717         key "url";
1718         leaf url {
1719           type string;
1720         }
1721       }
1722
1723       list alarm {
1724         key "url";
1725         leaf url {
1726           type string;
1727         }
1728       }
1729     }
1730
1731     leaf repeat {
1732       description
1733           "This flag indicates whether the alarm should be repeatedly emitted
1734           while the associated threshold has been crossed.";
1735
1736       type boolean;
1737       default true;
1738     }
1739
1740     leaf enabled {
1741       description
1742           "This flag indicates whether the alarm has been enabled or
1743           disabled.";
1744
1745       type boolean;
1746       default true;
1747     }
1748
1749     leaf severity {
1750       description "A measure of the importance or urgency of the alarm";
1751       type alarm-severity-type;
1752     }
1753
1754     leaf metric {
1755       description "The metric to be tracked by this alarm.";
1756       type alarm-metric-type;
1757     }
1758
1759     leaf statistic {
1760       description "The type of metric statistic that is tracked by this alarm";
1761       type alarm-statistic-type;
1762     }
1763
1764     leaf operation {
1765       description
1766           "The relational operator used to define whether an alarm should be
1767            triggered in certain scenarios, such as if the metric statistic 
1768            goes above or below a specified value.";
1769       type alarm-operation-type;
1770     }
1771
1772     leaf value {
1773       description
1774           "This value defines the threshold that, if crossed, will trigger
1775           the alarm.";
1776       type decimal64 {
1777         fraction-digits 4;
1778       }
1779     }
1780
1781     leaf period {
1782       description
1783           "The period defines the length of time (seconds) that the metric
1784           data are collected over in oreder to evaluate the chosen
1785           statistic.";
1786       type uint32;
1787     }
1788
1789     leaf evaluations {
1790       description
1791           "Defines the length of time (seconds) in which metric data are
1792            collected in order to evaluate the chosen statistic.";
1793       type uint32;
1794     }
1795   }
1796
1797   typedef cloud-account-type {
1798     description "VIM account type";
1799     type enumeration {
1800       enum aws;
1801       enum cloudsim;
1802       enum cloudsim_proxy;
1803       enum mock;
1804       enum openmano;
1805       enum openstack;
1806       enum vsphere;
1807       enum openvim;
1808     }
1809   }
1810   
1811   grouping host-aggregate {
1812     list host-aggregate {
1813       description "Name of the Host Aggregate";
1814       key "metadata-key";
1815       
1816       leaf metadata-key {
1817         description
1818             "Name of the additional information attached to the host-aggregate";
1819         type string;
1820       }
1821       leaf metadata-value {
1822         description
1823             "Value of the corresponding metadata-key";
1824         type string;
1825       }
1826     }
1827   }
1828   
1829   grouping placement-group-input {
1830     leaf cloud-type {
1831       type manotypes:cloud-account-type;
1832     }
1833     choice cloud-provider {
1834       case openstack {           
1835         container availability-zone {
1836           description "Name of the Availability Zone";
1837           leaf name {
1838             type string;
1839           }
1840         }
1841         container server-group {
1842           description "Name of the Affinity/Anti-Affinity Server Group";
1843           leaf name {
1844             type string;
1845           }
1846         }
1847         uses host-aggregate;
1848       }
1849       case aws {
1850         leaf aws-construct {
1851           type empty;
1852         }
1853       }
1854       case openmano {
1855         leaf openmano-construct {
1856           type empty;
1857         }        
1858       }
1859       case vsphere {
1860         leaf vsphere-construct {
1861           type empty;
1862         }
1863       }
1864       case mock {
1865         leaf mock-construct {
1866           type empty;
1867         }
1868       }
1869       case cloudsim {
1870         leaf cloudsim-construct {
1871           type empty;
1872         }
1873       }
1874     }
1875   }
1876   
1877   grouping placement-group-info {
1878     description "";
1879
1880     leaf name {
1881       description
1882           "Place group construct to define the compute resource placement strategy
1883            in cloud environment";
1884       type string;
1885     }
1886
1887     leaf requirement {
1888       description "This is free text space used to describe the intent/rationale
1889                    behind this placement group. This is for human consumption only";
1890       type string;
1891     }
1892     
1893     leaf strategy {
1894       description
1895           "Strategy associated with this placement group
1896              Following values are possible
1897                - COLOCATION: Colocation strategy imply intent to share the physical
1898                              infrastructure (hypervisor/network) among all members
1899                              of this group.
1900                - ISOLATION: Isolation strategy imply intent to not share the physical
1901                             infrastructure (hypervisor/network) among the members
1902                             of this group.
1903              ";
1904       type enumeration {
1905         enum COLOCATION;
1906         enum ISOLATION;
1907       }
1908       default "COLOCATION";
1909     }
1910   }
1911
1912   grouping ip-profile-info {
1913     description "Grouping for IP-Profile";
1914     container ip-profile-params {
1915       
1916       leaf ip-version {
1917         type inet:ip-version;
1918         default ipv4;
1919       }
1920
1921       leaf subnet-address {
1922         description "Subnet IP prefix associated with IP Profile";
1923         type inet:ip-prefix;
1924       }
1925
1926       leaf gateway-address {
1927         description "IP Address of the default gateway associated with IP Profile";
1928         type inet:ip-address;
1929       }
1930
1931       leaf security-group {
1932         description "Name of the security group";
1933         type string;
1934       }
1935
1936       list dns-server {
1937         key "address";
1938         leaf address {
1939                                         description "List of DNS Servers associated with IP Profile";
1940                                         type inet:ip-address;
1941         }
1942       }
1943
1944       container dhcp-params {  
1945         leaf enabled {
1946           description "This flag indicates if DHCP is enabled or not";
1947           type boolean;
1948           default true;
1949         }
1950
1951         leaf start-address {
1952           description "Start IP address of the IP-Address range associated with DHCP domain";
1953           type inet:ip-address;
1954         }
1955
1956         leaf count {
1957           description "Size of the DHCP pool associated with DHCP domain";
1958           type uint32;
1959         }
1960       }
1961
1962       leaf subnet-prefix-pool {
1963         description "VIM Specific reference to pre-created subnet prefix";
1964         type string;
1965       }
1966     }
1967   }
1968
1969   grouping ip-profile-list {
1970     list ip-profiles {
1971       description
1972           "List of IP Profiles.
1973              IP Profile describes the IP characteristics for the Virtual-Link";
1974     
1975       key "name";
1976
1977       leaf name {
1978         description "Name of the IP-Profile";
1979         type string;
1980       }
1981       
1982       leaf description {
1983         description "Description for IP profile";
1984         type string;
1985       }
1986       
1987       uses ip-profile-info;
1988     }
1989   }
1990
1991   grouping config-file {
1992     description "Grouping for files needed to be mounted into an additional drive";
1993     list config-file {
1994       description
1995           "List of configuration files to be written on an additional drive";
1996       key "source";
1997       leaf source {
1998         description "Name of the configuration file";
1999         type string;
2000       }
2001       leaf dest {
2002         description "Full path of the destination in the guest";
2003         type string;
2004       }
2005     }
2006   }
2007
2008   grouping supplemental-boot-data {
2009     description "Grouping for custom vim data";
2010     container supplemental-boot-data {
2011       uses manotypes:config-file;
2012       leaf boot-data-drive {
2013         description "Some VIMs implement additional drives to host config-files or meta-data";
2014         type boolean;
2015         default false;
2016       } 
2017     }
2018   }
2019
2020   grouping volume-info {
2021     description "Grouping for Volume-info";
2022
2023     leaf description {
2024       description "Description for Volume";
2025       type string;
2026     }
2027
2028     leaf size {
2029       description "Size of disk in GB";
2030       type uint64;
2031     }
2032
2033     choice volume-source {
2034       description
2035             "Defines the source of the volume. Possible options are
2036              1. Ephemeral -- Empty disk
2037              2. Image     -- Refer to image to be used for volume
2038              3. Volume    -- Reference of pre-existing volume to be used
2039             ";
2040
2041       case ephemeral {
2042         leaf ephemeral {
2043           type empty;
2044         }
2045       }
2046
2047       case image {
2048         uses image-properties;
2049       }
2050
2051     }
2052
2053     leaf device-bus {
2054       description "Type of disk-bus on which this disk is exposed to guest";
2055       type enumeration {
2056         enum ide;
2057         enum usb;
2058         enum virtio;
2059         enum scsi;
2060       }
2061     }
2062
2063     leaf device-type {
2064       description "The type of device as exposed to guest";
2065       type enumeration {
2066           enum disk;
2067           enum cdrom;
2068           enum floppy;
2069           enum lun;
2070       }
2071     }
2072
2073   }
2074
2075   grouping rpc-project-name {
2076     leaf project-name {
2077       mandatory true;
2078       description
2079         "Project to which this belongs";
2080       type leafref {
2081         path "/rw-project:project/rw-project:name";
2082       }
2083     }
2084   }
2085 }