diff options
Diffstat (limited to 'ci/genBundle.py')
-rw-r--r-- | ci/genBundle.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ci/genBundle.py b/ci/genBundle.py index 55f3f6eb..3eecdf4c 100644 --- a/ci/genBundle.py +++ b/ci/genBundle.py @@ -12,7 +12,9 @@ Parameters: from optparse import OptionParser from jinja2 import Environment, FileSystemLoader +from distutils.version import LooseVersion, StrictVersion import os +import subprocess import random import yaml import sys @@ -34,7 +36,12 @@ labconfig_file = options.lab scenarioconfig_file = 'default_deployment_config.yaml' # Capture our current directory -TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/bundle_tpl' +jujuver = subprocess.check_output(["juju", "--version"]) + +if LooseVersion(jujuver) >= LooseVersion('2'): + TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/juju2/bundle_tpl' +else: + TPL_DIR = os.path.dirname(os.path.abspath(__file__))+'/config_tpl/bundle_tpl' # # Prepare variables |