aboutsummaryrefslogtreecommitdiff
path: root/docker
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2019-12-06 21:05:13 +0000
committerGerrit Code Review <review@openstack.org>2019-12-06 21:05:13 +0000
commit3bd681a2039255d912ea970f1e3636546cb5a76a (patch)
tree48c8b52895b1268a94bb709b0a3fadb4fbfc84d3 /docker
parentce0fe598aa0714b3019303f6aa24916a821fa9cd (diff)
parent14f3cd2c326dfcbfa78f21d75b69093435468ef0 (diff)
downloadkolla-3bd681a2039255d912ea970f1e3636546cb5a76a.tar.gz
kolla-3bd681a2039255d912ea970f1e3636546cb5a76a.zip
Merge "Added python3 packages for mellanox agent container"
Diffstat (limited to 'docker')
-rw-r--r--docker/neutron/neutron-mlnx-agent/Dockerfile.j231
1 files changed, 17 insertions, 14 deletions
diff --git a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2 b/docker/neutron/neutron-mlnx-agent/Dockerfile.j2
index 7bb7adfaa..0158bba01 100644
--- a/docker/neutron/neutron-mlnx-agent/Dockerfile.j2
+++ b/docker/neutron/neutron-mlnx-agent/Dockerfile.j2
@@ -5,37 +5,40 @@ LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build
{% import "macros.j2" as macros with context %}
-{% if base_package_type == 'rpm' %}
-
+{% if distro_python_version.startswith('3') %}
{% set neutron_mlnx_agent_packages = [
- 'libvirt-python',
- 'python-ethtool',
+ 'python3-libvirt',
+ 'python3-ethtool',
] %}
-
-{% elif base_package_type == 'deb' %}
-
+{% else %}
{% set neutron_mlnx_agent_packages = [
- 'python-libvirt',
+ 'libvirt-python',
'python-ethtool',
] %}
-
{% endif %}
{% if install_type == 'binary' %}
- {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [
- 'python-networking-mlnx'
- ] %}
+ {% if distro_python_version.startswith('3') %}
+ {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [
+ 'python3-networking-mlnx'
+ ] %}
+ {% else %}
+ {% set neutron_mlnx_agent_packages = neutron_mlnx_agent_packages + [
+ 'python-networking-mlnx'
+ ] %}
+ {% endif %}
+
+{% endif %}
{{ macros.install_packages(neutron_mlnx_agent_packages | customizable("packages")) }}
-{% elif install_type == 'source' %}
+{% if install_type == 'source' %}
{% set neutron_mlnx_agent_pip_packages = [
'networking-mlnx'
] %}
-{{ macros.install_packages(neutron_mlnx_agent_packages | customizable("packages")) }}
RUN {{ macros.install_pip(neutron_mlnx_agent_pip_packages | customizable("pip_packages")) }}
{% endif %}