Package CedarBackup2 :: Package extend :: Module mysql :: Class MysqlConfig
[hide private]
[frames] | no frames]

Class MysqlConfig

source code

object --+
         |
        MysqlConfig

Class representing MySQL configuration.

The MySQL configuration information is used for backing up MySQL databases.

The following restrictions exist on data in this class:

Instance Methods [hide private]
 
__init__(self, user=None, password=None, compressMode=None, all=None, databases=None)
Constructor for the MysqlConfig class.
source code
 
__repr__(self)
Official string representation for class instance.
source code
 
__str__(self)
Informal string representation for class instance.
source code
 
__cmp__(self, other)
Definition of equals operator for this class.
source code
 
_setUser(self, value)
Property target used to set the user value.
source code
 
_getUser(self)
Property target used to get the user value.
source code
 
_setPassword(self, value)
Property target used to set the password value.
source code
 
_getPassword(self)
Property target used to get the password value.
source code
 
_setCompressMode(self, value)
Property target used to set the compress mode.
source code
 
_getCompressMode(self)
Property target used to get the compress mode.
source code
 
_setAll(self, value)
Property target used to set the 'all' flag.
source code
 
_getAll(self)
Property target used to get the 'all' flag.
source code
 
_setDatabases(self, value)
Property target used to set the databases list.
source code
 
_getDatabases(self)
Property target used to get the databases list.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__

Properties [hide private]
  user
User to execute backup as.
  password
Password associated with user.
  all
Indicates whether to back up all databases.
  databases
List of databases to back up.
  compressMode
Compress mode to be used for backed-up files.

Inherited from object: __class__

Method Details [hide private]

__init__(self, user=None, password=None, compressMode=None, all=None, databases=None)
(Constructor)

source code 

Constructor for the MysqlConfig class.

Parameters:
  • user - User to execute backup as.
  • password - Password associated with user.
  • compressMode - Compress mode for backed-up files.
  • all - Indicates whether to back up all databases.
  • databases - List of databases to back up.
Overrides: object.__init__

__repr__(self)
(Representation operator)

source code 

Official string representation for class instance.

Overrides: object.__repr__

__str__(self)
(Informal representation operator)

source code 

Informal string representation for class instance.

Overrides: object.__str__

__cmp__(self, other)
(Comparison operator)

source code 

Definition of equals operator for this class.

Parameters:
  • other - Other object to compare to.
Returns:
-1/0/1 depending on whether self is <, = or > other.

_setCompressMode(self, value)

source code 

Property target used to set the compress mode. If not None, the mode must be one of the values in VALID_COMPRESS_MODES.

Raises:
  • ValueError - If the value is not valid.

_setAll(self, value)

source code 

Property target used to set the 'all' flag. No validations, but we normalize the value to True or False.

_setDatabases(self, value)

source code 

Property target used to set the databases list. Either the value must be None or each element must be a string.

Raises:
  • ValueError - If the value is not a string.

Property Details [hide private]

user

User to execute backup as.

Get Method:
_getUser(self) - Property target used to get the user value.
Set Method:
_setUser(self, value) - Property target used to set the user value.

password

Password associated with user.

Get Method:
_getPassword(self) - Property target used to get the password value.
Set Method:
_setPassword(self, value) - Property target used to set the password value.

all

Indicates whether to back up all databases.

Get Method:
_getAll(self) - Property target used to get the 'all' flag.
Set Method:
_setAll(self, value) - Property target used to set the 'all' flag.

databases

List of databases to back up.

Get Method:
_getDatabases(self) - Property target used to get the databases list.
Set Method:
_setDatabases(self, value) - Property target used to set the databases list.

compressMode

Compress mode to be used for backed-up files.

Get Method:
_getCompressMode(self) - Property target used to get the compress mode.
Set Method:
_setCompressMode(self, value) - Property target used to set the compress mode.