Closed rgl closed 4 years ago
@rgl , I agree. shpublickeys and other plugins should use this logic: username = service.get_admin_username() or CONF.username.
ConfigWinRMCertificateAuthPlugin is a little special as it requires the user password to enable the certificate auth, but the plugin should still use the initial logic to get the username.
@rgl can you reply with a +1 on this patch: https://review.opendev.org/#/c/696603 ? Thank you.
@ader1990, @ociuhandu, sorry, I forgot to +1. But I agree with it.
Shouldn't the following code (or even all usages of
CONF.username
):https://github.com/cloudbase/cloudbase-init/blob/f9c15d221404b8f9842d247e37cfa14a070d9ee8/cloudbaseinit/plugins/common/sshpublickeys.py#L37
Be changed to:
Or:
Or normalize all usages to the last snippet (which is used by
ConfigWinRMCertificateAuthPlugin
)?