# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos720 src/bos/etc/cluster/name_rules/name_rules 1.1 
#  
# Licensed Materials - Property of IBM 
#  
# Restricted Materials of IBM 
#  
# COPYRIGHT International Business Machines Corp. 2010 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
#
# @(#)34   1.1   src/bos/etc/cluster/name_rules/name_rules, libcluster, bos720 8/17/10 17:41:26
#
# ========
# Overview
# ========
# 
# This file expresses rules governing name validity. It consists of:
# 
# - comment lines ('#' in column 1)
# 
# - empty lines (i.e. containing only whitespace)
# 
# - rule lines:
#   rule_name   minlen   maxlen
# 
# - pattern matching lines:
#   +|-   literal|regex   pattern
# 
# A combination of rule and pattern matching lines might look like this:
# 
# -------------------------------
# rule_name1   minlen   maxlen
#   +|-   literal|regex   pattern
#   +|-   literal|regex   pattern
# rule_name2   minlen   maxlen
#   +|-   literal|regex   pattern
#   +|-   literal|regex   pattern
# rule_nameN   minlen   maxlen
# -------------------------------
#
# For example:
#
# -------------------------------
# # this comment describes rule01
# rule01 1 8
#   - literal avoid_this_name_1
#   - literal avoid_this_name_2
#
# # this comment describes rule02
# rule02 1 *
#   - literal avoid_this_name_1
#   - regex   .*bogus.*
#
# # this comment describes rule03
# rule03 * 20
#   + regex   en.*
#
# # only lengths matter to rule04
# rule04 4 20
# -------------------------------
# 
# ============
# Key concepts
# ============
# 
# Lines are silently truncated to 4096 characters (including the newline).
#
# A rule name cannot contain whitespace.
#
# 'minlen' and 'maxlen' should be simple integers without sign characters,
# or '*' meaning "don't care". The use of sign characters result in the rule
# being ignored.
#
# 'literal' means "pattern is compared to names literally (i.e. via
# strcmp())".
#
# 'regex' means "pattern is compared to names using libc's regex facility,
# using *extended* regular expression pattern matching".
#
# 'pattern' extends from after the whitespace following either 'literal' or
# 'regex' to the end of the line.
#
# '+' means "must match"
#
# '-' means "must not match"
#
# Lines which are not recognized as comments, empty, rule or pattern matching
# lines are ignored.
# 
# Neither rule nor pattern matching lines need begin in column 1, but indenting
# pattern matching lines makes it easier to visualize rule organization.
# 
# A rule line can be followed by zero or more pattern matching lines.
# 
# Comment and empty lines can be placed anywhere.
# 
# A name is pronounced invalid upon the first violation of a pattern matching
# line associated with a rule line.
# 
# minlen/maxlen checking is performed before any pattern matching, and thus is
# the most restrictive aspect of a rule.
#
# ===============
# Supported rules
# ===============
# 
# cluster_name
# node_name
# disk_name
# ip4_addr
# ip6_addr
# uuid
# 
# =========================
# Add rules to this section
# =========================


# An RSCT cluster name must be 1-63 characters long
cluster_name 1 63
# and must:
# NOT be 'IW'
	- literal IW
# NOT begin with a '-'
	- regex ^[-]+.*$
# consist of upper or lower case letters, numbers, '.', '_', or '-'
	+ regex ^[a-zA-Z0-9\._\-]+$