validating threshold_rule and combination_rule should according alarm's type

Bug #1288677 reported by Liusheng
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Medium
Liusheng

Bug Description

Threshold_rule or combination_rule must be set to an alarm object, and they cannot be set at the same time.
Alarm's type must be one of threshold and combination.
So if when we updating an alarm with Threshold_rule and combination type, the return is error,but the faultstring is:

'UnsetType' object has no attribute 'as_dict'

it is ambiguous.

threshold_rule and combination_rule should be validated according alarm's type.

Liusheng (liusheng)
Changed in ceilometer:
assignee: nobody → Liusheng (liusheng)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ceilometer (master)

Fix proposed to branch: master
Review: https://review.openstack.org/78587

Changed in ceilometer:
status: New → In Progress
Changed in ceilometer:
importance: Undecided → Medium
milestone: none → icehouse-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/78587
Committed: https://git.openstack.org/cgit/openstack/ceilometer/commit/?id=2c23169109c75ff3e387b22979f8330a1fae8a10
Submitter: Jenkins
Branch: master

commit 2c23169109c75ff3e387b22979f8330a1fae8a10
Author: liu-sheng <email address hidden>
Date: Thu Mar 6 19:56:32 2014 +0800

    Ensure alarm rule conform to alarm type

    Threshold_rule or combination_rule must be set to an Alarm object,
    and they cannot be set at the same time.
    Alarm's type must be one of threshold and combination.
    Threshold_rule and combination_rule should be validated according alarm's
    type.

    Change-Id: I97bf82defeaf0dc1a0e897e10886fd736361041d
    Closes-bug: #1288677

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: icehouse-rc1 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.