def setUp(self): # property_map mocks mock_data = ZFSMockData() self.pmap_zfs = mock_data.pmap_zfs self.pmap_zpool = mock_data.pmap_zpool self.pmap_exec_zfs = mock_data.pmap_exec_zfs self.pmap_exec_zpool = mock_data.pmap_exec_zpool for name in ('pmap_zfs', 'pmap_zpool', 'pmap_exec_zfs', 'pmap_exec_zpool'): self.addCleanup(delattr, self, name)
def setup_loader_modules(self): self.opts = opts = salt.config.DEFAULT_MINION_OPTS.copy() self.utils_patch = ZFSMockData().get_patched_utils() for key in ("opts", "utils_patch"): self.addCleanup(delattr, self, key) utils = salt.loader.utils( opts, whitelist=["zfs", "args", "systemd", "path", "platform"]) zpool_obj = {zpool: {"__opts__": opts, "__utils__": utils}} return zpool_obj
def setup_loader_modules(self): self.opts = opts = salt.config.DEFAULT_MINION_OPTS.copy() self.utils_patch = ZFSMockData().get_patched_utils() for key in ('opts', 'utils_patch'): self.addCleanup(delattr, self, key) utils = salt.loader.utils( opts, whitelist=['zfs', 'args', 'systemd', 'path', 'platform']) zpool_obj = { zpool: { '__opts__': opts, '__utils__': utils, } } return zpool_obj
def setup_loader_modules(self): self.opts = opts = salt.config.DEFAULT_MINION_OPTS.copy() self.utils_patch = ZFSMockData().get_patched_utils() for key in ("opts", "utils_patch"): self.addCleanup(delattr, self, key) utils = salt.loader.utils(opts, whitelist=["zfs"]) zfs_obj = { zfs: { "__opts__": opts, "__grains__": {"kernel": "SunOS"}, "__utils__": utils, } } return zfs_obj
def setup_loader_modules(self): self.opts = opts = salt.config.DEFAULT_MINION_OPTS.copy() self.utils_patch = ZFSMockData().get_patched_utils() for key in ('opts', 'utils_patch'): self.addCleanup(delattr, self, key) utils = salt.loader.utils(opts, whitelist=['zfs']) zfs_obj = { zfs: { '__opts__': opts, '__grains__': { 'kernel': 'SunOS' }, '__utils__': utils, } } return zfs_obj
def utils_patch(): return ZFSMockData().get_patched_utils()