Package ZenRelations :: Module ImportRM :: Class ImportRM
[hide private]
[frames] | no frames]

Class ImportRM

source code

Products.ZenUtils.CmdBase.CmdBase --+        
                                    |        
Products.ZenUtils.ZenDaemon.ZenDaemon --+    
                                        |    
      Products.ZenUtils.ZCmdBase.ZCmdBase --+
                                            |
           xml.sax.handler.ContentHandler --+
                                            |
                                           ImportRM

Instance Methods [hide private]
 
context(self) source code
 
cleanattrs(self, attrs) source code
 
startElement(self, name, attrs)
Signals the start of an element in non-namespace mode.
source code
 
endElement(self, name)
Signals the end of an element in non-namespace mode.
source code
 
characters(self, chars)
Receive notification of character data.
source code
 
createObject(self, attrs)
create an object and set it into its container
source code
 
setProperty(self, obj, attrs, value)
Set the value of a property on an object.
source code
 
addLink(self, rel, objid)
build list of links to form after all objects have been created make sure that we don't add other side of a bidirectional relation
source code
 
processLinks(self)
walk through all the links that we saved and link them up
source code
 
buildOptions(self)
basic options setup sub classes can add more options here
source code
 
loadObjectFromXML(self, objstack=None, xmlfile='')
This method can be used to load data for the root of Zenoss (default behavior) or it can be used to operate on a specific point in the Zenoss hierarchy (ZODB).
source code
 
loadDatabase(self)
The default behavior of loadObjectFromXML() will be to use the Zope app object, and thus operatate on the whole of Zenoss.
source code
 
commit(self) source code

Inherited from Products.ZenUtils.ZCmdBase.ZCmdBase: __init__, closeAll, closedb, findDevice, getConnection, getContext, getDataRoot, getDmdObj, login, logout, opendb, syncdb, zeoConnect

Inherited from Products.ZenUtils.ZenDaemon.ZenDaemon: becomeDaemon, changeUser, setupLogging, sigTerm

Inherited from Products.ZenUtils.CmdBase.CmdBase: buildParser, generate_configs, generate_xml_table, parseOptions, pretty_print_config_comment

Inherited from xml.sax.handler.ContentHandler: endDocument, endElementNS, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElementNS, startPrefixMapping

Class Variables [hide private]
  rootpath = ''

Inherited from Products.ZenUtils.ZenDaemon.ZenDaemon: pidfile

Inherited from Products.ZenUtils.CmdBase.CmdBase: doesLogging

Method Details [hide private]

startElement(self, name, attrs)

source code 

Signals the start of an element in non-namespace mode.

The name parameter contains the raw XML 1.0 name of the element type as a string and the attrs parameter holds an instance of the Attributes class containing the attributes of the element.
Overrides: xml.sax.handler.ContentHandler.startElement
(inherited documentation)

endElement(self, name)

source code 

Signals the end of an element in non-namespace mode.

The name parameter contains the name of the element type, just as with the startElement event.
Overrides: xml.sax.handler.ContentHandler.endElement
(inherited documentation)

characters(self, chars)

source code 

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity so that the Locator provides useful information.
Overrides: xml.sax.handler.ContentHandler.characters
(inherited documentation)

buildOptions(self)

source code 
basic options setup sub classes can add more options here
Overrides: Products.ZenUtils.ZCmdBase.ZCmdBase.buildOptions

loadObjectFromXML(self, objstack=None, xmlfile='')

source code 

This method can be used to load data for the root of Zenoss (default behavior) or it can be used to operate on a specific point in the Zenoss hierarchy (ZODB).

Upon loading the XML file to be processed, the content of the XML file is handled (processed) by the methods in this class.