Add vm.is_networked()
This commit is contained in:
parent
938fc9348f
commit
f5e102177c
@ -215,6 +215,19 @@ class QubesVM(qubesadmin.base.PropertyHolder):
|
|||||||
|
|
||||||
return self.get_power_state() != 'Halted'
|
return self.get_power_state() != 'Halted'
|
||||||
|
|
||||||
|
def is_networked(self):
|
||||||
|
'''Check whether this VM can reach network (firewall notwithstanding).
|
||||||
|
|
||||||
|
:returns: :py:obj:`True` if is machine can reach network, \
|
||||||
|
:py:obj:`False` otherwise.
|
||||||
|
:rtype: bool
|
||||||
|
'''
|
||||||
|
|
||||||
|
if self.provides_network:
|
||||||
|
return True
|
||||||
|
|
||||||
|
return self.netvm is not None
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def volumes(self):
|
def volumes(self):
|
||||||
'''VM disk volumes'''
|
'''VM disk volumes'''
|
||||||
|
Loading…
Reference in New Issue
Block a user