'Gets the groups list from Rudder'

def get_groups(self):

    path = '/groups'
    result = self.api_call(path)
    groups = {}
    for group in result['data']['groups']:
        groups[group['id']] = {'hosts': group['nodeIds'], 'name': self.to_safe(group[self.group_name])}
    return groups
