The nova.api.openstack.compute.legacy_v2.contrib.hosts Module

The hosts admin extension.

class HostController

Bases: object

The Hosts API controller for the OpenStack API.

index(req)

Returns a dict in the format:

{‘hosts’: [{‘host_name’: ‘some.host.name’,
‘service’: ‘cells’,
‘zone’: ‘internal’},
{‘host_name’: ‘some.other.host.name’,
‘service’: ‘cells’,
‘zone’: ‘internal’},
{‘host_name’: ‘some.celly.host.name’,
‘service’: ‘cells’,
‘zone’: ‘internal’},
{‘host_name’: ‘console1.host.com’,
‘service’: ‘consoleauth’,
‘zone’: ‘internal’},
{‘host_name’: ‘network1.host.com’,
‘service’: ‘network’,
‘zone’: ‘internal’},
{‘host_name’: ‘netwwork2.host.com’,
‘service’: ‘network’,
‘zone’: ‘internal’},
{‘host_name’: ‘compute1.host.com’,
‘service’: ‘compute’,
‘zone’: ‘nova’},
{‘host_name’: ‘compute2.host.com’,
‘service’: ‘compute’,
‘zone’: ‘nova’},
{‘host_name’: ‘sched1.host.com’,
‘service’: ‘scheduler’,
‘zone’: ‘internal’},
{‘host_name’: ‘sched2.host.com’,
‘service’: ‘scheduler’,
‘zone’: ‘internal’},
{‘host_name’: ‘vol1.host.com’,
‘service’: ‘volume’,
‘zone’: ‘internal’}]}
reboot(req, id)
show(req, id)

Shows the physical/usage resource given by hosts.

Parameters:id – hostname
Returns:expected to use HostShowTemplate. ex.:
{'host': {'resource':D},..}
D: {'host': 'hostname','project': 'admin',
    'cpu': 1, 'memory_mb': 2048, 'disk_gb': 30}
shutdown(req, id)
startup(req, id)
update(req, id, body)

Updates a specified body.

Parameters:body – example format {‘status’: ‘enable’, ‘maintenance_mode’: ‘enable’}
class Hosts(ext_mgr)

Bases: nova.api.openstack.extensions.ExtensionDescriptor

Admin-only host administration.

alias = 'os-hosts'
get_resources()
name = 'Hosts'
namespace = 'http://docs.openstack.org/compute/ext/hosts/api/v1.1'
updated = '2011-06-29T00:00:00Z'

Previous topic

The nova.api.openstack.compute.legacy_v2.contrib.hide_server_addresses Module

Next topic

The nova.api.openstack.compute.legacy_v2.contrib.hypervisor_status Module

Project Source

This Page