Comment 0 for bug 1722802

Revision history for this message
Ricardo Rocha (rocha-porto) wrote :

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
'add' and 'replace' operations needs value (HTTP 400) (Request-ID: req-4629053f-01ff-4048-b3f5-178b147e63c8)

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 unknown' when an unknown field is given for replace
* 'invalid value' when an invalid value is given for an existing field