summaryrefslogtreecommitdiffstats
path: root/nova
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2013-03-05 04:09:16 +0000
committerGerrit Code Review <review@openstack.org>2013-03-05 04:09:16 +0000
commit5571889cb434ce96c379219e570c5c7d9acb7744 (patch)
treec2cdd83d145e9ff2823f0902a67ab27be18673be /nova
parentdbf5e13c3a914b7a7a685f551c782d130a1e7da7 (diff)
parentff483d683aa8203edbe0cbf47993972e4938a483 (diff)
downloadnova-5571889cb434ce96c379219e570c5c7d9acb7744.tar.gz
nova-5571889cb434ce96c379219e570c5c7d9acb7744.tar.xz
nova-5571889cb434ce96c379219e570c5c7d9acb7744.zip
Merge "Put options in a list."
Diffstat (limited to 'nova')
-rw-r--r--nova/notifications.py34
1 files changed, 16 insertions, 18 deletions
diff --git a/nova/notifications.py b/nova/notifications.py
index 08d7fce69..bed06acf6 100644
--- a/nova/notifications.py
+++ b/nova/notifications.py
@@ -33,27 +33,25 @@ from nova import utils
LOG = log.getLogger(__name__)
-notify_state_opt = cfg.StrOpt('notify_on_state_change', default=None,
- help='If set, send compute.instance.update notifications on instance '
- 'state changes. Valid values are None for no notifications, '
- '"vm_state" for notifications on VM state changes, or '
- '"vm_and_task_state" for notifications on VM and task state '
- 'changes.')
-
-notify_any_opt = cfg.BoolOpt('notify_on_any_change', default=False,
- help='If set, send compute.instance.update notifications on instance '
- 'state changes. Valid values are False for no notifications, '
- 'True for notifications on any instance changes.')
-
-notify_api_faults = cfg.BoolOpt('notify_api_faults', default=False,
- help='If set, send api.fault notifications on caught exceptions '
- 'in the API service.')
+notify_opts = [
+ cfg.StrOpt('notify_on_state_change', default=None,
+ help='If set, send compute.instance.update notifications on instance '
+ 'state changes. Valid values are None for no notifications, '
+ '"vm_state" for notifications on VM state changes, or '
+ '"vm_and_task_state" for notifications on VM and task state '
+ 'changes.'),
+ cfg.BoolOpt('notify_on_any_change', default=False,
+ help='If set, send compute.instance.update notifications on instance '
+ 'state changes. Valid values are False for no notifications, '
+ 'True for notifications on any instance changes.'),
+ cfg.BoolOpt('notify_api_faults', default=False,
+ help='If set, send api.fault notifications on caught exceptions '
+ 'in the API service.'),
+]
CONF = cfg.CONF
-CONF.register_opt(notify_state_opt)
-CONF.register_opt(notify_any_opt)
-CONF.register_opt(notify_api_faults)
+CONF.register_opts(notify_opts)
def send_api_fault(url, status, exception):