2504b45edf2578b87ae9a27fc926691acd8d71c0
[libguestfs.git] / ocaml / guestfs.ml
1 (* libguestfs generated file
2  * WARNING: THIS FILE IS GENERATED BY 'src/generator.ml'.
3  * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
4  *
5  * Copyright (C) 2009 Red Hat Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Lesser General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public
18  * License along with this library; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20  *)
21
22 type t
23 exception Error of string
24 external create : unit -> t = "ocaml_guestfs_create"
25 external close : t -> unit = "ocaml_guestfs_close"
26
27 let () =
28   Callback.register_exception "ocaml_guestfs_error" (Error "")
29
30 type lvm_pv = {
31   pv_name : string;
32   pv_uuid : string;
33   pv_fmt : string;
34   pv_size : int64;
35   dev_size : int64;
36   pv_free : int64;
37   pv_used : int64;
38   pv_attr : string;
39   pv_pe_count : int64;
40   pv_pe_alloc_count : int64;
41   pv_tags : string;
42   pe_start : int64;
43   pv_mda_count : int64;
44   pv_mda_free : int64;
45 }
46
47 type lvm_vg = {
48   vg_name : string;
49   vg_uuid : string;
50   vg_fmt : string;
51   vg_attr : string;
52   vg_size : int64;
53   vg_free : int64;
54   vg_sysid : string;
55   vg_extent_size : int64;
56   vg_extent_count : int64;
57   vg_free_count : int64;
58   max_lv : int64;
59   max_pv : int64;
60   pv_count : int64;
61   lv_count : int64;
62   snap_count : int64;
63   vg_seqno : int64;
64   vg_tags : string;
65   vg_mda_count : int64;
66   vg_mda_free : int64;
67 }
68
69 type lvm_lv = {
70   lv_name : string;
71   lv_uuid : string;
72   lv_attr : string;
73   lv_major : int64;
74   lv_minor : int64;
75   lv_kernel_major : int64;
76   lv_kernel_minor : int64;
77   lv_size : int64;
78   seg_count : int64;
79   origin : string;
80   snap_percent : float option;
81   copy_percent : float option;
82   move_pv : string;
83   lv_tags : string;
84   mirror_log : string;
85   modules : string;
86 }
87
88 external launch : t -> unit = "ocaml_guestfs_launch"
89 external wait_ready : t -> unit = "ocaml_guestfs_wait_ready"
90 external kill_subprocess : t -> unit = "ocaml_guestfs_kill_subprocess"
91 external add_drive : t -> string -> unit = "ocaml_guestfs_add_drive"
92 external add_cdrom : t -> string -> unit = "ocaml_guestfs_add_cdrom"
93 external config : t -> string -> string option -> unit = "ocaml_guestfs_config"
94 external set_path : t -> string -> unit = "ocaml_guestfs_set_path"
95 external get_path : t -> string = "ocaml_guestfs_get_path"
96 external set_autosync : t -> bool -> unit = "ocaml_guestfs_set_autosync"
97 external get_autosync : t -> bool = "ocaml_guestfs_get_autosync"
98 external set_verbose : t -> bool -> unit = "ocaml_guestfs_set_verbose"
99 external get_verbose : t -> bool = "ocaml_guestfs_get_verbose"
100 external mount : t -> string -> string -> unit = "ocaml_guestfs_mount"
101 external sync : t -> unit = "ocaml_guestfs_sync"
102 external touch : t -> string -> unit = "ocaml_guestfs_touch"
103 external cat : t -> string -> string = "ocaml_guestfs_cat"
104 external ll : t -> string -> string = "ocaml_guestfs_ll"
105 external ls : t -> string -> string array = "ocaml_guestfs_ls"
106 external list_devices : t -> string array = "ocaml_guestfs_list_devices"
107 external list_partitions : t -> string array = "ocaml_guestfs_list_partitions"
108 external pvs : t -> string array = "ocaml_guestfs_pvs"
109 external vgs : t -> string array = "ocaml_guestfs_vgs"
110 external lvs : t -> string array = "ocaml_guestfs_lvs"
111 external pvs_full : t -> lvm_pv array = "ocaml_guestfs_pvs_full"
112 external vgs_full : t -> lvm_vg array = "ocaml_guestfs_vgs_full"
113 external lvs_full : t -> lvm_lv array = "ocaml_guestfs_lvs_full"
114 external read_lines : t -> string -> string array = "ocaml_guestfs_read_lines"