Validate --lines with `openstack console log show`

Bug #1512263 reported by xiexs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-openstackclient
Fix Released
Medium
xiexs

Bug Description

The behaviors seem inconsistent for the "openstack console log --lines show", while the line number is specified with different negative numbers.
For instance:
  1) $ openstack console log show --lines -10 test_server
Invalid input for field/attribute length. Value: -9. -9 is less than the minimum of -1 (HTTP 400) (Request-ID: req-25afc42f-0fd1-45c6-b7c4-65236a5dc7a3)
        $echo $?
          1

  2) $ openstack console log show --lines -1 test_server
      $ echo $?
          0

  3) $ openstack console log show --lines -2 test_server
        >>output the all console log<<
      $ echo $?
          0

And the reason for this issue is because there is no validating for the --lines parameter.

xiexs (xiexs)
Changed in python-openstackclient:
assignee: nobody → xiexs (xiexs)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-openstackclient (master)

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

Changed in python-openstackclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-openstackclient (master)

Reviewed: https://review.openstack.org/240804
Committed: https://git.openstack.org/cgit/openstack/python-openstackclient/commit/?id=ea63553925bce0432958ae4a15536f7f83b1f28d
Submitter: Jenkins
Branch: master

commit ea63553925bce0432958ae4a15536f7f83b1f28d
Author: xiexs <email address hidden>
Date: Mon Nov 9 04:22:00 2015 -0500

    Fix the bug of "openstack console log show"

    The behaviors are inconsistent while different
    negative line numbers specified.

    Change-Id: I2573f3e789f5603c896758971830ffc0b94c5e2b
    Closes-Bug: #1512263

Changed in python-openstackclient:
status: In Progress → Fix Committed
Changed in python-openstackclient:
importance: Undecided → Medium
summary: - Miss checking the line number for OSC "openstack console log show"
+ Validate --lines with `openstack console log show`
Changed in python-openstackclient:
milestone: none → 1.9.0
status: Fix Committed → Fix Released
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.