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 /ruby | |
| 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 'ruby')
| -rw-r--r-- | ruby/examples/create_disk.rb | 2 | ||||
| -rw-r--r-- | ruby/examples/guestfs-ruby.pod | 4 | ||||
| -rw-r--r-- | ruby/examples/inspect_vm.rb | 2 | ||||
| -rw-r--r-- | ruby/tests/tc_060_optargs.rb | 10 |
4 files changed, 9 insertions, 9 deletions
diff --git a/ruby/examples/create_disk.rb b/ruby/examples/create_disk.rb index 32fb1171..fd6ec01e 100644 --- a/ruby/examples/create_disk.rb +++ b/ruby/examples/create_disk.rb @@ -15,7 +15,7 @@ File.open(output, "w") { g.set_trace(1) # Attach the disk image to libguestfs. -g.add_drive_opts(output, :format => "raw") +g.add_drive(output, :format => "raw") # Run the libguestfs back-end. g.launch(); diff --git a/ruby/examples/guestfs-ruby.pod b/ruby/examples/guestfs-ruby.pod index 1af133de..4b53d018 100644 --- a/ruby/examples/guestfs-ruby.pod +++ b/ruby/examples/guestfs-ruby.pod @@ -8,8 +8,8 @@ guestfs-ruby - How to use libguestfs from Ruby require 'guestfs' g = Guestfs::Guestfs.new() - g.add_drive_opts("disk.img", - :readonly => 1, :format => "raw") + g.add_drive("disk.img", + :readonly => 1, :format => "raw") g.launch() =head1 DESCRIPTION diff --git a/ruby/examples/inspect_vm.rb b/ruby/examples/inspect_vm.rb index abf22790..c29114ea 100644 --- a/ruby/examples/inspect_vm.rb +++ b/ruby/examples/inspect_vm.rb @@ -11,7 +11,7 @@ disk = ARGV[0] g = Guestfs::Guestfs.new() # 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/ruby/tests/tc_060_optargs.rb b/ruby/tests/tc_060_optargs.rb index de411d6f..6556bc7f 100644 --- a/ruby/tests/tc_060_optargs.rb +++ b/ruby/tests/tc_060_optargs.rb @@ -24,10 +24,10 @@ class TestLoad < Test::Unit::TestCase def test_optargs g = Guestfs::create() - g.add_drive_opts("/dev/null", {}) - g.add_drive_opts("/dev/null", :readonly => 1) - g.add_drive_opts("/dev/null", :readonly => 1, :iface => "virtio") - g.add_drive_opts("/dev/null", - :readonly => 1, :iface => "virtio", :format => "qcow2") + g.add_drive("/dev/null", {}) + g.add_drive("/dev/null", :readonly => 1) + g.add_drive("/dev/null", :readonly => 1, :iface => "virtio") + g.add_drive("/dev/null", + :readonly => 1, :iface => "virtio", :format => "qcow2") end end |
