The nova.api.openstack.extensions Module

class ControllerExtension(extension, collection, controller)

Bases: object

Extend core controllers of nova OpenStack API.

Provide a way to extend existing nova OpenStack API core controllers.

class ExtensionDescriptor(ext_mgr)

Bases: object

Base class that defines the contract for extensions.

Note that you don’t have to derive from this class to have a valid extension; it is purely a convenience.

alias = None
get_controller_extensions()

List of extensions.ControllerExtension extension objects.

Controller extensions are used to extend existing controllers.

get_resources()

List of extensions.ResourceExtension extension objects.

Resources define new nouns, and are accessible through URLs.

name = None
namespace = None
classmethod nsmap()

Synthesize a namespace map from extension.

updated = None
classmethod xmlname(name)

Synthesize element and attribute names.

class ExtensionManager

Bases: object

Load extensions from the configured extension path.

See nova/tests/api/openstack/volume/extensions/foxinsocks.py or an example extension implementation.

get_controller_extensions()

Returns a list of ControllerExtension objects.

get_resources()

Returns a list of ResourceExtension objects.

is_loaded(alias)
load_extension(ext_factory)

Execute an extension factory.

Loads an extension. The ‘ext_factory’ is the name of a callable that will be imported and called with one argument–the extension manager. The factory callable is expected to call the register() method at least once.

register(ext)
sorted_extensions()
class ExtensionTemplate

Bases: nova.api.openstack.xmlutil.TemplateBuilder

construct()
class ExtensionsResource(extension_manager)

Bases: nova.api.openstack.wsgi.Resource

create(req)
delete(req, id)
index(req)
show(req, id)
class ExtensionsTemplate

Bases: nova.api.openstack.xmlutil.TemplateBuilder

construct()
class ResourceExtension(collection, controller=None, parent=None, collection_actions=None, member_actions=None, custom_routes_fn=None, inherits=None)

Bases: object

Add top level resources to the OpenStack API in nova.

extension_authorizer(api_name, extension_name)
load_standard_extensions(ext_mgr, logger, path, package, ext_list=None)

Registers all standard API extensions.

make_ext(elem)
soft_extension_authorizer(api_name, extension_name)
wrap_errors(fn)

Ensure errors are not passed along.

Previous topic

The nova.api.openstack.compute.views.versions Module

Next topic

The nova.api.openstack.urlmap Module

This Page