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,7 +1387,7 @@ class NetworkScenarioTest(ScenarioTest):
|
|||||||
client.delete_security_group, secgroup['id'])
|
client.delete_security_group, secgroup['id'])
|
||||||
return secgroup
|
return secgroup
|
||||||
|
|
||||||
def _create_security_group_rule(self, secgroup=None,
|
def create_security_group_rule(self, secgroup=None,
|
||||||
sec_group_rules_client=None,
|
sec_group_rules_client=None,
|
||||||
project_id=None,
|
project_id=None,
|
||||||
security_groups_client=None, **kwargs):
|
security_groups_client=None, **kwargs):
|
||||||
@ -1474,7 +1474,7 @@ class NetworkScenarioTest(ScenarioTest):
|
|||||||
for r_direction in ['ingress', 'egress']:
|
for r_direction in ['ingress', 'egress']:
|
||||||
ruleset['direction'] = r_direction
|
ruleset['direction'] = r_direction
|
||||||
try:
|
try:
|
||||||
sg_rule = self._create_security_group_rule(
|
sg_rule = self.create_security_group_rule(
|
||||||
sec_group_rules_client=sec_group_rules_client,
|
sec_group_rules_client=sec_group_rules_client,
|
||||||
secgroup=secgroup,
|
secgroup=secgroup,
|
||||||
security_groups_client=security_groups_client,
|
security_groups_client=security_groups_client,
|
||||||
|
@ -217,7 +217,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
|||||||
direction='ingress',
|
direction='ingress',
|
||||||
)
|
)
|
||||||
sec_group_rules_client = tenant.manager.security_group_rules_client
|
sec_group_rules_client = tenant.manager.security_group_rules_client
|
||||||
self._create_security_group_rule(
|
self.create_security_group_rule(
|
||||||
secgroup=access_sg,
|
secgroup=access_sg,
|
||||||
sec_group_rules_client=sec_group_rules_client,
|
sec_group_rules_client=sec_group_rules_client,
|
||||||
**ssh_rule)
|
**ssh_rule)
|
||||||
@ -385,7 +385,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
|||||||
remote_group_id=tenant.security_groups['default']['id'],
|
remote_group_id=tenant.security_groups['default']['id'],
|
||||||
direction='ingress'
|
direction='ingress'
|
||||||
)
|
)
|
||||||
self._create_security_group_rule(
|
self.create_security_group_rule(
|
||||||
secgroup=tenant.security_groups['default'],
|
secgroup=tenant.security_groups['default'],
|
||||||
security_groups_client=tenant.manager.security_groups_client,
|
security_groups_client=tenant.manager.security_groups_client,
|
||||||
**ruleset
|
**ruleset
|
||||||
@ -413,7 +413,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
|||||||
protocol = ruleset['protocol']
|
protocol = ruleset['protocol']
|
||||||
sec_group_rules_client = (
|
sec_group_rules_client = (
|
||||||
dest_tenant.manager.security_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'],
|
secgroup=dest_tenant.security_groups['default'],
|
||||||
sec_group_rules_client=sec_group_rules_client,
|
sec_group_rules_client=sec_group_rules_client,
|
||||||
**ruleset
|
**ruleset
|
||||||
@ -429,7 +429,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
|||||||
# allow reverse traffic and check
|
# allow reverse traffic and check
|
||||||
sec_group_rules_client = (
|
sec_group_rules_client = (
|
||||||
source_tenant.manager.security_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'],
|
secgroup=source_tenant.security_groups['default'],
|
||||||
sec_group_rules_client=sec_group_rules_client,
|
sec_group_rules_client=sec_group_rules_client,
|
||||||
**ruleset
|
**ruleset
|
||||||
@ -543,7 +543,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
|||||||
direction='ingress',
|
direction='ingress',
|
||||||
)
|
)
|
||||||
sec_group_rules_client = new_tenant.manager.security_group_rules_client
|
sec_group_rules_client = new_tenant.manager.security_group_rules_client
|
||||||
self._create_security_group_rule(
|
self.create_security_group_rule(
|
||||||
secgroup=new_sg,
|
secgroup=new_sg,
|
||||||
sec_group_rules_client=sec_group_rules_client,
|
sec_group_rules_client=sec_group_rules_client,
|
||||||
**icmp_rule)
|
**icmp_rule)
|
||||||
@ -596,7 +596,7 @@ class TestSecurityGroupsBasicOps(manager.NetworkScenarioTest):
|
|||||||
protocol='icmp',
|
protocol='icmp',
|
||||||
direction='ingress'
|
direction='ingress'
|
||||||
)
|
)
|
||||||
self._create_security_group_rule(
|
self.create_security_group_rule(
|
||||||
secgroup=tenant.security_groups['default'],
|
secgroup=tenant.security_groups['default'],
|
||||||
**ruleset
|
**ruleset
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user