Put options in a list.
Update nova.notifications configuration options to be in a list, like pretty much everywhere else. For some reason when I saw this it buged me so ... I changed it. Change-Id: I551aba4eaceed2d1a8925e9ab621a030af83eeca
This commit is contained in:
@@ -33,27 +33,25 @@ from nova import utils
|
|||||||
|
|
||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
notify_state_opt = cfg.StrOpt('notify_on_state_change', default=None,
|
notify_opts = [
|
||||||
help='If set, send compute.instance.update notifications on instance '
|
cfg.StrOpt('notify_on_state_change', default=None,
|
||||||
'state changes. Valid values are None for no notifications, '
|
help='If set, send compute.instance.update notifications on instance '
|
||||||
'"vm_state" for notifications on VM state changes, or '
|
'state changes. Valid values are None for no notifications, '
|
||||||
'"vm_and_task_state" for notifications on VM and task state '
|
'"vm_state" for notifications on VM state changes, or '
|
||||||
'changes.')
|
'"vm_and_task_state" for notifications on VM and task state '
|
||||||
|
'changes.'),
|
||||||
notify_any_opt = cfg.BoolOpt('notify_on_any_change', default=False,
|
cfg.BoolOpt('notify_on_any_change', default=False,
|
||||||
help='If set, send compute.instance.update notifications on instance '
|
help='If set, send compute.instance.update notifications on instance '
|
||||||
'state changes. Valid values are False for no notifications, '
|
'state changes. Valid values are False for no notifications, '
|
||||||
'True for notifications on any instance changes.')
|
'True for notifications on any instance changes.'),
|
||||||
|
cfg.BoolOpt('notify_api_faults', default=False,
|
||||||
notify_api_faults = cfg.BoolOpt('notify_api_faults', default=False,
|
help='If set, send api.fault notifications on caught exceptions '
|
||||||
help='If set, send api.fault notifications on caught exceptions '
|
'in the API service.'),
|
||||||
'in the API service.')
|
]
|
||||||
|
|
||||||
|
|
||||||
CONF = cfg.CONF
|
CONF = cfg.CONF
|
||||||
CONF.register_opt(notify_state_opt)
|
CONF.register_opts(notify_opts)
|
||||||
CONF.register_opt(notify_any_opt)
|
|
||||||
CONF.register_opt(notify_api_faults)
|
|
||||||
|
|
||||||
|
|
||||||
def send_api_fault(url, status, exception):
|
def send_api_fault(url, status, exception):
|
||||||
|
|||||||
Reference in New Issue
Block a user