Package pulp :: Package client :: Module config :: Class Config
[hide private]
[frames] | no frames]

Class Config

source code

iniparse.INIConfig --+
                     |
                    Config

The pulp client configuration.

Instance Methods [hide private]
 
__init__(self)
Open the configuration.
source code
 
write(self)
Write the configuration.
source code
Config
__mergeIn(self, other)
Merge (in) the specified other configuration.
source code
Config
__mergeOut(self, other)
Merge (out) to the specified other configuration.
source code
Base
__read(self, path)
Read the configuration at the specified path.
source code
str
__altpath(self)
Get the alternate configuration path.
source code
Class Variables [hide private]
  FILE = 'client.conf'
str PATH = os.path.join('/etc/pulp', FILE)
The absolute path to the config directory.
str USER = os.path.join('~/.pulp', FILE)
The path to an alternate configuration file within the user's home.
str ALT = 'PULP_CLIENT_OVERRIDE'
The environment variable with a path to an alternate configuration file.
Method Details [hide private]

__init__(self)
(Constructor)

source code 

Open the configuration. Merge (in) alternate configuration file when specified by environment variable.

__mergeIn(self, other)

source code 

Merge (in) the specified other configuration.

Parameters:
  • other (Base) - The conf to merge in.
Returns: Config
self

__mergeOut(self, other)

source code 

Merge (out) to the specified other configuration.

Parameters:
  • other (Base) - The conf to merge out.
Returns: Config
self

__read(self, path)

source code 

Read the configuration at the specified path.

Parameters:
  • path (str) - The fully qualified path.
Returns: Base
The configuration object.

__altpath(self)

source code 

Get the alternate configuration path. Resolution order: ALT, USER

Returns: str
The path to the alternate configuration file.