Fix _create_loginable_secgroup_rule in scenario manager
In NetworkScenarioTest, _create_security_group does not pass the
requested client to _create_loginable_secgroup_rule.
If sec grp is being created with different client than admin or primary
cred then, _create_loginable_secgroup_rule will through Bad Request.
This is because sec grp is being created with different tenant and tests
try to add rule with different tenant.
This patch fix above issue.
Closes-Bug: 1412303
Change-Id: I558fec9081644b795f550ae4e63f133e22d6f325
diff --git a/tempest/scenario/manager.py b/tempest/scenario/manager.py
index 1c53f45..5b092c3 100644
--- a/tempest/scenario/manager.py
+++ b/tempest/scenario/manager.py
@@ -789,7 +789,8 @@
tenant_id=tenant_id)
# Add rules to the security group
- rules = self._create_loginable_secgroup_rule(secgroup=secgroup)
+ rules = self._create_loginable_secgroup_rule(client=client,
+ secgroup=secgroup)
for rule in rules:
self.assertEqual(tenant_id, rule.tenant_id)
self.assertEqual(secgroup.id, rule.security_group_id)