def _attached_volume_for_container(
            self, container, path_to_manifestations
    ):
        """
        Infer the Flocker manifestation which is in use by the given container.

        :param flocker.node._docker.Unit container: The container to inspect.
        :param dict path_to_manifestations: A mapping from mount points (as
            ``FilePath``) to identifiers (as ``unicode``) of the datasets that
            are mounted there.

        :return: ``None`` if no Flocker manifestation can be associated with
            the container state.  Otherwise an ``AttachedVolume`` referring to
            that manifestation and the location in the container where it is
            mounted.
        """
        if container.volumes:
            # XXX https://clusterhq.atlassian.net/browse/FLOC-49
            # we only support one volume per container
            # at this time
            # XXX https://clusterhq.atlassian.net/browse/FLOC-773
            # we assume all volumes are datasets
            docker_volume = list(container.volumes)[0]
            try:
                manifestation = path_to_manifestations[
                    docker_volume.node_path]
            except __HOLE__:
                # Apparently not a dataset we're managing, give up.
                return None
            else:
                return AttachedVolume(
                    manifestation=manifestation,
                    mountpoint=docker_volume.container_path,
                )
        return None
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/_container.py/ApplicationNodeDeployer._attached_volume_for_container