Package backend :: Package server :: Module rhnVirtualization :: Class VirtualizationEventHandler
[hide private]
[frames] | no frames]

Class VirtualizationEventHandler

source code

Instance Methods [hide private]
 
__init__(self) source code
 
handle(self, system_id, notification) source code
 
_handle_system_exists(self, system_id, timestamp, properties) source code
 
_handle_domain_exists(self, system_id, timestamp, properties) source code
 
_handle_domain_removed(self, system_id, timestamp, properties)
Handle a domain removal.
source code
 
_handle_system_crawl_began(self, system_id, timestamp, properties) source code
 
_handle_system_crawl_ended(self, system_id, timestamp, properties) source code
 
_handle_log_msg_exists(self, system_id, timestamp, properties) source code
 
__db_get_system(self, identity, system_id, uuid)
This returns a row from the database that represents a virtual system.
source code
 
__db_insert_system(self, identity, system_id, uuid, virt_type)
Inserts a new system into the database.
source code
 
__db_update_system(self, identity, system_id, uuid, existing_row)
Updates a system in the database.
source code
 
__db_get_domain(self, host_id, uuid) source code
 
__db_insert_domain(self, host_id, uuid, properties)
To create a new domain, we must modify both the rhnVirtualInstance and the rhnVirtualInstanceInfo tables.
source code
 
__db_update_domain(self, host_id, uuid, properties, existing_row) source code
 
__unconfirm_domains(self, system_id) source code
 
__confirm_domains(self, system_id) source code
 
__remove_unconfirmed_domains(self, system_id)
Mark the unconfirmed entries in the RVII table as stopped, since it appears they are no longer running.
source code
 
__db_insert_log_message(self, kickstart_session_id, log_message)
Insert a new installation log message into the database.
source code
 
__convert_properties(self, properties)
This function normalizes and converts the values of some properties to format consumable by the server.
source code
 
__notify_listeners(self, *args) source code
Class Variables [hide private]
  HANDLERS = {('crawl_began', 'system'): '_handle_system_crawl_b...
  REQUIRED_PROPERTIES = {('exists', 'domain'): ('uuid'), ('exist...
Method Details [hide private]

_handle_domain_removed(self, system_id, timestamp, properties)

source code 

Handle a domain removal. Since we are dealing with virtual domains, we can't really tell whether physical removal took place, so we'll just mark the domain as 'stopped'.

__db_get_system(self, identity, system_id, uuid)

source code 

This returns a row from the database that represents a virtual system. If no system could be found, None is returned.


Class Variable Details [hide private]

HANDLERS

Value:
{('crawl_began', 'system'): '_handle_system_crawl_began',
 ('crawl_ended', 'system'): '_handle_system_crawl_ended',
 ('exists', 'domain'): '_handle_domain_exists',
 ('exists', 'log_message'): '_handle_log_msg_exists',
 ('exists', 'system'): '_handle_system_exists',
 ('removed', 'domain'): '_handle_domain_removed'}

REQUIRED_PROPERTIES

Value:
{('exists', 'domain'): ('uuid'),
 ('exists', 'log_message'): ('message', 'id'),
 ('exists', 'system'): ('identity', 'uuid')}