Hypervisors refer to the software that creates and runs virtual machines (VMs) (Also known in Openstack as Servers). The physical device the Hypervisor runs on is known as the host. See Openstack Docs for more info
NOTE: HypervisorQuery
will only work with admin credentials - set by clouds.yaml
To Query for Hypervisors using the Query Library, you can import HypervisorQuery()
like so:
from openstackquery import HypervisorQuery
HypervisorQuery()
can then be used to setup and run queries - see API.md for details on API calls
Hypervisors
have the following properties:
Return Type | Property Name(s) (case-insensitive) | Description |
---|---|---|
int |
"current_workload", "workload" | The number of tasks the hypervisor is responsible for |
int |
"local_disk_free", "free_disk_gb" | The local disk space remaining on this hypervisor(in GiB) |
int |
"local_disk_size", "local_gb" | Total local disk size on this hypervisor (in GiB). |
int |
"local_disk_used", "local_gb_used" | The local disk space allocated on this hypervisor(in GiB) |
string |
"id", "uuid", "host_id" | ID of the Hypervisor |
string |
"ip", "host_ip" | The IP address of the hypervisor’s host |
int |
"memory_free", "free_ram_mb" | The free RAM on this hypervisor(in MiB). |
int |
"memory_size", "memory_mb" | Total RAM size for this hypervisor(in MiB). |
int |
"memory_used", "memory_mb_used" | RAM currently being used on this hypervisor(in MiB). |
string |
"name", "host_name" | Hypervisor Hostname |
int |
"running_vms" | The number of running VMs on this hypervisor. |
string |
"state" | The state of the hypervisor. One of up or down. |
string |
"status" | The status of the hypervisor. One of enabled or disabled. |
int |
"vcpus" | The number of vCPUs on this hypervisor. |
int |
"vcpus_used" | The number of vCPUs currently being used on this hypervisor. |
string |
"disabled_reason" | Comment of why the hypervisor is disabled, None if not disabled |
string |
"uptime" | The total uptime of the hypervisor and info about average load |
Any of these properties can be used for any of the API methods that takes a property - like select
, where
, sort_by
etc
This section details valid mappings you can use to chain onto other queries or from other queries to chain into a HypervisorQuery
object.
This applies to API calls then
and append_from
- see API.md for details
The aliases that can be used for the query when chaining are listed below:
Aliases (case-insensitive |
---|
"hypervisor", "hypervisors", "hypervisor_query", "hypervisorquery" |
A HypervisorQuery
can be chained to other queries.
The following shared-common properties are listed below (as well as the Query object they map to):
Prop 1 | Prop 2 | Type | Maps | Documentation |
---|---|---|---|---|
"name" | "hypervisor_name" | One-to-Many | HypervisorQuery to ServerQuery |
SERVERS.md |
Chaining from other HypervisorQuery
requires passing hypervisor_query
or any aliases mentioned above as the query_type
From | Prop 1 | Prop 2 | Type | Documentation |
---|---|---|---|---|
ServerQuery |
"hypervisor_name" | "name" | Many-to-One | SERVERS.md |
HypervisorQuery()
accepts no extra meta-parameters when calling run()