Skip to content

Commit

Permalink
Merge branch 'main' into feat/update-k8s-eol-data
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-gubricky authored Nov 8, 2024
2 parents 16eb9ab + ef46e2d commit 29d4800
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 192 deletions.
13 changes: 8 additions & 5 deletions Tests/iaas/key-manager/check-for-key-manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,16 @@ def main():
# parse cloud name for lookup in clouds.yaml
cloud = args.os_cloud or os.environ.get("OS_CLOUD", None)
if not cloud:
raise RuntimeError(
logger.critical(
"You need to have the OS_CLOUD environment variable set to your cloud "
"name or pass it via --os-cloud"
)
return 2

with openstack.connect(cloud=cloud) as conn:
if not check_for_member_role(conn):
logger.critical("Cannot test key-manager permissions. User has wrong roles")
return 1
return 2
if check_presence_of_key_manager(conn):
return check_key_manager_permissions(conn)
else:
Expand All @@ -145,9 +146,11 @@ def main():

if __name__ == "__main__":
try:
sys.exit(main())
except SystemExit:
sys.exit(main() or 0)
except SystemExit as e:
if e.code < 2:
print("key-manager-check: " + ('PASS', 'FAIL')[min(1, e.code)])
raise
except BaseException:
logger.critical("exception", exc_info=True)
sys.exit(1)
sys.exit(2)
1 change: 1 addition & 0 deletions Tests/iaas/security-groups/default-security-group-rules.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
"""Default Security Group Rules Checker
This script tests the absence of any ingress default security group rule
Expand Down
Loading

0 comments on commit 29d4800

Please sign in to comment.