Exemple #1
0
    def setUp(self, _factory_zfssa):
        super(ZFSSAShareDriverTestCase, self).setUp()
        self._create_fake_config()
        lcfg = self.configuration
        self.mountpoint = '/export/' + lcfg.zfssa_nas_mountpoint
        _factory_zfssa.return_value = fake_zfssa.FakeZFSSA()
        _factory_zfssa.set_host(lcfg.zfssa_host)
        _factory_zfssa.login(lcfg.zfssa_auth_user)
        self._context = context.get_admin_context()
        self._driver = zfssashare.ZFSSAShareDriver(False, configuration=lcfg)
        self._driver.do_setup(self._context)

        self.fake_proto_share = {
            'id': self.share['id'],
            'share_proto': 'fake_proto',
            'export_locations': [{'path': self.share['export_location']}],
        }

        self.test_share = {
            'id': self.share['id'],
            'share_proto': 'NFS',
            'export_locations': [{'path': self.share['export_location']}],
        }

        self.test_share2 = {
            'id': self.share2['id'],
            'share_proto': 'CIFS',
            'export_locations': [{'path': self.share2['export_location']}],
        }

        self.driver_options = {'zfssa_name': self.share['name']}
Exemple #2
0
 def setUp(self, _factory_zfssa):
     super(ZFSSAShareDriverTestCase, self).setUp()
     self._create_fake_config()
     lcfg = self.configuration
     self.mountpoint = '/export/' + lcfg.zfssa_nas_mountpoint
     _factory_zfssa.return_value = fake_zfssa.FakeZFSSA()
     _factory_zfssa.set_host(lcfg.zfssa_host)
     _factory_zfssa.login(lcfg.zfssa_auth_user)
     self._context = context.get_admin_context()
     self._driver = zfssashare.ZFSSAShareDriver(configuration=lcfg)
     self._driver.do_setup(self._context)