This Page

The quantum.extensions.agent Module

class quantum.extensions.agent.Agent

Bases: object

Agent management extension

classmethod get_alias()
classmethod get_description()
get_extended_resources(version)
classmethod get_name()
classmethod get_namespace()
classmethod get_resources()

Returns Ext Resources

classmethod get_updated()
exception quantum.extensions.agent.AgentNotFound(**kwargs)

Bases: quantum.common.exceptions.NotFound

message = u'Agent %(id)s could not be found'
exception quantum.extensions.agent.AgentNotFoundByTypeHost(**kwargs)

Bases: quantum.common.exceptions.NotFound

message = u'Agent with agent_type=%(agent_type)s and host=%(host)s could not be found'
class quantum.extensions.agent.AgentPluginBase

Bases: object

REST API to operate the Agent.

All of method must be in an admin context.

create_agent(context, agent)

Create agent.

This operation is not allow in REST API. @raise exceptions.BadRequest:

delete_agent(context, id)

Delete agent. Agents register themselves on reporting state. But if a agent does not report its status for a long time (for example, it is dead for ever. ), admin can remove it. Agents must be disabled before being removed.

get_agent(context, id, fields=None)
get_agents(context, filters=None, fields=None)
update_agent(context, agent)

Disable or Enable the agent. Discription also can be updated.

Some agents cannot be disabled, such as plugins, services. An error code should be reported in this case. @raise exceptions.BadRequest:

exception quantum.extensions.agent.MultipleAgentFoundByTypeHost(**kwargs)

Bases: quantum.common.exceptions.Conflict

message = u'Multiple agents with agent_type=%(agent_type)s and host=%(host)s found'