Generic Node baseclass for all workers that run on hosts
-
class nova.service.ApiService(conf, apis)
Bases: nova.service.WsgiService
Class for our nova-api service
-
classmethod create(conf=None)
-
class nova.service.Service(host, binary, topic, manager, report_interval=None, periodic_interval=None, *args, **kwargs)
Bases: object
Base class for workers that run on hosts.
-
classmethod create(host=None, binary=None, topic=None, manager=None, report_interval=None, periodic_interval=None)
Instantiates class and passes back application object.
- Args:
- 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()
Tasks to be run at a periodic interval
-
report_state()
Update the state of this service in the datastore.
-
start()
-
stop()
-
wait()
-
class nova.service.WsgiService(conf, apis)
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()
-
nova.service.serve(*services)
-
nova.service.serve_wsgi(cls, conf=None)
-
nova.service.wait()