ba750368ff50d30e2ad93dc7206b8fcf95e0c09b
[libguestfs.git] / ocaml / guestfs.mli
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 (** For API documentation you should refer to the C API
23     in the guestfs(3) manual page.  The OCaml API uses almost
24     exactly the same calls. *)
25
26 type t
27 (** A [guestfs_h] handle. *)
28
29 exception Error of string
30 (** This exception is raised when there is an error. *)
31
32 val create : unit -> t
33
34 val close : t -> unit
35 (** Handles are closed by the garbage collector when they become
36     unreferenced, but callers can also call this in order to
37     provide predictable cleanup. *)
38
39 val launch : t -> unit
40 val wait_ready : t -> unit
41 val kill_subprocess : t -> unit
42
43 val add_drive : t -> string -> unit
44 val add_cdrom : t -> string -> unit
45 val config : t -> string -> string option -> unit
46
47 val set_path : t -> string option -> unit
48 val get_path : t -> string
49 val set_autosync : t -> bool -> unit
50 val get_autosync : t -> bool
51 val set_verbose : t -> bool -> unit
52 val get_verbose : t -> bool
53
54 type lvm_pv = {
55   pv_name : string;
56   pv_uuid : string;
57   pv_fmt : string;
58   pv_size : int64;
59   dev_size : int64;
60   pv_free : int64;
61   pv_used : int64;
62   pv_attr : string;
63   pv_pe_count : int64;
64   pv_pe_alloc_count : int64;
65   pv_tags : string;
66   pe_start : int64;
67   pv_mda_count : int64;
68   pv_mda_free : int64;
69 }
70
71 type lvm_vg = {
72   vg_name : string;
73   vg_uuid : string;
74   vg_fmt : string;
75   vg_attr : string;
76   vg_size : int64;
77   vg_free : int64;
78   vg_sysid : string;
79   vg_extent_size : int64;
80   vg_extent_count : int64;
81   vg_free_count : int64;
82   max_lv : int64;
83   max_pv : int64;
84   pv_count : int64;
85   lv_count : int64;
86   snap_count : int64;
87   vg_seqno : int64;
88   vg_tags : string;
89   vg_mda_count : int64;
90   vg_mda_free : int64;
91 }
92
93 type lvm_lv = {
94   lv_name : string;
95   lv_uuid : string;
96   lv_attr : string;
97   lv_major : int64;
98   lv_minor : int64;
99   lv_kernel_major : int64;
100   lv_kernel_minor : int64;
101   lv_size : int64;
102   seg_count : int64;
103   origin : string;
104   snap_percent : float option;
105   copy_percent : float option;
106   move_pv : string;
107   lv_tags : string;
108   mirror_log : string;
109   modules : string;
110 }
111
112 val cat : t -> string -> string
113 (** list the contents of a file *)
114
115 val list_devices : t -> string list
116 (** list the block devices *)
117
118 val list_partitions : t -> string list
119 (** list the partitions *)
120
121 val ll : t -> string -> string
122 (** list the files in a directory (long format) *)
123
124 val ls : t -> string -> string list
125 (** list the files in a directory *)
126
127 val lvs : t -> string list
128 (** list the LVM logical volumes (LVs) *)
129
130 val lvs_full : t -> lvm_lv list
131 (** list the LVM logical volumes (LVs) *)
132
133 val mount : t -> string -> string -> unit
134 (** mount a guest disk at a position in the filesystem *)
135
136 val pvs : t -> string list
137 (** list the LVM physical volumes (PVs) *)
138
139 val pvs_full : t -> lvm_pv list
140 (** list the LVM physical volumes (PVs) *)
141
142 val sync : t -> unit
143 (** sync disks, writes are flushed through to the disk image *)
144
145 val touch : t -> string -> unit
146 (** update file timestamps or create a new file *)
147
148 val vgs : t -> string list
149 (** list the LVM volume groups (VGs) *)
150
151 val vgs_full : t -> lvm_vg list
152 (** list the LVM volume groups (VGs) *)
153