mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Output a human-readable machine state
Related to saltstack/salt#27089 Saltcloud virtualbox provider
This commit is contained in:
parent
f4386c9be1
commit
f8abd87f88
@ -21,7 +21,8 @@ import logging
|
||||
from salt.exceptions import SaltCloudSystemExit
|
||||
import salt.config as config
|
||||
import salt.utils.cloud as cloud
|
||||
from utils.virtualbox import vb_list_machines, vb_clone_vm, HAS_LIBS, vb_machine_exists, vb_destroy_machine
|
||||
from utils.virtualbox import vb_list_machines, vb_clone_vm, HAS_LIBS, vb_machine_exists, vb_destroy_machine, \
|
||||
vb_machinestate_to_str
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
@ -209,7 +210,7 @@ def list_nodes(kwargs=None, call=None):
|
||||
"id": machine.get("id", ""),
|
||||
"image": machine.get("image", ""),
|
||||
"size": "%s MB" % machine.get("memorySize", 0),
|
||||
"state": machine.get("state", ""),
|
||||
"state": vb_machinestate_to_str(machine.get("state", -1))[0],
|
||||
"private_ips": [],
|
||||
"public_ips": [],
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user