Skip to content

Commit

Permalink
changed prints to log
Browse files Browse the repository at this point in the history
  • Loading branch information
XaverStiensmeier committed Nov 23, 2023
1 parent 422eda5 commit 975f2e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions bibigrid/core/actions/list_clusters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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.")
Expand Down
4 changes: 2 additions & 2 deletions bibigrid/core/utility/validate_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit 975f2e5

Please sign in to comment.