TritonDataCenter / sdc-napi

Triton Network API: manages networking-related data
Mozilla Public License 2.0
4 stars 14 forks source link

Unable to remove default gateway after adding #12

Open mdrobnak opened 9 years ago

mdrobnak commented 9 years ago

In an attempt to do some testing to see if it was possible, I added a default gateway to the admin network like so:

66 sdc-napi /networks/f3a653b1-451e-474c-8690-996cc9dd3094 -X PUT -d '{"gateway":"10.13.96.1"}'

I then a moment later tried to remove it: 67 sdc-napi /networks/f3a653b1-451e-474c-8690-996cc9dd3094 -X PUT -d '{"gateway":""}'

But unfortunately that fails with: { "code": "InvalidParameters", "message": "Invalid parameters", "errors": [ { "field": "gateway", "code": "InvalidParameter", "message": "invalid IP address" } ] }

I also attempted with null instead of "", and that fails with the same error.

askfongjojo commented 9 years ago

Hi @mdrobnak, I am able to replicate this issue. Opened NAPI-318 to track this internally.