v7.1.1: Fix server launch error related to hostname
This commit is contained in:
parent
7158b6953c
commit
8cd2644c0c
|
@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [7.1.1 - 2022-09-29]
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Fixed hostname related bug when launching a server.
|
||||||
|
|
||||||
## [7.1.0 - 2022-09-27]
|
## [7.1.0 - 2022-09-27]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
__all__ = ["api", "api_client", "exceptions"]
|
__all__ = ["api", "api_client", "exceptions"]
|
||||||
|
|
||||||
__version__ = "7.1.0"
|
__version__ = "7.1.1"
|
||||||
|
|
|
@ -284,8 +284,12 @@ def get_machine_info(hostname: str) -> Dict[str, Any]:
|
||||||
|
|
||||||
|
|
||||||
def pretty_machine_info(info: Dict[str, Any]) -> str:
|
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]:
|
if "ipv6" in info["network_interfaces"][0]:
|
||||||
msg += "IPv6: {}\n".format(info["network_interfaces"][0]["ipv6"])
|
msg += "IPv6: {}\n".format(info["network_interfaces"][0]["ipv6"])
|
||||||
if "ipv4" in info["network_interfaces"][0]:
|
if "ipv4" in info["network_interfaces"][0]:
|
||||||
|
|
Loading…
Reference in New Issue