yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #00888
[Bug 1102897] Re: quantum port-create --fixed-ip ignores additional invalid items
A recent fix to the Quantum server now results in a 400 error when extra
fields are passed via the API. Part of the update to Quantum client
library included between input validation before the request is
submitted to the server. I'm moving the bug to the client project.
** Also affects: python-quantumclient
Importance: Undecided
Status: New
** Changed in: quantum
Status: New => Invalid
** Changed in: python-quantumclient
Status: New => Confirmed
** Changed in: python-quantumclient
Assignee: (unassigned) => Mark McClain (markmcclain)
** Changed in: python-quantumclient
Importance: Undecided => Medium
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to quantum.
https://bugs.launchpad.net/bugs/1102897
Title:
quantum port-create --fixed-ip ignores additional invalid items
Status in Python client library for Quantum:
Confirmed
Status in OpenStack Quantum (virtual network service):
Invalid
Bug description:
When doing a port-create - and possibly other requests - you can add any old rubbish to the request, and provided the minimum required info is present, there is no error :
ubuntu@az3devstackvm2:~/devstack$ quantum port-create --fixed-ip subnet_id=1972dfa7-5537-465b-b41d-d3fdcd1de7ce,RUBBISH=SOMETHING 20147087-5520-4bb0-81a1-43ccbf2d101a
Created a new port:
+----------------+---------------------------------------------------------------------------------+
| Field | Value |
+----------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "1972dfa7-5537-465b-b41d-d3fdcd1de7ce", "ip_address": "10.0.0.6"} |
| id | 78b68e9f-b414-40c8-af9e-0c537e5e45c8 |
| mac_address | fa:16:3e:a0:b6:82 |
| name | |
| network_id | 20147087-5520-4bb0-81a1-43ccbf2d101a |
| status | ACTIVE |
| tenant_id | 5e0d8b02dd0a448da10749dd5d33b88c |
+----------------+---------------------------------------------------------------------------------+
ubuntu@az3devstackvm2:~/devstack$
I have validated that the RUBBISH:SOMETHING is passed to the server, and is silently ignored.
This means that e.g. typos in commands can generate something other
than the user was expecting :
ubuntu@az3devstackvm2:~/devstack$ q port-create --fixed-ip subnet_id=1972dfa7-5537-465b-b41d-d3fdcd1de7ce,ip-address=10.0.0.6 20147087-5520-4bb0-81a1-43ccbf2d101a
Created a new port:
+----------------+---------------------------------------------------------------------------------+
| Field | Value |
+----------------+---------------------------------------------------------------------------------+
| admin_state_up | True |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "1972dfa7-5537-465b-b41d-d3fdcd1de7ce", "ip_address": "10.0.0.5"} |
| id | 008336f8-6fbd-4821-ab67-f9c8f70d0ab2 |
| mac_address | fa:16:3e:c6:ca:05 |
| name | |
| network_id | 20147087-5520-4bb0-81a1-43ccbf2d101a |
| status | ACTIVE |
| tenant_id | 5e0d8b02dd0a448da10749dd5d33b88c |
+----------------+---------------------------------------------------------------------------------+
I thought I was asking for 10.0.0.6, but I got 10.0.0.5
Would a 400 error not be more appropriate here ?
To manage notifications about this bug go to:
https://bugs.launchpad.net/python-quantumclient/+bug/1102897/+subscriptions