Change in vdsm[master]: gluster: Fix for json-rpc issue wrt gluster commands.
dnarayan at redhat.com
dnarayan at redhat.com
Wed Sep 17 08:36:44 UTC 2014
Darshan N has uploaded a new change for review.
Change subject: gluster: Fix for json-rpc issue wrt gluster commands.
......................................................................
gluster: Fix for json-rpc issue wrt gluster commands.
This patch adds spec file entry for missing apiwrapper
module and adds suitable path for finding vdsmapi-gluster
-schema.
Change-Id: Ia8cf744813f7bbfbf6e2bf073b28b88e0d3f304f
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1124481
Signed-off-by: ndarshan <dnarayan at redhat.com>
---
M lib/vdsm/constants.py.in
M vdsm.spec.in
M vdsm/gluster/Makefile.am
M vdsm/rpc/vdsmapi.py
4 files changed, 10 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/33007/1
diff --git a/lib/vdsm/constants.py.in b/lib/vdsm/constants.py.in
index ee379d6..f190db6 100644
--- a/lib/vdsm/constants.py.in
+++ b/lib/vdsm/constants.py.in
@@ -74,6 +74,7 @@
P_LIBVIRT_VMCHANNELS = '/var/lib/libvirt/qemu/channels/'
P_VDSM = '@VDSMDIR@/'
P_VDSM_RPC = '@VDSMDIR@/rpc/'
+P_VDSM_GLUSTER = '@VDSMDIR@/gluster/'
P_VDSM_HOOKS = '@HOOKSDIR@/'
P_VDSM_LIB = '@VDSMLIBDIR@/'
P_VDSM_RUN = '@VDSMRUNDIR@/'
diff --git a/vdsm.spec.in b/vdsm.spec.in
index c54922a..ff059dc 100644
--- a/vdsm.spec.in
+++ b/vdsm.spec.in
@@ -1508,6 +1508,7 @@
%dir %{_datadir}/%{vdsm_name}/gluster
%doc COPYING
%{_datadir}/%{vdsm_name}/gluster/api.py*
+%{_datadir}/%{vdsm_name}/gluster/apiwrapper.py*
%{_datadir}/%{vdsm_name}/gluster/vdsmapi-gluster-schema.json
%{_datadir}/%{vdsm_name}/gluster/gfapi.py*
%{_datadir}/%{vdsm_name}/gluster/hooks.py*
diff --git a/vdsm/gluster/Makefile.am b/vdsm/gluster/Makefile.am
index 3c307aa..577a4d1 100644
--- a/vdsm/gluster/Makefile.am
+++ b/vdsm/gluster/Makefile.am
@@ -29,6 +29,7 @@
dist_vdsmgluster_PYTHON = \
__init__.py \
api.py \
+ apiwrapper.py \
cli.py \
exception.py \
gfapi.py \
diff --git a/vdsm/rpc/vdsmapi.py b/vdsm/rpc/vdsmapi.py
index 9e4de3e..01b0c69 100644
--- a/vdsm/rpc/vdsmapi.py
+++ b/vdsm/rpc/vdsmapi.py
@@ -122,7 +122,12 @@
from vdsm import constants
localpath = os.path.dirname(__file__)
- installedpath = constants.P_VDSM_RPC
+
+ if schema_name == 'vdsmapi-gluster':
+ installedpath = constants.P_VDSM_GLUSTER
+ else:
+ installedpath = constants.P_VDSM_RPC
+
for directory in localpath, installedpath:
path = os.path.join(directory, schema_name + '-schema.json')
if os.access(path, os.R_OK):
@@ -190,7 +195,7 @@
info_key = schema
if schema is None:
schema = find_schema()
- gluster_schema = find_schema(schema_name='gluster/vdsmapi-gluster',
+ gluster_schema = find_schema(schema_name='vdsmapi-gluster',
raiseOnError=False)
with open(schema) as f:
--
To view, visit http://gerrit.ovirt.org/33007
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8cf744813f7bbfbf6e2bf073b28b88e0d3f304f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Darshan N <dnarayan at redhat.com>
More information about the vdsm-patches
mailing list