diff --git a/doc/source/aws.rst b/doc/source/aws.rst index 71a61c9da..6f81989a0 100644 --- a/doc/source/aws.rst +++ b/doc/source/aws.rst @@ -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 diff --git a/doc/source/azure.rst b/doc/source/azure.rst index 91bb47186..d80e69f86 100644 --- a/doc/source/azure.rst +++ b/doc/source/azure.rst @@ -510,6 +510,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 diff --git a/nodepool/driver/aws/config.py b/nodepool/driver/aws/config.py index 997d3f283..93475bedb 100644 --- a/nodepool/driver/aws/config.py +++ b/nodepool/driver/aws/config.py @@ -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', diff --git a/nodepool/driver/azure/config.py b/nodepool/driver/azure/config.py index 6df99b177..7a8761239 100644 --- a/nodepool/driver/azure/config.py +++ b/nodepool/driver/azure/config.py @@ -121,7 +121,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')