aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 %}