summaryrefslogtreecommitdiffstats
path: root/doctor_tests/user.py
diff options
context:
space:
mode:
authorRyota Mibu <r-mibu@cq.jp.nec.com>2018-01-09 13:02:33 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-01-09 13:02:33 +0000
commit9fd701278bf7d8c5b9451491bcb1a92580adc780 (patch)
tree885287d68762c5e755f082c88780b45e056dcc57 /doctor_tests/user.py
parentd767217e4ed267c585aa94fbbd3001ec0d59de8c (diff)
parent754b94bba6df6e7aafd5f1ffb8432a40cb815649 (diff)
Merge "support pep8 check"
Diffstat (limited to 'doctor_tests/user.py')
-rw-r--r--doctor_tests/user.py24
1 files changed, 14 insertions, 10 deletions
diff --git a/doctor_tests/user.py b/doctor_tests/user.py
index a6f58d9a..fee3e1fb 100644
--- a/doctor_tests/user.py
+++ b/doctor_tests/user.py
@@ -89,12 +89,13 @@ class User(object):
self.conf.doctor_domain_id)
self.projects[test_project.name] = test_project
else:
- self.log.info('project %s already created......' % self.conf.doctor_project)
- self.log.info('test project %s' % str(self.projects[self.conf.doctor_project]))
+ self.log.info('project %s already created......'
+ % self.conf.doctor_project)
+ self.log.info('test project %s'
+ % str(self.projects[self.conf.doctor_project]))
def _create_user(self):
"""create test user"""
- project = self.projects.get(self.conf.doctor_project)
self.users = {user.name: user for user in
self.keystone.users.list(
domain=self.conf.doctor_domain_id)}
@@ -106,8 +107,10 @@ class User(object):
domain=self.conf.doctor_domain_id)
self.users[test_user.name] = test_user
else:
- self.log.info('user %s already created......' % self.conf.doctor_user)
- self.log.info('test user %s' % str(self.users[self.conf.doctor_user]))
+ self.log.info('user %s already created......'
+ % self.conf.doctor_user)
+ self.log.info('test user %s'
+ % str(self.users[self.conf.doctor_user]))
def _create_role(self):
"""create test role"""
@@ -120,7 +123,8 @@ class User(object):
self.roles[test_role.name] = test_role
else:
self.use_exist_role = True
- self.log.info('role %s already created......' % self.conf.doctor_role)
+ self.log.info('role %s already created......'
+ % self.conf.doctor_role)
self.log.info('test role %s' % str(self.roles[self.conf.doctor_role]))
def _add_user_role_in_project(self, is_admin=False):
@@ -182,9 +186,10 @@ class User(object):
self.quota = self.nova.quotas.get(project.id,
user_id=user.id)
if self.conf.quota_instances > self.quota.instances:
- self.nova.quotas.update(project.id,
- instances=self.conf.quota_instances,
- user_id=user.id)
+ self.nova.quotas.update(
+ project.id,
+ instances=self.conf.quota_instances,
+ user_id=user.id)
if self.conf.quota_cores > self.quota.cores:
self.nova.quotas.update(project.id,
cores=self.conf.quota_cores,
@@ -192,4 +197,3 @@ class User(object):
self.log.info('user quota update end......')
else:
raise Exception('No project or role for update quota')
-