From Dan Kenigsberg <danken(a)redhat.com>:
Dan Kenigsberg has submitted this change and it was merged.
Change subject: contrib: Simple jsonrpc client
......................................................................
contrib: Simple jsonrpc client
This is a simple generic client that does not know anything about the
available methods and parameters. The user should consult the schema to
construct request that makes sense. Future version should parse the
schema and provide online help.
Invoking simple methods:
# jsonrpc Host getVMList
['b3f6fa00-b315-4ad4-8108-f73da817b5c5']
Invoking methods with simple parameters::
# jsonrpc VM getStats vmID=b3f6fa00-b315-4ad4-8108-f73da817b5c5
...
For invokinng methods with many or complex parameters, you can read the
parameters from a file:
# jsonrpc StorageDomain activate -f sd-activate
...
where sd-activate file content is:
{
"storagedomainID": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
"storagepoolID": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
}
It is also possible to read parameters from standard input, creating
complex parameters interactively:
# jsonrpc StorageDomain activate -f -
{
"storagedomainID": "75ab40e3-06b1-4a54-a825-2df7a40b93b2",
"storagepoolID": "b3f6fa00-b315-4ad4-8108-f73da817b5c5"
}
(Press Ctrl + D to finish)
Change-Id: Ia6273eabf6f3601602659d1e4e748d8025ae8084
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
Signed-off-by: pkliczewski <piotr.kliczewski(a)gmail.com>
Signed-off-by: Irit Goihman <igoihman(a)redhat.com>
---
A contrib/jsonrpc
1 file changed, 169 insertions(+), 0 deletions(-)
Approvals:
Piotr Kliczewski: Looks good to me, approved
Nir Soffer: Looks good to me, but someone else must approve
Jenkins CI: Passed CI tests
Irit Goihman: Verified
--
To view, visit
https://gerrit.ovirt.org/35181
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6273eabf6f3601602659d1e4e748d8025ae8084
Gerrit-PatchSet: 28
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Adam Litke <alitke(a)redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini(a)redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <toni+ovirt(a)midokura.com>
Gerrit-Reviewer: Dan Kenigsberg <danken(a)redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce(a)redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani(a)redhat.com>
Gerrit-Reviewer: Irit Goihman <igoihman(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Jenkins CI RO
Gerrit-Reviewer: Nir Soffer <nsoffer(a)redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski(a)gmail.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi(a)redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>