master - lvmdbusd: Add cfg.vdo_support
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=9d2ef05c5d0b57139d8405a2af947091f2c13942 Commit: 9d2ef05c5d0b57139d8405a2af947091f2c13942 Parent: ceb808d26f56ebd75baa379780ad55163197a20f Author: Tony Asleson <[email protected]> AuthorDate: Mon Oct 7 16:57:05 2019 -0500 Committer: Tony Asleson <[email protected]> CommitterDate: Wed Oct 30 10:38:40 2019 -0500
lvmdbusd: Add cfg.vdo_support
Will be used to add vdo interfaces on demand.
--- daemons/lvmdbusd/cfg.py | 3 +++ daemons/lvmdbusd/main.py | 6 +++++- test/dbus/lvmdbustest.py | 2 +- test/dbus/testlib.py | 1 + 4 files changed, 10 insertions(+), 2 deletions(-)
daemons/lvmdbusd/cfg.py +3 -0
@@ -79,6 +79,9 @@ hidden_lv = itertools.count() load = None event = None +# Boolean to denote if lvm supports VDO integration +vdo_support = False + # Global cached state db = None
daemons/lvmdbusd/main.py +5 -1
@@ -29,7 +29,7 @@ from .utils import log_debug, log_error import argparse import os import sys -from .cmdhandler import LvmFlightRecorder +from .cmdhandler import LvmFlightRecorder, supports_vdo from .request import RequestEntry
@@ -127,6 +127,10 @@ def main(): log_error("You cannot specify --lvmshell and --nojson") sys.exit(1) + # We will dynamically add interfaces which support vdo if it + # exists. + cfg.vdo_support = supports_vdo() + # List of threads that we start up thread_list = []
test/dbus/lvmdbustest.py +1 -1
@@ -114,7 +114,7 @@ def get_objects(): rc = { MANAGER_INT: [], PV_INT: [], VG_INT: [], LV_INT: [], THINPOOL_INT: [], JOB_INT: [], SNAPSHOT_INT: [], LV_COMMON_INT: [], - CACHE_POOL_INT: [], CACHE_LV_INT: []} + CACHE_POOL_INT: [], CACHE_LV_INT: [], VG_VDO_INT: []} object_manager_object = bus.get_object( BUS_NAME, "/com/redhat/lvmdbus1", introspect=False)
test/dbus/testlib.py +1 -0
@@ -24,6 +24,7 @@ MANAGER_INT = BASE_INTERFACE + '.Manager' MANAGER_OBJ = '/' + BASE_INTERFACE.replace('.', '/') + '/Manager' PV_INT = BASE_INTERFACE + ".Pv" VG_INT = BASE_INTERFACE + ".Vg" +VG_VDO_INT = BASE_INTERFACE + ".VgVdo" LV_INT = BASE_INTERFACE + ".Lv" THINPOOL_INT = BASE_INTERFACE + ".ThinPool" SNAPSHOT_INT = BASE_INTERFACE + ".Snapshot"