-
-
Save cleibl/e6654edf646b5a0b7b48da9652c13458 to your computer and use it in GitHub Desktop.
Create Service and call a function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create Client for the Compute Engine API | |
service = create_service() | |
print('Describing Firewall') | |
# Checks if the Firewall is disabled. Returns True/Faalse | |
disabled = check_for_disabled(project_id,service,firewall_name) | |
# Gets the Allowed Source Ranges for the firewall rule. Returns a list of CIDR Blocks | |
source_ranges = get_source_ranges(project_id, service, firewall_name) | |
# Checks if the Firewall is an "Allow All" Rule. Returns True/False | |
allow_all = check_for_allowed_all(project_id, service, firewall_name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment