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
{{ message }}
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.
The edit_rate_limits and disable_rate_limits methods of the pyvcloud.vcd.gateway.Gateway() class call the put_linked_resource method of the vcd.Client class.
The RelationType.EDIT is incorrect, the proper RelationType is RelationType.GATEWAY_UPDATE_PROPERTIES.
Currently any request to edit or remove rate limits on the Edge Gateway, is accepted with a 202 (queued) but then fails as the request is invalid.
Reproduction steps
Instantiate a Gateway object.
Attempt to disable or edit a rate limit on one of the external networks.
Log that the task was queued (Return code: 202).
Wait.
Notice that the updates you requested were not made.
Log in to the UI to see that the task failed almost instantly.
Compare the API call to that of the same request from the UI.
Notice that the RelationType is incorrect.
Subclass a Gateway object and override the rate_limits methods to use RelationType.GATEWAY_UPDATE_PROPERTIES.
Use the Subclassed Gateway object to confirm that the changes to rate limits are now working.
Cry inconsolably because a simple integration test would have caught this bug. ;-)
Cheer up because the folks a VMWare are gonna fix this quickly, right?
Expected behavior
The calls to Client.put_linked_resource() should use RelationType.GATEWAY_UPDATE_PROPERTIES.
Additional context
It's probable that a broader review needs to be done on all the methods of the Gateway class.
RelationType.GATEWAY_UPDATE_PROPERTIES is only used twice in the class definition and I suspect that it ought to be used for most of the modification tasks. Unfortunately, I don't have a suitable lab environment nor the time to check every method in this class. :-(
The text was updated successfully, but these errors were encountered:
Describe the bug
The
edit_rate_limits
anddisable_rate_limits
methods of thepyvcloud.vcd.gateway.Gateway()
class call theput_linked_resource
method of thevcd.Client
class.The calls look like this:
The
RelationType.EDIT
is incorrect, the properRelationType
isRelationType.GATEWAY_UPDATE_PROPERTIES
.Currently any request to edit or remove rate limits on the Edge Gateway, is accepted with a 202 (queued) but then fails as the request is invalid.
Reproduction steps
RelationType.GATEWAY_UPDATE_PROPERTIES
.Expected behavior
The calls to
Client.put_linked_resource()
should useRelationType.GATEWAY_UPDATE_PROPERTIES
.Additional context
It's probable that a broader review needs to be done on all the methods of the Gateway class.
RelationType.GATEWAY_UPDATE_PROPERTIES
is only used twice in the class definition and I suspect that it ought to be used for most of the modification tasks. Unfortunately, I don't have a suitable lab environment nor the time to check every method in this class. :-(The text was updated successfully, but these errors were encountered: