Package flumotion :: Package common :: Module connection
[show private | hide private]
[frames | no frames]

Module flumotion.common.connection

Abstractions for dealing with PB connections.
Classes
PBConnectionInfo I hold information on how to connect to a PB server somewhere.

Function Summary
PBConnectionInfo parsePBConnectionInfo(string, username, password, port, use_ssl)
Parse a string representation of a PB connection into a PBConnectionInfo object.

Variable Summary
SRE_Pattern _pat = ^(([^:@]*)(:([^:@]+))?@)?([^:@]+)(:([0-9]+))?$

Function Details

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

Variable Details

_pat

Type:
SRE_Pattern
Value:
^(([^:@]*)(:([^:@]+))?@)?([^:@]+)(:([0-9]+))?$                         

Generated by Epydoc 2.1 on Sat Apr 14 13:16:07 2007 http://epydoc.sf.net