From bcc0004e0ebd1345dc3580e1cb01f7ca1222ef51 Mon Sep 17 00:00:00 2001 From: Vishvananda Ishaya Date: Thu, 2 Sep 2010 14:57:45 -0700 Subject: fix service unit tests --- nova/service.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'nova/service.py') 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._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) -- cgit