summaryrefslogtreecommitdiffstats
path: root/tests/distaf
diff options
context:
space:
mode:
authorJonathan Holloway <jholloway@redhat.com>2016-04-11 20:32:26 -0500
committerM S Vishwanath Bhat <vbhat@redhat.com>2016-04-27 00:32:13 -0700
commit41fef03eb929a08588a4f4ebf4638096a5918a62 (patch)
treec8c88562e87f987827d0176f61f2afbfb320058f /tests/distaf
parent1866836749c2a12ae50abd109429da072ebe05ba (diff)
distaflibs: organize distaflibs to use namespace packages
Organized the distaflibs directory tree to accomodate namespace packages. * Allows multiple distaf library packages to install in single namespace package. - Created distaflibs-gluster directory as root for package configs, docs, etc. - Created setup.py file to install distaflibs-gluster package into namespace. - Created distaflibs-gluster/distaflibs namespace package dir and init. - Created distaflibs-gluster/distaflibs/gluster as package dir. - Copied distaf gluster library files into package dir. Requires the distaf package. distaflibs-gluster installs into /usr/lib/python2.7/site-packages/distaflibs/gluster Change-Id: I775c4f1526880ea606f35c3616abb9aaf2f3b886 BUG: 1330346 Signed-off-by: Jonathan Holloway <jholloway@redhat.com> Reviewed-on: http://review.gluster.org/13972 Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: M S Vishwanath Bhat <vbhat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'tests/distaf')
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/__init__.py1
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/__init__.py (renamed from tests/distaf/distaf_libs/__init__.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/brick_ops.py (renamed from tests/distaf/distaf_libs/gluster_libs/brick_ops.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/gluster_init.py (renamed from tests/distaf/distaf_libs/gluster_libs/gluster_init.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/mount_ops.py (renamed from tests/distaf/distaf_libs/gluster_libs/mount_ops.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/peer_ops.py (renamed from tests/distaf/distaf_libs/gluster_libs/peer_ops.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py (renamed from tests/distaf/distaf_libs/gluster_libs/quota_ops.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py (renamed from tests/distaf/distaf_libs/gluster_libs/rebalance.py)0
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/snap_ops.py (renamed from tests/distaf/distaf_libs/gluster_libs/snap_ops.py)2
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/volume_ops.py (renamed from tests/distaf/distaf_libs/gluster_libs/volume_ops.py)6
-rw-r--r--tests/distaf/distaf_libs/distaflibs-gluster/setup.py47
11 files changed, 52 insertions, 4 deletions
diff --git a/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/__init__.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/__init__.py
new file mode 100644
index 00000000000..de40ea7ca05
--- /dev/null
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/__init__.py
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/tests/distaf/distaf_libs/__init__.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/__init__.py
index e69de29bb2d..e69de29bb2d 100644
--- a/tests/distaf/distaf_libs/__init__.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/__init__.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/brick_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/brick_ops.py
index 3c363c2bfed..3c363c2bfed 100644
--- a/tests/distaf/distaf_libs/gluster_libs/brick_ops.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/brick_ops.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/gluster_init.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/gluster_init.py
index 633208ca49c..633208ca49c 100644
--- a/tests/distaf/distaf_libs/gluster_libs/gluster_init.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/gluster_init.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/mount_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/mount_ops.py
index 165e389f4da..165e389f4da 100644
--- a/tests/distaf/distaf_libs/gluster_libs/mount_ops.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/mount_ops.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/peer_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/peer_ops.py
index f2c0d0c0009..f2c0d0c0009 100644
--- a/tests/distaf/distaf_libs/gluster_libs/peer_ops.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/peer_ops.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/quota_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py
index fe90b5f359f..fe90b5f359f 100644
--- a/tests/distaf/distaf_libs/gluster_libs/quota_ops.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/quota_ops.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/rebalance.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
index e36b7ee9855..e36b7ee9855 100644
--- a/tests/distaf/distaf_libs/gluster_libs/rebalance.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/rebalance.py
diff --git a/tests/distaf/distaf_libs/gluster_libs/snap_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/snap_ops.py
index bc4067d8621..f36a271f1ab 100644
--- a/tests/distaf/distaf_libs/gluster_libs/snap_ops.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/snap_ops.py
@@ -18,7 +18,7 @@
from distaf.util import tc
-from distaf.gluster_libs.volume_ops import start_volume, stop_volume
+from distaflibs.gluster.volume_ops import start_volume, stop_volume
def snap_create(volname, snapname, server='', desc=''):
diff --git a/tests/distaf/distaf_libs/gluster_libs/volume_ops.py b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/volume_ops.py
index 6de08719e0c..f44aeec3043 100644
--- a/tests/distaf/distaf_libs/gluster_libs/volume_ops.py
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/distaflibs/gluster/volume_ops.py
@@ -25,9 +25,9 @@ try:
import xml.etree.cElementTree as etree
except ImportError:
import xml.etree.ElementTree as etree
-from distaf.gluster_libs.mount_ops import mount_volume
-from distaf.gluster_libs.peer_ops import peer_probe, nodes_from_pool_list
-from distaf.gluster_libs.gluster_init import env_setup_servers, start_glusterd
+from distaflibs.gluster.mount_ops import mount_volume
+from distaflibs.gluster.peer_ops import peer_probe, nodes_from_pool_list
+from distaflibs.gluster.gluster_init import env_setup_servers, start_glusterd
"""
This file contains the gluster volume operations like create volume,
diff --git a/tests/distaf/distaf_libs/distaflibs-gluster/setup.py b/tests/distaf/distaf_libs/distaflibs-gluster/setup.py
new file mode 100644
index 00000000000..c2d40e4e2d2
--- /dev/null
+++ b/tests/distaf/distaf_libs/distaflibs-gluster/setup.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+# Copyright (c) 2015 Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+from setuptools import setup, find_packages
+
+version = '0.1.0'
+name = 'distaflibs-gluster'
+
+setup(
+ name=name,
+ version=version,
+ description='DiSTAF Gluster Library',
+ license='GPLv2+',
+ author='Red Hat, Inc.',
+ author_email='gluster-devel@gluster.org',
+ url='http://www.gluster.org',
+ packages=find_packages(),
+ classifiers=[
+ 'Development Status :: 4 - Beta'
+ 'Environment :: Console'
+ 'Intended Audience :: Developers'
+ 'License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)'
+ 'Operating System :: POSIX :: Linux'
+ 'Programming Language :: Python'
+ 'Programming Language :: Python :: 2'
+ 'Programming Language :: Python :: 2.6'
+ 'Programming Language :: Python :: 2.7'
+ 'Topic :: Software Development :: Testing'
+ ],
+ install_requires=['distaf'],
+ namespace_packages = ['distaflibs']
+)