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
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Invalid
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'.

Tags: metering
Kengo Hobo (hobo-kengo)
Changed in neutron:
assignee: nobody → Kengo Hobo (hobo-kengo)
tags: added: metering
Revision history for this message
Victor Morales (electrocucaracha) wrote :

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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-neutronclient 6.1.0

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

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Fix released in openstack/python-neutronclient.

Changed in neutron:
status: Confirmed → Invalid
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.