'A volume created outside of Docker can be listed via the Docker
Volume API.
:param cluster: Flocker cluster.'

@require_cluster(1)
def test_listed(self, cluster):

    self.require_docker('1.10.0', cluster)
    name = random_name(self)
    name2 = random_name(self)
    d = gatherResults([create_dataset(self, cluster, metadata={u'name': name}), create_dataset(self, cluster, metadata={u'name': name2})])
    def created(_):
        client = get_docker_client(cluster, cluster.nodes[0].public_address)
        our_volumes = [v for v in client.volumes()[u'Volumes'] if (v[u'Name'] in (name, name2))]
        self.assertEqual([v[u'Driver'] for v in our_volumes], [u'flocker', u'flocker'])
        self.assertItemsEqual([v[u'Name'] for v in our_volumes], [name, name2])
    d.addCallback(created)
    return d
