summaryrefslogtreecommitdiffstats
path: root/glustolibs-gluster/glustolibs/gluster
diff options
context:
space:
mode:
authorArthy Loganathan <aloganat@redhat.com>2017-05-24 11:36:09 +0530
committerShwethaHPanduranga <shwetha-h-p@review.gluster.org>2017-06-12 10:31:30 +0000
commitcc1a36474c26c98ed93da003a274d58204c79e00 (patch)
treea38ae886678a8c98964654094248e295e87232b3 /glustolibs-gluster/glustolibs/gluster
parent67d32f7a0346e2f095a1468d14a054635ef8864b (diff)
Minor changes in gluster base class wrt nfs-ganesha
Change-Id: Iaceb22cd5b2fe920c9cdc6d110d26939e26e5ffe Signed-off-by: Arthy Loganathan <aloganat@redhat.com>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
-rw-r--r--glustolibs-gluster/glustolibs/gluster/gluster_base_class.py9
-rw-r--r--glustolibs-gluster/glustolibs/gluster/mount_ops.py10
2 files changed, 13 insertions, 6 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
index 4ad6cc7..777f9ea 100644
--- a/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
+++ b/glustolibs-gluster/glustolibs/gluster/gluster_base_class.py
@@ -126,12 +126,19 @@ class GlusterBaseClass(unittest.TestCase):
cls.smb_users_info['root']['password'] = 'foobar'
cls.smb_users_info['root']['acl'] = 'rwx'
- # NFS-Ganesha Cluster Info
+ # NFS-Ganesha Cluster info
try:
cls.enable_nfs_ganesha = bool(g.config['gluster']['cluster_config']
['nfs_ganesha']['enable'])
+ cls.num_of_nfs_ganesha_nodes = (g.config['gluster']
+ ['cluster_config']['nfs_ganesha']
+ ['num_of_nfs_ganesha_nodes'])
+ cls.vips = (g.config['gluster']['cluster_config']['nfs_ganesha']
+ ['vips'])
except KeyError:
cls.enable_nfs_ganesha = False
+ cls.num_of_nfs_ganesha_nodes = None
+ cls.vips = []
# Defining default volume_types configuration.
default_volume_type_config = {
diff --git a/glustolibs-gluster/glustolibs/gluster/mount_ops.py b/glustolibs-gluster/glustolibs/gluster/mount_ops.py
index 1a69786..adb3cae 100644
--- a/glustolibs-gluster/glustolibs/gluster/mount_ops.py
+++ b/glustolibs-gluster/glustolibs/gluster/mount_ops.py
@@ -396,7 +396,7 @@ def create_mount_objs(mounts):
Example:
mounts: [
- {'mount_protocol': 'glusterfs',
+ {'protocol': 'glusterfs',
'mountpoint': '/mnt/g1',
'server': 'abc.lab.eng.xyz.com',
'client': {'host': 'def.lab.eng.xyz.com'},
@@ -404,14 +404,14 @@ def create_mount_objs(mounts):
'options': '',
'num_of_mounts': 2},
- {'mount_protocol': 'nfs',
+ {'protocol': 'nfs',
'mountpoint': '/mnt/n1',
'server': 'abc.lab.eng.xyz.com',
'client': {'host': 'def.lab.eng.xyz.com'},
'volname': 'testvoi',
'options': ''}
- {'mount_protocol': 'smb',
+ {'protocol': 'smb',
'mountpoint': '',
'server': 'abc.lab.eng.xyz.com',
'client': {
@@ -435,14 +435,14 @@ def create_mount_objs(mounts):
temp_mount = copy.deepcopy(mount)
if (mount['protocol'] == "glusterfs" or mount['protocol'] == "nfs" or
mount['protocol'] == "cifs"):
- if 'mountpoint' in mount['mountpoint'] and mount['mountpoint']:
+ if 'mountpoint' in mount and mount['mountpoint']:
temp_mount['mountpoint'] = mount['mountpoint']
else:
temp_mount['mountpoint'] = ("/mnt/%s_%s" %
(mount['volname'],
mount['protocol']))
elif mount['protocol'] == "smb":
- if 'mountpoint' in mount['mountpoint'] and mount['mountpoint']:
+ if 'mountpoint' in mount and mount['mountpoint']:
temp_mount['mountpoint'] = mount['mountpoint']
else:
temp_mount['mountpoint'] = "*"