archipelagentvirtualmachinevnc :: vnc :: TNArchipelVNC :: Class TNArchipelVNC
[hide private]
[frames] | no frames]

Class TNArchipelVNC

source code

archipelcore.archipelPlugin.TNArchipelPlugin --+
                                               |
                                              TNArchipelVNC

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
 
awake_from_initialization(self, origin, user_info, parameters)
Will create or not the proxy according to the recovered status of the vm.
source code
 
create_novnc_proxy(self, origin=None, user_info=None, parameters=None)
Create a noVNC proxy on port vmpport + 1000 (so noVNC proxy is 6900 for VNC port 5900 etc).
source code
 
stop_novnc_proxy(self, origin=None, user_info=None, parameters=None)
Stop the current novnc websocket proxy if any.
source code
 
process_iq(self, conn, iq)
This method is invoked when a ARCHIPEL_NS_VNC IQ is received.
source code
dict
display(self)
Return an dist containing VNC informations.
source code
xmpp.Protocol.Iq
iq_display(self, iq)
Get the VNC display used in the virtual machine.
source code
string
message_display(self, msg)
Handle message vnc display order.
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

awake_from_initialization(self, origin, user_info, parameters)

source code 

Will create or not the proxy according to the recovered status of the vm.

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

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

source code 

Create a noVNC proxy on port vmpport + 1000 (so noVNC proxy is 6900 for VNC port 5900 etc).

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

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

source code 

Stop the current novnc websocket proxy if any.

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_VNC IQ is received. It understands IQ of type:

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

display(self)

source code 

Return an dist containing VNC informations.

Returns: dict
dict containing the information about VNC screen

iq_display(self, iq)

source code 

Get the VNC display used in 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

message_display(self, msg)

source code 

Handle message vnc display order.

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