diff options
| author | Richard W.M. Jones <rjones@redhat.com> | 2012-07-14 12:42:24 +0100 |
|---|---|---|
| committer | Richard W.M. Jones <rjones@redhat.com> | 2012-07-14 12:42:24 +0100 |
| commit | 7486fc6f43bdb22a989cc039e361afc4c0658d52 (patch) | |
| tree | eebbe3e0bb3ec8c79a1a60961f1d7c2ea96a28e1 /python | |
| parent | b48ae2eadf43315159f2174c8fd35b05ede14c0f (diff) | |
| download | libguestfs-7486fc6f43bdb22a989cc039e361afc4c0658d52.tar.gz libguestfs-7486fc6f43bdb22a989cc039e361afc4c0658d52.tar.xz libguestfs-7486fc6f43bdb22a989cc039e361afc4c0658d52.zip | |
generator: Rename 'add_drive_opts' API to 'add_drive'.
By using the once_had_no_optargs flag, this change is backwards
compatible for callers (except Haskell, PHP and GObject as discussed
in earlier commit).
Diffstat (limited to 'python')
| -rw-r--r-- | python/examples/create_disk.py | 2 | ||||
| -rw-r--r-- | python/examples/guestfs-python.pod | 2 | ||||
| -rw-r--r-- | python/examples/inspect_vm.py | 2 | ||||
| -rw-r--r-- | python/t/060-optargs.py | 6 | ||||
| -rw-r--r-- | python/t/rhbz811650.py | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/python/examples/create_disk.py b/python/examples/create_disk.py index 86f50427..a854c23f 100644 --- a/python/examples/create_disk.py +++ b/python/examples/create_disk.py @@ -16,7 +16,7 @@ f.close () g.set_trace (1) # Attach the disk image to libguestfs. -g.add_drive_opts (output, format = "raw", readonly = 0) +g.add_drive (output, format = "raw", readonly = 0) # Run the libguestfs back-end. g.launch () diff --git a/python/examples/guestfs-python.pod b/python/examples/guestfs-python.pod index e4406f55..59f60e57 100644 --- a/python/examples/guestfs-python.pod +++ b/python/examples/guestfs-python.pod @@ -8,7 +8,7 @@ guestfs-python - How to use libguestfs from Python import guestfs g = guestfs.GuestFS () - g.add_drive_opts ("disk.img", format="raw", readonly=1) + g.add_drive ("disk.img", format="raw", readonly=1) g.launch () =head1 DESCRIPTION diff --git a/python/examples/inspect_vm.py b/python/examples/inspect_vm.py index c491a2ce..816779cc 100644 --- a/python/examples/inspect_vm.py +++ b/python/examples/inspect_vm.py @@ -9,7 +9,7 @@ disk = sys.argv[1] g = guestfs.GuestFS () # Attach the disk image read-only to libguestfs. -g.add_drive_opts (disk, readonly=1) +g.add_drive (disk, readonly=1) # Run the libguestfs back-end. g.launch () diff --git a/python/t/060-optargs.py b/python/t/060-optargs.py index be28a3ce..ae2d934d 100644 --- a/python/t/060-optargs.py +++ b/python/t/060-optargs.py @@ -19,7 +19,7 @@ import os import guestfs g = guestfs.GuestFS() -g.add_drive_opts ("/dev/null") -g.add_drive_opts ("/dev/null", readonly = 1) -g.add_drive_opts ("/dev/null", iface = "virtio", format = "raw") +g.add_drive ("/dev/null") +g.add_drive ("/dev/null", readonly = 1) +g.add_drive ("/dev/null", iface = "virtio", format = "raw") g.close () diff --git a/python/t/rhbz811650.py b/python/t/rhbz811650.py index cf01673f..c84f094b 100644 --- a/python/t/rhbz811650.py +++ b/python/t/rhbz811650.py @@ -25,7 +25,7 @@ f.close () g = guestfs.GuestFS () # Deliberate error: the disk format is supposed to be raw. -g.add_drive_opts ("test.img", format="qcow2"); +g.add_drive ("test.img", format="qcow2"); # Because error() wasn't being called, guestfs_last_error would return # NULL, causing a segfault in the Python bindings (RHBZ#811650). |
