vm: add vm.klass property

Allow to get domain class as a property, not using admin.vm.List call.
This makes it unnecessary to call admin.vm.List on the client side to
construct wrapper object.
This commit is contained in:
Marek Marczykowski-Górecki 2017-09-26 13:31:12 +02:00
parent 9f88fa7f0c
commit a90dea34de
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -500,6 +500,10 @@ class BaseVM(qubes.PropertyHolder):
for path in self._qdb_watch_paths:
self._qdb_connection_watch.watch(path)
@qubes.stateless_property
def klass(self):
'''Domain class name'''
return type(self).__name__
class VMProperty(qubes.property):
'''Property that is referring to a VM