This Page

The quantum.service Module

class quantum.service.QuantumApiService(app_name)

Bases: quantum.service.WsgiService

Class for quantum-api service.

classmethod create()
class quantum.service.Service(host, binary, topic, manager, report_interval=None, periodic_interval=None, periodic_fuzzy_delay=None, *args, **kwargs)

Bases: quantum.openstack.common.rpc.service.Service

Service object for binaries running on hosts.

A service takes a manager and enables rpc by listening to queues based on topic. It also periodically runs tasks on the manager.

classmethod create(host=None, binary=None, topic=None, manager=None, report_interval=None, periodic_interval=None, periodic_fuzzy_delay=None)

Instantiates class and passes back application object.

Parameters:
  • host – defaults to CONF.host
  • binary – defaults to basename of executable
  • topic – defaults to bin_name - ‘nova-‘ part
  • manager – defaults to CONF.<topic>_manager
  • report_interval – defaults to CONF.report_interval
  • periodic_interval – defaults to CONF.periodic_interval
  • periodic_fuzzy_delay – defaults to CONF.periodic_fuzzy_delay
kill()

Destroy the service object.

periodic_tasks(raise_on_error=False)

Tasks to be run at a periodic interval.

report_state()

Update the state of this service.

start()
stop()
wait()
class quantum.service.WsgiService(app_name)

Bases: object

Base class for WSGI based services.

For each api you define, you must also define these flags: :<api>_listen: The address on which to listen :<api>_listen_port: The port on which to listen

start()
wait()
quantum.service.serve_wsgi(cls)