def do_group_type_create(cs, args): """Creates a group type.""" is_public = strutils.bool_from_string(args.is_public) gtype = cs.group_types.create(args.name, args.description, is_public) shell_utils.print_group_type_list([gtype])
def do_group_type_default(cs, args): """List the default group type.""" gtype = cs.group_types.default() shell_utils.print_group_type_list([gtype])
def do_group_type_update(cs, args): """Updates group type name, description, and/or is_public.""" is_public = strutils.bool_from_string(args.is_public) gtype = cs.group_types.update(args.id, args.name, args.description, is_public) shell_utils.print_group_type_list([gtype])
def do_group_type_list(cs, args): """Lists available 'group types'. (Admin only will see private types)""" gtypes = cs.group_types.list() shell_utils.print_group_type_list(gtypes)