openvswitch_db: Split key-value pairs correctly (#33335)

Map values can contain commas, e.g.
    - name: Configure OVN bridge mapping
      openvswitch_db:
        state: present                                                                                                                                                                                                                                table: open_vswitch                                                                                                                                                                                                                           record: .                                                                                                                                                                                                                                     col: external_ids                                                                                                                                                                                                                             key: ovn-bridge-mappings
        value: '"vmnet-static:br-vmnet-st,vmnet-dynamic:br-vmnet-dyn"'

Previous behaviour was splitting the value and raised an exception.
pull/38276/head
Roman Bolshakov 7 years ago committed by Chris Alfonso
parent 5e990301bb
commit 3c53e2f8ea

@ -127,7 +127,7 @@ def map_config_to_obj(module):
col_value = match.group(3)
col_value_to_dict = {}
if col_value and col_value != '{}':
for kv in col_value[1:-1].split(','):
for kv in col_value[1:-1].split(', '):
k, v = kv.split('=')
col_value_to_dict[k.strip()] = v.strip()

Loading…
Cancel
Save