def Api(use_local=True, **kwargs):
    if cfg.CONF.conductor.use_local or use_local:
        api = conductor_api.LocalApi
    else:
        raise NotImplementedError(
            _("Remote conductor isn't implemented yet."))
        # api = conductor.RemoteApi

    return api(**kwargs)
Creates local or remote conductor Api.
dataset/ETHPy150Open openstack/sahara/sahara/conductor/__init__.py/Api