CLI client tries to find meter-label-rule by using name even though name attribute is not supported in meter-label-rule.

Bug #1609717 reported by Kengo Hobo on 2016-08-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Low
Kengo Hobo

Bug Description

Behavior of Show/Delete meter-label-rule is odd.

Case1. There is more than one meter-label-rule in system.

ubuntu@neutron-ml2:~$ neutron meter-label-rule-list
+--------------------------------------+----------+-----------+------------------+
| id | excluded | direction | remote_ip_prefix |
+--------------------------------------+----------+-----------+------------------+
| 4b8cc074-4903-4fb9-bf6c-dbc62ae9f935 | False | ingress | 10.10.10.10/32 |
| ba880ef9-6af0-4dbc-be63-b4c9418e6ac8 | False | ingress | 10.10.10.11/32 |
+--------------------------------------+----------+-----------+------------------+

-Request and Response
===============
ubuntu@neutron-ml2:~$ neutron meter-label-rule-delete a
Multiple metering_label_rule matches found for name 'a', use an ID to be more specific.
================
Error above is returned even though there is no meter-label-rule with name 'a'.

Case2. There is a meter-label-rule in system.

ubuntu@neutron-ml2:~$ neutron meter-label-rule-list
+--------------------------------------+----------+-----------+------------------+
| id | excluded | direction | remote_ip_prefix |
+--------------------------------------+----------+-----------+------------------+
| ba880ef9-6af0-4dbc-be63-b4c9418e6ac8 | False | ingress | 10.10.10.11/32 |
+--------------------------------------+----------+-----------+------------------+

-Request and Response
ubuntu@neutron-ml2:~$ neutron meter-label-rule-delete a
Deleted metering_label_rule: a

The resource is deleted even though name of the meter-label-rule is not 'a'.

Kengo Hobo (hobo-kengo) on 2016-08-04
Changed in neutron:
assignee: nobody → Kengo Hobo (hobo-kengo)
tags: added: metering

Deleting metering rules should be only accept valid IDs. In this case, if there is only one metering rule it will be removed even if the ID is invalid.

Changed in neutron:
status: New → Confirmed
importance: Undecided → Low

This issue was fixed in the openstack/python-neutronclient 6.1.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers