Cast single value list as a string for config id
When passing containers config-id into the paunch module, convert it into a single value (string) for backwards compatibility of paunch, and unlocking upgrade paths as well. Paunch as a library only "understands" such single values for config ids yet. This can be fixed later although. Related-bug: #1853812 Change-Id: Id8985795fc8fac5a10466486d404799e9c65cc65 Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
This commit is contained in:
parent
7bb5baa64e
commit
e88785f124
|
@ -124,7 +124,11 @@ class PaunchManager:
|
|||
self.module = module
|
||||
self.results = results
|
||||
self.config = self.module.params['config']
|
||||
self.config_id = self.module.params['config_id']
|
||||
if (isinstance(self.module.params['config_id'], list)
|
||||
and len(self.module.params['config_id']) == 1):
|
||||
self.config_id = self.module.params['config_id'][0]
|
||||
else:
|
||||
self.config_id = self.module.params['config_id']
|
||||
self.action = self.module.params['action']
|
||||
self.healthcheck_disabled = \
|
||||
self.module.params['healthcheck_disabled']
|
||||
|
|
Loading…
Reference in New Issue