Possible Bug in Libvirt::StorageVol in ruby-libvirt?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Support Team
I want to kindly ask for help

I am running almalinux with the packages
libvirt
libvirt-devel
I installed the gem 'libvirt-ruby'

When running the following script the execution breaks with:
./libvirt-test.rb:25:in `name': Expected Connection object (ArgumentError)
from ./libvirt-test.rb:25:in `<main>'

#!/usr/bin/env ruby
require 'bundler/inline'

gemfile do
  source 'https://rubygems.org'
  gem 'ruby-libvirt'
end

require 'libvirt'

#Starts connection #works
conn = Libvirt::open()

# Lists all pools #works
pools = conn.list_all_storage_pools

# Saves all volumes of all pools #
volumes = pools.map {|p| p.list_all_volumes}.flatten

# Gets first volume
first_volume = volumes.first
puts volumes.first

#Breaks Should return the name of the volume as string
first_volume.name

#Breaks Should return the path of the volume as string
first_volume.path

--------------
Can someone confirm this issue?
Is there a possible fix or did I misread the documentation?
Thank you for your help

Regards
R. Koch




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux