Previous topic

The cinder.api.contrib.extended_snapshot_attributes Module

Next topic

The cinder.api.contrib.image_create Module

This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Cinder 2011.2 docs or all OpenStack docs too.

The cinder.api.contrib.hosts Module

The hosts admin extension.

class HostActionTemplate

Bases: cinder.api.xmlutil.TemplateBuilder

construct()
class HostController

Bases: object

The Hosts API controller for the OpenStack API.

index(req)
show(req, id)

Shows the volume usage info given by hosts.

Parameters:
  • context – security context
  • host – hostname
Returns:

expected to use HostShowTemplate. ex.:

{'host': {'resource':D},..}
D: {'host': 'hostname','project': 'admin',
    'volume_count': 1, 'total_volume_gb': 2048}

update(req, id, service=None, *args, **kwargs)
class HostDeserializer(metadata=None)

Bases: cinder.api.openstack.wsgi.XMLDeserializer

default(string)
class HostIndexTemplate

Bases: cinder.api.xmlutil.TemplateBuilder

construct()
class HostShowTemplate

Bases: cinder.api.xmlutil.TemplateBuilder

construct()
class HostUpdateTemplate

Bases: cinder.api.xmlutil.TemplateBuilder

construct()
class Hosts(ext_mgr)

Bases: cinder.api.extensions.ExtensionDescriptor

Admin-only host administration

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

Makes sure that the host exists.