'Trim away extraneous group type attributes.'

def show(self, request, group_type, brief=False):

    context = request.environ['cinder.context']
    trimmed = dict(id=group_type.get('id'), name=group_type.get('name'), description=group_type.get('description'), is_public=group_type.get('is_public'))
    if common.validate_policy(context, 'group:access_group_types_specs'):
        trimmed['group_specs'] = group_type.get('group_specs')
    return (trimmed if brief else dict(group_type=trimmed))
