|
|
|
@ -284,8 +284,12 @@ def get_machine_info(hostname: str) -> Dict[str, Any]:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def pretty_machine_info(info: Dict[str, Any]) -> str:
|
|
|
|
|
msg = "Hostname: {}\n".format(info["vm_hostname"])
|
|
|
|
|
msg += "Machine ID (keep this secret!): {}\n".format(info["machine_id"])
|
|
|
|
|
msg = "Machine ID (keep this secret!): {}\n".format(info["machine_id"])
|
|
|
|
|
if "vm_hostname" in info:
|
|
|
|
|
msg += "Hostname: {}\n".format(info["vm_hostname"])
|
|
|
|
|
elif "hostname" in info:
|
|
|
|
|
msg += "Hostname: {}\n".format(info["hostname"])
|
|
|
|
|
|
|
|
|
|
if "ipv6" in info["network_interfaces"][0]:
|
|
|
|
|
msg += "IPv6: {}\n".format(info["network_interfaces"][0]["ipv6"])
|
|
|
|
|
if "ipv4" in info["network_interfaces"][0]:
|
|
|
|
|