Adam Litke has uploaded a new change for review.
Change subject: [WIP] vdsm API and libvdsm ......................................................................
[WIP] vdsm API and libvdsm
This work-in-progress patch demonstrates the mechanics of generating a working C API and remote transport from a schema definition. The "C" API is written in Vala to more easily take advantage of GObjects and reduce the amount of boilerplate code that we need to generate and maintain. The API has a static part and a dynamically generated part. I generate the dynamic part by using the same technique employed by qemu for generating the qapi bindings (python format strings). The build system produces libvdsm and a C test program. An included python program demonstrates how the automatic python bindings work. A test server is included to enable the test programs to function. We use JSON for internal object storage and also as the wire format.
Thank you Saggi for sharing some great ideas (many of which are incorporated into this patch).
TODO: - Fix issues in the main schema * Return values must be anonymous, singular types * Remove 'IntStr' and friends in favor of native representation - Support generation for the entire schema * Mapping types * Enums with non-C string values * Finish array support * Generate the command sub-classes (VM, Volume, StorageDomain, etc) - Connect the server to the real vdsm API * Functions must map from the new schema to the old implementation - Validate argument and return types on the server side - Probably a few more things I haven't yet thought of
Signed-off-by: Adam Litke agl@us.ibm.com Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 --- M Makefile.am M build-aux/gitlog-to-changelog M configure.ac A vdsm_api/Makefile.am A vdsm_api/generate.py A vdsm_api/libvdsm-base.vala A vdsm_api/schema.json A vdsm_api/test.c A vdsm_api/test.py A vdsm_api/test_serv.py 10 files changed, 1,524 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/63/6863/1 -- To view, visit http://gerrit.ovirt.org/6863 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange Gerrit-Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com
Xu He Jie has posted comments on this change.
Change subject: [WIP] vdsm API and libvdsm ......................................................................
Patch Set 1: (1 inline comment)
.................................................... File vdsm_api/libvdsm-base.vala Line 13: this._mtx = new Mutex(); When client side code execute api call (both with python and c version, in test.py at line 37), it segmentation fault at here on my fedora17.
my env as below: libgee06-0.6.4-1.fc17.x86_64 gobject-introspection-1.32.1-1.fc17.x86_64 glib2-2.32.4-1.fc17.x86_64
-- To view, visit http://gerrit.ovirt.org/6863 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
Saggi Mizrahi has posted comments on this change.
Change subject: [WIP] vdsm API and libvdsm ......................................................................
Patch Set 1: (2 inline comments)
.................................................... File vdsm_api/libvdsm-base.vala Line 13: this._mtx = new Mutex(); You don't do new Mutext()
It's deprecated. Mutexes are initialized on deceleration.
This is the major reason for adding --target-glib=2.32 to vala flags
Look at how I did it. http://gerrit.ovirt.org/#/c/6659/1/libvdsm/libvdsm-base.vala
.................................................... File vdsm_api/Makefile.am Line 40: -g \ -g generates debug symbols. It shouldn't be on by defaults.
-- To view, visit http://gerrit.ovirt.org/6863 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] vdsm API and libvdsm ......................................................................
Patch Set 2:
Build Started http://jenkins.ovirt.info/job/vdsm_unit_tests_by_patch/262/
-- To view, visit http://gerrit.ovirt.org/6863 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
oVirt Jenkins CI Server has posted comments on this change.
Change subject: [WIP] vdsm API and libvdsm ......................................................................
Patch Set 2:
Build Successful
http://jenkins.ovirt.info/job/vdsm_unit_tests_by_patch/262/ : SUCCESS
-- To view, visit http://gerrit.ovirt.org/6863 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment Gerrit-Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
Adam Litke has abandoned this change.
Change subject: [WIP] vdsm API and libvdsm ......................................................................
Patch Set 2: Abandoned
-- To view, visit http://gerrit.ovirt.org/6863 To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: abandon Gerrit-Change-Id: I7c7427ea3f757135c9919fd65603495878fe3ae6 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Adam Litke agl@us.ibm.com Gerrit-Reviewer: Dan Kenigsberg danken@redhat.com Gerrit-Reviewer: Royce Lv lvroyce@linux.vnet.ibm.com Gerrit-Reviewer: Ryan Harper ryanh@us.ibm.com Gerrit-Reviewer: Saggi Mizrahi smizrahi@redhat.com Gerrit-Reviewer: Xu He Jie xuhj@linux.vnet.ibm.com Gerrit-Reviewer: oVirt Jenkins CI Server
vdsm-patches@lists.fedorahosted.org