aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Lee <limingjiang@huawei.com>2017-02-14 07:30:56 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-02-14 07:30:56 +0000
commit5420dd71763226d78fb1ff486b78918432c73e49 (patch)
tree3528f11382abae3774edef78c2b7a1db2e7b7bdd
parent523e002f3e8af341c9f13e626fa0f91ee2c33074 (diff)
parent6a9f0f9fbd1e86f320ccc188403cd2e1a2a66c70 (diff)
Merge "fix super() calls, must use explicit class name"
-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 4e31bdca6..0b9a4d294 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"""