if credentials is None:
raise N2VCBadArgumentsException(message='credentials are mandatory', bad_args=['credentials'])
- if 'hostname' in credentials:
+ if credentials.get('hostname'):
hostname = credentials['hostname']
else:
raise N2VCBadArgumentsException(message='hostname is mandatory', bad_args=['credentials.hostname'])
- if 'username' in credentials:
+ if credentials.get('username'):
username = credentials['username']
else:
raise N2VCBadArgumentsException(message='username is mandatory', bad_args=['credentials.username'])
total_timeout: float = None
):
- # get juju model
- model = await self._juju_get_model(model_name=model_name)
-
# get the application
application = await self._juju_get_application(model_name=model_name, application_name=application_name)
)
# check if 'verify-ssh-credentials' action exists
- unit = application.units[0]
+ # unit = application.units[0]
actions = await application.get_actions()
if 'verify-ssh-credentials' not in actions:
msg = 'Action verify-ssh-credentials does not exist in application {}'.format(application_name)
+ self.debug(msg=msg)
return False
# execute verify-credentials