parsePBConnectionInfo(string,
username='user',
password='test',
port=7531,
use_ssl=True)
Parse a string representation of a PB connection into a
PBConnectionInfo object.
The expected format is [user[:pass]@]host[:port]. Only the host
is mandatory. The default values for username, password, and port will
be taken from the optional username, password and port arguments.
-
- Parameters:
string -
A string describing the PB connection.
(type=str)
username -
Default username, or 'user' if not given.
(type=str)
password -
Default password, or 'test' if not given.
(type=str)
port -
Default port, or 7531 if not given.
(type=int)
use_ssl -
Whether to use SSL, or True if not given. Note that there is
no syntax in the connection string for specifying whether or not
to use SSL; if you want to control this you will have to provide
another method.
(type=bool)
- Returns:
-
PBConnectionInfo
|