deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@redhat.com
Subject [PATCH core 3/3] RHEV-M: Keep reporting the MAC addresses when ipv4 address is ready
Date Wed, 21 Nov 2012 11:15:52 GMT
From: Michal Fojtik <mfojtik@redhat.com>


Signed-off-by: Michal fojtik <mfojtik@redhat.com>
---
 server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 71db828..37e6622 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -244,13 +244,13 @@ class RhevmDriver < Deltacloud::BaseDriver
       ip = confserver_ip(inst.id)
       public_addresses = [ InstanceAddress.new(ip) ]
     end
-    # If IP retrieval failed, fallback to VNC and MAC address
-    if public_addresses.empty?
-      public_addresses = inst.interfaces.map { |interface| InstanceAddress.new(interface.mac,
:type => :mac) }
-    end
+
+    public_addresses += inst.interfaces.map { |interface| InstanceAddress.new(interface.mac,
:type => :mac) }
+
     if inst.vnc
       public_addresses << InstanceAddress.new(inst.vnc[:address], :port => inst.vnc[:port],
:type => :vnc)
     end
+
     Instance.new(
       :id => inst.id,
       :name => inst.name,
-- 
1.8.0


Mime
View raw message