Hypervisor ========== Hypervisors are responsible for housing virtual machines/instances. This resource inherits from Resource and has direct access to the resource’s database object. +-------------------------+-------------------------------------------------------------------------------------------------+ | Attribute | Description | +=========================+=================================================================================================+ | resource_id | The primary resource identifier that takes the form of a prefix followed by numbers and letters | +-------------------------+-------------------------------------------------------------------------------------------------+ | organization_service_id | The ID of the parent organization service (cloud) | +-------------------------+-------------------------------------------------------------------------------------------------+ | region_name | The region where the hypervisor lives | +-------------------------+-------------------------------------------------------------------------------------------------+ | hypervisor_id | The provider ID of the hypervisor | +-------------------------+-------------------------------------------------------------------------------------------------+ | name | The name of the hypervisor | +-------------------------+-------------------------------------------------------------------------------------------------+ | address | The IP address of the hypervisor | +-------------------------+-------------------------------------------------------------------------------------------------+ | port | The port the hypervisor listens on | +-------------------------+-------------------------------------------------------------------------------------------------+ | hypervisor_type | The type of hypervisor | +-------------------------+-------------------------------------------------------------------------------------------------+ | hypervisor_version | The hypervisor version | +-------------------------+-------------------------------------------------------------------------------------------------+ | state | The lifecycle state of the hypervisor | +-------------------------+-------------------------------------------------------------------------------------------------+ | availability_zone | The availability zone where the Hypervisor lives | +-------------------------+-------------------------------------------------------------------------------------------------+ | instances | Returns a list of instances running on this hypervisor | +-------------------------+-------------------------------------------------------------------------------------------------+ .. container:: magic-block-textarea **Hypervisor Operations** ``static get_db_class()`` ``static get_provider_id_field()`` | ``get_resource_dependencies()`` | Retrieve the dependencies for a particular resources. For hypervisors we also need to include datastores which requires flipping the ResourceLink relationship. ``static get_resource_type()`` | ``get_supported_actions()`` | Retrieve all the actions which are supported by this resource. | ``handle_resource_created(user_resource_id=None, project_resource_id=None)`` | This should be called when a resource is created/discovered after the basic data is added to the database. This gives an opportunity for post-addition hooks (assignment to groups, alerts, etc.). | ``handle_resource_destroyed(user_resource_id=None)`` | This should be called when a resource is destroyed before the basic data is removed from the database. This gives an opportunity for pre-destruction hooks (removal from groups, alerts, etc.). | ``handle_resource_modified(resource, *args, **kwargs)`` | This should be called when a resource is modified after the new data has been updated in the DB session. This gives an opportunity for post-modification hooks. ``hypervisor`` ``hypervisor_id`` ``top_level_resource = True``