Currently the way to do this is to gather the host information through qb.hostinfo() and then extract out the groups and clusters from there. Here is some sample python to extract out the groups and cluster information using just the qb python module.
Clusters:
clusters = [i['cluster'].strip() for i in qb.hostinfo()]
clusters = [i for i in clusters if len(i) > 0] # remove empty items
clusters = list(set(clusters)) # make sure unique
Groups:
groups = []
for i in qb.hostinfo():
groups.extend(i['groups'].strip().split(','))
groups = [i.strip() for i in groups if len(i) > 0] # remove empty&whitespace
groups = list(set(groups)) # make sure unique