Package archipelagentxmppserver :: Module xmppserver_base :: Class TNXMPPServerControllerBase
[hide private]
[frames] | no frames]

Class TNXMPPServerControllerBase

archipelcore.archipelPlugin.TNArchipelPlugin --+
                                               |
                                              TNXMPPServerControllerBase
Known Subclasses:

Instance Methods [hide private]
 
__init__(self, configuration, entity, entry_point_group)
Initialize the plugin.
 
create_autogroups_if_needed(self, origin, user_info, parameters)
Will create the auto_group when plugin loaded and add hypervisor if needed
 
group_add_users(self, ID, users)
Add users into a group
 
group_create(self, ID, name, description, display='')
Create a new shared roster group
 
group_delete(self, ID)
Destroy a shared roster group
 
group_delete_users(self, ID, users)
Delete users from a group
 
group_list(self)
Returns a list of existing groups
 
handle_autogroup_for_entity(self, origin, user_info, entity)
Will add all new virtual machines in autogroup if configured to
xmpp.Protocol.Iq
iq_group_add_users(self, iq)
Add a user into a shared group.
xmpp.Protocol.Iq
iq_group_create(self, iq)
Create a new shared roster.
xmpp.Protocol.Iq
iq_group_delete(self, iq)
Delete a shared group.
xmpp.Protocol.Iq
iq_group_delete_users(self, iq)
delete a user from a shared group
xmpp.Protocol.Iq
iq_group_list(self, iq)
List shared groups.
xmpp.Protocol.Iq
iq_users_filter(self, iq)
Filter all registered users.
xmpp.Protocol.Iq
iq_users_list(self, iq)
List all registered users.
xmpp.Protocol.Iq
iq_users_number(self, iq)
Return number of registered users.
xmpp.Protocol.Iq
iq_users_register(self, iq)
Register some new users.
xmpp.Protocol.Iq
iq_users_unregister(self, iq)
Unregister somes users.
 
process_groups_iq(self, conn, iq)
This method is invoked when a ARCHIPEL_NS_XMPPSERVER_GROUPS IQ is received.
 
process_users_iq_for_hypervisors(self, conn, iq)
This method is invoked when a ARCHIPEL_NS_XMPPSERVER_USERS IQ is received.
 
process_users_iq_for_virtualmachines(self, conn, iq)
This method is invoked when a ARCHIPEL_NS_XMPPSERVER_USERS IQ is received.
 
register_handlers(self)
This method will be called by the plugin user when it will be necessary to register module for listening to stanza.
 
unregister_handlers(self)
Unregister the handlers.
 
users_filter(self, perpared_reply, filterString)
filter all registered users
 
users_list(self, perpared_reply, page, only_humans=True)
List all registered users
 
users_number(self, perpared_reply, only_humans=True)
Return total number of users
 
users_register(self, users)
Reister new users
 
users_unregister(self, users)
Unregister users
Static Methods [hide private]
dict
plugin_info()
Return informations about the plugin.
Method Details [hide private]

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

 

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__

create_autogroups_if_needed(self, origin, user_info, parameters)

 

Will create the auto_group when plugin loaded and add hypervisor if needed

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

group_add_users(self, ID, users)

 

Add users into a group

Parameters:
  • ID (string) - the ID of the group
  • users (list) - list of the users to add in the group

group_create(self, ID, name, description, display='')

 

Create a new shared roster group

Parameters:
  • ID (string) - the ID of the group
  • name (string) - the name of the group
  • description (string) - the description of the group

group_delete(self, ID)

 

Destroy a shared roster group

Parameters:
  • ID (string) - the ID of the group to delete

group_delete_users(self, ID, users)

 

Delete users from a group

Parameters:
  • ID (string) - the ID of the group
  • users (list) - list of users to remove

handle_autogroup_for_entity(self, origin, user_info, entity)

 

Will add all new virtual machines in autogroup if configured to

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

iq_group_add_users(self, iq)

 

Add a user into a shared group.

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

iq_group_create(self, iq)

 

Create a new shared roster.

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

iq_group_delete(self, iq)

 

Delete a shared group.

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

iq_group_delete_users(self, iq)

 

delete a user from a shared group

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

iq_group_list(self, iq)

 

List shared groups.

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

iq_users_filter(self, iq)

 

Filter all registered users.

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

iq_users_list(self, iq)

 

List all registered users.

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

iq_users_number(self, iq)

 

Return number of registered users.

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

iq_users_register(self, iq)

 

Register some new users.

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

iq_users_unregister(self, iq)

 

Unregister somes users.

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

plugin_info()
Static Method

 

Return informations about the plugin.

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

process_groups_iq(self, conn, iq)

 

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

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

process_users_iq_for_hypervisors(self, conn, iq)

 

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

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

process_users_iq_for_virtualmachines(self, conn, iq)

 

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

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

register_handlers(self)

 

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)

 

Unregister the handlers.

Overrides: archipelcore.archipelPlugin.TNArchipelPlugin.unregister_handlers

users_filter(self, perpared_reply, filterString)

 

filter all registered users

Parameters:
  • prepared_reply (xmpp.Iq) - the base reply to use for sending users
  • filterString (String) - the filter

users_list(self, perpared_reply, page, only_humans=True)

 

List all registered users

Parameters:
  • prepared_reply (xmpp.Iq) - the base reply to use for sending users
  • page (Integer) - the page number
  • only_humans (Boolean) - if true, don't count hypervisors or virtualmachines

users_number(self, perpared_reply, only_humans=True)

 

Return total number of users

Parameters:
  • prepared_reply (xmpp.Iq) - the base reply to use for sending users
  • only_humans (Boolean) - if true, don't count hypervisors or virtualmachines

users_register(self, users)

 

Reister new users

Parameters:
  • users (list) - list of users to register

users_unregister(self, users)

 

Unregister users

Parameters:
  • users (list) - list of users to unregister