diff --git a/lib/fog/libvirt/requests/compute/get_node_info.rb b/lib/fog/libvirt/requests/compute/get_node_info.rb index 6cff387f1..1d1d037da 100644 --- a/lib/fog/libvirt/requests/compute/get_node_info.rb +++ b/lib/fog/libvirt/requests/compute/get_node_info.rb @@ -12,10 +12,10 @@ module Fog node_hash[param] = client.send(param) rescue nil end node_hash[:uri] = client.uri - xml = client.sys_info + xml = client.sys_info rescue nil [:uuid, :manufacturer, :product, :serial].each do |attr| node_hash[attr] = node_attr(attr, xml) - end + end if xml node_hash[:hostname] = client.hostname [node_hash] diff --git a/lib/fog/libvirt/requests/compute/list_interfaces.rb b/lib/fog/libvirt/requests/compute/list_interfaces.rb index 2b1d1b21a..2af2ff6b4 100644 --- a/lib/fog/libvirt/requests/compute/list_interfaces.rb +++ b/lib/fog/libvirt/requests/compute/list_interfaces.rb @@ -5,7 +5,9 @@ module Fog def list_interfaces(filter = { }) data=[] if filter.keys.empty? - (client.list_interfaces + client.list_defined_interfaces).each do |ifname| + active_networks = client.list_interfaces rescue [] + defined_networks = client.list_defined_interfaces rescue [] + (active_networks + defined_networks).each do |ifname| data << interface_to_attributes(client.lookup_interface_by_name(ifname)) end else