Skip to content

Commit

Permalink
found outdated openstacksdk call
Browse files Browse the repository at this point in the history
Signed-off-by: Katharina Trentau <[email protected]>
  • Loading branch information
fraugabel committed Sep 10, 2024
1 parent a0fbeb7 commit eb5830f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Tests/iaas/security-groups/default-security-group-rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ def connect(cloud_name: str) -> openstack.connection.Connection:
def test_rules(cloud_name: str):
try:
connection = connect(cloud_name)
rules = connection.network.default_security_group_rules()
#rules = connection.network.default_security_group_rules()
#print(f"!! worked: network.default_security_group_rules() {rules}")
#rules = connection.network.find_security_group("default")
rules = connection.network.security_group_rules()
print(f"!! worked: rules {rules}")
except Exception as e:
print(str(e))
raise Exception(
Expand All @@ -64,6 +68,10 @@ def test_rules(cloud_name: str):
print("No default security group rules defined.")
else:
for rule in rules:
# direction = rule['direction']
# ethertype = rule['ethertype']
# r_custom_sg = rule['used_in_non_default_sg']
# r_default_sg = rule['used_in_default_sg']
direction = rule.direction
ethertype = rule.ethertype
r_custom_sg = rule.used_in_non_default_sg
Expand Down

0 comments on commit eb5830f

Please sign in to comment.