archipelagentvmcasting :: vmappliancemanager :: TNVMApplianceManager :: Class TNVMApplianceManager
[hide private]
[frames] | no frames]

Class TNVMApplianceManager

source code

archipelcore.archipelPlugin.TNArchipelPlugin --+
                                               |
                                              TNVMApplianceManager

Instance Methods [hide private]
 
__init__(self, configuration, entity, entry_point_group)
Initialize the class.
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
 
finish_installing(self)
Used as callback for TNApplianceDecompresser.
source code
 
error_installing(self, exception)
Used as callback for TNApplianceDecompresser.
source code
 
finish_packaging(self)
Used as callback for TNApplianceCompresser.
source code
 
error_packaging(self, exception)
Used as callback for TNApplianceCompresser.
source code
array
get(self)
return the list of appliance
source code
 
attach(self, uuid, requester)
attach the appliance identified by given UUID
source code
 
detach(self)
detach the current appliance
source code
 
vm_terminate(self, origin, user_info, arguments)
Close the database connection.
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 all installed appliances.
source code
string
message_get(self, msg)
Create the message response to list appliances.
source code
xmpp.Protocol.Iq
iq_attach(self, iq)
Instanciate a new virtualmachine from an installed appliance.
source code
string
message_attach(self, msg)
Attach the appliance identified by UUID from the given msg
source code
xmpp.Protocol.Iq
iq_detach(self, iq)
Detach an installed appliance from a virtualmachine.
source code
 
message_detach(self, msg)
detach the current attached appliance
source code
xmpp.Protocol.Iq
iq_package(self, iq)
Package the current virtual machine.
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 (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(self)

source code 

return the list of appliance

Returns: array
array of appliances

attach(self, uuid, requester)

source code 

attach the appliance identified by given UUID

Parameters:
  • uuid (string) - the UUID of the appliance
  • requester (JID) - the JID of the requester

vm_terminate(self, origin, user_info, arguments)

source code 

Close the database connection.

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

process_iq(self, conn, iq)

source code 

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

  • get
  • attach
  • detach
  • package
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 all installed appliances.

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

message_get(self, msg)

source code 

Create the message response to list appliances.

Parameters:
  • msg (xmpp.Protocol.Message) - the message containing the request
Returns: string
the answer

iq_attach(self, iq)

source code 

Instanciate a new virtualmachine from an installed appliance.

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

message_attach(self, msg)

source code 

Attach the appliance identified by UUID from the given msg

Parameters:
  • msg (xmpp.Protocol.Message) - the message containing the request
Returns: string
the answer

iq_detach(self, iq)

source code 

Detach an installed appliance from a virtualmachine.

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

iq_package(self, iq)

source code 

Package the current virtual machine.

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