Package flumotion :: Package common :: Module config :: Class BaseConfigParser
[show private | hide private]
[frames | no frames]

Class BaseConfigParser

Loggable --+    
           |    
      Parser --+
               |
              BaseConfigParser

Known Subclasses:
AdminConfigParser, FlumotionConfigXML

Method Summary
  __init__(self, file)
  add(self, file)
  export(self)
  get_bool_values(self, nodes)
  get_float_values(self, nodes)
  get_fraction_values(self, nodes)
  get_int_values(self, nodes)
  get_long_values(self, nodes)
  get_raw_string_values(self, nodes)
  get_string_values(self, nodes)
  getPath(self)
  parsePlug(self, node)
  parsePlugs(self, node, sockets)
  parseProperties(self, node, properties, error)
Parse a <property>-containing node in a configuration XML file.
    Inherited from Parser
  checkAttributes(self, node, required, optional)
Checks that a given XML node has all of the required attributes, and no unknown attributes.
  getRoot(self, file)
Return the root of the XML tree for the the string or filename passed as an argument.
tuple of string or None, as long as the combined length of the required and optional attributes. parseAttributes(self, node, required, optional)
Checks the validity of the attributes on an XML node, via Parser.checkAttributes, then parses them out and returns them all as a tuple.
  parseFromTable(self, parent, parsers)
A data-driven verifying XML parser.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
    Inherited from Loggable
Implements __implemented__ = <implementedBy flumotion.common.log.Lo...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...
str logCategory: Implementors can provide a category to log their messages under.

Method Details

__init__(self, file)
(Constructor)

Parameters:
file - The file to parse, either as an open file object, or as the name of a file to open.
           (type=str or file.)

add(self, file)

Parameters:
file - The file to parse, either as an open file object, or as the name of a file to open.
           (type=str or file.)

parseProperties(self, node, properties, error)

Parse a <property>-containing node in a configuration XML file. Ignores any subnode not named <property>.
Parameters:
node - The <properties> XML node to parse.
           (type=xml.dom.Node)
properties - The set of valid properties.
           (type=list of flumotion.common.registry.RegistryEntryProperty)
error - An exception factory for parsing errors.
           (type=Callable that maps str => Exception.)
Returns:
The parsed properties, as a dict of name => value. Absent optional properties will not appear in the dict.

Generated by Epydoc 2.1 on Fri May 18 09:35:50 2007 http://epydoc.sf.net