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
The model.mustache template defines an if clause for parameters that
are required and have validation that looks like this:
if not {{param}}:
raise ValueError("Invalid value param is 'None'")
This part of the template was inherited from the upstream template,
the intention of the clause appears to be detect if the parameter is
being set to None. However, it causes issues for required parameters
that are of type 'integer' or 'float' because a value of 0 or 0.0
will be treated the same as the value of None, which is not correct.
This issue was encountered by an SE attempting to utilize the
NetworkGroupnetsApi.list_subnets_subnet_pools function, which prior to
this fix will throw an exception when the value of the sc_ttl parameter
is 0. I added the test script that I used to reproduce the issue and to
verify that the change fixes the issue. I also ran all the other test
scripts in the tests directory to verify that they all still worked.
Also, updated several of the tests to use test_constants.py.
0 commit comments