def get_groups(self):
        """
        Return the groups linked to the gateway.

        Returns a Command.
        """
        def process_result(result):
            return [self.get_group(group) for group in result]

        return Command('get', [ROOT_GROUPS], process_result=process_result)