Previous topic

The nova.scheduler.simple Module

Next topic

The nova.test Module

This Page

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

The nova.service Module

Generic Node base class for all workers that run on hosts.

class Launcher

Bases: object

Launch one or more services and wait for them to complete.

launch_server(server)

Load and start the given server.

Parameters:server – The server you would like to start.
Returns:None
static run_server(server)

Start and wait for a server to finish.

Parameters:service – Server to run and wait for.
Returns:None
stop()

Stop all services which are currently running.

Returns:None
wait()

Waits until all services have been stopped, and then returns.

Returns:None
class Service(host, binary, topic, manager, report_interval=None, periodic_interval=None, *args, **kwargs)

Bases: object

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 and reports it state to the database services table.

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

Instantiates class and passes back application object.

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

Destroy the service object in the datastore.

periodic_tasks(raise_on_error=False)

Tasks to be run at a periodic interval.

report_state()

Update the state of this service in the datastore.

start()
stop()
wait()
class WSGIService(name, loader=None)

Bases: object

Provides ability to launch API from a ‘paste’ configuration.

start()

Start serving this service using loaded configuration.

Also, retrieve updated port number in case ‘0’ was passed in, which indicates a random port should be used.

Returns:None
stop()

Stop serving this API.

Returns:None
wait()

Wait for the service to stop serving this API.

Returns:None
serve(*servers)
wait()