summaryrefslogtreecommitdiffstats
path: root/examples/test_baseclass_variables.py
diff options
context:
space:
mode:
authorValerii Ponomarov <vponomar@redhat.com>2019-12-18 21:21:27 +0530
committerBala Konda Reddy M <bmekala@redhat.com>2019-12-23 12:36:55 +0000
commit517557b69cae5f6790facdbbd28d6bd597111d3e (patch)
treec1902f89ac339494879fc8a0d4f051aea2ff60e8 /examples/test_baseclass_variables.py
parent68d7bacad91349bb437b3c8cf6bbdf572562bbd3 (diff)
Fix python files in the 'examples' directory
Fix consists of following things: - Add py2/3 compatibility - Place imports into 3 different groups and reorder them alphabetically. As it is written in the "pep8" [1]. [1] https://www.python.org/dev/peps/pep-0008/ Change-Id: Iad1c6c409d2711f8c9b2d929d29072953fd49d8e Signed-off-by: Valerii Ponomarov <kiparis.kh@gmail.com>
Diffstat (limited to 'examples/test_baseclass_variables.py')
-rw-r--r--examples/test_baseclass_variables.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/examples/test_baseclass_variables.py b/examples/test_baseclass_variables.py
index 86488d6bd..09a0ad9f1 100644
--- a/examples/test_baseclass_variables.py
+++ b/examples/test_baseclass_variables.py
@@ -1,10 +1,16 @@
""" This Module demostrates how to use functions available in volume_ops
"""
from glusto.core import Glusto as g
-from glustolibs.gluster.gluster_base_class import (GlusterBaseClass)
+from glustolibs.gluster.gluster_base_class import (
+ GlusterBaseClass,
+ runs_on,
+)
-class DemoGlusyerBaseClassVariables(GlusterBaseClass):
+
+@runs_on([['distributed-replicated', 'replicated'],
+ ['glusterfs', 'nfs']])
+class DemoGlusterBaseClassVariables(GlusterBaseClass):
"""Demonstrating all the functions available in volume_ops module
"""
@classmethod
@@ -13,7 +19,7 @@ class DemoGlusyerBaseClassVariables(GlusterBaseClass):
"""
# Read all the cluster config from the g.config and assign it to
# class variables
- GlusterBaseClass.setUpClass.im_func(cls)
+ cls.get_super_method(cls, 'setUpClass')()
# Servers (list)
g.log.info("Servers:\n %s\n\n", cls.servers)