From a90dea34de4053355cfd640336bb54a2052dec6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 26 Sep 2017 13:31:12 +0200 Subject: [PATCH] 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. --- qubes/vm/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qubes/vm/__init__.py b/qubes/vm/__init__.py index 853d57a7..02f1d34a 100644 --- a/qubes/vm/__init__.py +++ b/qubes/vm/__init__.py @@ -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