Skip to content

Commit

Permalink
Print availability zone when listing instances
Browse files Browse the repository at this point in the history
  • Loading branch information
malfet committed Oct 25, 2024
1 parent cb75d7d commit 000a40b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aarch64_linux/build_aarch64_wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,9 @@ def get_instance_name(instance) -> Optional[str]:
def list_instances(instance_type: str) -> None:
print(f"All instances of type {instance_type}")
for instance in ec2_instances_of_type(instance_type):
print(f"{instance.id} {get_instance_name(instance)} {instance.public_dns_name} {instance.state['Name']}")
ifaces = instance.network_interfaces
az = ifaces[0].subnet.availability_zone if len(ifaces)>0 else None
print(f"{instance.id} {get_instance_name(instance)} {instance.public_dns_name} {instance.state['Name']} {az}")


def terminate_instances(instance_type: str) -> None:
Expand Down

0 comments on commit 000a40b

Please sign in to comment.