def setUp(self): super(TestNexentaNfsDriver, self).setUp() self.ctxt = context.get_admin_context() self.cfg = mock.Mock(spec=conf.Configuration) self.cfg.nexenta_dataset_description = '' self.cfg.nexenta_mount_point_base = '$state_path/mnt' self.cfg.nexenta_sparsed_volumes = True self.cfg.nexenta_dataset_compression = 'on' self.cfg.nexenta_dataset_dedup = 'off' self.cfg.nfs_mount_point_base = '/mnt/test' self.cfg.nfs_mount_attempts = 3 self.cfg.nas_mount_options = 'vers=4' self.cfg.reserved_percentage = 20 self.cfg.nexenta_use_https = False self.cfg.nexenta_rest_port = 0 self.cfg.nexenta_user = '******' self.cfg.nexenta_password = '******' self.cfg.max_over_subscription_ratio = 20.0 self.cfg.nas_host = '1.1.1.1' self.cfg.nas_share_path = 'pool/share' self.nef_mock = mock.Mock() self.stubs.Set(jsonrpc, 'NexentaJSONProxy', lambda *_, **__: self.nef_mock) self.drv = nfs.NexentaNfsDriver(configuration=self.cfg) self.drv.db = db self.drv.do_setup(self.ctxt)
def setUp(self): super(TestNexentaNfsDriver, self).setUp() self.ctxt = context.get_admin_context() self.cfg = mock.Mock(spec=conf.Configuration) self.cfg.volume_backend_name = 'nexenta_nfs' self.cfg.nexenta_group_snapshot_template = 'group-snapshot-%s' self.cfg.nexenta_origin_snapshot_template = 'origin-snapshot-%s' self.cfg.nexenta_dataset_description = '' self.cfg.nexenta_mount_point_base = '$state_path/mnt' self.cfg.nexenta_sparsed_volumes = True self.cfg.nexenta_qcow2_volumes = False self.cfg.nexenta_dataset_compression = 'on' self.cfg.nexenta_dataset_dedup = 'off' self.cfg.nfs_mount_point_base = '/mnt/test' self.cfg.nfs_mount_attempts = 3 self.cfg.nas_mount_options = 'vers=4' self.cfg.reserved_percentage = 20 self.cfg.nexenta_use_https = False self.cfg.driver_ssl_cert_verify = False self.cfg.nexenta_user = '******' self.cfg.nexenta_password = '******' self.cfg.max_over_subscription_ratio = 20.0 self.cfg.nas_host = '1.1.1.2' self.cfg.nexenta_rest_address = '1.1.1.1' self.cfg.nexenta_rest_port = 8443 self.cfg.nexenta_rest_backoff_factor = 1 self.cfg.nexenta_rest_retry_count = 3 self.cfg.nexenta_rest_connect_timeout = 1 self.cfg.nexenta_rest_read_timeout = 1 self.cfg.nas_share_path = 'pool/share' self.cfg.nfs_mount_options = '-o vers=4' self.cfg.safe_get = self.fake_safe_get self.nef_mock = mock.Mock() self.mock_object(jsonrpc, 'NefRequest', return_value=self.nef_mock) self.drv = nfs.NexentaNfsDriver(configuration=self.cfg) self.drv.db = db self.drv.do_setup(self.ctxt)