def __init__(self, host, username): """ :param host: the fully qualified hostname of the host to deploy to :type host: str :param username: the user who is executing this process and whose ssh credentials will be used :type username: str """ self._host = host self._username = username self._shell_client = ShellClientFactory.create(host, username)
def __init__(self, host, username, executable_path): """ :param host: the fully qualified hostname of the host to deploy to :type host: str :param username: the user who is executing this process and whose ssh credentials will be used :type username: str :param executable_path: the path to the clusterrunner executable on the remote host :type executable_path: str """ self._logger = get_logger(__name__) self.host = host self._username = username self._executable_path = executable_path self._shell_client = ShellClientFactory.create(host, username)
def test_create_returns_instance_of_expected(self, expected_class_type, host_name): shell_client = ShellClientFactory.create(host=host_name, user='******') self.assertEqual(expected_class_type, type(shell_client))