def volume_exist?(volume_name, driver)
      begin
        debug "volume #{volume_name} exists"
        volume = Docker::Volume.get(volume_name)
        if volume && volume.info['Driver'] == driver
          return true
        elsif volume && volume.info['Driver'] != driver
          raise DriverMismatchError.new("Volume driver not as expected. Expected #{driver}, existing volume has #{volume.info['Driver']}")
        end
      rescue Docker::Error::NotFoundError
        debug "volume #{volume_name} does NOT exist"
        false
      rescue => error
        abort error
      end
    end
def volume_exist?(volume_name, driver)
      begin
        debug "volume #{volume_name} exists"
        volume = Docker::Volume.get(volume_name)
        if volume && volume.info['Driver'] == driver
          return true
        elsif volume && volume.info['Driver'] != driver
          raise DriverMismatchError.new("Volume driver not as expected. Expected #{driver}, existing volume has #{volume.info['Driver']}")
        end
      rescue Docker::Error::NotFoundError
        debug "volume #{volume_name} does NOT exist"
        false
      rescue => error
        abort error
      end
    end
Checks if given volume exists with the expected driver

 @param [String] name of the volume
 @param [String] driver to expect on the volume if already existing
 @raise [DriverMismatchError] If the volume is found but using a different driver than expected