Package flumotion :: Package common :: Module connection
[hide private]

Module connection

source code

Abstractions for dealing with PB connections.

Classes [hide private]
  PBConnectionInfo
I hold information on how to connect to a PB server somewhere.
Functions [hide private]
PBConnectionInfo
parsePBConnectionInfo(string, username='user', password='test', port=7531, use_ssl=True)
Parse a string representation of a PB connection into a PBConnectionInfo object.
source code
Variables [hide private]
  _pat = re.compile(r'^(([^:@]*)(:([^:@]+))?@)?([^:@]+)(:([0-9]+...
Function Details [hide private]

parsePBConnectionInfo(string, username='user', password='test', port=7531, use_ssl=True)

source code 

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 (str) - A string describing the PB connection.
  • username (str) - Default username, or 'user' if not given.
  • password (str) - Default password, or 'test' if not given.
  • port (int) - Default port, or 7531 if not given.
  • use_ssl (bool) - 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.
Returns: PBConnectionInfo

Variables Details [hide private]

_pat

Value:
re.compile(r'^(([^:@]*)(:([^:@]+))?@)?([^:@]+)(:([0-9]+))?$')