':returns: A generator of 2-tuple(``Dataset``, ``Nodestate`` or
``None``) for all the primary manifest datasets and non-manifest
datasets in the ``DeploymentState``.'

def all_datasets(self):

    for node in self.nodes.values():
        if (node.manifestations is None):
            continue
        for manifestation in node.manifestations.values():
            if manifestation.primary:
                (yield (manifestation.dataset, node))
    for dataset in self.nonmanifest_datasets.values():
        (yield (dataset, None))
