machine: use virtualization.virt_identifier property
Signed-off-by: Pedro Lamas <pedrolamas@gmail.com>
This commit is contained in:
parent
c61ff8b252
commit
b67a08a65b
|
@ -232,7 +232,8 @@ class Machine:
|
||||||
async def _handle_machine_request(self, web_request: WebRequest) -> str:
|
async def _handle_machine_request(self, web_request: WebRequest) -> str:
|
||||||
ep = web_request.get_endpoint()
|
ep = web_request.get_endpoint()
|
||||||
if self.inside_container:
|
if self.inside_container:
|
||||||
virt_id = self.system_info['virtualization'].get('virt_id', "none")
|
virt_id = self.system_info['virtualization'].get(
|
||||||
|
'virt_identifier', "none")
|
||||||
raise self.server.error(
|
raise self.server.error(
|
||||||
f"Cannot {ep.split('/')[-1]} from within a "
|
f"Cannot {ep.split('/')[-1]} from within a "
|
||||||
f"{virt_id} container")
|
f"{virt_id} container")
|
||||||
|
|
Loading…
Reference in New Issue