'Create a volume with the given name and driver options on the passed in
docker client and block until the ``docker volume ls`` API reports that
the volume has been mounted.
:param client: The docker.Client object to use.
:param name: The name of the volume to create.
:param opts: The options to pass through to the Flocker Plugin for
Docker.
:returns: The result of the API call when the volume has been mounted.'

def _create_volume(self, client, name, driver_opts):

    result = client.create_volume(name, u'flocker', driver_opts)
    self.addCleanup(client.remove_volume, name)
    poll_until(predicate=(lambda : list((v for v in client.volumes()['Volumes'] if ((v['Name'] == name) and v['Mountpoint'])))), steps=([1] * 60))
    return result
