This Page

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

The nova.scheduler.api Module

Handles all requests relating to schedulers.

exception nova.scheduler.api.RedirectResult(results)

Bases: nova.exception.Error

Used to the HTTP API know that these results are pre-cooked and they can be returned to the caller directly.

nova.scheduler.api.child_zone_helper(zone_list, func)

Fire off a command to each zone in the list. The return is [novaclient return objects] from each child zone. For example, if you are calling server.pause(), the list will be whatever the response from server.pause() is. One entry per child zone called.

nova.scheduler.api.get_zone_capabilities(context, service=None)

Returns a dict of key, value capabilities for this zone, or for a particular class of services running in this zone.

nova.scheduler.api.get_zone_list(context)

Return a list of zones assoicated with this zone.

nova.scheduler.api.redirect_handler(f)
class nova.scheduler.api.reroute_compute(method_name)

Bases: object

Decorator used to indicate that the method should delegate the call the child zones if the db query can’t find anything.

get_collection_context_and_id(args, kwargs)

Returns a tuple of (novaclient collection name, security context and resource id. Derived class should override this.

unmarshall_result(zone_responses)

Result is a list of responses from each child zone. Each decorator derivation is responsible to turning this into a format expected by the calling method. For example, this one is expected to return a single Server dict {‘server’:{k:v}}. Others may return a list of them, like {‘servers’:[{k,v}]}

nova.scheduler.api.update_service_capabilities(context, service_name, host, capabilities)

Send an update to all the scheduler services informing them of the capabilities of this service.

nova.scheduler.api.wrap_novaclient_function(f, collection, method_name, item_id)

Appends collection, method_name and item_id to the incoming (nova, zone) call from child_zone_helper.

nova.scheduler.api.zone_create(context, data)
nova.scheduler.api.zone_delete(context, zone_id)
nova.scheduler.api.zone_get(context, zone_id)
nova.scheduler.api.zone_update(context, zone_id, data)