def __init__(self, host, port, ssh_host_fingerprint, user, ssh_public_key_path, ssh_private_key_path): self.ssh_connection_creator = \ ssh.SSHConnectionCreator(host, port, [ ssh_host_fingerprint ], user, ssh_public_key_path, ssh_private_key_path) self.ssh_connection = None # cached connection
def __init__(self, host, port, ssh_host_fingerprint, user, ssh_public_key_path, ssh_private_key_path, db_ip): self.ssh_connection_creator = \ ssh.SSHConnectionCreator(host, port, [ ssh_host_fingerprint ], user, ssh_public_key_path, ssh_private_key_path) self.db_ip = db_ip log.msg('SSH connection arguments %s, %s, %s, %s, %s, %s' % (host, port, ssh_host_fingerprint, user, ssh_public_key_path, ssh_private_key_path), system=LOG_SYSTEM)
def __init__(self, host, port, ssh_host_fingerprint, user, ssh_public_key_path, ssh_private_key_path, network_name): self.ssh_connection_creator = \ ssh.SSHConnectionCreator(host, port, [ ssh_host_fingerprint ], user, ssh_public_key_path, ssh_private_key_path) self.ssh_connection = None # cached connection self.connection_lock = defer.DeferredLock() self.network_name = network_name
def __init__(self, log_system, port_map, cfg): self.log_system = log_system self.port_map = port_map host = cfg[config.FORCE10_HOST] port = cfg.get(config.FORCE10_PORT, 22) host_fingerprint = cfg[config.FORCE10_HOST_FINGERPRINT] user = cfg[config.FORCE10_USER] if config.FORCE10_PASSWORD in cfg: password = cfg[config.FORCE10_PASSWORD] ssh_connection_creator = ssh.SSHConnectionCreator(host, port, [ host_fingerprint ], user, password=password) else: ssh_public_key = cfg[config.FORCE10_SSH_PUBLIC_KEY] ssh_private_key = cfg[config.FORCE10_SSH_PRIVATE_KEY] ssh_connection_creator = ssh.SSHConnectionCreator(host, port, [ host_fingerprint ], user, ssh_public_key, ssh_private_key) # this will blow up when used with ssh keys self.command_sender = Force10CommandSender(ssh_connection_creator, enable_password=password)
def __init__(self, host, port, ssh_host_fingerprint, user, ssh_public_key_path, ssh_private_key_path, enable_password): self.ssh_connection_creator = \ ssh.SSHConnectionCreator(host, port, [ ssh_host_fingerprint ], user, ssh_public_key_path, ssh_private_key_path) self.enable_password = enable_password