Fix magnum logic for rhel

RHEL currently doesn't support magnum, so let's throw an error if it is
built on rhel.

Change-Id: Idfb94fd66e5eb841fb81ec4eeeaf13b7c5a3cede
This commit is contained in:
Alex Schultz 2019-01-18 08:50:30 -07:00
parent ae1322ec10
commit d78144fbdb
3 changed files with 12 additions and 4 deletions

View File

@ -6,8 +6,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %} {% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_package_type == 'rpm' %} {% if base_package_type == 'rpm' and base_distro != 'rhel' %}
{% set magnum_api_packages = ['openstack-magnum-api'] %} {% set magnum_api_packages = ['openstack-magnum-api'] %}
{% elif base_package_type == 'rpm' and base_distro == 'rhel' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif base_package_type == 'deb' %} {% elif base_package_type == 'deb' %}
{% set magnum_api_packages = ['magnum-api'] %} {% set magnum_api_packages = ['magnum-api'] %}
{% endif %} {% endif %}

View File

@ -8,8 +8,11 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{{ macros.configure_user(name='magnum') }} {{ macros.configure_user(name='magnum') }}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_package_type == 'rpm' %} {% if base_package_type == 'rpm' and base_distro != 'rhel' %}
{% set magnum_base_packages = ['openstack-magnum-common'] %} {% set magnum_base_packages = ['openstack-magnum-common'] %}
{% elif base_package_type == 'rpm' and base_distro == 'rhel' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/bash
{% elif base_package_type == 'deb' %} {% elif base_package_type == 'deb' %}
{% set magnum_base_packages = ['magnum-common'] %} {% set magnum_base_packages = ['magnum-common'] %}
{% endif %} {% endif %}

View File

@ -6,11 +6,13 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %} {% import "macros.j2" as macros with context %}
{% if install_type == 'binary' %} {% if install_type == 'binary' %}
{% if base_package_type == 'rpm' %} {% if base_package_type == 'rpm' and base_distro != 'rhel' %}
{% set magnum_conductor_packages = [ {% set magnum_conductor_packages = [
'openstack-magnum-conductor' 'openstack-magnum-conductor'
] %} ] %}
{% elif base_package_type == 'rpm' and base_distro == 'rhel' %}
RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
&& /bin/false
{% elif base_package_type == 'deb' %} {% elif base_package_type == 'deb' %}
{% set magnum_conductor_packages = [ {% set magnum_conductor_packages = [
'magnum-conductor' 'magnum-conductor'