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 324d5f67df)
This commit is contained in:
Cédric Jeanneret 2020-06-11 08:41:51 +02:00 committed by Emilien Macchi
parent d2f7423718
commit 88328a8663
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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', []):