diff options
author | dongwenjuan <dong.wenjuan@zte.com.cn> | 2017-12-21 16:11:31 +0800 |
---|---|---|
committer | dongwenjuan <dong.wenjuan@zte.com.cn> | 2018-01-09 09:37:39 +0800 |
commit | 754b94bba6df6e7aafd5f1ffb8432a40cb815649 (patch) | |
tree | 4bbe2f725e5b378bbd8f1b12cbbbb173afb203b2 /doctor_tests/user.py | |
parent | bdbd22904733af311225a3315555bb39ea12ed55 (diff) |
support pep8 check
Change-Id: I3c4358694c57d27a207ae60712c44f717c8895f7
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
Diffstat (limited to 'doctor_tests/user.py')
-rw-r--r-- | doctor_tests/user.py | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/doctor_tests/user.py b/doctor_tests/user.py index 5598a2d5..b5637d93 100644 --- a/doctor_tests/user.py +++ b/doctor_tests/user.py @@ -88,12 +88,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)} @@ -105,8 +106,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""" @@ -119,7 +122,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): @@ -178,9 +182,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, @@ -188,4 +193,3 @@ class User(object): self.log.info('user quota update end......') else: raise Exception('No project or role for update quota') - |