public function getHostGroupsByHost(Host $host)
    {
        return array_values(
            array_filter(
                $this->hostGroups,
                function ($g) use ($host) {
                    return $g->hasHost($host);
                }
            )
        );
    }