def retrieve_servers_names(dns_zone, dns_project_id): LOGGER.info("Retrieving names servers in %s, project %s", dns_zone, dns_project_id) returned_servers = run_command_readonly([ 'gcloud', 'dns', 'managed-zones', 'describe', dns_zone, '--project', dns_project_id ]) servers = returned_servers.decode("utf-8") LOGGER.warning("Keep these names servers for the next step\n") LOGGER.warning(servers)
def retrieve_servers_names(dns_zone, dns_project_id): LOGGER.info("Retrieving names servers in {}, project {}".format( dns_zone, dns_project_id)) returned_servers = run_command([ 'gcloud', 'dns', 'managed-zones', 'describe', dns_zone, '--project', dns_project_id ]) if helpers.DRY_RUN: servers = "server1" else: servers = returned_servers.decode("utf-8") LOGGER.warning("Keep these names servers for the next step\n") LOGGER.warning(servers)