aboutsummaryrefslogtreecommitdiff
path: root/kolla/cmd
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-04 11:31:01 +0000
committerGerrit Code Review <review@openstack.org>2016-02-04 11:31:01 +0000
commite8348d033a7496c2c5934d248e3ea2f8b125e44e (patch)
tree06615ec21791fd06c1d0b219eea49f7af2198504 /kolla/cmd
parent33484d7a792711903a05b3956e69ad2005ee00df (diff)
parentdb53ad1ddf4f3b87582fbd2a8516b77d9c031723 (diff)
downloadkolla-e8348d033a7496c2c5934d248e3ea2f8b125e44e.tar.gz
kolla-e8348d033a7496c2c5934d248e3ea2f8b125e44e.zip
Merge "Move the install base type check to kolla-build"
Diffstat (limited to 'kolla/cmd')
-rwxr-xr-xkolla/cmd/build.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/kolla/cmd/build.py b/kolla/cmd/build.py
index 1e51dde75..68babfa75 100755
--- a/kolla/cmd/build.py
+++ b/kolla/cmd/build.py
@@ -64,6 +64,10 @@ class KollaUnknownBuildTypeException(Exception):
pass
+class KollaMismatchBaseTypeException(Exception):
+ pass
+
+
class KollaRpmSetupUnknownConfig(Exception):
pass
@@ -322,6 +326,17 @@ class KollaWorker(object):
rpm_setup_config = filter(None, conf.rpm_setup_config)
self.rpm_setup = self.build_rpm_setup(rpm_setup_config)
+ rh_base = ['fedora', 'centos', 'oraclelinux', 'rhel']
+ rh_type = ['source', 'binary', 'rdo', 'rhos']
+ deb_base = ['ubuntu', 'debian']
+ deb_type = ['source', 'binary']
+
+ if not ((self.base in rh_base and self.install_type in rh_type) or
+ (self.base in deb_base and self.install_type in deb_type)):
+ raise KollaMismatchBaseTypeException(
+ '{} is unavailable for {}'.format(self.install_type, self.base)
+ )
+
if self.install_type == 'binary':
self.install_metatype = 'rdo'
elif self.install_type == 'source':