lib/vagrant-libvirt/action/destroy_networks.rb in vagrant-libvirt-0.0.30 vs lib/vagrant-libvirt/action/destroy_networks.rb in vagrant-libvirt-0.0.31

- old
+ new

@@ -34,11 +34,11 @@ file.readlines.each do |network_uuid| @logger.info "Checking for #{network_uuid}" # lookup_network_by_uuid throws same exception # if there is an error or if the network just doesn't exist begin - libvirt_network = env[:libvirt_compute].client.lookup_network_by_uuid( + libvirt_network = env[:machine].provider.driver.connection.client.lookup_network_by_uuid( network_uuid) rescue Libvirt::RetrieveError => e # this network is already destroyed, so move on if e.message =~ /Network not found/ @logger.info "It is already undefined" @@ -64,10 +64,10 @@ begin libvirt_network.destroy libvirt_network.undefine @logger.info "Undefined it" rescue => e - raise Error::DestroyNetworkError, + raise Errors::DestroyNetworkError, network_name: libvirt_network.name, error_message: e.message end end file.close