Package flumotion :: Package manager :: Module config
[hide private]

Module config

source code

parsing of manager configuration files


Version: $Rev: 6981 $

Classes [hide private]
  ConfigEntryComponent
I represent a <component> entry in a planet config file
  ConfigEntryFlow
I represent a <flow> entry in a planet config file
  ConfigEntryManager
I represent a <manager> entry in a planet config file
  ConfigEntryAtmosphere
I represent a <atmosphere> entry in a planet config file
  FlumotionConfigParser
This is a base class for parsing planet configuration files (both manager and flow files).
  PlanetConfigParser
I represent a planet configuration file for Flumotion.
  ManagerConfigParser
I parse manager configuration out of a planet configuration file.
  PlanetXMLWriter
Functions [hide private]
 
_ignore(*args) source code
 
upgradeEaters(conf) source code
 
upgradeAliases(conf) source code
 
buildEatersDict(eatersList, eaterDefs)
Build a eaters dict suitable for forming part of a component config.
source code
 
buildVirtualFeeds(feedPairs, feeders)
Build a virtual feeds dict suitable for forming part of a component config.
source code
 
dictDiff(old, new, onlyOld=None, onlyNew=None, diff=None, keyBase=None)
Compute the difference between two config dicts.
source code
 
dictDiffMessageString((old, new, diff), oldLabel='old', newLabel='new') source code
 
exportPlanetXml(p) source code
Variables [hide private]
  UPGRADERS = [upgradeEaters, upgradeAliases]
  CURRENT_VERSION = 2
Function Details [hide private]

buildEatersDict(eatersList, eaterDefs)

source code 

Build a eaters dict suitable for forming part of a component config.

Parameters:
  • eatersList (List of (eaterName, feedId, eaterAlias?)) - List of eaters. For example, [('default', 'othercomp:feeder', 'foo')] says that our eater 'default' will be fed by the feed identified by the feedId 'othercomp:feeder', and that it has the alias 'foo'. Alias is optional.
  • eaterDefs (List of flumotion.common.registry.RegistryEntryEater) - The set of allowed and required eaters
Returns:
Dict of eaterName => [(feedId, eaterAlias)]

buildVirtualFeeds(feedPairs, feeders)

source code 

Build a virtual feeds dict suitable for forming part of a component config.

Parameters:
  • feedPairs (List of (feedId, feedName) -- both strings.) - List of virtual feeds, as name-feederName pairs. For example, [('bar:baz', 'qux')] defines one virtual feed 'bar:baz', which is provided by the component's 'qux' feed.
  • feeders (List of str.) - The feeders exported by this component, from the registry.

dictDiff(old, new, onlyOld=None, onlyNew=None, diff=None, keyBase=None)

source code 

Compute the difference between two config dicts.

Returns:
3 tuple: (onlyOld, onlyNew, diff) where: onlyOld is a list of (key, value), representing key-value pairs that are only in old; onlyNew is a list of (key, value), representing key-value pairs that are only in new; diff is a list of (key, oldValue, newValue), representing keys with different values in old and new; and key is a tuple of strings representing the recursive key to get to a value. For example, ('foo', 'bar') represents the value d['foo']['bar'] on a dict d.