Index
$#! · 0-9 · A · B · C · D · E · F · G · H · I · J · K · L · M · N · O · P · Q · R · S · T · U · V · W · X · Y · Z
T
 tab, Sep
 tag, FAI_DiskConfig
 tag_spec, Sudoers
 target
 tcp_check_field, Keepalived
 terminal, Grub
 TEST a/c/e, Test_IniFile
 TEST a/c/f, Test_IniFile
 TEST a/d/e, Test_IniFile
 TEST a/d/f, Test_IniFile
 TEST b/c/e, Test_IniFile
 TEST b/c/f, Test_IniFile
 TEST b/d/e, Test_IniFile
 TEST b/d/f, Test_IniFile
 TEST multiline values, Test_IniFile
 Test_Access
 Test_Aliases
 Test_Approx
 Test_FAI_DiskConfig
 Test_IniFile
 Test_Keepalived
 Test_login_defs
 Test_Reprepro_Uploaders
 Test_Xml
 Tests to run, Test_IniFile
 the valid values for schedules, Cron
 time, Cron
 title
 Title definition
 title_ace, Test_IniFile
 title_acf, Test_IniFile
 title_ade, Test_IniFile
 title_adf, Test_IniFile
 title_bce, Test_IniFile
 title_bcf, Test_IniFile
 title_bde, Test_IniFile
 title_bdf, Test_IniFile
 title_label, IniFile
 to_comment_re, IniFile
 to_eol, Xorg
 TODO, IniFile
 token, Syslog
 Top of the tree, Syslog
 trim, Host_Conf
 type_label_lv, FAI_DiskConfig
U
 ul1, Test_Xml
 Usage Example
 USEFUL FUNCTIONS, Grub
 Useful primitives, Access
 USEFUL PRIMITIVES
 user
 USER SPECIFICATION, Sudoers
 user_alias, Sudoers
 user_list, Access
 user_re, Access
 user_record, cgrules
 users, Syslog
 Util
 Utilities lens, Test_Xml
V
 value_list, Aliases
 value_re, Approx
 value_sep, Grub
 value_to_eol, Grub
 Variables, Desktop
 various macros, Syslog
 vg_option, FAI_DiskConfig
 videoram, Xorg
 virtual_server, Keepalived
 virtual_server_field, Keepalived
 virtual_server_group, Keepalived
 virtual_server_group_field, Keepalived
 volume
 volume_cryptsetup, FAI_DiskConfig
 volume_full, FAI_DiskConfig
 volume_lvm, FAI_DiskConfig
 volume_or_comment, FAI_DiskConfig
 volume_raid, FAI_DiskConfig
 volume_tmpfs, FAI_DiskConfig
 volume_vg, FAI_DiskConfig
 VRRP CONFIGURATION, Keepalived
 vrrp_instance, Keepalived
 vrrp_instance_field, Keepalived
 vrrp_script, Keepalived
 vrrp_script_field, Keepalived
 vrrp_sync_group, Keepalived
 vrrp_sync_group_field, Keepalived
 vrrpd_conf, Keepalived
let tab = del Rx.space "\t"
Deletes a Rx.space and default to a tab
let tag (re:regexp) = [ Util.del_str ":" . key re ]
A generic tag beginning with a colon
let tag_spec = [ label "tag" . store /(NO)?(PASSWD|EXEC|SETENV)/ . sep_col ]
Tag specification for spec
let target = Rx.device_name
let tcp_check_field = field "connect_timeout" sto_num | field "connect_port" sto_num
let terminal = [ command "terminal" "" . ([ spc . switch /dumb|no-echo|no-edit|silent/ ] |[ spc . switch_arg /timeout|lines/ ])* . [ spc . key /console|serial|hercules/ ]* . eol ]
Provides unit tests and examples for the Access lens.
Provides unit tests and examples for the Aliases lens.
Provides unit tests and examples for the Approx lens.
Provides unit tests and examples for the FAI_DiskConfig lens.
Provides unit tests and examples for the IniFile module.
Provides unit tests and examples for the Keepalived lens.
Test cases for the login_defs lense
Provides unit tests and examples for the Reprepro_Uploaders lens.
Provides unit tests and examples for the Xml lens.
The tests are run with all combinations of the following three parameters:
let time = [ label "time" . minute . sep_spc . hour . sep_spc . dayofmonth . sep_spc . month . sep_spc . dayofweek ]
Time in the format “minute hour dayofmonth month dayofweek”
let title = IniFile.indented_title IniFile.record_re
Uses standard INI File title
let title = del /title[ \t=]+/ "title " . value_to_eol . eol
let title (kw:regexp) = Util.del_str "[" . key kw . Util.del_str "]". eol
Title for record.
let title = IniFile.title IniFile.record_re
An IniFile.title
let title_ace = IniFile.title IniFile.record_re
let title_acf = IniFile.title IniFile.record_re
let title_ade = IniFile.title IniFile.record_re
let title_adf = IniFile.title IniFile.record_re
let title_bce = IniFile.title IniFile.record_re
let title_bcf = IniFile.title IniFile.record_re
let title_bde = IniFile.title IniFile.record_re
let title_bdf = IniFile.title IniFile.record_re
let title_label (name:string) (kw:regexp) = label name . Util.del_str "[" . store kw . Util.del_str "]". eol
Title for record.
let to_comment_re = /[^;# \t\n][^;#\n]*[^;# \t\n]|[^;# \t\n]/
Regex until comment
let to_eol = /[^ \t\n](.*[^ \t\n])?/
Match everything from here to eol, cropping whitespace at both ends
Things to add in the future
let token = /([a-z0-9]+|\*)/
alphanum or “*”
let trim = let trim_list = Build.opt_list [seq "trim" . store Rx.word] (del /[:;,]/ ":") in Build.key_value_line "trim" Sep.space trim_list
let type_label_lv = label "lv" . [ label "vg" . store (/[^# \t\n-]+/ - "raw") ] . Util.del_str "-" . [ label "name" . store /[^ \t\n]+/ ]
let ul1 = " <ul> <li>test1</li> <li>test2</li> <li>test3</li> <li>test4</li> </ul> " test Xml.doc get ul1 = { "ul" { "#text" = " " } { "li" { "#text" = "test1" } } { "#text" = " " } { "li" { "#text" = "test2" } } { "#text" = " " } { "li" { "#text" = "test3" } } { "#text" = " " } { "li" { "#text" = "test4" } } }
let user = [ label "user" . ( store user_re | store Rx.word . Util.del_str "@" . [ label "host" . store Rx.word ] ) ]
user can be a username, username@hostname or a group
let user = [ label "user" . store Rx.word ]
let user = comma_sep_list "user"
TODO: support for quoted strings
let user_alias = alias_entry "User_Alias" "user" sto_to_com
User_Alias, see alias_field
let user_list = Build.opt_list (user|group|netgroup) Sep.space
A list of users or netgroups to apply the rule to
let user_re = Rx.word - /[Ee][Xx][Cc][Ee][Pp][Tt]/
Regex for user/netgroup fields
let user_record = generic_record "user" (store name)
let users = label_opt_list_or "user" (store word) comma "*"
a list of users or a “*”
Generic module providing useful primitives
let value_list = Build.opt_list ([ label "value" . store destination]) comma
List of destinations
let value_re = /[^ \t\n](.*[^ \t\n])?/
let value_sep (dflt:string) = del /[ \t]*[ \t=][ \t]*/ dflt
let value_to_eol = store /[^= \t\n][^\n]*[^= \t\n]|[^= \t\n]/
let vg_option = [ key "pvcreateopts" . Util.del_str "=\"" . store /[^"\n]*/ . Util.del_str "\"" ]
An option for volume_vg
let videoram = entry_int "VideoRam" /[vV]ideo[rR]am/
let virtual_server = named_block_arg "virtual_server" "ip" "port" virtual_server_field
let virtual_server_field = field "delay_loop" sto_num | field "lb_algo" sto_word | field "lb_kind" sto_word | field "nat_mask" sto_word | field "protocol" sto_word | named_block_arg "real_server" "ip" "port" real_server_field
let virtual_server_group = named_block "virtual_server_group" virtual_server_group_field
let virtual_server_group_field = [ indent . label "vip" . [ ipaddr ] . sep_spc . [ label "port" . sto_num ] . comment_or_eol ]
test FAI_DiskConfig.volume get "primary /boot 20-100 ext3 rw\n" = { "primary" { "mountpoint" = "/boot" } { "size" = "20-100" } { "filesystem" = "ext3" } { "mount_options" { "1" = "rw" } } }
Test FAI_DiskConfig.volume
let volume_cryptsetup = volume_full (key ("swap"|"tmp"|"luks")) device
let volume_full (type:lens) (third_field:lens) =
let volume_lvm = volume_full type_label_lv size (* lvm logical volume: vg name and lv name *) | volume_vg
let volume_or_comment (vol:lens) = (vol|empty|comment)* . vol
A succesion of volumes and comments
let volume_raid = volume_full (key /raid[0156]/) disk_list (* raid level *)
let volume_tmpfs = [ key "tmpfs" . space . mountpoint .space . size . space . mount_options . (space . fs_options)? . eol ]
let volume_vg = [ key "vg" . space . name . space . disk . (space . vg_option)? . eol ]
let vrrp_instance = named_block "vrrp_instance" vrrp_instance_field
let vrrp_instance_field = field "state" sto_word | field "interface" sto_word | field "lvs_sync_daemon_interface" sto_word | field "virtual_router_id" sto_num | field "priority" sto_num | field "advert_int" sto_num | field "garp_master_delay" sto_num | field "notify_master" sto_to_eol | field "notify_backup" sto_to_eol | field "notify_fault" sto_to_eol | flag "smtp_alert" | flag "nopreempt" | flag "ha_suspend" | flag "debug" | block "authentication" ( field "auth_type" sto_word | field "auth_pass" sto_word ) | block "virtual_ipaddress" static_ipaddress_field | block "track_interface" ( flag word ) | block "track_script" ( flag word )
let vrrp_script = named_block "vrrp_script" vrrp_script_field
let vrrp_script_field = field "script" sto_to_eol | field "interval" sto_num | field "weight" sto_num
let vrrp_sync_group = named_block "vrrp_sync_group" vrrp_sync_group_field
let vrrp_sync_group_field = block "group" [ indent . key word . comment_or_eol ]
let vrrpd_conf = vrrp_sync_group | vrrp_instance | vrrp_script
contains subblocks of VRRP synchronization group(s) and VRRP instance(s)
Close