archipelagenthypervisorhealth :: health :: TNHypervisorHealth :: Class TNHypervisorHealth
[hide private]
[frames] | no frames]

Class TNHypervisorHealth

source code

archipelcore.archipelPlugin.TNArchipelPlugin --+
                                               |
                                              TNHypervisorHealth

Instance Methods [hide private]
 
__init__(self, configuration, entity, entry_point_group)
Initialize the plugin.
source code
 
register_handlers(self)
This method will be called by the plugin user when it will be necessary to register module for listening to stanza.
source code
 
unregister_handlers(self)
Unregister the handlers.
source code
Dict
get_basic_info(self)
Returns some info about the hypervisor
source code
 
start_collector(self, origin=None, user_info=None, parameters=None)
Start the collector
source code
 
process_iq(self, conn, iq)
This method is invoked when a ARCHIPEL_NS_HYPERVISOR_HEALTH IQ is received.
source code
xmpp.Protocol.Iq
iq_health_info_history(self, iq)
Get a range of old stat history according to the limit parameters in iq node.
source code
xmpp.Protocol.Iq
iq_health_info(self, iq)
Send information about the hypervisor health info.
source code
string
message_health_info(self, msg)
Handle the health info request message.
source code
xmpp.Protocol.Iq
iq_get_logs(self, iq)
Read the hypervisor's log file.
source code
xmpp.Protocol.Iq
message_get_logs(self, msg)
Handle the log info request message.
source code
Static Methods [hide private]
dict
plugin_info()
Return informations about the plugin.
source code
Method Details [hide private]

__init__(self, configuration, entity, entry_point_group)
(Constructor)

source code 

Initialize the plugin.

Parameters:
  • configuration (Configuration object) - the configuration
  • entity (TNArchipelEntity) - the entity that owns the plugin
  • entry_point_group (string) - the group name of plugin entry_point
Overrides: archipelcore.archipelPlugin.TNArchipelPlugin.__init__

register_handlers(self)

source code 

This method will be called by the plugin user when it will be necessary to register module for listening to stanza.

Overrides: archipelcore.archipelPlugin.TNArchipelPlugin.register_handlers

unregister_handlers(self)

source code 

Unregister the handlers.

Overrides: archipelcore.archipelPlugin.TNArchipelPlugin.unregister_handlers

plugin_info()
Static Method

source code 

Return informations about the plugin.

Returns: dict
dictionary contaning plugin informations
Overrides: archipelcore.archipelPlugin.TNArchipelPlugin.plugin_info

get_basic_info(self)

source code 

Returns some info about the hypervisor

Returns: Dict
Dictionary containing information

start_collector(self, origin=None, user_info=None, parameters=None)

source code 

Start the collector

Parameters:
  • origin (TNArchipelEntity) - the origin of the hook
  • user_info (object) - random user info
  • parameters (object) - runtime argument

process_iq(self, conn, iq)

source code 

This method is invoked when a ARCHIPEL_NS_HYPERVISOR_HEALTH IQ is received. It understands IQ of type:

  • history
  • info
  • logs
Parameters:
  • conn (xmpp.Dispatcher) - ths instance of the current connection that send the stanza
  • iq (xmpp.Protocol.Iq) - the received IQ

iq_health_info_history(self, iq)

source code 

Get a range of old stat history according to the limit parameters in iq node.

Parameters:
  • iq (xmpp.Protocol.Iq) - the sender request IQ
Returns: xmpp.Protocol.Iq
a ready-to-send IQ containing the results

iq_health_info(self, iq)

source code 

Send information about the hypervisor health info.

Parameters:
  • iq (xmpp.Protocol.Iq) - the sender request IQ
Returns: xmpp.Protocol.Iq
a ready-to-send IQ containing the results

message_health_info(self, msg)

source code 

Handle the health info request message.

Parameters:
  • msg (xmmp.Protocol.Message) - the message
Returns: string
the answer

iq_get_logs(self, iq)

source code 

Read the hypervisor's log file.

Parameters:
  • iq (xmpp.Protocol.Iq) - the sender request IQ
Returns: xmpp.Protocol.Iq
a ready-to-send IQ containing the results

message_get_logs(self, msg)

source code 

Handle the log info request message.

Parameters:
  • msg (xmpp.Protocol.Iq) - the sender request IQ
Returns: xmpp.Protocol.Iq
a ready-to-send IQ containing the results