diff options
Diffstat (limited to 'kolla/cmd/build.py')
| -rwxr-xr-x | kolla/cmd/build.py | 15 |
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': |
