mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Unit tests for openvswitch_db module (#23974)
This commit is contained in:
parent
09b8badc5e
commit
a3a970180a
6 changed files with 256 additions and 2 deletions
|
@ -129,7 +129,6 @@ def map_config_to_obj(module):
|
|||
templatized_command = "%(ovs-vsctl)s -t %(timeout)s list %(table)s %(record)s"
|
||||
command = templatized_command % module.params
|
||||
rc, out, err = module.run_command(command, check_rc=True)
|
||||
|
||||
if rc != 0:
|
||||
module.fail_json(msg=err)
|
||||
|
||||
|
@ -137,7 +136,7 @@ def map_config_to_obj(module):
|
|||
|
||||
col_value = match.group(3)
|
||||
col_value_to_dict = {}
|
||||
if match.group(3):
|
||||
if col_value and col_value != '{}':
|
||||
for kv in col_value[1:-1].split(','):
|
||||
k, v = kv.split('=')
|
||||
col_value_to_dict[k.strip()] = v.strip()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue