Container Infra v1: Use interface for update value#1463
Container Infra v1: Use interface for update value#1463jtopjian merged 1 commit intogophercloud:masterfrom
Conversation
This commit changes the Value field of UpdateOpts to be an interface{}
instead of a string. This is to send type-specific values to the API
service.
|
Build failed.
|
|
recheck |
|
Build failed.
|
|
I've tested this, passing a string to UpdateOpts still causes the value to be rejected by the API (as expected), but now passing an int works. |
|
@tghartland Thank you for testing. Just to confirm: this is expected behavior for you? If the value really should be a string, then this change is still valid, right? |
|
The node_count parameter is supposed to be an integer. That it accepts a string when the API is run with python2 is probably unintended. |
|
Right, but what I mean is that when updating other attributes besides |
|
Ah I see what you mean now. I'm not even sure what other parameter I would use to test that. |
|
Sounds good. Thank you for looking into this. |
Required for compatibility with Magnum APIs running on Python 3. See gophercloud#1458 and gophercloud#1463
* Add WaitForTimeout to acceptance tools To be used in situations where a 300 second timeout is not long enough or otherwise unsuitable. The WaitFor function is changed to simply call WaitForTimeout and pass the same 300 second timeout, keeping the same behaviour. * Set timeout for cluster creation in containerinfra acceptance tests Keeps the same timeout as previously by default, but can be changed for cluster templates that require a longer timeout. * Check cluster creation error in containerinfra CRUD acceptance * Use integer for replacing node count in containerinfra acceptance tests Required for compatibility with Magnum APIs running on Python 3. See #1458 and #1463 * Use overlay2 for template storage driver in contianerinfra acceptance With the storage driver set to devicemapper the magnum API did not accept clusters created with the template, as docker_volume_size was not set. Instead of setting the volume size, overlay2 can be used with no volume and is the preferred storage driver.
This commit changes the Value field of UpdateOpts to be an interface{}
instead of a string. This is to send type-specific values to the API
service.
For #1458
/cc @tghartland would you be able to test this and confirm it's working?