From 863168467f14e33407c4bf9c7f790bcd4911aea3 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 2 Aug 2012 17:21:47 +0100 Subject: examples: Use add_drive_opts function in examples. In libguestfs 1.20, you will be able to use 'add_drive' instead of 'add_drive_opts' (except in the C bindings). However until libguestfs 1.20 is the minimum stable version people will still be using old versions where you have to use 'add_drive_opts'. This makes the examples confusing. Therefore continue to use 'add_drive_opts' in the examples for now. --- python/examples/create_disk.py | 2 +- python/examples/guestfs-python.pod | 2 +- python/examples/inspect_vm.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'python/examples') diff --git a/python/examples/create_disk.py b/python/examples/create_disk.py index a854c23f..86f50427 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 (output, format = "raw", readonly = 0) +g.add_drive_opts (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 59f60e57..e4406f55 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 ("disk.img", format="raw", readonly=1) + g.add_drive_opts ("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 816779cc..c491a2ce 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 (disk, readonly=1) +g.add_drive_opts (disk, readonly=1) # Run the libguestfs back-end. g.launch () -- cgit