deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject [3/3] git commit: RHEV-M: Fixed incompatibilities with rbovirt gem when destroying an instance or getting IP addresses
Date Tue, 21 Feb 2012 12:00:31 GMT
RHEV-M: Fixed incompatibilities with rbovirt gem when destroying an instance or getting IP
addresses

Signed-off-by: Michal fojtik <mfojtik@redhat.com>


Project: http://git-wip-us.apache.org/repos/asf/deltacloud/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltacloud/commit/a9619069
Tree: http://git-wip-us.apache.org/repos/asf/deltacloud/tree/a9619069
Diff: http://git-wip-us.apache.org/repos/asf/deltacloud/diff/a9619069

Branch: refs/heads/master
Commit: a9619069345121fc9fb21b357854b5dd3235b138
Parents: e632156
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Feb 15 15:49:36 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Tue Feb 21 12:49:56 2012 +0100

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a9619069/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 4713321..7fa4c91 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -158,7 +158,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
   def destroy_instance(credentials, id)
     client = new_client(credentials)
     safely do
-      raise "ERROR: Operation start failed" unless client.vm_action(id, :delete)
+      raise "ERROR: Operation start failed" unless client.destroy_vm(id)
     end
   end
 
@@ -237,7 +237,8 @@ class RHEVMDriver < Deltacloud::BaseDriver
     public_addresses = []
     # First try to get IP address from RHEV-M. This require rhev-agent package
     # installed on guest
-    public_addresses << InstanceAddress.new(inst.ip) if inst.ip
+    public_addresses = inst.ips.map { |ip| InstanceAddress.new(ip, :type => :ipv4) } unless
inst.ips.empty?
+
     # ConfServer will overide the IP address returned by RHEV-M guest agent
     if ENV['CONFIG_SERVER_ADDRESS']
       ip = confserver_ip(inst.id)


Mime
View raw message