From Ondra Machacek <omachace(a)redhat.com>:
Ondra Machacek has submitted this change and it was merged.
Change subject: Add support for custom headers and query parameters
......................................................................
Add support for custom headers and query parameters
Currently there is no way to send to the server custom headers or query
parameters. This patch adds support for that. For example, if the
caller, for whatever the reason, needs to send the 'My: myvalue' header
and the 'your=yourvalue' query parameter to the request to add a virtual
machine, it can be done as follows:
# Get the reference to the service that managse the collection
# of virtual machines:
vms_service = connection.system_service().vms_service()
# Add the virtual machine, with a custom query and header
vms_service.add(
types.Vm(),
headers={'my': 'value'},
query={'your': 'value'},
)
Change-Id: I27ca5f421215da1d920474445be08746248e4aed
Signed-off-by: Ondra Machacek <omachace(a)redhat.com>
Signed-off-by: Juan Hernandez <juan.hernandez(a)redhat.com>
---
M generator/src/main/java/org/ovirt/sdk/python/ServicesGenerator.java
M sdk/tests/server.py
M sdk/tests/test_vm_service.py
3 files changed, 124 insertions(+), 14 deletions(-)
Approvals:
Ondra Machacek: Verified; Looks good to me, approved
Juan Hernandez: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
--
To view, visit
https://gerrit.ovirt.org/72983
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I27ca5f421215da1d920474445be08746248e4aed
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine-sdk
Gerrit-Branch: master
Gerrit-Owner: Ondra Machacek <omachace(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Ondra Machacek <omachace(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>