diff options
| author | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-02 14:57:45 -0700 |
|---|---|---|
| committer | Vishvananda Ishaya <vishvananda@yahoo.com> | 2010-09-02 14:57:45 -0700 |
| commit | bcc0004e0ebd1345dc3580e1cb01f7ca1222ef51 (patch) | |
| tree | a5ec9d703e07c2f9c92972356f33699fd5908aa3 /nova/service.py | |
| parent | 450eac9e6cc76d6a1f03f9da67b40d814e5712c1 (diff) | |
| download | nova-bcc0004e0ebd1345dc3580e1cb01f7ca1222ef51.tar.gz nova-bcc0004e0ebd1345dc3580e1cb01f7ca1222ef51.tar.xz nova-bcc0004e0ebd1345dc3580e1cb01f7ca1222ef51.zip | |
fix service unit tests
Diffstat (limited to 'nova/service.py')
| -rw-r--r-- | nova/service.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nova/service.py b/nova/service.py index fc188be34..d7471f4c6 100644 --- a/nova/service.py +++ b/nova/service.py @@ -85,9 +85,6 @@ class Service(object, service.Service): manager, defaults to FLAGS.<topic>_manager report_interval, defaults to FLAGS.report_interval """ - if not report_interval: - report_interval = FLAGS.report_interval - if not host: host = FLAGS.host if not binary: @@ -96,16 +93,18 @@ class Service(object, service.Service): topic = binary.rpartition("nova-")[2] if not manager: manager = FLAGS.get('%s_manager' % topic, None) + if not report_interval: + report_interval = FLAGS.report_interval logging.warn("Starting %s node", topic) - service_obj = cls(FLAGS.host, binary, topic, manager) + service_obj = cls(host, binary, topic, manager) conn = rpc.Connection.instance() consumer_all = rpc.AdapterConsumer( connection=conn, - topic='%s' % topic, + topic=topic, proxy=service_obj) consumer_node = rpc.AdapterConsumer( connection=conn, - topic='%s.%s' % (topic, FLAGS.host), + topic='%s.%s' % (topic, host), proxy=service_obj) pulse = task.LoopingCall(service_obj.report_state) |
