summaryrefslogtreecommitdiffstats
path: root/gluster
diff options
context:
space:
mode:
authorPrashanth Pai <ppai@redhat.com>2016-08-10 15:28:48 +0530
committerPrashanth Pai <ppai@redhat.com>2016-08-10 18:20:57 +0530
commit655b0d2793386d2059b9c682e931035a83619917 (patch)
treec1dfcc19202af123b649767c6a0bb5c4b340bd63 /gluster
parentd4b8804abb876bda9803cee61c6c4298b475e6be (diff)
Move source files into gfapi/ dir
Currently, many source files are directly placed under gluster/ dir: gluster/exceptions.py gluster/gfapi.py gluster/utils.py When multiple packages (RPMs) are sharing the same gluster namespace, these source files will conflict if there are source files with same names provided by other projects. Fix: Move all source files in gluster/* to gluster/gfapi/* Note that this patch does not break how existing users import gfapi. Change-Id: Idf9d07eefafe8333215d6c61201c97c982565ba9 Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'gluster')
-rw-r--r--gluster/gfapi/__init__.py14
-rw-r--r--[-rwxr-xr-x]gluster/gfapi/api.py (renamed from gluster/api.py)0
-rw-r--r--gluster/gfapi/exceptions.py (renamed from gluster/exceptions.py)0
-rw-r--r--[-rwxr-xr-x]gluster/gfapi/gfapi.py (renamed from gluster/gfapi.py)8
-rw-r--r--gluster/gfapi/utils.py (renamed from gluster/utils.py)2
5 files changed, 18 insertions, 6 deletions
diff --git a/gluster/gfapi/__init__.py b/gluster/gfapi/__init__.py
new file mode 100644
index 0000000..8d99bf2
--- /dev/null
+++ b/gluster/gfapi/__init__.py
@@ -0,0 +1,14 @@
+# Copyright (c) 2016 Red Hat, Inc.
+#
+# This file is part of libgfapi-python project which is a
+# subproject of GlusterFS ( www.gluster.org)
+#
+# This file is licensed to you under your choice of the GNU Lesser
+# General Public License, version 3 or any later version (LGPLv3 or
+# later), or the GNU General Public License, version 2 (GPLv2), in all
+# cases as published by the Free Software Foundation.
+
+__version__ = '1.0'
+
+from gfapi import File, Dir, DirEntry, Volume
+__all__ = ['File', 'Dir', 'DirEntry', 'Volume']
diff --git a/gluster/api.py b/gluster/gfapi/api.py
index c440de6..c440de6 100755..100644
--- a/gluster/api.py
+++ b/gluster/gfapi/api.py
diff --git a/gluster/exceptions.py b/gluster/gfapi/exceptions.py
index 05496f0..05496f0 100644
--- a/gluster/exceptions.py
+++ b/gluster/gfapi/exceptions.py
diff --git a/gluster/gfapi.py b/gluster/gfapi/gfapi.py
index 222f7a2..89d8388 100755..100644
--- a/gluster/gfapi.py
+++ b/gluster/gfapi/gfapi.py
@@ -16,11 +16,9 @@ import stat
import errno
from collections import Iterator
-from gluster import api
-from gluster.exceptions import LibgfapiException, Error
-from gluster.utils import validate_mount, validate_glfd
-
-__version__ = '1.0'
+from gluster.gfapi import api
+from gluster.gfapi.exceptions import LibgfapiException, Error
+from gluster.gfapi.utils import validate_mount, validate_glfd
# TODO: Move this utils.py
python_mode_to_os_flags = {}
diff --git a/gluster/utils.py b/gluster/gfapi/utils.py
index bc55184..a556a41 100644
--- a/gluster/utils.py
+++ b/gluster/gfapi/utils.py
@@ -11,7 +11,7 @@
import os
import errno
from functools import wraps
-from gluster.exceptions import VolumeNotMounted
+from gluster.gfapi.exceptions import VolumeNotMounted
def validate_mount(func):