cluster template update error is too generic

Bug #1722802 reported by Ricardo Rocha
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
New
Undecided
M V P Nitesh

Bug Description

Trying to update the floating_ip_enabled field:

# openstack coe cluster template update test-template replace floating_ip_enabled=false
'add' and 'replace' operations needs value (HTTP 400) (Request-ID: req-4629053f-01ff-4048-b3f5-178b147e63c8)

It's not obvious that the value is wrong. If i do instead (note uppercase False):

# openstack coe cluster template update test-template replace floating_ip_enabled=False
+-----------------------+---------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------+
| floating_ip_enabled | False

The same original error is given if i pass a field that does not exist:

# openstack coe cluster template update test-template replace random_field=false
'add' and 'replace' operations needs value (HTTP 400) (Request-ID: req-c60395bf-6b3b-4ab8-8d6a-353b6e08e0bb)

Interestingly passing an int gives a different message:

# openstack coe cluster template update test-template replace random_field=1
Couldn't apply patch '[{'path': '/random_field', 'value': 1, 'op': 'replace'}]' (HTTP 400) (Request-ID: req-67ff0b8b-a0d2-4f30-b883-2b162e7ac28a)

Would be nice to get Magnum to reply with:
* 'field X is not known' when an unknown field is given for replace
* 'invalid value X for field Y' when an invalid value is given for an existing field

description: updated
M V P Nitesh (m-nitesh)
Changed in magnum:
assignee: nobody → M V P Nitesh (m-nitesh)
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.