Change in ovirt-engine-sdk[master]: sdk: Remove trailing slashes from URL prefix

Juan Hernandez has submitted this change and it was merged. Change subject: sdk: Remove trailing slashes from URL prefix ...................................................................... sdk: Remove trailing slashes from URL prefix Currently we get the URL prefix of the RESTAPI from the URL provided by the user, without modification. If this prefix contains trailing slashes we end up building complete URLs that contain two slashes. For example, if the user writes this code: api = ovirtsdk.api.API(url='https://whatever/api/', ...) api.clusters.list() We send the following request to the server: GET /api//clusters HTTP/1.1 The server doesn't accept these two slashes and generates an error response. To fix this issue this patch removes trailing slashes from the URL prefix. Change-Id: I7a75aeccd7ba42fa3d49c4cebb9fc0ab3eff5cb9 Bug-Url: https://bugzilla.redhat.com/1063746 Signed-off-by: Juan Hernandez <juan.hernandez@redhat.com> --- M src/codegen/templates/entrypointtemplate M src/ovirtsdk/api.py 2 files changed, 4 insertions(+), 4 deletions(-) Approvals: Juan Hernandez: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/24316 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I7a75aeccd7ba42fa3d49c4cebb9fc0ab3eff5cb9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine-sdk Gerrit-Branch: master Gerrit-Owner: Juan Hernandez <juan.hernandez@redhat.com> Gerrit-Reviewer: Juan Hernandez <juan.hernandez@redhat.com>
participants (1)
-
juan.hernandez@redhat.com