The freezer_dr.common.osclient
Module
this page last updated: 2019-04-09 05:32:35.476127
OpenStack client class.
-
class
freezer_dr.common.osclient.
OSClient
(authurl, authmethod='password', **kwargs)[source]
Bases: object
Provide OpenStack credentials to initalize the connection.
-
auth
()[source]
Create a session.
-
disable_node
(node)[source]
Disable nova on the failing node.
-
evacuate
(nodes, shared_storage=False)[source]
Will get the hypervisors and list all running VMs on it and then start
Evacuating one by one …
:param nodes: List of nodes to be evacuated !
:param shared_storage: Boolean, True if your compute nodes are running
under shared storage and False otherwise
:return: List of nodes with VMs that were running on that node
-
get_affected_tenants
(node)[source]
-
get_hypervisor
(node)[source]
Get an instance of the hypervisor.
Parameters: | node – dict contains host index |
Returns: | Hypervisor |
-
get_hypervisor_details
(node)[source]
Get details about hypervisor running on the provided node.
-
get_hypervisor_instances
(node)[source]
Get instances from an hypervisor.
-
get_hypervisors_stats
()[source]
Get stats for all hypervisors.
-
get_instances_list
(node)[source]
Get instances running on a node for all tenants.
-
get_neutronclient
()[source]
-
get_node_status
(node)[source]
Check the node nova-service status and if it’s disabled or not.
:param node: dict contains node info
:return: True or False. True => node disabled, False => node is enabled
or unknow status !
-
get_novaclient
()[source]
-
get_session
()[source]
Get the authentication section.
-
list_tenants
()[source]
List tenants.
-
neutronagents
(hosts=[])[source]
-
novacomputes
()[source]
-
novahypervisors
()[source]
-
set_in_maintenance
(nodes)[source]
Set compute nodes in maintenance mode.
-
users_on_tenant
(tenant)[source]
List user per project.
this page last updated: 2019-04-09 05:32:35.476127