def api_factory(cluster_id, **kwargs): protocol = 'iSCSI' if 'protocol' in kwargs: protocol = kwargs['protocol'] hosts = {} if 'hosts' in kwargs: hosts = kwargs['hosts'] dbhost = 'localhost' if 'database' in kwargs: dbhost = kwargs['database'] lock_path = '/tmp' if 'lockdir' in kwargs: lock_path = kwargs['lockdir'] log_file = None if 'logfile' in kwargs: log_file = kwargs['logfile'] return vmax_from_configuration(cluster_id=cluster_id, protocol=protocol, hosts=hosts, dbhost=dbhost, lock_path=lock_path, log_file=log_file)
def vmax_client_for_test(): """ Create a ``scaleiopy.scaleio.ScaleIO`` using credentials from a test_emc_sio.py (TODO move these to config file) :returns: An instance of ``scaleiopy.scaleio.ScaleIO`` authenticated """ dataset = _read_vmax_yaml() protocol = dataset['protocol'] hosts = dataset['hosts'] dbhost = dataset['database'] lock_path = dataset['lockdir'] log_file = None if 'logfile' in dataset: log_file = dataset['logfile'] return vmax_from_configuration(cluster_id=unicode(uuid4()), hosts=hosts, protocol=protocol, dbhost=dbhost, lock_path=lock_path, log_file=log_file)
def vmax_client_for_test(): """ Create a ``scaleiopy.scaleio.ScaleIO`` using credentials from a test_emc_sio.py (TODO move these to config file) :returns: An instance of ``scaleiopy.scaleio.ScaleIO`` authenticated """ dataset = _read_vmax_yaml() config_file = dataset["config_file"] protocol = dataset["protocol"] hosts = dataset["hosts"] profiles = {} if "profiles" in dataset: profiles = dataset["profiles"] return vmax_from_configuration( cluster_id=six.text_type(uuid4()), config_file=config_file, hosts=hosts, profiles=profiles, protocol=protocol )
def vmax_client_for_test(): """ Create a ``scaleiopy.scaleio.ScaleIO`` using credentials from a test_emc_sio.py (TODO move these to config file) :returns: An instance of ``scaleiopy.scaleio.ScaleIO`` authenticated """ dataset = _read_vmax_yaml() config_file = dataset['config_file'] protocol = dataset['protocol'] hosts = dataset['hosts'] dbhost = '%s:%s' % (dataset['database'], 'test_emc_flocker_hash') profiles = {} if 'profiles' in dataset: profiles = dataset['profiles'] return vmax_from_configuration(cluster_id=unicode(uuid4()), config_file=config_file, hosts=hosts, profiles=profiles, protocol=protocol, dbhost=dbhost)
def vmax_client_for_test(): """ Create a ``scaleiopy.scaleio.ScaleIO`` using credentials from a test_emc_sio.py (TODO move these to config file) :returns: An instance of ``scaleiopy.scaleio.ScaleIO`` authenticated """ dataset = _read_vmax_yaml() config_file = dataset['config_file'] protocol = dataset['protocol'] hosts = dataset['hosts'] profiles = {} if 'profiles' in dataset: profiles = dataset['profiles'] return vmax_from_configuration(cluster_id=six.text_type(uuid4()), config_file=config_file, hosts=hosts, profiles=profiles, protocol=protocol)
def api_factory(cluster_id, **kwargs): config_file = '/etc/flocker/vmax3.conf' if 'config_file' in kwargs: config_file = kwargs['config_file'] protocol = 'iSCSI' if 'protocol' in kwargs: protocol = kwargs['protocol'] hosts = {} if 'hosts' in kwargs: hosts = kwargs['hosts'] profiles = {} if 'profiles' in kwargs: profiles = kwargs['profiles'] return vmax_from_configuration(cluster_id=cluster_id, config_file=config_file, protocol=protocol, hosts=hosts, profiles=profiles)
def api_factory(cluster_id, **kwargs): config_file = '/etc/flocker/vmax3.conf' if 'config_file' in kwargs: config_file = kwargs['config_file'] protocol = 'iSCSI' if 'protocol' in kwargs: protocol = kwargs['protocol'] hosts = {} if 'hosts' in kwargs: hosts = kwargs['hosts'] profiles = {} if 'profiles' in kwargs: profiles = kwargs['profiles'] dbhost='localhost:emc_flocker_hash' if 'database' in kwargs: dbhost = '%s:%s' % (kwargs['database'], 'emc_flocker_hash') return vmax_from_configuration(cluster_id=cluster_id, config_file=config_file, protocol=protocol, hosts=hosts, profiles=profiles, dbhost=dbhost)
def api_factory(cluster_id, **kwargs): protocol = 'iSCSI' if 'protocol' in kwargs: protocol = kwargs['protocol'] hosts = {} if 'hosts' in kwargs: hosts = kwargs['hosts'] dbhost='localhost' if 'database' in kwargs: dbhost = kwargs['database'] lock_path = '/tmp' if 'lockdir' in kwargs: lock_path = kwargs['lockdir'] log_file = None if 'logfile' in kwargs: log_file = kwargs['logfile'] return vmax_from_configuration(cluster_id=cluster_id, protocol=protocol, hosts=hosts, dbhost=dbhost, lock_path=lock_path, log_file=log_file)