Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fix for DTACLOUD-419 - Typos in Intance model to_hash

  • Loading branch information...
commit a75ed47a6746deacf21a8cc53d34aa5ed30e4671 1 parent 599df2f
authored January 16, 2013

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. 6  server/lib/deltacloud/models/instance.rb
6  server/lib/deltacloud/models/instance.rb
@@ -64,15 +64,15 @@ def to_hash(context)
64 64
     }
65 65
     r.merge!(:launch_time => launch_time)
66 66
     r.merge!(:create_image => create_image) if create_image
67  
-    r.merge!(:firewalls => firewalls.map { |f| { :id => f.id, :href => context.firewall_url(f.id), :rel => :firewall }}) if firewalls
  67
+    r.merge!(:firewalls => firewalls.map { |f| { :id => f, :href => context.firewall_url(f), :rel => :firewall }}) if firewalls
68 68
     if storage_volumes
69  
-      r.merge!(:storage_volumes => storage_volumes.map { |f| { :id => f.id, :href => context.storage_volume_url(f.id), :rel => :storage_volume }})
  69
+      r.merge!(:storage_volumes => storage_volumes.map { |v| { :id => v.keys.first, :href => context.storage_volume_url(v.keys.first), :rel => :storage_volume }})
70 70
     end
71 71
     if context.driver.class.has_feature?(:instances, :authentication_key)
72 72
       r.merge!(:authentication => { :keyname => keyname }) if keyname
73 73
     end
74 74
     if context.driver.class.has_feature?(:instances, :authentication_password)
75  
-      r.merge!(:authentication => { :user => username, :password => password }) if user
  75
+      r.merge!(:authentication => { :user => username, :password => password }) if username
76 76
     end
77 77
     r
78 78
   end

0 notes on commit a75ed47

Please sign in to comment.
Something went wrong with that request. Please try again.