Package archipelagentxmppserver :: Module xmppserver_xmpp :: Class TNXMPPServerController
[hide private]
[frames] | no frames]

Class TNXMPPServerController

archipelcore.archipelPlugin.TNArchipelPlugin --+    
                                               |    
      xmppserver_base.TNXMPPServerControllerBase --+
                                                   |
                                                  TNXMPPServerController

Instance Methods [hide private]
 
__init__(self, configuration, entity, entry_point_group)
Initialize the plugin.
String
_extract_entity_type(self, vcard_node)
Extract the entity type from given vcard
 
_fetch_users(self, xmppserver, callback, args=None)
Fetch users and populate the internal list
 
create_autogroup_if_needed(self, origin, user_info, parameters)
Not supported in XMPP API
 
group_add_users(self, ID, users)
Not supported in XMPP API
 
group_create(self, ID, name, description, display=None)
Not supported in XMPP API
 
group_delete(self, ID)
Not supported in XMPP API
 
group_delete_users(self, ID, users)
Not supported in XMPP API
 
group_list(self)
Not supported in XMPP API
 
handle_autogroup_on_alloc(self, origin, user_info, newvm)
Not supported in XMPP API
 
handle_autogroup_on_vm_wake_up(self, origin, user_info, vm)
Not supported in XMPP API
 
users_filter(self, base_reply, filterString)
Filter all registered users.
 
users_list(self, base_reply, page, only_humans=True)
List all registered users
 
users_number(self, base_reply, only_humans=True)
Return total number of registered users
 
users_register(self, users)
Reister new users
 
users_unregister(self, users)
Unregister users

Inherited from xmppserver_base.TNXMPPServerControllerBase: create_autogroups_if_needed, handle_autogroup_for_entity, iq_group_add_users, iq_group_create, iq_group_delete, iq_group_delete_users, iq_group_list, iq_users_filter, iq_users_list, iq_users_number, iq_users_register, iq_users_unregister, process_groups_iq, process_users_iq_for_hypervisors, process_users_iq_for_virtualmachines, register_handlers, unregister_handlers

Static Methods [hide private]

Inherited from xmppserver_base.TNXMPPServerControllerBase: plugin_info

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__

_extract_entity_type(self, vcard_node)

 

Extract the entity type from given vcard

Parameters:
  • vcard_node (xmpp.Node) - the VCard
Returns: String
the entity type : virtualmachine, hypervisor or human

_fetch_users(self, xmppserver, callback, args=None)

 

Fetch users and populate the internal list

Parameters:
  • xmppserver (String) - the xmpp server to query
  • callback (function) - the callback to call when fetching is complete
  • args (dict) - optional kwards of the callback

group_add_users(self, ID, users)

 

Not supported in XMPP API

Parameters:
  • ID - the ID of the group
  • users - list of the users to add in the group
Overrides: xmppserver_base.TNXMPPServerControllerBase.group_add_users

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

 

Not supported in XMPP API

Parameters:
  • ID - the ID of the group
  • name - the name of the group
  • description - the description of the group
Overrides: xmppserver_base.TNXMPPServerControllerBase.group_create

group_delete(self, ID)

 

Not supported in XMPP API

Parameters:
  • ID - the ID of the group to delete
Overrides: xmppserver_base.TNXMPPServerControllerBase.group_delete

group_delete_users(self, ID, users)

 

Not supported in XMPP API

Parameters:
  • ID - the ID of the group
  • users - list of users to remove
Overrides: xmppserver_base.TNXMPPServerControllerBase.group_delete_users

group_list(self)

 

Not supported in XMPP API

Overrides: xmppserver_base.TNXMPPServerControllerBase.group_list

users_filter(self, base_reply, filterString)

 

Filter all registered users.

Parameters:
  • prepared_reply - the base reply to use for sending users
  • filterString - the filter
Overrides: xmppserver_base.TNXMPPServerControllerBase.users_filter

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

 

List all registered users

Parameters:
  • prepared_reply - the base reply to use for sending users
  • page - the page number
  • only_humans - if true, don't count hypervisors or virtualmachines
Overrides: xmppserver_base.TNXMPPServerControllerBase.users_list

users_number(self, base_reply, only_humans=True)

 

Return total number of registered users

Parameters:
  • prepared_reply - the base reply to use for sending users
  • only_humans - if true, don't count hypervisors or virtualmachines
Overrides: xmppserver_base.TNXMPPServerControllerBase.users_number

users_register(self, users)

 

Reister new users

Parameters:
  • users (list) - list of users to register
Overrides: xmppserver_base.TNXMPPServerControllerBase.users_register

users_unregister(self, users)

 

Unregister users

Parameters:
  • users (list) - list of users to unregister
Overrides: xmppserver_base.TNXMPPServerControllerBase.users_unregister