for dep in deps[remote.os.package_type]:
remove_package(dep, remote)
+def get_keystone_dir(ctx):
+ return '{tdir}/keystone'.format(tdir=teuthology.get_testdir(ctx))
+
+def run_in_keystone_dir(ctx, client, args):
+ ctx.cluster.only(client).run(
+ args=[ 'cd', get_keystone_dir(ctx), run.Raw('&&'), ] + args,
+ )
+
+def run_in_keystone_venv(ctx, client, args):
+ run_in_keystone_dir(ctx, client,
+ [ 'source',
+ '.tox/venv/bin/activate',
+ run.Raw('&&')
+ ] + args)
+
+def get_keystone_venved_cmd(ctx, cmd, args):
+ kbindir = get_keystone_dir(ctx) + '/.tox/venv/bin/'
+ return [ kbindir + 'python', kbindir + cmd ] + args
+
+def get_toxvenv_dir(ctx):
+ return ctx.tox.venv_path
+
@contextlib.contextmanager
def download(ctx, config):
"""
"""
assert isinstance(config, dict)
log.info('Downloading keystone...')
- testdir = teuthology.get_testdir(ctx)
+ keystonedir = get_keystone_dir(ctx)
for (client, cconf) in config.items():
ctx.cluster.only(client).run(
'git', 'clone',
'-b', cconf.get('force-branch', 'master'),
'https://github.com/openstack/keystone.git',
- '{tdir}/keystone'.format(tdir=testdir),
+ keystonedir,
],
)
sha1 = cconf.get('sha1')
if sha1 is not None:
- ctx.cluster.only(client).run(
- args=[
- 'cd', '{tdir}/keystone'.format(tdir=testdir),
- run.Raw('&&'),
+ run_in_keystone_dir(ctx, client, [
'git', 'reset', '--hard', sha1,
],
)
+
+ # hax for http://tracker.ceph.com/issues/23659
+ run_in_keystone_dir(ctx, client, [
+ 'sed', '-i',
+ 's/pysaml2<4.0.3,>=2.4.0/pysaml2>=4.5.0/',
+ 'requirements.txt'
+ ],
+ )
try:
yield
finally:
log.info('Removing keystone...')
- testdir = teuthology.get_testdir(ctx)
for client in config:
ctx.cluster.only(client).run(
- args=[ 'rm', '-rf', '{tdir}/keystone'.format(tdir=testdir) ],
+ args=[ 'rm', '-rf', keystonedir ],
)
-def get_keystone_dir(ctx):
- return '{tdir}/keystone'.format(tdir=teuthology.get_testdir(ctx))
-
-def run_in_keystone_dir(ctx, client, args):
- ctx.cluster.only(client).run(
- args=[ 'cd', get_keystone_dir(ctx), run.Raw('&&'), ] + args,
- )
-
-def run_in_keystone_venv(ctx, client, args):
- run_in_keystone_dir(ctx, client,
- [ 'source',
- '.tox/venv/bin/activate',
- run.Raw('&&')
- ] + args)
-
-def get_keystone_venved_cmd(ctx, cmd, args):
- kbindir = get_keystone_dir(ctx) + '/.tox/venv/bin/'
- return [ kbindir + 'python', kbindir + cmd ] + args
-
-def get_toxvenv_dir(ctx):
- return ctx.tox.venv_path
-
@contextlib.contextmanager
def setup_venv(ctx, config):
"""