Dan Kenigsberg has posted comments on this change.
Change subject: contrib: Simple jsonrpc client
......................................................................
Patch Set 11: Code-Review-1
(2 comments)
https://gerrit.ovirt.org/#/c/35181/11/contrib/jsonrpc
File contrib/jsonrpc:
Line 38:
Line 39: For invokinng methods with many or complex parameters, you can read the
Line 40: parameters from a file:
Line 41:
Line 42: # jsonrpc VM.create -f vm-create
could you provide an example how does a complex input like this would look like?
I don't understand how can this possibly work without json-parsing the file. How would
you represent the list of device dictionaries?
Line 43: ...
Line 44:
Line 45: It is also possible to read parameters from standard input, creating complex
Line 46: parameters interactively:
Line 111:
Line 112: def option_parser():
Line 113: parser = argparse.ArgumentParser()
Line 114: parser.add_argument('-a', '--host', dest="host",
default="localhost",
Line 115: help='host address (default localhost)')
can you contact a host with ssl=True (which is the default, common installation)? I see no
reference to our pki.
Line 116: parser.add_argument('method', help='remote method name')
Line 117: parser.add_argument('-f', '--file', dest='file',
Line 118: help="read method parameters from json file. Set
to"
Line 119: " '-' to read from standard
input")
--
To view, visit
https://gerrit.ovirt.org/35181
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia6273eabf6f3601602659d1e4e748d8025ae8084
Gerrit-PatchSet: 11
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: 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>
Gerrit-HasComments: Yes