diff --git a/bibigrid/core/actions/list_clusters.py b/bibigrid/core/actions/list_clusters.py index 99e1b6bc..554b7221 100644 --- a/bibigrid/core/actions/list_clusters.py +++ b/bibigrid/core/actions/list_clusters.py @@ -24,8 +24,8 @@ def dict_clusters(providers, log): servers = provider.list_servers() for server in servers: result = SERVER_REGEX.match(server["name"]) - print(server["name"]) - print(result) + log.log(42, server["name"]) + log.log(42, result) if result: identifier = result.group(4) or result.group(2) cluster_id = result.group(5) or result.group(3) @@ -71,7 +71,7 @@ def log_list(cluster_id, providers, log): master_count, worker_count, vpn_count = get_size_overview(cluster_dict[cluster_id], log) log.log(42, f"\tCluster has {master_count} master, {vpn_count} vpngtw and {worker_count} regular workers. " f"The cluster is spread over {vpn_count + master_count} reachable provider(s).") - pprint.pprint(cluster_dict[cluster_id]) + log.log(42, pprint.pformat(cluster_dict[cluster_id])) else: log.info("Cluster with cluster-id {cluster_id} not found.") log.log(42, f"Cluster with cluster-id {cluster_id} not found.") diff --git a/bibigrid/core/utility/validate_configuration.py b/bibigrid/core/utility/validate_configuration.py index 72deb806..a4232d2e 100644 --- a/bibigrid/core/utility/validate_configuration.py +++ b/bibigrid/core/utility/validate_configuration.py @@ -303,8 +303,8 @@ def check_instance_type_image_combination(self, instance_type, instance_image, p flavor = provider.get_flavor(instance_type) if not flavor: self.log.warning("Flavor %s does not exist.", instance_type) - print("Available flavors:") - print("\n".join(provider.get_active_flavors())) + self.log.log(42, "Available flavors:") + self.log.log(42, "\n".join(provider.get_active_flavors())) return False type_max_disk_space = flavor["disk"] type_max_ram = flavor["ram"]