incubator-deltacloud-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfoj...@apache.org
Subject svn commit: r1157027 - /incubator/deltacloud/trunk/server/server.rb
Date Fri, 12 Aug 2011 10:00:16 GMT
Author: mfojtik
Date: Fri Aug 12 10:00:16 2011
New Revision: 1157027

URL: http://svn.apache.org/viewvc?rev=1157027&view=rev
Log:
Fixed realms loading when creating a new instance and realm_id is not set

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

Modified:
    incubator/deltacloud/trunk/server/server.rb

Modified: incubator/deltacloud/trunk/server/server.rb
URL: http://svn.apache.org/viewvc/incubator/deltacloud/trunk/server/server.rb?rev=1157027&r1=1157026&r2=1157027&view=diff
==============================================================================
--- incubator/deltacloud/trunk/server/server.rb (original)
+++ incubator/deltacloud/trunk/server/server.rb Fri Aug 12 10:00:16 2011
@@ -395,8 +395,8 @@ END
       @instance = Instance.new( { :id=>params[:id], :image_id=>params[:image_id] }
)
       @image   = Image.new( :id => params[:image_id] )
       @hardware_profiles = driver.hardware_profiles(credentials, :architecture => @image.architecture
)
-      @realms = Realm.new(:id => params[:realm_id]) if params[:realm_id]
-      @realms ||= []
+      @realms = [Realm.new(:id => params[:realm_id])] if params[:realm_id]
+      @realms ||= driver.realms(credentials)
       @keys = driver.keys(credentials) if driver_has_feature?(:authentication_key)
       @firewalls = driver.firewalls(credentials) if driver_has_feature?(:firewalls)
       respond_to do |format|



Mime
View raw message