Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 000a40b

Browse files
committed
Print availability zone when listing instances
1 parent cb75d7d commit 000a40b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

aarch64_linux/build_aarch64_wheel.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,9 @@ def get_instance_name(instance) -> Optional[str]:
686686
def list_instances(instance_type: str) -> None:
687687
print(f"All instances of type {instance_type}")
688688
for instance in ec2_instances_of_type(instance_type):
689-
print(f"{instance.id} {get_instance_name(instance)} {instance.public_dns_name} {instance.state['Name']}")
689+
ifaces = instance.network_interfaces
690+
az = ifaces[0].subnet.availability_zone if len(ifaces)>0 else None
691+
print(f"{instance.id} {get_instance_name(instance)} {instance.public_dns_name} {instance.state['Name']} {az}")
690692

691693

692694
def terminate_instances(instance_type: str) -> None:

0 commit comments

Comments
 (0)