Provide fake CPUs count and total memory in offline mode
This commit is contained in:
parent
5eea473725
commit
2ff6aa456e
@ -248,6 +248,8 @@ class QubesHost(object):
|
|||||||
def memory_total(self):
|
def memory_total(self):
|
||||||
'''Total memory, in kbytes'''
|
'''Total memory, in kbytes'''
|
||||||
|
|
||||||
|
if self.app.vmm.offline_mode:
|
||||||
|
return 2**64-1
|
||||||
self._fetch()
|
self._fetch()
|
||||||
return self._total_mem
|
return self._total_mem
|
||||||
|
|
||||||
@ -256,6 +258,9 @@ class QubesHost(object):
|
|||||||
def no_cpus(self):
|
def no_cpus(self):
|
||||||
'''Number of CPUs'''
|
'''Number of CPUs'''
|
||||||
|
|
||||||
|
if self.app.vmm.offline_mode:
|
||||||
|
return 42
|
||||||
|
|
||||||
self._fetch()
|
self._fetch()
|
||||||
return self._no_cpus
|
return self._no_cpus
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user