def main():
<EOL>if len(sys.argv) != <NUM_LIT:2>:<EOL><INDENT>region = '<STR_LIT:all>'<EOL><DEDENT>else:<EOL><INDENT>region = sys.argv[<NUM_LIT:1>]<EOL><DEDENT>try:<EOL><INDENT>with open('<STR_LIT>') as config_file:<EOL><INDENT>config_data = json.load(config_file)<EOL><DEDENT><DEDENT>except FileNotFoundError:<EOL><INDENT>sys.exit('<STR_LIT>')<EOL><DEDENT>tenant_id = config_data['<STR_LIT>']<EOL>app_id = config_data['<STR_LIT>']<EOL>app_secret = config_data['<STR_LIT>']<EOL>sub_id = config_data['<STR_LIT>']<EOL>access_token = azurerm.get_access_token(tenant_id, app_id, app_secret)<EOL>if region == '<STR_LIT:all>':<EOL><INDENT>locations = azurerm.list_locations(access_token, sub_id)<EOL>for location in locations['<STR_LIT:value>']:<EOL><INDENT>print_region_quota(access_token, sub_id, location['<STR_LIT:name>'])<EOL><DEDENT><DEDENT>else:<EOL><INDENT>print_region_quota(access_token, sub_id, region)<EOL><DEDENT>
Main routine.