You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to POST a child prefix to the following endpoint api/ipam/prefixes/(parent-prefix)/available-prefixes
You get the following error complaining about prefix length: <pre><strong><type 'exceptions.KeyError'></strong><br /> u'prefix_length'</pre>
The point of the /available-prefixes/ endpoint is that it will automatically provision the next available prefix: You just have to specify the size (prefix_length) in the request. If you want to provision a specific prefix, use the /api/ipam/prefixes/ endpoint. (Also, you only need "status": 1 for the status field.)
That said, the API should return a validation error rather than an exception if prefix_length is missing from the POSTed data.
Issue type
[ ] Feature request
[X ] Bug report
[ ] Documentation
Environment
When trying to POST a child prefix to the following endpoint
api/ipam/prefixes/(parent-prefix)/available-prefixes
You get the following error complaining about prefix length:
<pre><strong><type 'exceptions.KeyError'></strong><br /> u'prefix_length'</pre>
The following is the json I am passing
{ "prefix": "ip/29", "status": { "value": 1, "label": "Active" } }
Description
The text was updated successfully, but these errors were encountered: