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