ovs-vsctl returns the data quoted and there's a new line, so should be something like:
      # The datapath_id is a quoted 12 or 16 character string with a newline
      # with the MAC possibly being left-padded, e.g. '"0000112233445566"\n'
      bridge_mac_address = datapath_id[-14..-3].scan(/.{1,2}/).join(':') if datapath_id
    end