archipelagentvirtualmachinestorage :: storage :: TNStorageManagement :: Class TNStorageManagement
[hide private]
[frames] | no frames]

Class TNStorageManagement

source code

archipelcore.archipelPlugin.TNArchipelPlugin --+
                                               |
                                              TNStorageManagement

Plugin that manages the storage volumes for virtual machines.

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
 
_is_file_a_drive(self, path)
check if given drive is a valid virtual drive
source code
 
_is_file_a(self, types, extension, path)
check given file type either by mimetypes or extension
source code
 
_is_file_a_cow(self, path)
check if given drive is a valid COW file
source code
 
_is_file_a_qcow(self, path)
check if given drive is a valid QCOW file
source code
 
_is_file_a_qcow2(self, path)
check if given drive is a valid QCOW2 file
source code
 
_is_file_a_raw(self, path)
check if given drive is a valid RAW drive
source code
 
_is_file_a_vmdk(self, path)
check if given drive is a valid VMDK
source code
 
_is_file_an_iso(self, path)
check if given drive is a valid ISO
source code
 
process_iq(self, conn, iq)
Invoked when new ARCHIPEL_NS_VM_DISK IQ is received.
source code
xmpp.Protocol.Iq
iq_create(self, iq)
Create a disk in given format.
source code
xmpp.Protocol.Iq
iq_convert(self, iq)
Convert a disk from a format to another.
source code
xmpp.Protocol.Iq
iq_rename(self, iq)
Rename a disk.
source code
xmpp.Protocol.Iq
iq_delete(self, iq)
Delete a virtual hard drive.
source code
xmpp.Protocol.Iq
iq_get(self, iq)
Get the virtual hard drives of the virtual machine.
source code
xmpp.Protocol.Iq
iq_getiso(self, iq)
Get the virtual cdrom ISO of the virtual machine.
source code
xmpp.Protocol.Iq
iq_getgolden(self, iq)
Get the list of golden qcow2 images
source code
xmpp.Protocol.Iq
iq_setgolden(self, iq)
Set a qow2 image as golden image
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

_is_file_a_drive(self, path)

source code 

check if given drive is a valid virtual drive

Parameters:
  • path (string) - the path of the file to check

_is_file_a(self, types, extension, path)

source code 

check given file type either by mimetypes or extension

Parameters:
  • types (tuple) - the types of file
  • extension (string) - file extension
  • path (string) - the file path to check
Returns:
boolean

_is_file_a_cow(self, path)

source code 

check if given drive is a valid COW file

Parameters:
  • path (string) - the path of the file to check

_is_file_a_qcow(self, path)

source code 

check if given drive is a valid QCOW file

Parameters:
  • path (string) - the path of the file to check

_is_file_a_qcow2(self, path)

source code 

check if given drive is a valid QCOW2 file

Parameters:
  • path (string) - the path of the file to check

_is_file_a_raw(self, path)

source code 

check if given drive is a valid RAW drive

Parameters:
  • path (string) - the path of the file to check

_is_file_a_vmdk(self, path)

source code 

check if given drive is a valid VMDK

Parameters:
  • path (string) - the path of the file to check

_is_file_an_iso(self, path)

source code 

check if given drive is a valid ISO

Parameters:
  • path (string) - the path of the file to check

process_iq(self, conn, iq)

source code 

Invoked when new ARCHIPEL_NS_VM_DISK IQ is received. It understands IQ of type:

  • create
  • delete
  • get
  • getiso
  • convert
  • rename
  • getgolden
  • setgolden
Parameters:
  • conn (xmpp.Dispatcher) - ths instance of the current connection that send the message
  • iq (xmpp.Protocol.Iq) - the received IQ

iq_create(self, iq)

source code 

Create a disk in given format.

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_convert(self, iq)

source code 

Convert a disk from a format to another.

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_rename(self, iq)

source code 

Rename a disk.

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_delete(self, iq)

source code 

Delete a virtual hard drive.

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_get(self, iq)

source code 

Get the virtual hard drives of the virtual machine.

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_getiso(self, iq)

source code 

Get the virtual cdrom ISO of the virtual machine.

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_getgolden(self, iq)

source code 

Get the list of golden qcow2 images

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action

iq_setgolden(self, iq)

source code 

Set a qow2 image as golden image

Parameters:
  • iq (xmpp.Protocol.Iq) - the received IQ
Returns: xmpp.Protocol.Iq
a ready to send IQ containing the result of the action