From 88328a8663c96ab0c4c3dc1ecf474d344c283a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Jeanneret?= Date: Thu, 11 Jun 2020 08:41:51 +0200 Subject: [PATCH] Allow to pass a list for "security_opt" param Since we can put multiple "--security-opt" in the command line, let's reflect it in paunch! Change-Id: I6a60fd12edb692d386e542f0635253fde92ec6d5 (cherry picked from commit 324d5f67dfe6487ae98f5d07fdc5b8fec9332724) --- paunch/builder/compose1.py | 2 +- paunch/builder/podman.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/paunch/builder/compose1.py b/paunch/builder/compose1.py index b22acd9..245b7cd 100644 --- a/paunch/builder/compose1.py +++ b/paunch/builder/compose1.py @@ -75,7 +75,7 @@ class ComposeV1Builder(base.BaseBuilder): self.string_arg(cconfig, cmd, 'mem_limit', '--memory') self.string_arg(cconfig, cmd, 'memswap_limit', '--memory-swap') self.string_arg(cconfig, cmd, 'mem_swappiness', '--memory-swappiness') - self.string_arg(cconfig, cmd, 'security_opt', '--security-opt') + self.list_or_string_arg(cconfig, cmd, 'security_opt', '--security-opt') self.string_arg(cconfig, cmd, 'stop_signal', '--stop-signal') if 'cpuset_cpus' in cconfig: # 'all' is a special value to directly configure all CPUs diff --git a/paunch/builder/podman.py b/paunch/builder/podman.py index fb259fd..ca91c62 100644 --- a/paunch/builder/podman.py +++ b/paunch/builder/podman.py @@ -85,7 +85,7 @@ class PodmanBuilder(base.BaseBuilder): self.string_arg(cconfig, cmd, 'mem_limit', '--memory') self.string_arg(cconfig, cmd, 'memswap_limit', '--memory-swap') self.string_arg(cconfig, cmd, 'mem_swappiness', '--memory-swappiness') - self.string_arg(cconfig, cmd, 'security_opt', '--security-opt') + self.list_or_string_arg(cconfig, cmd, 'security_opt', '--security-opt') self.string_arg(cconfig, cmd, 'stop_signal', '--stop-signal') self.string_arg(cconfig, cmd, 'hostname', '--hostname') for extra_host in cconfig.get('extra_hosts', []):