def main(): # Set to False if you do not have a valid certificate for your Turbot Host turbot_host_certificate_verification = True # Set to your Turbot Host URL turbot_host = turbotutils.get_turbot_host() # Get the access and secret key pairs (turbot_api_access_key, turbot_api_secret_key) = turbotutils.get_turbot_access_keys() # Get the turbot account numbers accounts = turbotutils.cluster.get_turbot_account_ids( turbot_api_access_key, turbot_api_secret_key, turbot_host_certificate_verification, turbot_host) for tid, id in accounts.items(): print(tid + ',' + str(id).zfill(12))
def turbot_main(): # Set to False if you do not have a valid certificate for your Turbot Host turbot_host_certificate_verification = True # Set to your Turbot Host URL turbot_host = turbotutils.get_turbot_host() # Get the access and secret key pairs (turbot_api_access_key, turbot_api_secret_key) = turbotutils.get_turbot_access_keys() # Get the turbot account numbers accounts = turbotutils.get_turbot_account_ids( turbot_api_access_key, turbot_api_secret_key, turbot_host_certificate_verification, turbot_host) for account in accounts: print("Checking %s" % account) #peers = resposne = turbotutils.query_yes_no( "Do you want to break this peering?")
if args.source == "cluster": filename = 'reports/guardrails/cluster_to_' + args.dest + '.csv' else: filename = 'reports/guardrails/' + args.source + '_to_' + args.dest + '.csv' with open(filename, 'w') as csvfile: writer = csv.writer(csvfile) # Set to False if you do not have a valid certificate for your Turbot Host turbot_host_certificate_verification = True # Set to your Turbot Host URL turbot_host = turbotutils.get_turbot_host() # Get the access and secret key pairs (turbot_api_access_key, turbot_api_secret_key) = turbotutils.get_turbot_access_keys() urn_format = turbotutils.cluster.get_cluster_id(turbot_host, turbot_api_access_key, turbot_api_secret_key, turbot_host_certificate_verification) if args.source == 'cluster': source_account_urn = urn_format else: source_account_urn = urn_format + ':' + args.source dest_source_account_urn = urn_format + ':' + args.dest difference_count = 0 sourceguardrails = turbotutils.guardrails.get_guardrail_list(turbot_api_access_key, turbot_api_secret_key, turbot_host_certificate_verification, turbot_host, source_account_urn) destguardrails = turbotutils.guardrails.get_guardrail_list(turbot_api_access_key, turbot_api_secret_key, turbot_host_certificate_verification, turbot_host, dest_source_account_urn)