v7.1.1: Fix server launch error related to hostname

master v7.1.1
SporeStack 2 months ago
parent 7158b6953c
commit 8cd2644c0c
  1. 6
      CHANGELOG.md
  2. 2
      src/sporestack/__init__.py
  3. 8
      src/sporestack/cli.py

@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
## [7.1.1 - 2022-09-29]
### Changed
- Fixed hostname related bug when launching a server.
## [7.1.0 - 2022-09-27]
### Added

@ -2,4 +2,4 @@
__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:
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]:

Loading…
Cancel
Save