This doesn't work primarily because "bridge #{@resource[:bridge]}" needs to be broken up as "bridge", @resource[:bridge]. With them quoted together, ovs-vsctl actually looks for a table named "bridge br-ex".  So instead:
  datapath_id = vsctl("get", "bridge", @resource[:bridge], "datapath_id")