def api_factory(test_case): """Create a test instance of the block driver. :param test_case: The specific test case instance. :return: A test configured driver instance. """ logging.basicConfig( format='%(asctime)s %(levelname)-7s [%(threadName)-19s]: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filename='../driver.log') test_config_path = os.environ.get( 'FLOCKER_CONFIG', '../example.sc_agent.yml') if not os.path.exists(test_config_path): raise Exception('Functional test configuration not found.') with open(test_config_path) as config_file: config = yaml.load(config_file.read()) config = config.get('dataset', {}) test_driver = TestDriver( create_driver_instance( cluster_id=uuid4(), **config)) test_case.addCleanup(test_driver._cleanup) return test_driver
def api_factory(test_case): """Create a test instance of the block driver. :param test_case: The specific test case instance. :return: A test configured driver instance. """ logging.basicConfig( format='%(asctime)s %(levelname)-7s [%(threadName)-19s]: %(message)s', datefmt='%Y-%m-%d %H:%M:%S', level=logging.DEBUG, filename='../driver.log') test_config_path = os.environ.get('FLOCKER_CONFIG', '../example.sc_agent.yml') if not os.path.exists(test_config_path): raise Exception('Functional test configuration not found.') with open(test_config_path) as config_file: config = yaml.load(config_file.read()) config = config.get('dataset', {}) test_driver = TestDriver( create_driver_instance(cluster_id=uuid4(), **config)) test_case.addCleanup(test_driver._cleanup) return test_driver
def api_factory(cluster_id, **kwargs): """Well known entry point for Flocker to load driver instance.""" kwargs['cluster_id'] = cluster_id return dell_storagecenter_blockdevice.create_driver_instance( **kwargs)
def api_factory(cluster_id, **kwargs): """Well known entry point for Flocker to load driver instance.""" kwargs['cluster_id'] = cluster_id return dell_storagecenter_blockdevice.create_driver_instance(**kwargs)