Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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)
Add Comment
Please, Sign In to add comment