'Gets a single host group by name from the array.'

def get_host_group_by_name(self, name):

    host_groups = self.list_host_groups()
    matching = [host_group for host_group in host_groups if (host_group['label'] == name)]
    if len(matching):
        return matching[0]
    raise exception.NotFound((_('Host    group    with    name    %s    not    found') % name))
