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

Module rhnVirtualization

source code

Classes [hide private]
  ListenerEvent
  ClientStateType
  ServerStateType
  VirtualizationType
  IdentityType
  EventType
  TargetType
  PropertyType
  VirtualizationEventError
  Listeners
Abusing python to get a singleton behavior.
  VirtualizationEventHandler
  VirtualizationListener
  EntitlementVirtualizationListener
Functions [hide private]
 
add_listener(listener)
Allows other components of the server to listen for virtualization related events.
source code
 
_notify_guest(server_id, uuid, virt_type)
Notifies the virtualization backend that there is a guest with a specific uuid and type, then associates it with the provided system id.
source code
 
_virt_notify(server_id, actions) source code
 
_make_virt_action(event, target, properties)
Construct a tuple representing a virtualization action.
source code
 
is_host_uuid(uuid) source code
Variables [hide private]
  CLIENT_SERVER_STATE_MAP = {'blocked': 'running', 'crashed': 'c...
  __package__ = 'backend.server'
Function Details [hide private]

_notify_guest(server_id, uuid, virt_type)

source code 
Notifies the virtualization backend that there is a guest with a
specific
uuid and type, then associates it with the provided system id.

New for RHEL 5.

Args are:
 * system_id   - a string representation of the system's system id.
 * uuid        - a string representation of the system's uuid.
 * virt_type   - a string representation of the system's virt type

 No return value.

_make_virt_action(event, target, properties)

source code 

Construct a tuple representing a virtualization action.

New for RHEL 5.

Args are:
* event       - one of EventType.EXISTS, EventType.REMOVED,
                EventType.CRAWL_BEGAN, EventType.CRAWL_ENDED
* target      - one of TargetType.SYSTEM, TargetType.DOMAIN,
                TargetType.LOG_MSG
* properties  - a dictionary that associates a PropertyType with
                a value (typically a string).

Return a tuple consisting of (timestamp, event, target, properties).


Variables Details [hide private]

CLIENT_SERVER_STATE_MAP

Value:
{'blocked': 'running',
 'crashed': 'crashed',
 'nostate': 'running',
 'paused': 'paused',
 'running': 'running',
 'shutdown': 'stopped',
 'shutoff': 'stopped'}