
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success. I've seen /usr/share/doc/vdsm-jsonrpc/vdsm-api.html shipped within vdsm-jsonrpc rpm but it doesn't explain how to use the api. /usr/lib/python2.7/site-packages/vdsmapi.py looks useless /usr/share/vdsm/rpc/ are not public API but something only vdsm process should use. The feature pages http://www.ovirt.org/Features/Design/JsonRpc3.5 and http://www.ovirt.org/Features/Design/JsonRpc are incomplete or outdated and miss proper testing section specifying how to test the API. VDSM API pages are outdated or incomplete: http://www.ovirt.org/Vdsm_API http://www.ovirt.org/VDSM_Stable_API_Plan http://www.ovirt.org/Vdsm_API_Schema Any hint on how to use VDSM JSON RPC API anywhere? Can someone please write a clear VDSM API reference documentation? Piotr, as a kickstart, can you give me a code sample for connecting to vdsm and call getVdsCaps using jsonrpc? Thanks, -- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

Sandro, The API hasn't changed between xmlrpc and jsonrpc. The only difference is format how we provide it. We need to update the API docs that we have and there is a bit of work (hopefully) scheduled for 4.0 to define api interface between the engine and vdsm with validation on both sides. There is a bit of ongoing work to provide jsonrpc client for vdsm and you can code how to use it here [1]. There is a bit of work that needs to be done in order to merge it but you can take a look at start to play with it. Thanks, Piotr [1] https://gerrit.ovirt.org/#/c/45789 On Wed, Oct 7, 2015 at 3:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I've seen /usr/share/doc/vdsm-jsonrpc/vdsm-api.html shipped within vdsm-jsonrpc rpm but it doesn't explain how to use the api.
/usr/lib/python2.7/site-packages/vdsmapi.py looks useless
/usr/share/vdsm/rpc/ are not public API but something only vdsm process should use.
The feature pages http://www.ovirt.org/Features/Design/JsonRpc3.5 and http://www.ovirt.org/Features/Design/JsonRpc are incomplete or outdated and miss proper testing section specifying how to test the API.
VDSM API pages are outdated or incomplete: http://www.ovirt.org/Vdsm_API http://www.ovirt.org/VDSM_Stable_API_Plan http://www.ovirt.org/Vdsm_API_Schema
Any hint on how to use VDSM JSON RPC API anywhere? Can someone please write a clear VDSM API reference documentation?
Piotr, as a kickstart, can you give me a code sample for connecting to vdsm and call getVdsCaps using jsonrpc?
Thanks,
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

On Wed, Oct 7, 2015 at 3:51 PM, Piotr Kliczewski <pkliczew@redhat.com> wrote:
Sandro,
The API hasn't changed between xmlrpc and jsonrpc. The only difference is format how we provide it. We need to update the API docs that we have and there is a bit of work (hopefully) scheduled for 4.0 to define api interface between the engine and vdsm with validation on both sides.
There is a bit of ongoing work to provide jsonrpc client for vdsm and you can code how to use it here [1]. There is a bit of work that needs to be done in order to merge it but you can take a look at start to play with it.
Thanks, Piotr
Ok, so, looking at your URL, a first difference is: from vdsm import jsonrpcvdscli instead of from vdsm import vdscli a second one is that connect API differs: In [3]: xmlcli = vdscli.connect() In [4]: jsoncli = jsonrpcvdscli.connect() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-71cd6ff663fb> in <module>() ----> 1 jsoncli = jsonrpcvdscli.connect() TypeError: connect() takes at least 1 argument (0 given) so they're not really coming without changes :-)
On Wed, Oct 7, 2015 at 3:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I've seen /usr/share/doc/vdsm-jsonrpc/vdsm-api.html shipped within vdsm-jsonrpc rpm but it doesn't explain how to use the api.
/usr/lib/python2.7/site-packages/vdsmapi.py looks useless
/usr/share/vdsm/rpc/ are not public API but something only vdsm process should use.
The feature pages http://www.ovirt.org/Features/Design/JsonRpc3.5 and http://www.ovirt.org/Features/Design/JsonRpc are incomplete or outdated and miss proper testing section specifying how to test the API.
VDSM API pages are outdated or incomplete: http://www.ovirt.org/Vdsm_API http://www.ovirt.org/VDSM_Stable_API_Plan http://www.ovirt.org/Vdsm_API_Schema
Any hint on how to use VDSM JSON RPC API anywhere? Can someone please write a clear VDSM API reference documentation?
Piotr, as a kickstart, can you give me a code sample for connecting to vdsm and call getVdsCaps using jsonrpc?
Thanks,
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

On Wed, Oct 7, 2015 at 3:57 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Wed, Oct 7, 2015 at 3:51 PM, Piotr Kliczewski <pkliczew@redhat.com> wrote:
Sandro,
The API hasn't changed between xmlrpc and jsonrpc. The only difference is format how we provide it. We need to update the API docs that we have and there is a bit of work (hopefully) scheduled for 4.0 to define api interface between the engine and vdsm with validation on both sides.
There is a bit of ongoing work to provide jsonrpc client for vdsm and you can code how to use it here [1]. There is a bit of work that needs to be done in order to merge it but you can take a look at start to play with it.
Thanks, Piotr
Ok, so, looking at your URL, a first difference is:
from vdsm import jsonrpcvdscli instead of from vdsm import vdscli
a second one is that connect API differs:
In [3]: xmlcli = vdscli.connect()
In [4]: jsoncli = jsonrpcvdscli.connect() --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-71cd6ff663fb> in <module>() ----> 1 jsoncli = jsonrpcvdscli.connect()
TypeError: connect() takes at least 1 argument (0 given)
so they're not really coming without changes :-)
Small changes required since new jsonrpcvdscli is not one to one replacement. If you have any suggestions/improvements please let me know and we can change it to be more usable.
On Wed, Oct 7, 2015 at 3:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I've seen /usr/share/doc/vdsm-jsonrpc/vdsm-api.html shipped within vdsm-jsonrpc rpm but it doesn't explain how to use the api.
/usr/lib/python2.7/site-packages/vdsmapi.py looks useless
/usr/share/vdsm/rpc/ are not public API but something only vdsm process should use.
The feature pages http://www.ovirt.org/Features/Design/JsonRpc3.5 and http://www.ovirt.org/Features/Design/JsonRpc are incomplete or outdated and miss proper testing section specifying how to test the API.
VDSM API pages are outdated or incomplete: http://www.ovirt.org/Vdsm_API http://www.ovirt.org/VDSM_Stable_API_Plan http://www.ovirt.org/Vdsm_API_Schema
Any hint on how to use VDSM JSON RPC API anywhere? Can someone please write a clear VDSM API reference documentation?
Piotr, as a kickstart, can you give me a code sample for connecting to vdsm and call getVdsCaps using jsonrpc?
Thanks,
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

On Wed, Oct 7, 2015 at 4:00 PM, Piotr Kliczewski <pkliczew@redhat.com> wrote:
On Wed, Oct 7, 2015 at 3:57 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Wed, Oct 7, 2015 at 3:51 PM, Piotr Kliczewski <pkliczew@redhat.com> wrote:
Sandro,
The API hasn't changed between xmlrpc and jsonrpc. The only difference is format how we provide it. We need to update the API docs that we have and there is a bit of work (hopefully) scheduled for 4.0 to define api interface between the engine and vdsm with validation on both sides.
There is a bit of ongoing work to provide jsonrpc client for vdsm and you can code how to use it here [1]. There is a bit of work that needs to be done in order to merge it but you can take a look at start to play with it.
Thanks, Piotr
Ok, so, looking at your URL, a first difference is:
from vdsm import jsonrpcvdscli instead of from vdsm import vdscli
a second one is that connect API differs:
In [3]: xmlcli = vdscli.connect()
In [4]: jsoncli = jsonrpcvdscli.connect()
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-71cd6ff663fb> in <module>() ----> 1 jsoncli = jsonrpcvdscli.connect()
TypeError: connect() takes at least 1 argument (0 given)
so they're not really coming without changes :-)
Small changes required since new jsonrpcvdscli is not one to one replacement. If you have any suggestions/improvements please let me know and we can change it to be more usable.
ok, not an issue. help(jsonrpcvdscli.connect) Help on function connect in module vdsm.jsonrpcvdscli: connect(requestQueue, stompClient=None, host=None, port=None, useSSL=None, responseQueue=None) ok, this should probably be documented a bit better :-)
On Wed, Oct 7, 2015 at 3:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I've seen /usr/share/doc/vdsm-jsonrpc/vdsm-api.html shipped within vdsm-jsonrpc rpm but it doesn't explain how to use the api.
/usr/lib/python2.7/site-packages/vdsmapi.py looks useless
/usr/share/vdsm/rpc/ are not public API but something only vdsm process should use.
The feature pages http://www.ovirt.org/Features/Design/JsonRpc3.5 and http://www.ovirt.org/Features/Design/JsonRpc are incomplete or outdated and miss proper testing section specifying how to test the API.
VDSM API pages are outdated or incomplete: http://www.ovirt.org/Vdsm_API http://www.ovirt.org/VDSM_Stable_API_Plan http://www.ovirt.org/Vdsm_API_Schema
Any hint on how to use VDSM JSON RPC API anywhere? Can someone please write a clear VDSM API reference documentation?
Piotr, as a kickstart, can you give me a code sample for connecting to vdsm and call getVdsCaps using jsonrpc?
Thanks,
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

On Wed, Oct 7, 2015 at 4:34 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Wed, Oct 7, 2015 at 4:00 PM, Piotr Kliczewski <pkliczew@redhat.com> wrote:
On Wed, Oct 7, 2015 at 3:57 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
On Wed, Oct 7, 2015 at 3:51 PM, Piotr Kliczewski <pkliczew@redhat.com> wrote:
Sandro,
The API hasn't changed between xmlrpc and jsonrpc. The only difference is format how we provide it. We need to update the API docs that we have and there is a bit of work (hopefully) scheduled for 4.0 to define api interface between the engine and vdsm with validation on both sides.
There is a bit of ongoing work to provide jsonrpc client for vdsm and you can code how to use it here [1]. There is a bit of work that needs to be done in order to merge it but you can take a look at start to play with it.
Thanks, Piotr
Ok, so, looking at your URL, a first difference is:
from vdsm import jsonrpcvdscli instead of from vdsm import vdscli
a second one is that connect API differs:
In [3]: xmlcli = vdscli.connect()
In [4]: jsoncli = jsonrpcvdscli.connect()
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-4-71cd6ff663fb> in <module>() ----> 1 jsoncli = jsonrpcvdscli.connect()
TypeError: connect() takes at least 1 argument (0 given)
so they're not really coming without changes :-)
Small changes required since new jsonrpcvdscli is not one to one replacement. If you have any suggestions/improvements please let me know and we can change it to be more usable.
ok, not an issue.
help(jsonrpcvdscli.connect) Help on function connect in module vdsm.jsonrpcvdscli:
connect(requestQueue, stompClient=None, host=None, port=None, useSSL=None, responseQueue=None)
ok, this should probably be documented a bit better :-)
Agree. We have no documentation for now there is only code. We will provide it soon.
On Wed, Oct 7, 2015 at 3:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I've seen /usr/share/doc/vdsm-jsonrpc/vdsm-api.html shipped within vdsm-jsonrpc rpm but it doesn't explain how to use the api.
/usr/lib/python2.7/site-packages/vdsmapi.py looks useless
/usr/share/vdsm/rpc/ are not public API but something only vdsm process should use.
The feature pages http://www.ovirt.org/Features/Design/JsonRpc3.5 and http://www.ovirt.org/Features/Design/JsonRpc are incomplete or outdated and miss proper testing section specifying how to test the API.
VDSM API pages are outdated or incomplete: http://www.ovirt.org/Vdsm_API http://www.ovirt.org/VDSM_Stable_API_Plan http://www.ovirt.org/Vdsm_API_Schema
Any hint on how to use VDSM JSON RPC API anywhere? Can someone please write a clear VDSM API reference documentation?
Piotr, as a kickstart, can you give me a code sample for connecting to vdsm and call getVdsCaps using jsonrpc?
Thanks,
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com
-- Sandro Bonazzola Better technology. Faster innovation. Powered by community collaboration. See how it works at redhat.com

On Wed, Oct 7, 2015 at 4:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I don't you can use jsonrpc yet. What do you need is vdscli.py version that supports jsonrpc for all verbs, but we don't have one yet. Nir

On Wed, Oct 7, 2015 at 3:52 PM, Nir Soffer <nsoffer@redhat.com> wrote:
On Wed, Oct 7, 2015 at 4:21 PM, Sandro Bonazzola <sbonazzo@redhat.com> wrote:
Hi, I'm looking at Bug 1228641 <https://bugzilla.redhat.com/show_bug.cgi?id=1228641> - [RFE] Switch from XML-RPC to JSON-RPC API and I'm searching google about "vdsm json rpc API documentation" without success.
I don't you can use jsonrpc yet.
What do you need is vdscli.py version that supports jsonrpc for all verbs, but we don't have one yet.
The patch that I sent actually contains improvements for jsonrpcvdscli which makes it usable. Once those patches are in we can start to use it to talk to vdsm using jsonrpc.
Nir
participants (3)
-
Nir Soffer
-
Piotr Kliczewski
-
Sandro Bonazzola