deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core] RHEV-M: Fixed incompatibilities with rbovirt gem when destroying an instance or getting IP addresses
Date Wed, 15 Feb 2012 14:49:36 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

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)
-- 
1.7.4.4


Mime
View raw message