summaryrefslogtreecommitdiffstats
path: root/ci/genDeploymentConfig.py
diff options
context:
space:
mode:
authorNarinder Gupta <narinder.gupta@canonical.com>2017-02-01 03:06:48 -0600
committerNarinder Gupta <narinder.gupta@canonical.com>2017-02-01 03:07:41 -0600
commita882d9373127a2f749dd205ba51b93d5efb61727 (patch)
treedfa14fcdc833d4c5de088d6eea3252726d665de1 /ci/genDeploymentConfig.py
parent7d5df8c96948086605955438f282eb96385de9cc (diff)
modfied to to increase the scope of vip to all api network.
Change-Id: I7a5fc38b7381cf9badb48c4e1a86cb0dbf7d128b Signed-off-by: Narinder Gupta <narinder.gupta@canonical.com>
Diffstat (limited to 'ci/genDeploymentConfig.py')
-rw-r--r--ci/genDeploymentConfig.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/ci/genDeploymentConfig.py b/ci/genDeploymentConfig.py
index 05aeb1f1..eecdd2f2 100644
--- a/ci/genDeploymentConfig.py
+++ b/ci/genDeploymentConfig.py
@@ -10,8 +10,10 @@ Parameters:
from optparse import OptionParser
from jinja2 import Environment, FileSystemLoader
+from distutils.version import LooseVersion, StrictVersion
import os
import yaml
+import subprocess
#
# Parse parameters
@@ -27,7 +29,13 @@ labconfig_file = options.lab
#
# Capture our current directory
-TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl'
+jujuver = subprocess.check_output(["juju", "--version"])
+
+if LooseVersion(jujuver) >= LooseVersion('2'):
+ TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2'
+else:
+ TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl'
+
HOME = os.environ['HOME']
USER = os.environ['USER']