def _get_path_from_dataset_id(self, dataset_id):
        d = self._flocker_client.list_datasets_state()

        def got_state(datasets):
            datasets = [dataset for dataset in datasets
                        if dataset.dataset_id == dataset_id]
            if datasets and datasets[0].primary == self._node_id:
                return datasets[0].path
            else:
                return None
        d.addCallback(got_state)
        return d
Return a dataset's path if available.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/dockerplugin/_api.py/VolumePlugin._get_path_from_dataset_id