Created
October 28, 2010 17:35
-
-
Save jesseproudman/651878 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/fog/bluebox/models/compute/server.rb b/lib/fog/bluebox/models/compute/server.rb | |
index b447b82..5068d4f 100644 | |
--- a/lib/fog/bluebox/models/compute/server.rb | |
+++ b/lib/fog/bluebox/models/compute/server.rb | |
@@ -81,12 +81,12 @@ module Fog | |
def save | |
raise Fog::Errors::Error.new('Resaving an existing object may create a duplicate') if identity | |
requires :flavor_id, :image_id | |
- options = if !password && !public_key | |
+ options = if !attributes[:password] && !public_key | |
raise(ArgumentError, "password or public_key is required for this operation") | |
elsif public_key | |
{'ssh_public_key' => public_key} | |
- elsif @password | |
- {'password' => password} | |
+ elsif attributes[:password] | |
+ {'password' => attributes[:password]} | |
end | |
options['username'] = username | |
data = connection.create_block(flavor_id, image_id, options) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment