Fixed some docstring

Added default publisher_id flagw
This commit is contained in:
Nachi Ueno 2011-08-23 09:46:49 -07:00
parent c79a963009
commit 11a9d4acc3
2 changed files with 6 additions and 4 deletions

View File

@ -25,6 +25,9 @@ FLAGS = flags.FLAGS
flags.DEFINE_string('default_notification_level', 'INFO',
'Default notification level for outgoing notifications')
flags.DEFINE_string('default_publisher_id', FLAGS.host,
'Default publisher_id for outgoing notifications')
WARN = 'WARN'
INFO = 'INFO'
@ -55,9 +58,9 @@ def notify_decorator(name, fn):
body['args'].append(arg)
for key in kwarg:
body['kwarg'][key] = kwarg[key]
notify(FLAGS.host,
notify(FLAGS.default_publisher_id,
name,
DEBUG,
FLAGS.default_notification_level,
body)
return fn(*args, **kwarg)
return wrapped_func

View File

@ -141,8 +141,7 @@ class NotifierTestCase(test.TestCase):
def example_api(arg1, arg2):
return arg1 + arg2
example_api =\
nova.notifier.api.notify_decorator(
example_api = nova.notifier.api.notify_decorator(
'example_api',
example_api)