Setting "period " with negative value do not prompt error

Bug #1212159 reported by Feilong Wang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceilometer
Fix Released
Undecided
Feilong Wang

Bug Description

GET http://10.1.0.175:8777/v2/meters/port/statistics?period=-1
But the result is 200 OK. No errors report.
This query should not allow negative number setting, it should return 400 error, and prompts like this :
"Period must be positive” which like setting "Limit" to negative.

Feilong Wang (flwang)
Changed in ceilometer:
assignee: nobody → Fei Long Wang (flwang)
status: New → In Progress
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/41926

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ceilometer (master)

Reviewed: https://review.openstack.org/41926
Committed: http://github.com/openstack/ceilometer/commit/a6ca935665aef3cf00b8a01ca8d4fb4becf1051f
Submitter: Jenkins
Branch: master

commit a6ca935665aef3cf00b8a01ca8d4fb4becf1051f
Author: Fei Long Wang <email address hidden>
Date: Wed Aug 14 21:40:57 2013 +0800

    Raise error when period with negative value

    Based on current implement, when use launch below REST API:
    GET http://10.1.0.175:8777/v2/meters/port/statistics?period=-1
    The result will be 200 OK. No any error reports. This query
    should not allow negative value setting but 400 error, and
    prompts like this: "Period must be positive.". Just like
    setting "Limit" to negative.

    Fixes bug 1212159

    Change-Id: I8d547fdf8faae2094b24c81da6b233b432bc99ae

Changed in ceilometer:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: none → havana-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ceilometer:
milestone: havana-3 → 2013.2
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.