<NME> mod.rs
<BEF> // This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

use dbus::arg::Variant;
use dbus_tree::Factory;

use crate::{
    dbus_api::{
        consts,
        types::{DbusContext, InterfacesAddedThreadSafe, OPContext},
        util::make_object_path,
    },
    engine::{Engine, Name, PoolUuid, StratisUuid},
};

mod pool_3_0;
mod pool_3_1;
mod pool_3_3;
pub mod prop_conv;
mod shared;

pub fn create_dbus_pool<'a, E>(
    dbus_context: &DbusContext<E>,
    parent: dbus::Path<'static>,
    name: &Name,
    uuid: PoolUuid,
    pool: &E::Pool,
) -> dbus::Path<'a>
where
    E: 'static + Engine,
{
    let f = Factory::new_sync();

    let object_name = make_object_path(dbus_context);

    let object_path = f
        .object_path(
            object_name,
            Some(OPContext::new(parent, StratisUuid::Pool(uuid))),
        )
        .introspectable()
        .add(
            f.interface(consts::POOL_INTERFACE_NAME_3_0, ())
                .add_m(pool_3_0::create_filesystems_method(&f))
                .add_m(pool_3_0::destroy_filesystems_method(&f))
                .add_m(pool_3_0::snapshot_filesystem_method(&f))
                .add_m(pool_3_0::add_blockdevs_method(&f))
                .add_m(pool_3_0::bind_clevis_method(&f))
                .add_m(pool_3_0::unbind_clevis_method(&f))
                .add_m(pool_3_0::init_cache_method(&f))
                .add_m(pool_3_0::add_cachedevs_method(&f))
                .add_m(pool_3_0::bind_keyring_method(&f))
                .add_m(pool_3_0::unbind_keyring_method(&f))
                .add_m(pool_3_0::rebind_keyring_method(&f))
                .add_m(pool_3_0::rebind_clevis_method(&f))
                .add_m(pool_3_0::rename_method(&f))
                .add_p(pool_3_0::name_property(&f))
                .add_p(pool_3_0::uuid_property(&f))
                .add_p(pool_3_0::encrypted_property(&f))
                .add_p(pool_3_0::avail_actions_property(&f))
                .add_p(pool_3_0::key_desc_property(&f))
                .add_p(pool_3_0::clevis_info_property(&f))
                .add_p(pool_3_0::has_cache_property(&f))
                .add_p(pool_3_0::alloc_size_property(&f))
                .add_p(pool_3_0::used_size_property(&f))
                .add_p(pool_3_0::total_size_property(&f)),
        )
        .add(
            f.interface(consts::POOL_INTERFACE_NAME_3_1, ())
                .add_m(pool_3_0::create_filesystems_method(&f))
                .add_m(pool_3_0::destroy_filesystems_method(&f))
                .add_m(pool_3_0::snapshot_filesystem_method(&f))
                .add_m(pool_3_0::add_blockdevs_method(&f))
                .add_m(pool_3_0::bind_clevis_method(&f))
                .add_m(pool_3_0::unbind_clevis_method(&f))
                .add_m(pool_3_0::init_cache_method(&f))
                .add_m(pool_3_0::add_cachedevs_method(&f))
                .add_m(pool_3_0::bind_keyring_method(&f))
                .add_m(pool_3_0::unbind_keyring_method(&f))
                .add_m(pool_3_0::rebind_keyring_method(&f))
                .add_m(pool_3_0::rebind_clevis_method(&f))
                .add_m(pool_3_0::rename_method(&f))
                .add_p(pool_3_0::name_property(&f))
                .add_p(pool_3_0::uuid_property(&f))
                .add_p(pool_3_0::encrypted_property(&f))
                .add_p(pool_3_0::avail_actions_property(&f))
                .add_p(pool_3_0::key_desc_property(&f))
                .add_p(pool_3_0::clevis_info_property(&f))
                .add_p(pool_3_0::has_cache_property(&f))
                .add_p(pool_3_0::alloc_size_property(&f))
                .add_p(pool_3_0::used_size_property(&f))
                .add_p(pool_3_0::total_size_property(&f))
                .add_p(pool_3_1::fs_limit_property(&f))
                .add_p(pool_3_1::enable_overprov_property(&f))
                .add_p(pool_3_1::no_alloc_space_property(&f)),
        )
        .add(
            f.interface(consts::POOL_INTERFACE_NAME_3_2, ())
                .add_m(pool_3_0::create_filesystems_method(&f))
                .add_m(pool_3_0::destroy_filesystems_method(&f))
                .add_m(pool_3_0::snapshot_filesystem_method(&f))
                .add_m(pool_3_0::add_blockdevs_method(&f))
                .add_m(pool_3_0::bind_clevis_method(&f))
                .add_m(pool_3_0::unbind_clevis_method(&f))
                .add_m(pool_3_0::init_cache_method(&f))
                .add_m(pool_3_0::add_cachedevs_method(&f))
                .add_m(pool_3_0::bind_keyring_method(&f))
                .add_m(pool_3_0::unbind_keyring_method(&f))
                .add_m(pool_3_0::rebind_keyring_method(&f))
                .add_m(pool_3_0::rebind_clevis_method(&f))
                .add_m(pool_3_0::rename_method(&f))
                .add_p(pool_3_0::name_property(&f))
                .add_p(pool_3_0::uuid_property(&f))
                .add_p(pool_3_0::encrypted_property(&f))
                .add_p(pool_3_0::avail_actions_property(&f))
                .add_p(pool_3_0::key_desc_property(&f))
                .add_p(pool_3_0::clevis_info_property(&f))
                .add_p(pool_3_0::has_cache_property(&f))
                .add_p(pool_3_0::alloc_size_property(&f))
                .add_p(pool_3_0::used_size_property(&f))
                .add_p(pool_3_0::total_size_property(&f))
                .add_p(pool_3_1::fs_limit_property(&f))
                .add_p(pool_3_1::enable_overprov_property(&f))
                .add_p(pool_3_1::no_alloc_space_property(&f)),
        )
        .add(
            f.interface(consts::POOL_INTERFACE_NAME_3_3, ())
                .add_m(pool_3_0::create_filesystems_method(&f))
                .add_m(pool_3_0::destroy_filesystems_method(&f))
                .add_m(pool_3_0::snapshot_filesystem_method(&f))
                .add_m(pool_3_0::add_blockdevs_method(&f))
                .add_m(pool_3_0::bind_clevis_method(&f))
                .add_m(pool_3_0::unbind_clevis_method(&f))
                .add_m(pool_3_0::init_cache_method(&f))
                .add_m(pool_3_0::add_cachedevs_method(&f))
                .add_m(pool_3_0::bind_keyring_method(&f))
                .add_m(pool_3_0::unbind_keyring_method(&f))
                .add_m(pool_3_0::rebind_keyring_method(&f))
                .add_m(pool_3_0::rebind_clevis_method(&f))
                .add_m(pool_3_0::rename_method(&f))
                .add_m(pool_3_3::grow_physical_device_method(&f))
                .add_p(pool_3_0::name_property(&f))
                .add_p(pool_3_0::uuid_property(&f))
                .add_p(pool_3_0::encrypted_property(&f))
                .add_p(pool_3_0::avail_actions_property(&f))
                .add_p(pool_3_0::key_desc_property(&f))
                .add_p(pool_3_0::clevis_info_property(&f))
                .add_p(pool_3_0::has_cache_property(&f))
                .add_p(pool_3_0::alloc_size_property(&f))
                .add_p(pool_3_0::used_size_property(&f))
                .add_p(pool_3_0::total_size_property(&f))
                .add_p(pool_3_1::fs_limit_property(&f))
                .add_p(pool_3_1::enable_overprov_property(&f))
                .add_p(pool_3_1::no_alloc_space_property(&f)),
        )
        .add(
            f.interface(consts::POOL_INTERFACE_NAME_3_4, ())
                .add_m(pool_3_0::create_filesystems_method(&f))
                .add_m(pool_3_0::destroy_filesystems_method(&f))
                .add_m(pool_3_0::snapshot_filesystem_method(&f))
                .add_m(pool_3_0::add_blockdevs_method(&f))
                .add_m(pool_3_0::bind_clevis_method(&f))
                .add_m(pool_3_0::unbind_clevis_method(&f))
                .add_m(pool_3_0::init_cache_method(&f))
                .add_m(pool_3_0::add_cachedevs_method(&f))
                .add_m(pool_3_0::bind_keyring_method(&f))
                .add_m(pool_3_0::unbind_keyring_method(&f))
                .add_m(pool_3_0::rebind_keyring_method(&f))
                .add_m(pool_3_0::rebind_clevis_method(&f))
                .add_m(pool_3_0::rename_method(&f))
                .add_m(pool_3_3::grow_physical_device_method(&f))
                .add_p(pool_3_0::name_property(&f))
                .add_p(pool_3_0::uuid_property(&f))
                .add_p(pool_3_0::encrypted_property(&f))
                .add_p(pool_3_0::avail_actions_property(&f))
                .add_p(pool_3_0::key_desc_property(&f))
                .add_p(pool_3_0::clevis_info_property(&f))
                .add_p(pool_3_0::has_cache_property(&f))
                .add_p(pool_3_0::alloc_size_property(&f))
                .add_p(pool_3_0::used_size_property(&f))
                .add_p(pool_3_0::total_size_property(&f))
                .add_p(pool_3_1::fs_limit_property(&f))
                .add_p(pool_3_1::enable_overprov_property(&f))
                .add_p(pool_3_1::no_alloc_space_property(&f)),
        );

    let path = object_path.get_name().to_owned();
    let interfaces = get_pool_properties::<E>(name, uuid, pool);
    dbus_context.push_add(object_path, interfaces);
    path
}

/// Get the initial state of all properties associated with a pool object.
pub fn get_pool_properties<E>(
    pool_name: &Name,
    pool_uuid: PoolUuid,
    pool: &E::Pool,
) -> InterfacesAddedThreadSafe
where
    E: 'static + Engine,
{
    initial_properties! {
        consts::POOL_INTERFACE_NAME_3_0 => {
            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),
            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),
            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),
            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),
            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),
            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),
            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),
            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),
            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),
            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool)
        },
        consts::POOL_INTERFACE_NAME_3_1 => {
            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),
            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),
            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),
            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),
            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),
            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),
            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),
            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),
            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),
            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),
            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),
            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),
            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)
        },
        consts::POOL_INTERFACE_NAME_3_2 => {
            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),
            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),
            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),
            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),
            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),
            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),
            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),
            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),
            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),
            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),
            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),
            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),
            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)
        },
        consts::POOL_INTERFACE_NAME_3_3 => {
            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),
            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),
            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),
            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),
            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),
            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),
            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),
            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),
            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),
            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),
            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),
            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),
            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)
        },
        consts::POOL_INTERFACE_NAME_3_4 => {
            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),
            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),
            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),
            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),
            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),
            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),
            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),
            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),
            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),
            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),
            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),
            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),
            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)
        }
    }
}

<MSG> Merge pull request #2770 from mulkieran/macro-fqn

Use fully qualified name for Variant in macro
<DFF> @@ -2,7 +2,6 @@
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-use dbus::arg::Variant;
 use dbus_tree::Factory;
 
 use crate::{

{'commit': 'diff --git a/src/dbus_api/blockdev/mod.rs b/src/dbus_api/blockdev/mod.rs\nindex c5364721..5ef53d5d 100644\n--- a/src/dbus_api/blockdev/mod.rs\n+++ b/src/dbus_api/blockdev/mod.rs\n@@ -2,7 +2,6 @@\n // License, v. 2.0. If a copy of the MPL was not distributed with this\n // file, You can obtain one at http://mozilla.org/MPL/2.0/.\n \n-use dbus::arg::Variant;\n use dbus_tree::Factory;\n \n use crate::{\ndiff --git a/src/dbus_api/filesystem/mod.rs b/src/dbus_api/filesystem/mod.rs\nindex b2a26086..1065764b 100644\n--- a/src/dbus_api/filesystem/mod.rs\n+++ b/src/dbus_api/filesystem/mod.rs\n@@ -2,7 +2,6 @@\n // License, v. 2.0. If a copy of the MPL was not distributed with this\n // file, You can obtain one at http://mozilla.org/MPL/2.0/.\n \n-use dbus::arg::Variant;\n use dbus_tree::Factory;\n \n use crate::{\ndiff --git a/src/dbus_api/macros.rs b/src/dbus_api/macros.rs\nindex f2d67b2a..35b80704 100644\n--- a/src/dbus_api/macros.rs\n+++ b/src/dbus_api/macros.rs\n@@ -147,7 +147,7 @@ macro_rules! initial_properties {\n             $(\n                 ($iface, vec![\n                     $(\n-                        ($prop, Variant(\n+                        ($prop, dbus::arg::Variant(\n                             Box::new($val) as Box<dyn dbus::arg::RefArg + std::marker::Send + std::marker::Sync>\n                         )),\n                     )*\ndiff --git a/src/dbus_api/pool/mod.rs b/src/dbus_api/pool/mod.rs\nindex 93edfdbb..c4e702cb 100644\n--- a/src/dbus_api/pool/mod.rs\n+++ b/src/dbus_api/pool/mod.rs\n@@ -2,7 +2,6 @@\n // License, v. 2.0. If a copy of the MPL was not distributed with this\n // file, You can obtain one at http://mozilla.org/MPL/2.0/.\n \n-use dbus::arg::Variant;\n use dbus_tree::Factory;\n \n use crate::{\n', 'commit_subject': 'Merge pull request #2770 from mulkieran/macro-fqn', 'repo_name': 'stratis-storage/stratisd', 'committer': {'name': 'GitHub', 'email': '1505422b2465e9a84f6fdfaa161078890c593f06@github.com', 'time_sec': '1630634752', 'tz_offset': '-240', 'date': {'seconds': '1630634752'}}, 'commit_tree': '7864e138cb9de045cfa46a62d387c948d856406e', 'commit_message': 'Merge pull request #2770 from mulkieran/macro-fqn\n\nUse fully qualified name for Variant in macro', 'language_name': 'Shell', 'license': 'mpl-2.0', 'hunks': '@@ -2,7 +2,6 @@\n // License, v. 2.0. If a copy of the MPL was not distributed with this\n // file, You can obtain one at http://mozilla.org/MPL/2.0/.\n \n-use dbus::arg::Variant;\n use dbus_tree::Factory;\n \n use crate::{\n', 'addition_count': 0, 'deletion_count': 1, 'src_file': 'a/src/dbus_api/pool/mod.rs', 'tgt_file': 'b/src/dbus_api/pool/mod.rs', 'file_extension': '.rs', 'before_file': "// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this\n// file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\nuse dbus::arg::Variant;\nuse dbus_tree::Factory;\n\nuse crate::{\n    dbus_api::{\n        consts,\n        types::{DbusContext, InterfacesAddedThreadSafe, OPContext},\n        util::make_object_path,\n    },\n    engine::{Engine, Name, PoolUuid, StratisUuid},\n};\n\nmod pool_3_0;\nmod pool_3_1;\nmod pool_3_3;\npub mod prop_conv;\nmod shared;\n\npub fn create_dbus_pool<'a, E>(\n    dbus_context: &DbusContext<E>,\n    parent: dbus::Path<'static>,\n    name: &Name,\n    uuid: PoolUuid,\n    pool: &E::Pool,\n) -> dbus::Path<'a>\nwhere\n    E: 'static + Engine,\n{\n    let f = Factory::new_sync();\n\n    let object_name = make_object_path(dbus_context);\n\n    let object_path = f\n        .object_path(\n            object_name,\n            Some(OPContext::new(parent, StratisUuid::Pool(uuid))),\n        )\n        .introspectable()\n        .add(\n            f.interface(consts::POOL_INTERFACE_NAME_3_0, ())\n                .add_m(pool_3_0::create_filesystems_method(&f))\n                .add_m(pool_3_0::destroy_filesystems_method(&f))\n                .add_m(pool_3_0::snapshot_filesystem_method(&f))\n                .add_m(pool_3_0::add_blockdevs_method(&f))\n                .add_m(pool_3_0::bind_clevis_method(&f))\n                .add_m(pool_3_0::unbind_clevis_method(&f))\n                .add_m(pool_3_0::init_cache_method(&f))\n                .add_m(pool_3_0::add_cachedevs_method(&f))\n                .add_m(pool_3_0::bind_keyring_method(&f))\n                .add_m(pool_3_0::unbind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_clevis_method(&f))\n                .add_m(pool_3_0::rename_method(&f))\n                .add_p(pool_3_0::name_property(&f))\n                .add_p(pool_3_0::uuid_property(&f))\n                .add_p(pool_3_0::encrypted_property(&f))\n                .add_p(pool_3_0::avail_actions_property(&f))\n                .add_p(pool_3_0::key_desc_property(&f))\n                .add_p(pool_3_0::clevis_info_property(&f))\n                .add_p(pool_3_0::has_cache_property(&f))\n                .add_p(pool_3_0::alloc_size_property(&f))\n                .add_p(pool_3_0::used_size_property(&f))\n                .add_p(pool_3_0::total_size_property(&f)),\n        )\n        .add(\n            f.interface(consts::POOL_INTERFACE_NAME_3_1, ())\n                .add_m(pool_3_0::create_filesystems_method(&f))\n                .add_m(pool_3_0::destroy_filesystems_method(&f))\n                .add_m(pool_3_0::snapshot_filesystem_method(&f))\n                .add_m(pool_3_0::add_blockdevs_method(&f))\n                .add_m(pool_3_0::bind_clevis_method(&f))\n                .add_m(pool_3_0::unbind_clevis_method(&f))\n                .add_m(pool_3_0::init_cache_method(&f))\n                .add_m(pool_3_0::add_cachedevs_method(&f))\n                .add_m(pool_3_0::bind_keyring_method(&f))\n                .add_m(pool_3_0::unbind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_clevis_method(&f))\n                .add_m(pool_3_0::rename_method(&f))\n                .add_p(pool_3_0::name_property(&f))\n                .add_p(pool_3_0::uuid_property(&f))\n                .add_p(pool_3_0::encrypted_property(&f))\n                .add_p(pool_3_0::avail_actions_property(&f))\n                .add_p(pool_3_0::key_desc_property(&f))\n                .add_p(pool_3_0::clevis_info_property(&f))\n                .add_p(pool_3_0::has_cache_property(&f))\n                .add_p(pool_3_0::alloc_size_property(&f))\n                .add_p(pool_3_0::used_size_property(&f))\n                .add_p(pool_3_0::total_size_property(&f))\n                .add_p(pool_3_1::fs_limit_property(&f))\n                .add_p(pool_3_1::enable_overprov_property(&f))\n                .add_p(pool_3_1::no_alloc_space_property(&f)),\n        )\n        .add(\n            f.interface(consts::POOL_INTERFACE_NAME_3_2, ())\n                .add_m(pool_3_0::create_filesystems_method(&f))\n                .add_m(pool_3_0::destroy_filesystems_method(&f))\n                .add_m(pool_3_0::snapshot_filesystem_method(&f))\n                .add_m(pool_3_0::add_blockdevs_method(&f))\n                .add_m(pool_3_0::bind_clevis_method(&f))\n                .add_m(pool_3_0::unbind_clevis_method(&f))\n                .add_m(pool_3_0::init_cache_method(&f))\n                .add_m(pool_3_0::add_cachedevs_method(&f))\n                .add_m(pool_3_0::bind_keyring_method(&f))\n                .add_m(pool_3_0::unbind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_clevis_method(&f))\n                .add_m(pool_3_0::rename_method(&f))\n                .add_p(pool_3_0::name_property(&f))\n                .add_p(pool_3_0::uuid_property(&f))\n                .add_p(pool_3_0::encrypted_property(&f))\n                .add_p(pool_3_0::avail_actions_property(&f))\n                .add_p(pool_3_0::key_desc_property(&f))\n                .add_p(pool_3_0::clevis_info_property(&f))\n                .add_p(pool_3_0::has_cache_property(&f))\n                .add_p(pool_3_0::alloc_size_property(&f))\n                .add_p(pool_3_0::used_size_property(&f))\n                .add_p(pool_3_0::total_size_property(&f))\n                .add_p(pool_3_1::fs_limit_property(&f))\n                .add_p(pool_3_1::enable_overprov_property(&f))\n                .add_p(pool_3_1::no_alloc_space_property(&f)),\n        )\n        .add(\n            f.interface(consts::POOL_INTERFACE_NAME_3_3, ())\n                .add_m(pool_3_0::create_filesystems_method(&f))\n                .add_m(pool_3_0::destroy_filesystems_method(&f))\n                .add_m(pool_3_0::snapshot_filesystem_method(&f))\n                .add_m(pool_3_0::add_blockdevs_method(&f))\n                .add_m(pool_3_0::bind_clevis_method(&f))\n                .add_m(pool_3_0::unbind_clevis_method(&f))\n                .add_m(pool_3_0::init_cache_method(&f))\n                .add_m(pool_3_0::add_cachedevs_method(&f))\n                .add_m(pool_3_0::bind_keyring_method(&f))\n                .add_m(pool_3_0::unbind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_clevis_method(&f))\n                .add_m(pool_3_0::rename_method(&f))\n                .add_m(pool_3_3::grow_physical_device_method(&f))\n                .add_p(pool_3_0::name_property(&f))\n                .add_p(pool_3_0::uuid_property(&f))\n                .add_p(pool_3_0::encrypted_property(&f))\n                .add_p(pool_3_0::avail_actions_property(&f))\n                .add_p(pool_3_0::key_desc_property(&f))\n                .add_p(pool_3_0::clevis_info_property(&f))\n                .add_p(pool_3_0::has_cache_property(&f))\n                .add_p(pool_3_0::alloc_size_property(&f))\n                .add_p(pool_3_0::used_size_property(&f))\n                .add_p(pool_3_0::total_size_property(&f))\n                .add_p(pool_3_1::fs_limit_property(&f))\n                .add_p(pool_3_1::enable_overprov_property(&f))\n                .add_p(pool_3_1::no_alloc_space_property(&f)),\n        )\n        .add(\n            f.interface(consts::POOL_INTERFACE_NAME_3_4, ())\n                .add_m(pool_3_0::create_filesystems_method(&f))\n                .add_m(pool_3_0::destroy_filesystems_method(&f))\n                .add_m(pool_3_0::snapshot_filesystem_method(&f))\n                .add_m(pool_3_0::add_blockdevs_method(&f))\n                .add_m(pool_3_0::bind_clevis_method(&f))\n                .add_m(pool_3_0::unbind_clevis_method(&f))\n                .add_m(pool_3_0::init_cache_method(&f))\n                .add_m(pool_3_0::add_cachedevs_method(&f))\n                .add_m(pool_3_0::bind_keyring_method(&f))\n                .add_m(pool_3_0::unbind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_keyring_method(&f))\n                .add_m(pool_3_0::rebind_clevis_method(&f))\n                .add_m(pool_3_0::rename_method(&f))\n                .add_m(pool_3_3::grow_physical_device_method(&f))\n                .add_p(pool_3_0::name_property(&f))\n                .add_p(pool_3_0::uuid_property(&f))\n                .add_p(pool_3_0::encrypted_property(&f))\n                .add_p(pool_3_0::avail_actions_property(&f))\n                .add_p(pool_3_0::key_desc_property(&f))\n                .add_p(pool_3_0::clevis_info_property(&f))\n                .add_p(pool_3_0::has_cache_property(&f))\n                .add_p(pool_3_0::alloc_size_property(&f))\n                .add_p(pool_3_0::used_size_property(&f))\n                .add_p(pool_3_0::total_size_property(&f))\n                .add_p(pool_3_1::fs_limit_property(&f))\n                .add_p(pool_3_1::enable_overprov_property(&f))\n                .add_p(pool_3_1::no_alloc_space_property(&f)),\n        );\n\n    let path = object_path.get_name().to_owned();\n    let interfaces = get_pool_properties::<E>(name, uuid, pool);\n    dbus_context.push_add(object_path, interfaces);\n    path\n}\n\n/// Get the initial state of all properties associated with a pool object.\npub fn get_pool_properties<E>(\n    pool_name: &Name,\n    pool_uuid: PoolUuid,\n    pool: &E::Pool,\n) -> InterfacesAddedThreadSafe\nwhere\n    E: 'static + Engine,\n{\n    initial_properties! {\n        consts::POOL_INTERFACE_NAME_3_0 => {\n            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),\n            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),\n            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),\n            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),\n            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),\n            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),\n            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),\n            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),\n            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),\n            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool)\n        },\n        consts::POOL_INTERFACE_NAME_3_1 => {\n            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),\n            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),\n            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),\n            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),\n            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),\n            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),\n            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),\n            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),\n            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),\n            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),\n            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),\n            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),\n            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)\n        },\n        consts::POOL_INTERFACE_NAME_3_2 => {\n            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),\n            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),\n            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),\n            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),\n            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),\n            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),\n            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),\n            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),\n            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),\n            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),\n            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),\n            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),\n            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)\n        },\n        consts::POOL_INTERFACE_NAME_3_3 => {\n            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),\n            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),\n            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),\n            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),\n            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),\n            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),\n            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),\n            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),\n            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),\n            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),\n            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),\n            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),\n            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)\n        },\n        consts::POOL_INTERFACE_NAME_3_4 => {\n            consts::POOL_NAME_PROP => shared::pool_name_prop(pool_name),\n            consts::POOL_UUID_PROP => uuid_to_string!(pool_uuid),\n            consts::POOL_ENCRYPTED_PROP => shared::pool_enc_prop::<E>(pool),\n            consts::POOL_AVAIL_ACTIONS_PROP => shared::pool_avail_actions_prop::<E>(pool),\n            consts::POOL_KEY_DESC_PROP => shared::pool_key_desc_prop::<E>(pool),\n            consts::POOL_CLEVIS_INFO_PROP => shared::pool_clevis_info_prop::<E>(pool),\n            consts::POOL_HAS_CACHE_PROP => shared::pool_has_cache_prop::<E>(pool),\n            consts::POOL_ALLOC_SIZE_PROP => shared::pool_allocated_size::<E>(pool),\n            consts::POOL_TOTAL_USED_PROP => shared::pool_used_size::<E>(pool),\n            consts::POOL_TOTAL_SIZE_PROP => shared::pool_total_size::<E>(pool),\n            consts::POOL_FS_LIMIT_PROP => shared::pool_fs_limit::<E>(pool),\n            consts::POOL_OVERPROV_PROP => shared::pool_overprov_enabled::<E>(pool),\n            consts::POOL_NO_ALLOCABLE_SPACE_PROP => shared::pool_no_alloc_space::<E>(pool)\n        }\n    }\n}\n", 'message': 'Merge pull request #2770 from mulkieran/macro-fqn\n\nUse fully qualified name for Variant in macro', 'author_name': 'GitHub', 'lang': 'rs'}