Use diskimage username in AWS and Azure drivers
The AWS and Azure drivers incorrectly required the user to supply the username in the pool configuration when using diskimages. The OpenStack and IBMVPC drivers correctly use the top-level diskimage configuration to determine the username. Correct this by deprecating the pool-level configuration in the drivers that offer it, and default it to using the top-level configuration. Change-Id: I4e6b4d4268b32ab7b397a11dd0ccd08b18c09a86
This commit is contained in:
parent
426951af18
commit
202230e16b
@ -343,6 +343,9 @@ Selecting the ``aws`` driver adds the following options to the
|
||||
|
||||
The username that should be used when connecting to the node.
|
||||
|
||||
.. warning:: This option is deprecated. Specify the username
|
||||
on the diskimage definition itself instead.
|
||||
|
||||
.. attr:: connection-type
|
||||
:type: string
|
||||
|
||||
|
@ -444,6 +444,9 @@ section of the configuration.
|
||||
|
||||
The username that should be used when connecting to the node.
|
||||
|
||||
.. warning:: This option is deprecated. Specify the username
|
||||
on the diskimage definition itself instead.
|
||||
|
||||
.. attr:: key
|
||||
:type: str
|
||||
|
||||
|
@ -94,7 +94,7 @@ class AwsProviderDiskImage(ConfigValue):
|
||||
self.pause = bool(image.get('pause', False))
|
||||
self.python_path = image.get('python-path', 'auto')
|
||||
self.shell_type = image.get('shell-type')
|
||||
self.username = image.get('username')
|
||||
self.username = image.get('username', diskimage.username)
|
||||
self.connection_type = image.get('connection-type', 'ssh')
|
||||
self.connection_port = image.get(
|
||||
'connection-port',
|
||||
|
@ -102,7 +102,7 @@ class AzureProviderDiskImage(ConfigValue):
|
||||
self.pause = bool(image.get('pause', False))
|
||||
self.python_path = image.get('python-path', 'auto')
|
||||
self.shell_type = image.get('shell-type')
|
||||
self.username = image.get('username')
|
||||
self.username = image.get('username', diskimage.username)
|
||||
self.password = image.get('password')
|
||||
self.generate_password = image.get('generate-password', False)
|
||||
self.key = image.get('key')
|
||||
|
Loading…
Reference in New Issue
Block a user