Make _create_security_group_rule non-private
_create_security_group_rule() is currently private which is not necessarily required to be private Implements: blueprint tempest-scenario-manager-stable Signed-off by: Soniya Vyas<svyas@redhat.com> Change-Id: I0e8800d20e3cbb0d8290e4a1372a2ba543288d17
This commit is contained in:
parent
ccf56b5ca2
commit
945f5a1ce2
@ -0,0 +1,6 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added public interface create_security_group_rule().
|
||||
Since this interface is meant to be used by tempest plugins,
|
||||
It doesn't neccessarily require to be private api.
|
@ -1387,10 +1387,10 @@ class NetworkScenarioTest(ScenarioTest):
|
||||
client.delete_security_group, secgroup['id'])
|
||||
return secgroup
|
||||
|
||||
def _create_security_group_rule(self, secgroup=None,
|
||||
sec_group_rules_client=None,
|
||||
project_id=None,
|
||||
security_groups_client=None, **kwargs):
|
||||
def create_security_group_rule(self, secgroup=None,
|
||||
sec_group_rules_client=None,
|
||||
project_id=None,
|
||||
security_groups_client=None, **kwargs):
|
||||
"""Create a rule from a dictionary of rule parameters.
|
||||
|
||||
Create a rule in a secgroup. if secgroup not defined will search for
|
||||
@ -1474,7 +1474,7 @@ class NetworkScenarioTest(ScenarioTest):
|
||||
for r_direction in ['ingress', 'egress']:
|
||||
ruleset['direction'] = r_direction
|
||||
try:
|
||||
sg_rule = self._create_security_group_rule(
|
||||
sg_rule = self.create_security_group_rule(
|
||||
sec_group_rules_client=sec_group_rules_client,
|
||||
secgroup=secgroup,
|
||||
security_groups_client=security_groups_client,
|
||||
|
@ -217,7 +217,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
direction='ingress',
|
||||
)
|
||||
sec_group_rules_client = tenant.manager.security_group_rules_client
|
||||
self._create_security_group_rule(
|
||||
self.create_security_group_rule(
|
||||
secgroup=access_sg,
|
||||
sec_group_rules_client=sec_group_rules_client,
|
||||
**ssh_rule)
|
||||
@ -385,7 +385,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
remote_group_id=tenant.security_groups['default']['id'],
|
||||
direction='ingress'
|
||||
)
|
||||
self._create_security_group_rule(
|
||||
self.create_security_group_rule(
|
||||
secgroup=tenant.security_groups['default'],
|
||||
security_groups_client=tenant.manager.security_groups_client,
|
||||
**ruleset
|
||||
@ -413,7 +413,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
protocol = ruleset['protocol']
|
||||
sec_group_rules_client = (
|
||||
dest_tenant.manager.security_group_rules_client)
|
||||
self._create_security_group_rule(
|
||||
self.create_security_group_rule(
|
||||
secgroup=dest_tenant.security_groups['default'],
|
||||
sec_group_rules_client=sec_group_rules_client,
|
||||
**ruleset
|
||||
@ -429,7 +429,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
# allow reverse traffic and check
|
||||
sec_group_rules_client = (
|
||||
source_tenant.manager.security_group_rules_client)
|
||||
self._create_security_group_rule(
|
||||
self.create_security_group_rule(
|
||||
secgroup=source_tenant.security_groups['default'],
|
||||
sec_group_rules_client=sec_group_rules_client,
|
||||
**ruleset
|
||||
@ -543,7 +543,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
direction='ingress',
|
||||
)
|
||||
sec_group_rules_client = new_tenant.manager.security_group_rules_client
|
||||
self._create_security_group_rule(
|
||||
self.create_security_group_rule(
|
||||
secgroup=new_sg,
|
||||
sec_group_rules_client=sec_group_rules_client,
|
||||
**icmp_rule)
|
||||
@ -596,7 +596,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
||||
protocol='icmp',
|
||||
direction='ingress'
|
||||
)
|
||||
self._create_security_group_rule(
|
||||
self.create_security_group_rule(
|
||||
secgroup=tenant.security_groups['default'],
|
||||
**ruleset
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user