N | |
NagiosConfig | |
NagiosObjects | |
name | |
name_re, AptConf | |
name_re_colons, AptConf | |
named_block | |
named_block_arg, Keepalived | |
named_block_arg_title, Keepalived | |
nameserver, Resolv | |
neg1, Rx | |
negate_node, Sudoers | |
netgroup, Access | |
netmask, Resolv | |
Netmasks | |
NetworkManager | |
Networks | |
new_conf | |
nexthop, Postfix_Transport | |
nexthop_smtp, Postfix_Transport | |
Nginx | |
nil cases, Test_Quote | |
no_colon, Channels | |
no_semicolon, Channels | |
no_space, Chrony | |
no_spaces, Rx | |
nocomma, Test_Aliases | |
nocull, Cachefilesd | |
nondef, LVM | |
Not supported, Xymon_Alerting | |
notation_def, Test_Xml.Xml | |
notice, Xymon_Alerting | |
Nrpe | |
Nsswitch | |
Ntpd | |
num, Cron | |
number | |
number_re, Postgresql | |
O | |
octal, Rx | |
OpenShift_Config | |
OpenShift_Http | |
OpenShift_Quickstarts | |
opt_eol, Keepalived | |
opt_hash, Syslog | |
opt_list | |
opt_plus, Syslog | |
opt_space | |
opt_tab, Sep | |
opt_value, Ntpd | |
opt_ws, Grub | |
option | |
option_kw, Hosts_Access | |
options | |
Options with multiple values, Chrony | |
optsep, Automaster | |
optval, Crypttab | |
org, Desktop. | |
origin_list, Access | |
origin_pin, AptPreferences |
let name = /([^ \t\n#:|@]+|"[^"|\n]*")/ (* " make emacs calm down *)
let name = /[^: \t\n]+/
let name = /[^@%# \t\n][^ \t\n]*/
LVM volume group name
let name = [ label "name" . store /[^\/ \t\n]+/ ]
pw_gecos; the user’s full name
let name = [ label "name" . sto_to_col? . colon ]
Regex for entry names
let name_re = /[A-Za-z][A-Za-z-]*/
Regex for entry names with colons
let name_re_colons = /[A-Za-z][A-Za-z:-]*/
A named block enclosed in brackets
let named_block (kw:regexp) (entry:lens) = [ key kw . block entry . eol ]
A block with a block title and name
let named_block (kw:string) (sto:lens) = lens_block (key kw . sep_spc . sto_word) sto
The named block used for testing
let named_block = Build.named_block "foo" block_entry
A block with a block title, a name and an argument
let named_block_arg (kw:string) (name:string) (arg:string) (sto:lens) = lens_block (named_block_arg_title kw name arg) sto
A title lens for named_block_arg
let named_block_arg_title (kw:string) (name:string) (arg:string) = key kw . sep_spc . [ label name . sto_word ] . sep_spc . [ label arg . sto_word ]
A nameserver entry
let nameserver = Build.key_value_line_comment "nameserver" Sep.space (store Rx.ip) comment_eol
Anything but a space, a comma or a comment sign
let neg1 = /[^,# \n\t]+/
Negation of boolean values for defaults.
let negate_node = [ del "!" "!" . label "negate" ]
Format is @NETGROUP[@@NISDOMAIN]
let netgroup = [ label "netgroup" . Util.del_str "@" . store user_re . [ label "nisdomain" . Util.del_str "@@" . store Rx.word ]? ]
A network mask for IP addresses
let netmask = [ label "netmask" . Util.del_str "/" . store Rx.ip ]
let new_conf = " ACTIVEMQ_HOME=/usr/local/share/activemq ACTIVEMQ_BASE=${ACTIVEMQ_HOME} "
let new_conf = "<beans> <broker xmlns=\"http://activemq.apache.org/schema/core\" brokerName=\"localhost\" dataDirectory=\"${activemq.data}\"> <transportConnectors> <transportConnector name=\"openwire\" uri=\"tcp://127.0.0.1:61616\"/> </transportConnectors> </broker> </beans> "
let new_conf = "### Comment admin: password, admin "
let new_conf = "# Comment admin readonly "
let new_conf = "# Comment admin password "
let new_conf = "CLOUD_DOMAIN=\"rhcloud.com\" VALID_GEAR_SIZES=\"small,medium\" DEFAULT_MAX_GEARS=\"100\" DEFAULT_GEAR_CAPABILITIES=\"small\" DEFAULT_GEAR_SIZE=\"small\" MONGO_HOST_PORT=\"localhost:27017\" MONGO_USER=\"openshift\" MONGO_PASSWORD=\"mooo\" MONGO_DB=\"openshift_broker_dev\" MONGO_SSL=\"false\" ENABLE_USAGE_TRACKING_DATASTORE=\"false\" ENABLE_USAGE_TRACKING_AUDIT_LOG=\"false\" USAGE_TRACKING_AUDIT_LOG_FILE=\"/var/log/openshift/broker/usage.log\" ENABLE_ANALYTICS=\"false\" ENABLE_USER_ACTION_LOG=\"true\" USER_ACTION_LOG_FILE=\"/var/log/openshift/broker/user_action.log\" AUTH_PRIVKEYFILE=\"/etc/openshift/server_priv.pem\" AUTH_PRIVKEYPASS=\"\" AUTH_PUBKEYFILE=\"/etc/openshift/server_pub.pem\" AUTH_RSYNC_KEY_FILE=\"/etc/openshift/rsync_id_rsa\" AUTH_SCOPE_TIMEOUTS=\"session=1.days|7.days, *=1.months|6.months\" ENABLE_MAINTENANCE_MODE=\"false\" MAINTENANCE_NOTIFICATION_FILE=\"/etc/openshift/outage_notification.txt\" DOWNLOAD_CARTRIDGES_ENABLED=\"false\" "
let new_conf = "Listen 127.0.0.1:8080 User nobody Group apache include /etc/httpd/conf.d/ruby193-passenger.conf PassengerUser apache PassengerMaxPoolSize 80 PassengerMinInstances 2 PassengerPreStart http://127.0.0.1:8080/ PassengerUseGlobalQueue off RackBaseURI /broker PassengerRuby /var/www/openshift/broker/script/broker_ruby <Directory /var/www/openshift/broker/httpd/root/broker> Options -MultiViews </Directory> "
let new_conf = "[ {\"quickstart\": { \"id\": \"1\", \"name\":\"CakePHP\", \"website\":\"http://cakephp.org/\", \"initial_git_url\":\"git://github.com/openshift/cakephp-example.git\", \"cartridges\":[\"php-5.4\",\"mysql-5.1\"], \"summary\":\"CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC.\", \"tags\":[\"php\",\"cakephp\",\"framework\"], \"admin_tags\":[] }}, {\"quickstart\": { \"id\": \"2\", \"name\":\"Django\", \"website\":\"https://www.djangoproject.com/\", \"initial_git_url\":\"git://github.com/openshift/django-example.git\", \"cartridges\":[\"python-2.7\"], \"summary\":\"A high-level Python web framework that encourages rapid development and clean, pragmatic design. Administrator user name and password are written to $OPENSHIFT_DATA_DIR/CREDENTIALS.\", \"tags\":[\"python\",\"django\",\"framework\"], \"admin_tags\":[] }}, {\"quickstart\":{ \"id\": \"4\", \"name\":\"Drupal\", \"website\":\"http://drupal.org/\", \"initial_git_url\":\"git://github.com/openshift/drupal-example.git\", \"cartridges\":[\"php-5.4\",\"mysql-5.1\"], \"summary\":\"An open source content management platform written in PHP powering millions of websites and applications. It is built, used, and supported by an active and diverse community of people around the world. Administrator user name and password are written to $OPENSHIFT_DATA_DIR/CREDENTIALS.\", \"tags\":[\"php\",\"drupal\",\"wiki\",\"framework\",\"instant_app\"], \"admin_tags\":[] }}, {\"quickstart\":{ \"id\": \"6\", \"name\":\"Ruby on Rails\", \"website\":\"http://rubyonrails.org/\", \"initial_git_url\":\"git://github.com/openshift/rails-example.git\", \"cartridges\":[\"ruby-1.9\",\"mysql-5.1\"], \"summary\":\"An open source web framework for Ruby that is optimized for programmer happiness and sustainable productivity. It lets you write beautiful code by favoring convention over configuration.\", \"tags\":[\"ruby\",\"rails\",\"framework\"], \"admin_tags\":[] }}, {\"quickstart\":{ \"id\": \"8\", \"name\":\"WordPress\", \"website\":\"https://wordpress.org\", \"initial_git_url\":\"git://github.com/openshift/wordpress-example.git\", \"cartridges\":[\"php-5.4\",\"mysql-5.1\"], \"summary\":\"A semantic personal publishing platform written in PHP with a MySQL back end, focusing on aesthetics, web standards, and usability. Administrator user name and password are written to $OPENSHIFT_DATA_DIR/CREDENTIALS.\", \"tags\":[\"php\",\"wordpress\",\"blog\",\"framework\",\"instant_app\"], \"admin_tags\":[] }} ]"
let nexthop = let host_re = "[" . Rx.word . "]" | /[A-Za-z]([^\n]*[^ \t\n])?/ in [ label "nexthop" . (store host_re)? ]
let nexthop_smtp = let host_re = "[" . Rx.word . "]" | Rx.word in [ label "host" . store host_re ] . colon . [ label "port" . store Rx.integer ]
let no_colon = /[^: \t\n][^:\n]*[^: \t\n]|[^:\n]/
let no_semicolon = /[^;\n]+/
No spaces or comment characters
let no_space = /[^ \t\r\n!;#%]+/
A string with no spaces
let no_spaces = /[^ \t\r\n]+/
Don’t have to have whitespace after a comma
let nocomma = "alias: target1,target2\n"
The nocull key has different syntax than the rest
let nocull = /nocull/i
A line that doesn’t contain a statement
let nondef = Util.empty | Util.comment
test Xml.notation_def get "<!NOTATION not3 SYSTEM \"\">" = { "!NOTATION" = "not3" { "SYSTEM" = "" } }
The notice filter definition
let notice = flag "NOTICE"
let num = /[0-9*][0-9\/,*-]*/
let number = integer | decimal
Storing number_re, with or without quotes
let number = Quote.do_squote_opt (store number_re)
A relative decimal number, optionally with unit
let number_re = Rx.reldecimal . /[kMG]?B|[m]?s|min|h|d/?
An octal value
let octal = /0[0-7]+/
let opt_eol = del /[ \t]*\n?/ " "
deletes an optional # sign
let opt_hash = del /#?/ ""
Same as list, but there might be only one element in the list
let opt_list (lns:lens) (sep:lens) = lns . ( sep . lns )*
An optional list of elements, in square brackets
let opt_list (lns:lens) = rspace lbrack . (Build.opt_list lns (lrspace comma) . space)? . Util.del_str rbrack
let opt_list = Build.opt_list [ key Rx.word ] Sep.space
deletes an optional + sign
let opt_plus = del /\+?/ ""
An optional space or tab
let opt_space = /[ \t]*/
Deletes a Rx.opt_space and default to an empty string
let opt_space = del Rx.opt_space ""
Deletes a Rx.opt_space and default to a tab
let opt_tab = del Rx.opt_space "\t"
A subnode for optional values.
let opt_value (s:string) (r:regexp) = Build.key_value s space (store r)
let opt_ws = Util.del_opt_ws ""
A key option
let option = let kv_re = "command" | "environment" | "from" | "permitopen" | "principals" | "tunnel" in let flag_re = "cert-authority" | "no-agent-forwarding" | "no-port-forwarding" | "no-pty" | "no-user-rc" | "no-X11-forwarding" in let option_value = Util.del_str "\"" . store /((\\\\")?[^\\\n"]*)+/ . Util.del_str "\"" in Build.key_value kv_re Sep.equal option_value | Build.flag flag_re
let option =
Optional extensions defined in hosts_options(5)
let option = [ key option_kw . ( del /([ \t]*=[ \t]*|[ \t]+)/ " " . sto_to_colon )? ]
part of method
let option = let value_start = label "value" . Sep.equal in [ label "option" . store Rx.word . (Quote.quote_spaces value_start)? ]
let option = [ indent . del /[oO]ption/ "Option" . label "Option" . sep_spc . quoted_string_val . [ label "value" . sep_spc . quoted_string_val ]* . eol ]
Since either an option or a shell command can be given, use an explicit list of known options to avoid misinterpreting a command as an option
let option_kw = "severity" | "spawn" | "twist" | "keepalive" | "linger" | "rfc931" | "banners" | "nice" | "setenv" | "umask" | "user" | /allow/i | /deny/i
let options = let opt_value = /[^#" \t\n\\\\]+|"[^#"\n\\\\]*"/ in let option = [ key Rx.word . (del /[ \t]*=[ \t]*/ "=" . store opt_value)? ] in [ key "options" . sep_space . sto_no_spaces . (sep_space . option)* . Util.comment_or_eol ]
Options values
let options = let options_entry = Build.key_value ("ndots"|"timeout"|"attempts") (Util.del_str ":") (store Rx.integer) | Build.flag ("debug"|"rotate"|"no-check-names" |"inet6"|"ip6-bytestring"|"edns0" |"single-request-reopen") | ip6_dotint in Build.key_value_line_comment "options" Sep.space (Build.opt_list options_entry Sep.space) comment_eol
let options = "# Example options no-pty ssh-dsa AAAA no-pty ssh-ed25519 AAAA no-pty,command=\"foo\" ssh-dsa AAAA no-pty,command=\"foo bar\" ssh-dsa AAAA no-pty,from=\"example.com,10.1.1.0/16\" ssh-dsa AAAA no-pty,environment=\"LANG=en_GB.UTF8\" ssh-dsa AAAA "
let optsep = del /[ \t,]+/ ","
let optval = /[A-Za-z0-9_.:-]+/
origin_list can be a single ipaddr/originname/domain/fqdn or a list of those values
let origin_list = let origin_re = Rx.no_spaces - /[Ee][Xx][Cc][Ee][Pp][Tt]/ in Build.opt_list [ label "origin" . store origin_re ] Sep.space
let origin_pin = pin_gen "origin"