What happened?
The defaultLimit field for RegisteredLimits in Gophercloud is an integer with required:true
While OpenStack permits a value of 0, Gophercloud will fail validation for the field in that case.
Gophercloud runs into this:
|
if zero { |
|
// if the field has a 'required' tag, it can't have a zero-value |
|
err := ErrMissingInput{} |
|
err.Argument = f.Name |
|
return nil, err |
|
} |
Expected behavior would be that Gophercloud permits requests containing a defaultLimit of 0 (in fact everything from -1 to 2147483647 should be valid)
See also k-orc/openstack-resource-controller#782 (comment)
Version
v2 (current)
What happened?
The
defaultLimitfield for RegisteredLimits in Gophercloud is an integer withrequired:trueWhile OpenStack permits a value of
0, Gophercloud will fail validation for the field in that case.Gophercloud runs into this:
gophercloud/params.go
Lines 92 to 97 in 7544537
Expected behavior would be that Gophercloud permits requests containing a
defaultLimitof0(in fact everything from-1to2147483647should be valid)See also k-orc/openstack-resource-controller#782 (comment)
Version
v2 (current)