Skip to content

Commit

Permalink
Merge pull request #754 from tbzatek/modularity-imp-pt2
Browse files Browse the repository at this point in the history
Modularity improvements, part II
  • Loading branch information
tbzatek authored May 26, 2020
2 parents 9e17696 + 3f9083a commit 58bda4c
Show file tree
Hide file tree
Showing 147 changed files with 6,783 additions and 5,785 deletions.
6 changes: 2 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -538,9 +538,7 @@ AM_CONDITIONAL(HAVE_BCACHE, [test "x$have_bcache" = "xyes"])
# VDO module
have_vdo=no
AC_ARG_ENABLE(vdo, AS_HELP_STRING([--enable-vdo], [enable VDO support]))
if test "x$enable_vdo" = "xyes" \
-o "x$enable_modules" = "xyes" \
-o "x$enable_available_modules" = "xyes"; then
if test "x$enable_vdo" = "xyes"; then
# libblockdev
SAVE_CFLAGS=$CFLAGS
SAVE_LDFLAGS=$LDFLAGS
Expand Down Expand Up @@ -838,5 +836,5 @@ echo "
Zram module: ${have_zram}
LibStorageMgmt module: ${have_lsm}
Bcache module: ${have_bcache}
VDO module: ${have_vdo}
VDO module (deprecated): ${have_vdo}
"
35 changes: 33 additions & 2 deletions data/org.freedesktop.UDisks2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,42 @@
EnableModules:
@enable: A boolean value indicating whether modules should be enabled. Currently only the %TRUE value is permitted.
Loads and activates modules. This action also causes all objects to receive "add" uevent that triggers additional module interfaces activation.
Loads and activates modules. Modules that have been already loaded are not reinitialized on subsequent calls to this method and are skipped.
In case any new module is getting activated by this method call a <literal>add</literal> uevent is trigerred on all exported objects.
Modules cannot be deactivated for the moment. Any consecutive calls with modules already enabled equals to noop.
This takes in account an optional explicit list of modules to load as specified in the <filename>/etc/udisks2/udisks2.conf</filename>
config file. If unspecified all available modules will be loaded.
Modules cannot be deactivated at the moment. This method call never fails even if no module has been activated
and by nature it cannot report any particular module initialization failures. Clients have no way of finding that
a particular module is available.
<note>
<emphasis>This method is deprecated since 2.9.0.</emphasis>
Use org.freedesktop.UDisks2.Manager.EnableModule() instead.
</note>
-->
<method name="EnableModules">
<annotation name="org.freedesktop.DBus.Deprecated" value="true"/>
<arg name="enable" direction="in" type="b"/>
</method>

<!--
EnableModule:
@name: Name of the module.
@enable: A boolean value indicating whether modules should be enabled. Currently only the %TRUE value is permitted.
@since: 2.9.0
Loads and activates single module identified by @name. In case the module is already active no reinitialization
is done and this call has no effect. Clients are supposed to call this method before using any of the particular module API.
In case no such module is available or its initialization fails a proper error is returned. This action also causes
all objects to receive <literal>add</literal> uevent that allows the module to attach extra interfaces before
this method call returns.
Modules cannot be deactivated at the moment.
-->
<method name="EnableModule">
<arg name="name" direction="in" type="s"/>
<arg name="enable" direction="in" type="b"/>
</method>

Expand Down
8 changes: 6 additions & 2 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ CFILE_GLOB = \
if ENABLE_DAEMON
HFILE_GLOB += \
$(top_srcdir)/src/*.h \
$(top_srcdir)/modules/*.h \
$(NULL)

CFILE_GLOB += \
$(top_srcdir)/src/*.c \
$(top_srcdir)/modules/*.c \
$(NULL)
endif # ENABLE_DAEMON

Expand Down Expand Up @@ -176,6 +174,9 @@ else
$(AM_V_at) $(SED) "/\# VDO_TYPES/d" $(builddir)/$(UDISKS_TYPES) > $(builddir)/$(UDISKS_TYPES).tmp && mv -f $(builddir)/$(UDISKS_TYPES).tmp $(builddir)/$(UDISKS_TYPES)
endif # HAVE_VDO


if ENABLE_DAEMON

# GTKDOC for LVM2
if HAVE_LVM2
DOC_SOURCE_DIR += $(top_srcdir)/modules/lvm2
Expand Down Expand Up @@ -239,6 +240,9 @@ AM_CPPFLAGS += -I$(top_srcdir)/modules/vdo
GTKDOC_LIBS += $(top_builddir)/modules/vdo/libudisks2_vdo.la
endif # HAVE_VDO

endif # ENABLE_DAEMON


# ------------------------------------------------------------------------------

include $(top_srcdir)/gtk-doc.make
Expand Down
39 changes: 19 additions & 20 deletions doc/man/udisks2_lsm.conf.5.xml.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
</para>

<para>
Some storage system requires extra configuration in
<emphasis>@sysconfdir@/udisks2/modules.conf.d/udisks2.conf</emphasis>.
Some storage systems require extra configuration in
<emphasis>@sysconfdir@/udisks2/modules.conf.d/udisks2_lsm.conf</emphasis>.
</para>
</refsect1>

Expand All @@ -44,18 +44,17 @@
<varlistentry>
<term><option>refresh_interval = &lt;integer&gt;</option></term>
<para>
The option controls how many seconds should this module
refresh the RAID information cache. If not defined, the default
value is 30 (seconds).
This option controls how often the RAID information cache should be
refreshed. If not defined, the default value is 30 (seconds).
</para>
</varlistentry>

<varlistentry>
<term><option>enable_sim = true|false</option></term>
<para>
This option indicates whether lsm module should try simulator of
LibStorageMgmt. This is only for developer. If not defined,
the default value is false(do not enable simulator of
This option indicates whether the lsm module should try simulator of
LibStorageMgmt. This is only for developers. If not defined,
the default value is false (do not enable simulator of
LibStorageMgmt). If enabled, the
<emphasis role="bold">sim://</emphasis> URI will be
used to query LibStorageMgmt simulator plugin.
Expand All @@ -65,14 +64,14 @@
<varlistentry>
<term><option>enable_hpsa = true|false</option></term>
<para>
This option indicates whether lsm module should check HP
SmartArray. If not defined, the default value is true(check HP
This option indicates whether the lsm module should check HP
SmartArray. If not defined, the default value is true (check HP
SmartArray).
</para>
<para>
To be functional, also requires
To be functional this also requires the
<emphasis role="bold">libstoragemgmt-hpsa-plugin</emphasis>
package be installed and well configured. Please refer to the
package to be installed and configured properly. Please refer to the
<emphasis>hpsa_lsmplugin(1)</emphasis> manpage for detail.
</para>
<para>
Expand All @@ -85,25 +84,25 @@
<term><option>extra_uris= ["uri_string_1", "uri_string_2"]</option></term>
<para>
This option defines extra LibStorageMgmt URI list here. Please
refer to <emphasis>LibStorageMgmt User Guide[3]</emphasis> for URI
refer to <emphasis>LibStorageMgmt User Guide[3]</emphasis> for the URI
format.
</para>
<para>
Require double quoted string and separated by comma, example:
Requires double quoted string separated by comma, for example:

<programlisting>
extra_uris = ["ontap+ssl://[email protected]", "ontap+ssl://[email protected]"]
</programlisting>

If not defined, empty list(no extra URI loaded) will be used.
If not defined, empty list (no extra URI loaded) will be used.
</para>
</varlistentry>

<varlistentry>
<term><option>extra_passwords = ["password_string_1", "password_string_2"]</option></term>
<para>
This options defines the passwords of above URI list. Please use
double quoted string and separated by comma, example:
double quoted string separated by comma, for example:

<programlisting>
extra_paasswords = ["password1", "password2"]
Expand All @@ -117,14 +116,14 @@
<refsect1>
<title>HARDWARE SUPPORT STATUS</title>
<para>
Any hardwares which are supported in LibStorageMgmt with these capabilities
will get fully support by UDisks2 LSM module:
Any hardware which is supported in LibStorageMgmt with these capabilities
will get fully supported by the UDisks2 LSM module:
</para>

<variablelist>
<varlistentry>
<term>
* <option>VOLUMES capabilityes</option>
* <option>VOLUMES capabilities</option>
with valid VPD83 information,
</term>
</varlistentry>
Expand All @@ -139,7 +138,7 @@
Please refer to LibStorageMgmt document website[2] for support status.
</para>
<para>
Tested hardwares are:
Tested hardware:
</para>
<variablelist>
<varlistentry>
Expand Down
1 change: 1 addition & 0 deletions doc/udisks2-docs.xml.daemon.part.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<xi:include href="xml/udisksstate.xml"/>
<xi:include href="xml/udisksata.xml"/>
<xi:include href="xml/UDisksModuleManager.xml"/>
<xi:include href="xml/UDisksModule.xml"/>
</chapter>
<chapter id="ref-daemon-monitoring">
<title>State and Configuration</title>
Expand Down
1 change: 0 additions & 1 deletion doc/udisks2-docs.xml.lsm.dbus.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
<xi:include href="xml/udisks-generated-doc-org.freedesktop.UDisks2.Manager.LSM.xml"/>
<xi:include href="xml/udisks-generated-doc-org.freedesktop.UDisks2.Drive.LSM.xml"/>
<xi:include href="xml/udisks-generated-doc-org.freedesktop.UDisks2.Drive.LsmLocal.xml"/>
58 changes: 35 additions & 23 deletions doc/udisks2-sections.txt.daemon.sections.in
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ udisks_simple_job_get_type
<FILE>udiskslinuxdriveobject</FILE>
<TITLE>UDisksLinuxDriveObject</TITLE>
UDisksLinuxDriveObject
UDisksObjectHasInterfaceFunc
UDisksObjectConnectInterfaceFunc
UDisksObjectUpdateInterfaceFunc
udisks_linux_drive_object_new
udisks_linux_drive_object_uevent
udisks_linux_drive_object_get_daemon
Expand Down Expand Up @@ -532,38 +535,47 @@ udisks_linux_mdraid_get_type
<SECTION>
<FILE>UDisksModuleManager</FILE>
UDisksModuleManager
UDisksModuleInterfaceInfo
UDisksObjectHasInterfaceFunc
UDisksObjectConnectInterfaceFunc
UDisksObjectUpdateInterfaceFunc
UDisksModuleObjectNewFunc
UDisksModuleNewManagerIfaceFunc
UDisksModuleInitFunc
UDisksModuleIfaceSetupFunc
UDisksModuleObjectNewSetupFunc
UDisksModuleNewManagerIfaceSetupFunc
UDisksModuleObject
UDisksModuleObjectIface
udisks_module_manager_new
udisks_module_manager_get_modules_available
udisks_module_manager_new_uninstalled
udisks_module_manager_load_single_module
udisks_module_manager_load_modules
udisks_module_manager_get_module_state_pointer
udisks_module_manager_set_module_state_pointer
udisks_module_manager_get_block_object_iface_infos
udisks_module_manager_get_drive_object_iface_infos
udisks_module_manager_get_module_object_new_funcs
udisks_module_manager_get_new_manager_iface_funcs
udisks_module_manager_unload_modules
udisks_module_manager_get_modules
udisks_module_manager_get_daemon
udisks_module_manager_get_uninstalled
<SUBSECTION Standard>
UDISKS_IS_MODULE_MANAGER
UDISKS_MODULE_MANAGER
UDISKS_TYPE_MODULE_MANAGER
<SUBSECTION Private>
udisks_module_manager_get_type
</SECTION>

<SECTION>
<FILE>UDisksModule</FILE>
UDisksModule
UDisksModuleClass
UDisksModuleIDFunc
UDisksModuleNewFunc
UDisksModuleObject
UDisksModuleObjectIface
udisks_module_get_name
udisks_module_new_manager
udisks_module_new_object
udisks_module_get_block_object_interface_types
udisks_module_get_drive_object_interface_types
udisks_module_new_block_object_interface
udisks_module_new_drive_object_interface
udisks_module_track_parent
udisks_module_get_daemon
udisks_module_object_process_uevent
udisks_module_object_housekeeping
<SUBSECTION Standard>
UDISKS_IS_MODULE_MANAGER
UDISKS_IS_MODULE_OBJECT
UDISKS_MODULE_MANAGER
UDISKS_MODULE_OBJECT
UDISKS_MODULE_OBJECT_GET_IFACE
UDISKS_TYPE_MODULE_MANAGER
UDISKS_TYPE_MODULE_OBJECT
<SUBSECTION Private>
udisks_module_manager_get_type
udisks_module_object_get_type
udisks_module_get_type
</SECTION>
42 changes: 23 additions & 19 deletions doc/udisks2-sections.txt.in.in
Original file line number Diff line number Diff line change
Expand Up @@ -856,15 +856,37 @@ udisks_block_skeleton_get_type
<FILE>UDisksManager</FILE>
UDisksManager
UDisksManagerIface
UDisksManagerProxy
UDisksManagerProxyClass
UDisksManagerSkeleton
UDisksManagerSkeletonClass
udisks_manager_proxy_new
udisks_manager_proxy_new_finish
udisks_manager_proxy_new_sync
udisks_manager_proxy_new_for_bus
udisks_manager_proxy_new_for_bus_finish
udisks_manager_proxy_new_for_bus_sync
udisks_manager_interface_info
udisks_manager_override_properties
udisks_manager_get_version
udisks_manager_dup_version
udisks_manager_set_version
udisks_manager_call_enable_modules
udisks_manager_call_enable_modules_finish
udisks_manager_call_enable_modules_sync
udisks_manager_complete_enable_modules
udisks_manager_call_enable_module
udisks_manager_call_enable_module_finish
udisks_manager_call_enable_module_sync
udisks_manager_complete_enable_module
udisks_manager_call_can_format
udisks_manager_call_can_format_finish
udisks_manager_call_can_format_sync
udisks_manager_complete_can_format
udisks_manager_call_get_block_devices
udisks_manager_call_get_block_devices_finish
udisks_manager_call_get_block_devices_sync
udisks_manager_complete_get_block_devices
udisks_manager_call_can_resize
udisks_manager_call_can_resize_finish
udisks_manager_call_can_resize_sync
Expand All @@ -885,29 +907,11 @@ udisks_manager_call_mdraid_create
udisks_manager_call_mdraid_create_finish
udisks_manager_call_mdraid_create_sync
udisks_manager_complete_mdraid_create
UDisksManagerProxy
UDisksManagerProxyClass
udisks_manager_proxy_new
udisks_manager_proxy_new_finish
udisks_manager_proxy_new_sync
udisks_manager_proxy_new_for_bus
udisks_manager_proxy_new_for_bus_finish
udisks_manager_proxy_new_for_bus_sync
UDisksManagerSkeleton
UDisksManagerSkeletonClass
udisks_manager_skeleton_new
udisks_manager_call_enable_modules
udisks_manager_call_enable_modules_finish
udisks_manager_call_enable_modules_sync
udisks_manager_complete_enable_modules
udisks_manager_call_get_block_devices
udisks_manager_call_get_block_devices_finish
udisks_manager_call_get_block_devices_sync
udisks_manager_complete_get_block_devices
udisks_manager_call_resolve_device
udisks_manager_call_resolve_device_finish
udisks_manager_call_resolve_device_sync
udisks_manager_complete_resolve_device
udisks_manager_skeleton_new
<SUBSECTION Standard>
UDISKS_TYPE_MANAGER
UDISKS_IS_MANAGER
Expand Down
Loading

0 comments on commit 58bda4c

Please sign in to comment.