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: Keep reporting the MAC addresses when ipv4 address is ready
Date Wed, 21 Nov 2012 13:25:25 GMT
RHEV-M: Keep reporting the MAC addresses when ipv4 address is ready


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

Branch: refs/heads/master
Commit: bb38e353f323e0897834ea24d716604822f65b08
Parents: e4d189d
Author: Michal Fojtik <mfojtik@redhat.com>
Authored: Wed Nov 21 12:14:05 2012 +0100
Committer: Michal fojtik <mfojtik@redhat.com>
Committed: Wed Nov 21 14:24:59 2012 +0100

----------------------------------------------------------------------
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/bb38e353/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 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,


Mime
View raw message