Lines Matching full:connection

29 def sprint_connection(connection, indent=0):  argument
31 sprint data from the connection object to a string and return it.
33connection A connection object which is created by the SSHlibrary open_connec…
39 buffer += "connection:\n"
41 buffer += gp.sprint_varx("index", connection.index, 0, indent)
42 buffer += gp.sprint_varx("host", connection.host, 0, indent)
43 buffer += gp.sprint_varx("alias", connection.alias, 0, indent)
44 buffer += gp.sprint_varx("port", connection.port, 0, indent)
45 buffer += gp.sprint_varx("timeout", connection.timeout, 0, indent)
46 buffer += gp.sprint_varx("newline", connection.newline, 0, indent)
47 buffer += gp.sprint_varx("prompt", connection.prompt, 0, indent)
48 buffer += gp.sprint_varx("term_type", connection.term_type, 0, indent)
49 buffer += gp.sprint_varx("width", connection.width, 0, indent)
50 buffer += gp.sprint_varx("height", connection.height, 0, indent)
52 "path_separator", connection.path_separator, 0, indent
54 buffer += gp.sprint_varx("encoding", connection.encoding, 0, indent)
63 connections A list of connection objects which are created by the SSHlibrary
73 for connection in connections:
74 buffer += sprint_connection(connection, indent)
81 …Find connection that matches the given connection arguments and return connection object. Return …
82 if no matching connection is found.
88 corresponding value in the connection being examined.
93 for connection in sshlib.get_connections():
94 # Create connection_dict from connection object.
96 (key, str(value)) for key, value in connection._config.items()
99 return connection
106 Login on the latest open SSH connection. Retry on failure up to max_login_attempts.
108 The caller is responsible for making sure there is an open SSH connection.
122 # Get connection data for debug output.
123 connection = sshlib.get_connection()
124 gp.lprintn(sprint_connection(connection))
126 gp.lprint_timen("Logging in to " + connection.host + ".")
132 # Login will sometimes fail if the connection is new.
167 …If there is no open SSH connection, this function will connect and login. Likewise, if the caller…
168 not yet logged in to the connection, this function will do the login.
216 # Look for existing SSH connection.
217 # Prepare a search connection dictionary.
221 connection = find_connection(search_connection_args)
222 if connection:
223 gp.lprint_timen("Found the following existing connection:")
224 gp.lprintn(sprint_connection(connection))
225 if connection.alias == "":
226 index_or_alias = connection.index
228 index_or_alias = connection.alias
230 'Switching to existing connection: "' + str(index_or_alias) + '".'
276 r"Connection not open", str(except_value)
305 r"\[Errno 104\] Connection reset by peer",
316 # Close and re-open a connection.
318 # connection. It merely closes it. Since there is a concern