From 8c152634124bde21c2c0a6d52861dccba5ff9e4e Mon Sep 17 00:00:00 2001 From: Corey Bryant Date: Wed, 6 May 2015 19:46:38 +0000 Subject: [PATCH] Sync charm-helpers --- hooks/charmhelpers/contrib/openstack/utils.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/hooks/charmhelpers/contrib/openstack/utils.py b/hooks/charmhelpers/contrib/openstack/utils.py index 5909b0f5..6d91490e 100644 --- a/hooks/charmhelpers/contrib/openstack/utils.py +++ b/hooks/charmhelpers/contrib/openstack/utils.py @@ -655,3 +655,18 @@ def git_src_dir(projects_yaml, project): return os.path.join(parent_dir, os.path.basename(p['repository'])) return None + + +def git_http_proxy(projects_yaml): + """ + Return the http_proxy value if it is specified in projects_yaml. + """ + if not projects_yaml: + return + + projects = yaml.load(projects_yaml) + + if 'http_proxy' in projects.keys(): + return projects['http_proxy'] + + return None