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

Class ExportDevices

source code

              object --+            
                       |            
ZenUtils.CmdBase.CmdBase --+        
                           |        
ZenUtils.ZenDaemon.ZenDaemon --+    
                               |    
      ZenUtils.ZCmdBase.ZCmdBase --+
                                   |
                                  ExportDevices

Wrapper class around exportXml() to create XML exports of devices.

Instance Methods [hide private]
 
__init__(self)
Initializer that creates an output file, or if nothing is specified with the command-line option --outfile, sends to stdout.
source code
 
buildOptions(self)
Command-line options setup
source code
string
strip_out_zenoss_internals(self, doc)
Remove Zenoss internal-use objects that we don't need for an import.
source code
string
getVersion(self)
Gather our current version information
source code
string
getServerName(self)
Gather our Zenoss server name
source code
 
export(self)
Create XML header and then call exportXml() for all objects starting at root.
source code

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

Inherited from ZenUtils.ZenDaemon.ZenDaemon: becomeDaemon, becomeWatchdog, changeUser, niceDoggie, openPrivilegedPort, setupLogging, sighandler_USR1, watchdogCycleTime, watchdogMaxRestartTime, watchdogStartTimeout, writePidFile

Inherited from ZenUtils.CmdBase.CmdBase: buildParser, checkLogpath, generate_configs, generate_xml_configs, generate_xml_table, getConfigFileDefaults, parseOptions, pretty_print_config_comment

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

Class Variables [hide private]

Inherited from ZenUtils.ZenDaemon.ZenDaemon: pidfile

Inherited from ZenUtils.CmdBase.CmdBase: doesLogging

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Initializer that creates an output file, or if nothing is specified with the command-line option --outfile, sends to stdout.
Overrides: ZenUtils.ZCmdBase.ZCmdBase.__init__

buildOptions(self)

source code 
Command-line options setup
Overrides: ZenUtils.ZCmdBase.ZCmdBase.buildOptions

strip_out_zenoss_internals(self, doc)

source code 
Remove Zenoss internal-use objects that we don't need for an import. doc is our XML document tree.
Parameters:
  • doc (XML DOM document) - XML tree
Returns: string
XML output

getVersion(self)

source code 
Gather our current version information
Returns: string
Zenoss version information

getServerName(self)

source code 
Gather our Zenoss server name
Returns: string
Zenoss server name