From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: vdsmapi: get complex type representation
......................................................................
vdsmapi: get complex type representation
vdsm-api contain some complex method prameter types.
vdsm-client should use vdsmapi.py knowledge of the schema
in order to help the users construct these parameters.
vdsmapi now returns a dictionary represenation of
given command parameters.
keys represent the parameter names and dict values are
the parameter types.
Note that it's almost perfect: union types aren't fully
represented and only the union types are being stored.
usage:
from vdsm.api import vdsmapi
schema_paths = [vdsmapi.find_schema()]
schema = vdsmapi.Schema(schema_paths, False)
schema.get_args_dict("Lease", "create")
{
"lease": {
"sd_id": "UUID",
"lease_id": "UUID"
}
}
Change-Id: I25a9ace931b377408ffabb2b570af9da7cfccfc6
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
M lib/vdsm/api/vdsmapi.py
M tests/vdsmapi_test.py
2 files changed, 112 insertions(+), 0 deletions(-)
Approvals:
Piotr Kliczewski: Looks good to me, approved
Yaniv Bronhaim: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Irit Goihman: Verified
--
To view, visit
https://gerrit.ovirt.org/73172
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I25a9ace931b377408ffabb2b570af9da7cfccfc6
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>