You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltacloud.apache.org by ma...@apache.org on 2013/01/17 17:15:49 UTC

git commit: Fix for DTACLOUD-419 - Typos in Intance model to_hash

Updated Branches:
  refs/heads/master 599df2fc4 -> a75ed47a6


Fix for DTACLOUD-419 - Typos in Intance model to_hash

https://issues.apache.org/jira/browse/DTACLOUD-419


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

Branch: refs/heads/master
Commit: a75ed47a6746deacf21a8cc53d34aa5ed30e4671
Parents: 599df2f
Author: marios <ma...@redhat.com>
Authored: Wed Jan 16 18:07:11 2013 +0200
Committer: marios <ma...@redhat.com>
Committed: Wed Jan 16 18:07:11 2013 +0200

----------------------------------------------------------------------
 server/lib/deltacloud/models/instance.rb |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltacloud/blob/a75ed47a/server/lib/deltacloud/models/instance.rb
----------------------------------------------------------------------
diff --git a/server/lib/deltacloud/models/instance.rb b/server/lib/deltacloud/models/instance.rb
index fcfe092..8396529 100644
--- a/server/lib/deltacloud/models/instance.rb
+++ b/server/lib/deltacloud/models/instance.rb
@@ -64,15 +64,15 @@ class Instance < BaseModel
     }
     r.merge!(:launch_time => launch_time)
     r.merge!(:create_image => create_image) if create_image
-    r.merge!(:firewalls => firewalls.map { |f| { :id => f.id, :href => context.firewall_url(f.id), :rel => :firewall }}) if firewalls
+    r.merge!(:firewalls => firewalls.map { |f| { :id => f, :href => context.firewall_url(f), :rel => :firewall }}) if firewalls
     if storage_volumes
-      r.merge!(:storage_volumes => storage_volumes.map { |f| { :id => f.id, :href => context.storage_volume_url(f.id), :rel => :storage_volume }})
+      r.merge!(:storage_volumes => storage_volumes.map { |v| { :id => v.keys.first, :href => context.storage_volume_url(v.keys.first), :rel => :storage_volume }})
     end
     if context.driver.class.has_feature?(:instances, :authentication_key)
       r.merge!(:authentication => { :keyname => keyname }) if keyname
     end
     if context.driver.class.has_feature?(:instances, :authentication_password)
-      r.merge!(:authentication => { :user => username, :password => password }) if user
+      r.merge!(:authentication => { :user => username, :password => password }) if username
     end
     r
   end