From d211a2771a6a50215ad0ad3185778086b8969960 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 22 Mar 2018 01:33:51 +0100 Subject: [PATCH] api/admin: expose volume path in admin.vm.volume.Info Since (for LVM at least) path is dynamic now, add information about it to volume info. This is not very useful outside of dom0, but in dom0 it can be very useful for various scripts. This will disclose current volume revision id, but it is already possible to deduce it from snapshots list. --- qubes/api/admin.py | 2 +- qubes/tests/api_admin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qubes/api/admin.py b/qubes/api/admin.py index a4a803c5..d0b9e32d 100644 --- a/qubes/api/admin.py +++ b/qubes/api/admin.py @@ -335,7 +335,7 @@ class QubesAdminAPI(qubes.api.AbstractQubesAPI): volume = self.dest.volumes[self.arg] # properties defined in API volume_properties = [ - 'pool', 'vid', 'size', 'usage', 'rw', 'source', + 'pool', 'vid', 'size', 'usage', 'rw', 'source', 'path', 'save_on_stop', 'snap_on_start', 'revisions_to_keep'] def _serialize(value): diff --git a/qubes/tests/api_admin.py b/qubes/tests/api_admin.py index 3d785ac4..4a425d4b 100644 --- a/qubes/tests/api_admin.py +++ b/qubes/tests/api_admin.py @@ -39,7 +39,7 @@ import qubes.storage # properties defined in API volume_properties = [ - 'pool', 'vid', 'size', 'usage', 'rw', 'source', + 'pool', 'vid', 'size', 'usage', 'rw', 'source', 'path', 'save_on_stop', 'snap_on_start', 'revisions_to_keep']