secgroup-add-rule and delete-rule handle case differently

Bug #1052725 reported by Michael Chapman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
Vasyl Khomenko

Bug Description

$ nova secgroup-add-rule revproxy TCP 8080 8080 0.0.0.0/0
$ nova secgroup-list-rules revproxy
+-------------+-----------+---------+-----------+--------------+
| IP Protocol | From Port | To Port | IP Range | Source Group |
+-------------+-----------+---------+-----------+--------------+
| tcp | 8080 | 8080 | 0.0.0.0/0 | |
+-------------+-----------+---------+-----------+--------------+

$ nova secgroup-delete-rule revproxy TCP 8080 8080 0.0.0.0/0
ERROR: Rule not found

$ nova secgroup-delete-rule revproxy tcp 8080 8080 0.0.0.0/0
$

The ‘TCP’ is case sensitive when removing, but not when adding.

Is there some sort of sanitisation performed by the API server to convert the 'TCP' to lower case, that then means that the base.getId() function is not going to get a match when it compares the db's value to the upper case version provided by user input?

Changed in python-novaclient:
assignee: nobody → Vasyl Khomenko (vkhomenko)
Changed in python-novaclient:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/22718
Committed: http://github.com/openstack/python-novaclient/commit/9ab600fb8030183cd58e40b2f0ac6d9fd74e46cb
Submitter: Jenkins
Branch: master

commit 9ab600fb8030183cd58e40b2f0ac6d9fd74e46cb
Author: Vasyl Khomenko <email address hidden>
Date: Fri Feb 22 12:59:06 2013 -0500

    Make ip_protocol parameter in security groups rules case insensitive

    Added convert ip_protocol to uppercase.
    Added tests

    Fixes: bug #1052725

    Change-Id: I966ddad0800556b1cc848003d07d4a897ce1b9c1

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-novaclient:
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.