1 /* libguestfs Java bindings
2 * Copyright (C) 2011 Red Hat Inc.
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 import java.util.HashMap;
21 import com.redhat.et.libguestfs.*;
23 public class GuestFS080OptArgs
25 public static void main (String[] argv)
28 GuestFS g = new GuestFS ();
30 g.add_drive_opts ("/dev/null", null);
32 HashMap<String,Object> optargs;
34 optargs = new HashMap<String,Object>() {
36 put ("readonly", Boolean.TRUE);
39 g.add_drive_opts ("/dev/null", optargs);
41 optargs = new HashMap<String,Object>() {
43 put ("readonly", Boolean.TRUE);
44 put ("format", "raw");
47 g.add_drive_opts ("/dev/null", optargs);
49 optargs = new HashMap<String,Object>() {
51 put ("readonly", Boolean.TRUE);
52 put ("format", "raw");
53 put ("iface", "virtio");
56 g.add_drive_opts ("/dev/null", optargs);
58 catch (Exception exn) {
59 System.err.println (exn);