summaryrefslogtreecommitdiffstats
path: root/doctor_tests/instance.py
diff options
context:
space:
mode:
authordongwenjuan <dong.wenjuan@zte.com.cn>2017-12-21 16:11:31 +0800
committerdongwenjuan <dong.wenjuan@zte.com.cn>2018-01-09 09:37:39 +0800
commit754b94bba6df6e7aafd5f1ffb8432a40cb815649 (patch)
tree4bbe2f725e5b378bbd8f1b12cbbbb173afb203b2 /doctor_tests/instance.py
parentbdbd22904733af311225a3315555bb39ea12ed55 (diff)
support pep8 check
Change-Id: I3c4358694c57d27a207ae60712c44f717c8895f7 Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'doctor_tests/instance.py')
-rw-r--r--doctor_tests/instance.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/doctor_tests/instance.py b/doctor_tests/instance.py
index 27f412e2..960e7057 100644
--- a/doctor_tests/instance.py
+++ b/doctor_tests/instance.py
@@ -54,14 +54,15 @@ class Instance(object):
flavors = {flavor.name: flavor for flavor in self.nova.flavors.list()}
flavor = flavors.get(self.conf.flavor)
image = self.nova.glance.find_image(self.conf.image_name)
- network = self.neutron.list_networks(name=self.conf.net_name)['networks'][0]
+ network = \
+ self.neutron.list_networks(name=self.conf.net_name)['networks'][0]
nics = {'net-id': network['id']}
self.servers = \
{getattr(server, 'name'): server
for server in self.nova.servers.list()}
for i in range(0, self.conf.instance_count):
- vm_name = "%s%d"%(self.conf.instance_basename, i)
+ vm_name = "%s%d" % (self.conf.instance_basename, i)
self.vm_names.append(vm_name)
if vm_name not in self.servers:
server = self.nova.servers.create(vm_name, image,
@@ -111,4 +112,3 @@ class Instance(object):
count += 1
time.sleep(2)
raise Exception('time out for vm launch')
-