archipelagentvmcasting :: hypervisorrepomanager :: TNHypervisorRepoManager :: Class TNHypervisorRepoManager
[hide private]
[frames] | no frames]

Class TNHypervisorRepoManager

source code

archipelcore.archipelPlugin.TNArchipelPlugin --+
                                               |
                                              TNHypervisorRepoManager

Implementation of the plugin.

Instance Methods [hide private]
 
__init__(self, configuration, entity, entry_point_group)
Initialize the class.
source code
 
repo_parse_hook(self, origin=None, user_info=None, parameters=None)
Start the parser on connection
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
 
parse_own_repo(self, loop=True)
Periodically parse the repository to build the RSS.
source code
 
on_download_complete(self, code, uuid, path)
Callback triggered by a TNApplianceDownloader when download is over.
source code
tupple
getFeed(self, data)
Get the feed.
source code
 
parseRSS(self)
Parse the content of the database, update the feed, create the answer node.
source code
 
process_iq(self, conn, iq)
Process incoming IQ of type ARCHIPEL_NS_HYPERVISOR_VMCASTING.
source code
xmpp.Protocol.Iq
iq_get(self, iq)
Get the sources and appliances.
source code
xmpp.Protocol.Iq
iq_register(self, iq)
Register to a new VMCast.
source code
xmpp.Protocol.Iq
iq_unregister(self, iq)
Unregister from a VMCasts and remove all its appliances (not the files).
source code
xmpp.Protocol.Iq
iq_download(self, iq)
Start a download of appliance according to its uuid.
source code
xmpp.Protocol.Iq
iq_get_download_queue(self, iq)
Get the state of the download queue.
source code
xmpp.Protocol.Iq
iq_stop_download(self, iq)
Stop a download according to its uuid.
source code
xmpp.Protocol.Iq
iq_get_appliance(self, iq)
Get the info about an appliances according to its uuid.
source code
xmpp.Protocol.Iq
iq_get_installed_appliances(self, iq)
Get all installed appliances.
source code
xmpp.Protocol.Iq
iq_delete_appliance(self, iq)
Delete an appliance according to its uuid.
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 class.

Parameters:
  • configuration (string) - the configuration object
  • entity (TNArchipelHypervisor) - the instance of the TNArchipelHypervisor. Will be used for push.
  • entry_point_group (string) - the entry point group name
Overrides: archipelcore.archipelPlugin.TNArchipelPlugin.__init__

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

source code 

Start the parser on connection

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

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

parse_own_repo(self, loop=True)

source code 

Periodically parse the repository to build the RSS.

Parameters:
  • loop (boolean) - if True will do it periodically

on_download_complete(self, code, uuid, path)

source code 

Callback triggered by a TNApplianceDownloader when download is over.

Parameters:
  • uuid (string) - the uuid of the download
  • path (string) - the path of the downloaded file

getFeed(self, data)

source code 

Get the feed.

Parameters:
  • data (string) - RSS data
Returns: tupple
tupple that contains info on the feed

process_iq(self, conn, iq)

source code 

Process incoming IQ of type ARCHIPEL_NS_HYPERVISOR_VMCASTING. It understands IQ of type:

  • get
  • register
  • unregister
  • downloadappliance
  • downloadqueue
  • getappliances
  • deleteappliance
Parameters:
  • conn (xmpp.Dispatcher) - ths instance of the current connection that send the stanza
  • iq (xmpp.Protocol.Iq) - the received IQ

iq_get(self, iq)

source code 

Get the sources and appliances. Replay parseRSS at each time to be up to date.

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

iq_register(self, iq)

source code 

Register to a new VMCast.

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

iq_unregister(self, iq)

source code 

Unregister from a VMCasts and remove all its appliances (not the files).

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

iq_download(self, iq)

source code 

Start a download of appliance according to its uuid.

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

iq_get_download_queue(self, iq)

source code 

Get the state of the download queue.

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

iq_stop_download(self, iq)

source code 

Stop a download according to its uuid.

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

iq_get_appliance(self, iq)

source code 

Get the info about an appliances according to its uuid.

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

iq_get_installed_appliances(self, iq)

source code 

Get all installed appliances.

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

iq_delete_appliance(self, iq)

source code 

Delete an appliance according to its uuid.

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