'List all the ``Application``\ s running on this node.
The given local state is used to figure out if applications have
attached volumes that are specific manifestations. If no
manifestations are known then discovery isn\'t done and ignorance
is claimed about applications. This ensures that the information
returned is accurate, and therefore that convergence is done
correctly.
This does mean you can\'t run an application agent without a
dataset agent. See
https://clusterhq.atlassian.net/browse/FLOC-1646.
:return: A ``Deferred`` which fires with a list containing a
``NodeState`` instance with information only about
``Application`` and ports. ``NodeState.manifestations`` and
``NodeState.paths`` will not be filled in.'

def discover_state(self, cluster_state, persistent_state):

    local_state = cluster_state.get_node(self.node_uuid, hostname=self.hostname)
    if (local_state.manifestations is None):
        return succeed(NodeLocalState(node_state=NodeState(uuid=self.node_uuid, hostname=self.hostname, applications=None, manifestations=None, paths=None)))
    path_to_manifestations = {path: local_state.manifestations[dataset_id] for (dataset_id, path) in local_state.paths.items()}
    applications = self.docker_client.list()
    applications.addCallback(self._applications_from_containers, path_to_manifestations)
    applications.addCallback(self._nodestate_from_applications)
    return applications
