aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/contexts
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2017-02-08 14:42:08 -0800
committerRoss Brattain <ross.b.brattain@intel.com>2017-02-09 21:27:46 +0000
commit6a9f0f9fbd1e86f320ccc188403cd2e1a2a66c70 (patch)
treef60c5a6599491bcfa83f7c2160e51efb7b451c3f /yardstick/benchmark/contexts
parent1787d1f400118de3f6bd60bc968cea39b181923e (diff)
fix super() calls, must use explicit class name
self.__class__ is not correct. For Python 2 we have to explicitly use the class name see http://stackoverflow.com/questions/4235078/how-to-avoid-infinite-recursion-with-super Change-Id: I584ca565707b7331c1742fb33c8b524f7b7c9bf9 Signed-off-by: Ross Brattain <ross.b.brattain@intel.com>
Diffstat (limited to 'yardstick/benchmark/contexts')
-rw-r--r--yardstick/benchmark/contexts/dummy.py2
-rw-r--r--yardstick/benchmark/contexts/heat.py2
-rw-r--r--yardstick/benchmark/contexts/model.py6
-rw-r--r--yardstick/benchmark/contexts/node.py2
-rw-r--r--yardstick/benchmark/contexts/standalone.py2
5 files changed, 7 insertions, 7 deletions
diff --git a/yardstick/benchmark/contexts/dummy.py b/yardstick/benchmark/contexts/dummy.py
index f7530035c..0edc250f8 100644
--- a/yardstick/benchmark/contexts/dummy.py
+++ b/yardstick/benchmark/contexts/dummy.py
@@ -22,7 +22,7 @@ class DummyContext(Context):
__context_type__ = "Dummy"
def __init__(self):
- super(self.__class__, self).__init__()
+ super(DummyContext, self).__init__()
def init(self, attrs):
pass
diff --git a/yardstick/benchmark/contexts/heat.py b/yardstick/benchmark/contexts/heat.py
index 0346efcf4..a97a3e2c4 100644
--- a/yardstick/benchmark/contexts/heat.py
+++ b/yardstick/benchmark/contexts/heat.py
@@ -55,7 +55,7 @@ class HeatContext(Context):
self.key_filename = ''.join(
[YARDSTICK_ROOT_PATH, 'yardstick/resources/files/yardstick_key-',
get_short_key_uuid(self.key_uuid)])
- super(self.__class__, self).__init__()
+ super(HeatContext, self).__init__()
def init(self, attrs):
"""initializes itself from the supplied arguments"""
diff --git a/yardstick/benchmark/contexts/model.py b/yardstick/benchmark/contexts/model.py
index 636abfa35..c83a209cf 100644
--- a/yardstick/benchmark/contexts/model.py
+++ b/yardstick/benchmark/contexts/model.py
@@ -66,7 +66,7 @@ class Router(Object):
"""Class that represents a router in the logical model"""
def __init__(self, name, network_name, context, external_gateway_info):
- super(self.__class__, self).__init__(name, context)
+ super(Router, self).__init__(name, context)
self.stack_name = context.name + "-" + network_name + "-" + self.name
self.stack_if_name = self.stack_name + "-if0"
@@ -78,7 +78,7 @@ class Network(Object):
list = []
def __init__(self, name, context, attrs):
- super(self.__class__, self).__init__(name, context)
+ super(Network, self).__init__(name, context)
self.stack_name = context.name + "-" + self.name
self.subnet_stack_name = self.stack_name + "-subnet"
self.subnet_cidr = attrs.get('cidr', '10.0.1.0/24')
@@ -118,7 +118,7 @@ class Server(Object):
list = []
def __init__(self, name, context, attrs):
- super(self.__class__, self).__init__(name, context)
+ super(Server, self).__init__(name, context)
self.stack_name = self.name + "." + context.name
self.keypair_name = context.keypair_name
self.secgroup_name = context.secgroup_name
diff --git a/yardstick/benchmark/contexts/node.py b/yardstick/benchmark/contexts/node.py
index 9242e2727..c7ed3b3f1 100644
--- a/yardstick/benchmark/contexts/node.py
+++ b/yardstick/benchmark/contexts/node.py
@@ -32,7 +32,7 @@ class NodeContext(Context):
self.controllers = []
self.computes = []
self.baremetals = []
- super(self.__class__, self).__init__()
+ super(NodeContext, self).__init__()
def read_config_file(self):
"""Read from config file"""
diff --git a/yardstick/benchmark/contexts/standalone.py b/yardstick/benchmark/contexts/standalone.py
index c1d963f50..eff700974 100644
--- a/yardstick/benchmark/contexts/standalone.py
+++ b/yardstick/benchmark/contexts/standalone.py
@@ -37,7 +37,7 @@ class StandaloneContext(Context):
self.file_path = None
self.nodes = []
self.nfvi_node = []
- super(self.__class__, self).__init__()
+ super(StandaloneContext, self).__init__()
def read_config_file(self):
"""Read from config file"""