From 2bb99f3d3530c6f2d48bcbabe79eb4ea09e3c058 Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Wed, 6 May 2015 18:04:13 +0000 Subject: [PATCH] Install python-memcached for /usr/share/openstack-dashboard/manage.py --- hooks/horizon_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/hooks/horizon_utils.py b/hooks/horizon_utils.py index d7fedc99..8ff47286 100644 --- a/hooks/horizon_utils.py +++ b/hooks/horizon_utils.py @@ -17,6 +17,10 @@ from charmhelpers.contrib.openstack.utils import ( git_clone_and_install, os_release, git_src_dir, + git_http_proxy, +) +from charmhelpers.contrib.python.packages import ( + pip_install, ) from charmhelpers.core.hookenv import ( charm_dir, @@ -359,6 +363,11 @@ def git_post_install(projects_yaml): os.chmod('/var/lib/openstack-dashboard', 0o750) os.chmod('/usr/share/openstack-dashboard/manage.py', 0o755), + http_proxy = git_http_proxy(projects_yaml) + if http_proxy: + pip_install('python-memcached', proxy=http_proxy, venv=True) + else: + pip_install('python-memcached', venv=True) python = os.path.join(charm_dir(), 'venv/bin/python') subprocess.check_call([python, '/usr/share/openstack-dashboard/manage.py', 'collectstatic', '--noinput'])