aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Yang <yangyang1@zte.com.cn>2017-09-06 09:26:44 +0800
committerAlex Yang <yangyang1@zte.com.cn>2017-09-06 09:26:44 +0800
commitc167e319b676a46eda05475784c1fd99d6a65385 (patch)
tree9ca355a5246b699cae416939d6780f94a6656c83
parent808319c010baf449808214ec06237b4703af39c6 (diff)
Create VNF user with admin role
Change-Id: I9cdeedd90cacfdae10c498580493106a6cb727fb Signed-off-by: Alex Yang <yangyang1@zte.com.cn>
-rw-r--r--functest/core/vnf.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/functest/core/vnf.py b/functest/core/vnf.py
index 868b8b48f..517838a76 100644
--- a/functest/core/vnf.py
+++ b/functest/core/vnf.py
@@ -116,13 +116,15 @@ class VnfOnBoarding(base.TestCase):
self.created_object.append(project_creator)
self.os_project = project_creator
- user_creator = OpenStackUser(snaps_creds,
- UserSettings(
- name=self.tenant_name,
- password=self.tenant_name))
- self.created_object.append(user_creator)
+ user_creator = OpenStackUser(
+ snaps_creds,
+ UserSettings(
+ name=self.tenant_name,
+ password=self.tenant_name,
+ roles={'admin': self.tenant_name}))
- project_creator.assoc_user(user_creator.create())
+ user_creator.create()
+ self.created_object.append(user_creator)
self.snaps_creds = user_creator.get_os_creds(self.tenant_name)