mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[AWS] Setup a fog keypair only if not supplied.
When calling bootstrap, the :key_name argument is currently ignored and not passed to the internal _setup_bootstrap() method. This results in fog creating a keypair and using it for the instance. The additional parameter -- new_attributes -- is also never actually used when calling _setup_bootstrap(). The patch removes the new_attributes parameter and uses the key_name attribute of the passed server object to ascertain whether a default fog keypair should be created.
This commit is contained in:
parent
1c96d0cabd
commit
1401a8723a
1 changed files with 2 additions and 2 deletions
|
@ -175,8 +175,8 @@ module Fog
|
|||
|
||||
private
|
||||
|
||||
def _setup_bootstrap(server, new_attributes = {})
|
||||
unless new_attributes[:key_name]
|
||||
def _setup_bootstrap(server)
|
||||
unless server.key_name
|
||||
# first or create fog_#{credential} keypair
|
||||
name = Fog.respond_to?(:credential) && Fog.credential || :default
|
||||
unless server.key_pair = service.key_pairs.get("fog_#{name}")
|
||||
|
|
Loading…
Add table
Reference in a new issue