mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 17:36:05 +00:00
fix(instances): Guest Info says when the agent fails and keeps what it answered
When the guest agent failed, the Guest Info section stayed empty with no word: the request's error answer was not handled. An agent without the time zone or host name command lost the OS details it had answered too. The section now shows the agent's error, and a missing command leaves out only its own details.
This commit is contained in:
parent
8395a00eab
commit
431646335b
4 changed files with 29 additions and 11 deletions
|
|
@ -389,8 +389,10 @@ class wvmInstance(wvmConnect):
|
|||
|
||||
def osinfo(self):
|
||||
info = agent_command(self.instance, "guest-get-osinfo")
|
||||
info.update(agent_command(self.instance, "guest-get-timezone"))
|
||||
info.update(agent_command(self.instance, "guest-get-host-name"))
|
||||
# an agent without one of these commands still gives the rest
|
||||
for command in ("guest-get-timezone", "guest-get-host-name"):
|
||||
with contextlib.suppress(libvirtError):
|
||||
info.update(agent_command(self.instance, command))
|
||||
return info
|
||||
|
||||
def start(self, flags=0):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue