public function getAllByNode(PuppetDbModel\NodeInterface $node)
    {
        $environment = $this->environmentService->getByNode($node);
        $revision = $environment->getCurrentRevision();
        $groups[$environment->getNormalizedName()] = $revision->getGroupsMatchingHostname($node->getName());
        while ($environment->hasParent()) {
            $parent = $environment->getParent();
            $groups[$parent->getNormalizedName()] = $parent->getCurrentRevision()->getGroupsMatchingHostname($node->getName());
            $environment = $parent;
        }
        return $groups;
    }