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

L |
| LABEL OPERATIONS Build Test_Build
| label_opt_list, Syslog
| label_opt_list_or, Syslog
| langs, Channels
| lbrace, Erlang
| lbrack, Erlang
| lbracket, Sep
| Ldap related values, Nslcd
| ldap_dn, Nslcd
| ldap_filter, Nslcd
| ldap_rdn, Nslcd
| ldap_scope, Nslcd
| ldapoid_re, Ldif
| Ldif
| LDIF CHANGE RECORDS, Ldif
| LDIF CONTENT RECORDS, Ldif
| ldif_attrval_record, Ldif
| ldif_change_record, Ldif
| ldif_changes, Ldif
| ldif_content, Ldif
| lens Nslcd Toml
| Lens AptPreferences Aptsources NagiosConfig Ntpd
| LENS Global Ldif Netmasks Solaris_System Ssh Systemd Up2date
| Lens and filter Avahi Oz
| LENS AND FILTER AptConf ClamAV Dovecot Grub Host_Conf Hosts_Access Mke2fs Modprobe Pgbouncer Sysconfig_Route Trapperkeeper
| Lens definition, IniFile
| Lens usage, IniFile
| Lens Usage Access ActiveMQ_Conf ActiveMQ_XML AFS_cellalias Aliases Anacron Approx Apt_Update_Manager AptConf Authorized_Keys Automaster Automounter BackupPCHosts Cachefilesd cgconfig cgrules Channels Chrony Collectd CPanel Cron Cron_User Crypttab CSV Cups debctrl Desktop Dhcpd Erlang Fonts Fuse Grub GtkBookmarks Host_Conf Hosts_Access Inputrc JettyRealm JMXAccess JMXPassword Keepalived keepalived.aug ldso.aug Known_Hosts Koji Lightdm Mke2fs Modprobe Modules MongoDBServer NagiosConfig NagiosObjects Netmasks NetworkManager Networks Nginx Nslcd Nsswitch OpenShift_Config OpenShift_Http OpenShift_Quickstarts Pam PamConf Postfix_Transport Postfix_Virtual Postgresql Protocols Puppet_Auth Puppetfile Qpid Quote Rabbitmq Resolv Rhsm Rsyslog Schroot Services Shells Shellvars Simplelines Simplevars Sip_Conf SmbUsers Solaris_System Splunk Ssh Sshd Sudoers Sysconfig_Route Sysctl Syslog Systemd Tmpfiles Toml Trapperkeeper Up2date UpdateDB Vfstab VWware_Config Xorg Xymon_Alerting
| LENS&FILTER Access cgrules PylonsPaste Subversion Sudoers
| lens_block, Keepalived
| LENSE DEFINITION, Syslog
| Lense-specific primitives, Tmpfiles
| LENSES PamConf Services
| Lenses for parsing out sections, Chrony
| lglob, Erlang
| Licence cgconfig cgrules Ldif Netmasks Nsswitch Pam PamConf Resolv Solaris_System Syslog
| License Access ActiveMQ_Conf ActiveMQ_XML AFS_cellalias Aliases Anaconda Anacron Approx Apt_Update_Manager AptCacherNGSecurity AptConf Authorized_Keys Automaster Automounter BackupPCHosts BootConf Build Cachefilesd Carbon Channels Chrony ClamAV Collectd CPanel Cron Cron_User Crypttab CSV Cups debctrl Desktop Dhcpd Dns_Zone Dovecot Dpkg Erlang FAI_DiskConfig Fonts Fuse Grub Gshadow GtkBookmarks Host_Conf Hostname Hosts_Access Htpasswd IniFile Inputrc JettyRealm JMXAccess JMXPassword Kdump Keepalived keepalived.aug ldso.aug Known_Hosts Koji Lightdm Login_defs LVM Mailscanner Mailscanner_rules MCollective Memcached Mke2fs Modprobe Modules MongoDBServer NagiosConfig NagiosObjects NetworkManager Networks Nginx Nrpe Ntpd OpenShift_Config OpenShift_Http OpenShift_Quickstarts Pagekite Pbuilder Pg_Hba Pgbouncer Postfix_Passwordmap Postfix_Transport Postfix_Virtual Postgresql Protocols Puppet_Auth Puppetfile PylonsPaste Qpid Quote Rabbitmq Redis Reprepro_Uploaders Rhsm Rmt Rsyslog Rx Schroot Semanage Sep Services Shadow Shells Shellvars Simplelines Simplevars Sip_Conf SmbUsers Splunk Ssh Sshd Star Strongswan Subversion Sudoers Sysconfig_Route Sysctl Systemd Test_Lightdm Test_login_defs Test_sssd Thttpd Tmpfiles Toml Trapperkeeper Tuned Up2date UpdateDB Util Vfstab VWware_Config Xorg Xymon_Alerting
| Lightdm
| Limitations, Exports
| line, Simplelines
| list Build Erlang Host_Conf LVM Puppet_Auth Test_Build UpdateDB
| LIST CONSTRUCTIONS Build Test_Build
| list values, Test_Erlang
| list_ace, Test_IniFile
| list_empty, Test_Up2date
| list_item, Hosts_Access
| list_nocomment_ace, Test_IniFile
| list_nocomment_test, Test_IniFile
| list_one, Test_Up2date
| list_sep, Hosts_Access
| list_sto, Mke2fs
| list_test, Test_IniFile
| list_two, Test_Up2date
| list_two_trailing, Test_Up2date
| listen, Ntpd
| listeners Rabbitmq Test_Rabbitmq.Rabbitmq
| lns Global puppetfileserver.aug sssd.aug Access ActiveMQ_Conf AFS_cellalias Aliases Anacron Approx Apt_Update_Manager AptConf AptPreferences Aptsources Authorized_Keys Automaster Automounter Avahi BackupPCHosts BootConf Cachefilesd cgrules Channels Chrony Collectd CPanel Cron Cron_User Crypttab CSV csv.aug tests/test_csv.aug Cups Desktop Dovecot Dpkg FAI_DiskConfig Fonts Fuse Grub GtkBookmarks Host_Conf Hostname Hosts_Access Httpd IniFile Inputrc Interfaces JettyRealm JMXAccess JMXPassword Kdump Keepalived keepalived.aug ldso.aug Known_Hosts Ldif Login_defs LVM Mke2fs Modprobe Modules MongoDBServer NagiosConfig Netmasks Networks Nginx Nrpe Nsswitch Ntpd OpenShift_Config OpenShift_Http OpenShift_Quickstarts Oz Pagekite Pbuilder Pg_Hba Postfix_Passwordmap Postfix_Transport Postfix_Virtual Postgresql Protocols Puppet_Auth Puppetfile Qpid Rabbitmq Redis Reprepro_Uploaders Resolv Schroot Services Shells Shellvars Shellvars_list Simplelines Simplevars Slapd SmbUsers Solaris_System Subversion Sudoers Sysconfig_Route Sysctl Syslog Systemd Test_Access.Access Test_ActiveMQ_Conf.ActiveMQ_Conf Test_ActiveMQ_XML.ActiveMQ_XML Test_AFS_cellalias.AFS_cellalias Test_Aliases.Aliases Test_Anacron.Anacron Test_Approx.Approx Test_Apt_Update_Manager.Apt_Update_Manager Test_Authorized_Keys.Authorized_keys Test_Authorized_Keys.Authorized_Keys Test_Channels.Channels Test_Collectd.Collectd Test_CPanel.CPanel Test_Cups.Simplevars Test_FAI_DiskConfig.FAI_DiskConfig Test_Fonts.Fonts Test_Fuse.Fuse Test_GtkBookmarks.GtkBookmarks Test_Inputrc.Inputrc Test_Iscsid.Iscsid Test_JettyRealm.JettyRealm Test_JMXAccess.JMXAccess Test_JMXPassword.JMXPassword Test_Kdump.Kdump Test_Keepalived.Keepalived Test_Known_Hosts.Known_Hosts Test_Ldso.Ldso Test_LVM.LVM Test_MongoDBServer.MongoDBServer Test_NetworkManager.NetworkManager Test_OpenShift_Config.OpenShift_Config Test_OpenShift_Http.OpenShift_Http Test_OpenShift_Quickstarts.OpenShift_Quickstarts Test_Postfix_Passwordmap.Postfix_Passwordmap Test_Postfix_Transport.Postfix_Transport Test_Postfix_Virtual.Postfix_Virtual Test_Postgresql.Postgresql Test_Protocols.Protocols Test_Puppet_Auth.Puppet_Auth Test_Puppetfile.Puppetfile Test_Qpid.Qpid Test_Rabbitmq.Rabbitmq Test_Redis.Redis Test_Reprepro_Uploaders.Reprepro_Uploaders Test_Rsyslog.Rsyslog Test_Semanage.Semanage Test_Simplelines.Simplelines Test_Simplevars.Simplevars Test_SmbUsers.Simplevars Test_ssh.Ssh Test_sshd.Sshd Test_Subversion.Subversion Test_Sysconfig_Route.Sysconfig_Route Test_Sysctl.Sysctl Test_Systemd.Systemd Test_Up2date.Up2date Test_UpdateDB.UpdateDB Test_VMware_Config.VMware_Config Test_Xml.Xml Test_Yum.Yum Tmpfiles Toml tests/test_toml.aug toml.aug Trapperkeeper tests/test_trapperkeeper.aug trapperkeeper.aug Up2date UpdateDB VWware_Config Xorg Xymon_Alerting Yaml
| Lns, ClamAV
| Lns and Filter, Mailscanner
| lns_ace, Test_IniFile
| lns_acf, Test_IniFile
| lns_ade, Test_IniFile
| lns_adf, Test_IniFile
| lns_bce, Test_IniFile
| lns_bcf, Test_IniFile
| lns_bde, Test_IniFile
| lns_bdf, Test_IniFile
| lns_loose IniFile Test_IniFile.IniFile
| lns_loose_multiline IniFile Test_IniFile.IniFile
| lns_noempty, IniFile
| lns_semicol, CSV csv.aug tests/test_csv.aug
| local, Chrony
| local_flags, Chrony
| local_options, Chrony
| log_flag_list, Chrony
| log_flags, Chrony
| log_levels Rabbitmq Test_Rabbitmq.Rabbitmq
| log_list, Chrony
| loghost, Syslog
| loghost_r, Syslog
| logic_construct_condition, Reprepro_Uploaders
| logic_construct_field, Reprepro_Uploaders
| Login_defs
| logprogram, Syslog
| logrotate_block, Test_Build
| Lokkit
| lookup, Resolv
| lrspace, Erlang
| ls, BootConf
| lspace, Erlang
| LVM
| lvmoption, FAI_DiskConfig
| LVS CONFIGURATION, Keepalived
| lvs_conf, Keepalived

> let label_opt_list (l:string) (r:lens) (s:lens) = Build.opt_list [ label l . r ] s

Uses Build.opt_list to generate a list of labels

> let label_opt_list_or (l:string) (r:lens) (s:lens) (or:string) = ( label_opt_list l r s | [ label l . store or ] )

Either label_opt_list matches something or it emits a single label with the “or” string.

> let langs = let lang = [ label "lang" . store Rx.word ] in Build.opt_list lang plus

Left square bracket
Left curly brackets
Values that need to be parsed.

> let ldap_dn = ldap_rdn . (/(,)?/ . ldap_rdn)*

> let ldap_filter = /\(.*\)/

> let ldap_rdn = /[A-Za-z][A-Za-z]+=[A-Za-z0-9_.-]+/

> let ldap_scope = /sub(tree)?|one(level)?|base/

> let ldapoid_re = /[0-9][0-9\.]*/

Format of an LDAP OID from RFC 2251
Parses the LDAP Data Interchange Format (LDIF)

> let ldif_attrval_record = [ seq "record" . attr_dn . ( sep_line* . attr_val_spec )+ ]

ldif-attrval-record = dn-spec SEP 1*attrval-spec

> let ldif_change_record = [ seq "record" . attr_dn . ( ( sep_line | change_control )* . change_control )? . sep_line* . change_record ]

ldif-change-record = dn-spec SEP *control changerecord

> let ldif_changes = [ label "@changes" . ( sep_record . attr_version )? . ( sep_record . ldif_change_record )+ . sep_record ]

ldif-changes = version-spec 1*(1*SEP ldif-change-record)

> let ldif_content = [ label "@content" . ( sep_record . attr_version )? . ( sep_record . ldif_attrval_record )+ . sep_record ]

ldif-content = version-spec 1*(1*SEP ldif-attrval-record)
This lens is made to provide generic primitives to construct INI File lenses.
Sample usage of this lens in augtool
Sample usage of this lens in augtool
See lns.
See lns.
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
See lns.
Sample usage of this lens in augtool
To be documented
To be documented
To be documented
To be documented
Sample usage of this lens in augtool
Sample usage of this lens in augtool
Sample usage of this lens in augtool
To be documented
To be documented
Since control file is not a system configuration file, you will have to use augtool -r option to point to ‘debian’ directory.
This lens is made to provide a lens for .desktop files for augeas
Sample usage of this lens in augtool
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
This is a generic module which doesn’t apply to files directly.
To be documented
To be documented
To be documented
To be documented
Sample usage of this lens in augtool
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
Works like IniFile lens, with anonymous section for entries without enclosing section and allowing underscore-prefixed keys.
Sample usage of this lens in augtool
Sample usage of this lens in augtool
Sample usage of this lens in augtool
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
To be documented
Sample usage of this lens in augtool
To be documented

> let lens_block (title:lens) (sto:lens) = [ indent . title . Build.block_newlines sto comment . eol ]

A generic block with a title lens.
Left glob separator
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPLv2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the BSD License.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL License.
This file is licensed under the LGPL License.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
Copyright 2013 Erik B.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the GPL.
This file is licensed under the LGPL v2+
This file is licensed under the LGPL v2+.
This file, and the attendant test_dpgk.aug, are explicitly placed in the public domain.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL License.
This file is licensed under the LGPL License.
This file is licensed under the LGPL License.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+.
This file is licensed under the LGPL v2+.
This file is licensed under the LGPL v2+.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, conforming to the other components of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, conforming to the other components of Augeas.
This file is licenced under the LGPL v2+, conforming to the other components of Augeas.
This file is licenced under the LGPL v2+, conforming to the other components of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+
This file is licensed under the GPL.
This file is licensed under the LGPL v2+.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPLv2+, like the rest of Augeas.
This file is licensed under the LGPLv2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPL v2+, like the rest of Augeas.
This file is licenced under the LGPLv2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPLv2+, like the rest of Augeas.
This file is licenced under the LGPLv2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
This file is licensed under the LGPLv2+, like the rest of Augeas.
This file is licenced under the LGPL v2+, like the rest of Augeas.
Lightdm module for Augeas for which parses /etc/lightdm/*.conf files which are standard INI file format.
This lens cannot handle options without a host, as with the last example line in “man 5 exports”:

> let line = let line_re = /[^# \t\n].*[^ \t\n]|[^# \t\n]/ in [ seq "line" . Util.indent . store line_re . Util.eol ]

A simple, uncommented, line

> let list (lns:lens) (sep:lens) = lns . ( sep . lns )+

Build a list of identical lenses separated with a given separator (at least 2 elements)

> let list (kw:regexp) (lns:lens) = [ rspace lbrace . key kw . lrspace comma . opt_list lns . lspace rbrace ]

A list of lenses

> let list (kw:regexp) (elem:string) = let list_elems = Build.opt_list [seq elem . store Rx.word] (Sep.comma . Sep.opt_space) in Build.key_value_line kw Sep.space list_elems

A list of items
A list containing flat literals

> let list (kw:string) (val:regexp) = let item = [ seq kw . store val ] in let comma = del /[ \t]*,[ \t]*/ ", " in [ Util.indent . key kw . Sep.space . Build.opt_list item comma . Util.comment_or_eol ]

A list of values

> let list = Build.list [ key Rx.word ] Sep.space

> let list = let entry = [ label "entry" . store Rx.no_spaces ] in let entry_list = Build.opt_list entry Sep.space in [ key /PRUNE(FS|NAMES|PATHS)/ . Sep.space_equal . Quote.do_dquote entry_list . Util.doseol ]

A list entry

> test list_ace get list_test = { "test_ace" { "1" = "val1" } { "2" = "val2" } { "3" = "val3" } { "#comment" = "a comment" } }

Testing the a/c/e combination with a list entry

> let list_empty = "keyword=; " test Up2date.lns get list_empty = { "1" = "keyword" { "values" } }

> let list_item = store ( Rx.word - /EXCEPT/i )

> test list_nocomment_ace get list_nocomment_test = { "test_ace" { "1" = "val1" } { "2" = "val2" } { "3" = "val3" } }

Testing the a/c/e combination with a list entry without end-of-line comment

> let list_nocomment_test = "test_ace = val1,val2,val3 \n"

> let list_one = "keyword=foo; " test Up2date.lns get list_one = { "1" = "keyword" { "values" { "1" = "foo" } } }

> let list_sep = del ( comma_sep | ws_sep ) ", "

> let list_sto (kw:regexp) (lns:lens) = counter "item" . entry kw (Build.opt_list [lns] Sep.comma)

A list of values with given lens

> let list_test = "test_ace = val1,val2,val3 # a comment\n"

> let list_two = "keyword=foo;bar " test Up2date.lns get list_two = { "1" = "keyword" { "values" { "1" = "foo" } { "2" = "bar" } } }

Probably not useful, up2date throws “bar” away

> let list_two_trailing = "keyword=foo;bar; " test Up2date.lns get list_two_trailing = { "1" = "keyword" { "values" { "1" = "foo" } { "2" = "bar" } } }

> let listen = let addr = [ label "address" . store address_re ] in key_opt_rtable_line "listen on" addr

listen on address [rtable table-id]

> let listeners = let value = Erlang.make_value Erlang.integer | Erlang.tuple Erlang.quoted Erlang.integer in Erlang.list /(tcp|ssl)_listeners/ value

A tcp/ssl listener

> test Rabbitmq.listeners get "{ssl_listeners, [5671, {\"127.0.0.1\", 5672}]}" = { "ssl_listeners" { "value" = "5671" } { "tuple" { "value" = "127.0.0.1" } { "value" = "5672" } } }

> let lns = IniFile.lns record comment

Uses standard INI File lens

> let lns = (comment|empty|entry) *

The access.conf lens, any amount of

> let lns = (Util.empty | Util.comment | entry | empty_entry )*

> let lns = (empty | comment | entry)*

> let lns = (comment | empty | alias)*

> let lns = ( Util.empty | Util.comment | shellvar | entry )*

The anacron lens

> let lns = (empty | comment | kv) *

> let lns = IniFile.lns record comment

> let lns = (empty|comment|entry|include|clear)*

The apt.conf lens

> let lns = Util.empty* . (Build.opt_list record Util.eol+ . Util.empty*)?

> let lns = ( comment | empty | record ) *

> let lns = ( Util.empty | Util.comment | authorized_key)*

The authorized_keys lens

> let lns = ( empty | comment | map_mount | map_master ) *

> let lns = ( empty | comment | entry | include ) *

> let lns = IniFile.lns record comment

> let lns = ( Util.empty | Util.comment | record ) *

> let lns = ( empty | comment | command | single_command )*

> let lns = (empty | comment | cacheconfig | nocull_entry)*

> let lns = ( empty | comment | user_record | group_record )*

The main lens, any amount of

> let lns = entry_or_comment* . group*

> let lns = ( empty | comment | settings )*

The crony lens

> let lns = Httpd.lns

Collectd is essentially Httpd-compliant configuration files

> let lns = (Util.comment | Util.empty | kv)*

The CPanel lens

> let lns = ( empty | comment | shellvar | entry )*

The cron lens

> let lns = ( Cron.empty | Cron.comment | Cron.shellvar | entry )*

The cron_user lens.

> let lns = ( empty | comment | record ) *

The crypttab lens

> let lns_generic (sep:string) = (comment | entry sep)*

The generic lens, taking the separator as a parameter

> let lns = Httpd.lns

> test Desktop.lns get "[Desktop Entry] Name[sr@latin] = foobar\n" = { "Desktop Entry" { "Name[sr@latin]" = "foobar" } }

Allow @ in setting (GH issue #92)

> let lns = (comment|empty|entry|command|block)*

The Dovecot lens

> let lns = ( empty | comment | record ) *

Any number of empty lines, comments, and records.

> let lns = (disk_config|comment|empty)*

The disk_config lens

> let lns = Xml.lns

> let lns = ( Util.empty | Util.comment | mount_max | user_allow_other )*

The fuse.conf lens

> let lns = (comment | empty | menu_setting | debian)* . (boot . (comment | empty | boot)*)?

> let lns = (empty | entry)*

> let lns = ( Util.empty | Util.comment | entry )*

> let lns = [ label "hostname" . store Rx.word . Util.eol ] | Util.empty

> let lns = (Util.empty | Util.comment | entry)*

> test Httpd.lns get "Single 'Foo\\ bar' Double \"Foo\\ bar\"\n" = { "directive" = "Single" { "arg" = "'Foo\\\nbar'" } } { "directive" = "Double" { "arg" = "\"Foo\\\nbar\"" } }

Newlines inside quoted value (GH issue #104)

> let lns (record:lens) (comment:lens) = lns_noempty record (comment|empty)

Generic INI File lens

> let lns = (Util.empty | Util.comment | condition | variable | entry)*

The inputrc lens

> test Interfaces.lns get "source-directory interfaces.d\n" = { "source-directory" = "interfaces.d" }

source-directory (Issue #306)

> let lns = ( Util.comment | Util.empty | realm_entry )*

> let lns = ( Util.comment | Util.empty | access_entry )*

> let lns = ( Util.comment | Util.empty | pass_entry )*

> let lns = ( empty | comment | option )*

The options lens

> let lns = ( empty | comment | global_conf | vrrpd_conf | lvs_conf )*

The keepalived lens

> let lns = (Util.empty | Util.comment | entry)*

The known_hosts lens

> let lns = sep_record | ldif_content | ldif_changes

> let lns = (record | Util.comment | Util.empty) *

The login.defs lens

> let lns = (nondef | def)*

The main lens

> let lns = (empty|comment)* . (defaults|fs_types)*

The mke2fs lens

> let lns = (comment|empty|entry)*

> let lns = ( Util.empty | Util.comment | record ) *

> let lns = (Util.empty | Util.comment | entry)*

> let lns = ( Util.empty | Util.comment | entry )*

main structure

> let lns = ( empty | comment | entry )*

> let lns = ( Util.empty | Util.comment | entry )*

> let lns = ( Util.comment | Util.empty | directive )*

> let lns = ( command | include | include_dir | item | comment | empty ) *

The Nrpe lens

> let lns = ( empty | comment | database )*

> let lns = ( empty | comment | keyword )*

> let lns = (Util.empty | Util.comment | primary_entry | empty_entry )*

> let lns = Httpd.lns

> let lns = Json.lns

> let lns = IniFile.lns record comment

> let lns = Shellvars.lns

The pbuilder lens

> let lns = ( record | Util.comment | Util.empty ) *

The pg_hba.conf lens

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | entry)*

> let lns = (Util.empty | Util.comment | entry)*

The protocols lens

> let lns = (Util.empty | Util.comment | record)*

> let lns = (Util.empty | Util.comment | forge | metadata | mod | moduledir )*

the Puppetfile lens

> let lns = (Util.empty | Util.comment | entry)*

> let lns = Erlang.config rabbit

A top-level Erlang.config

> let lns = (comment | empty | entry )*

The Redis lens

> let lns = (Util.empty|Util.comment|entry)*

The lens is made of Util.empty, Util.comment and entry lines

> let lns = ( empty | comment | entry )*

> let lns = IniFile.lns record comment

An IniFile.lns

> let lns = ( empty | comment | record )*

The services lens is either empty, comment or record

> let lns = ( empty | comment | shell )*

The shells lens

> test Shellvars.lns get "if [ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ] ; then SUFFIX=\"-${APACHE_CONFDIR##/etc/apache2-}\" else SUFFIX= fi\n" = { "@if" = "[ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ]" { "SUFFIX" = "\"-${APACHE_CONFDIR##/etc/apache2-}\"" } { "@else" { "SUFFIX" = "" } } }

Support `##` bashism in conditions (GH issue #118)

> test Shellvars_list.lns get "service_ping=\"ping/icmp\" #ping\n" = { "service_ping" { "quote" = "\"" } { "value" = "ping/icmp" } { "#comment" = "ping" } }

Ticket #342: end-of-line comments

> let lns = (Util.empty | Util.comment | line)*

The simplelines lens

> let lns = (Util.empty | Util.comment | entry)*

> test Slapd.lns get "access to dn.subtree=\"dc=example,dc=com\" by self write stop\n" = { "access to" = "dn.subtree=\"dc=example,dc=com\"" { "by" = "self" { "access" = "write" } { "control" = "stop" } } }

Full access test with who/access/control

> let lns = (Util.empty | (Util.comment_generic /[ \t]*[#;][ \t]*/ "# ") | entry)*

> let lns = ( empty | comment | cmd_moddir | cmd_kv "rootdev" Rx.fspath | cmd_kv "rootfs" Rx.word | cmd_kv "exclude" Rx.fspath | cmd_kv "include" Rx.fspath | cmd_kv "forceload" Rx.fspath | cmd_set )*

> let lns = IniFile.lns record comment

> let lns = ( empty | comment | includedir | alias | defaults | spec )*

The sudoers lens, any amount of

> let lns = entry+

> let lns = (Util.empty | comment | Simplevars.entry)*

The sysctl lens

> let lns = entries . ( program | hostname | include )*

generic entries then programs or hostnames matching blocs

> let lns = IniFile.lns record (comment|include)

An IniFile.lns

> test Access.lns get conf = { "access" = "+" { "user" = "ALL" } { "origin" = "LOCAL" } } { "access" = "+" { "user" = "root" } { "origin" = "localhost.localdomain" } } { "access" = "-" { "user" = "root" } { "origin" = "127.0.0.1" } { "origin" = ".localdomain" } } { "access" = "+" { "user" = "root" } { "user" = "alice" { "host" = "server1" } } { "netgroup" = "admins" } { "group" = "wheel" } { "origin" = "cron" } { "origin" = "crond" } { "origin" = ":0" } { "origin" = "tty1" } { "origin" = "tty2" } { "origin" = "tty3" } { "origin" = "tty4" } { "origin" = "tty5" } { "origin" = "tty6" } } { "#comment" = "IP v6 support" } { "access" = "+" { "user" = "john" } { "user" = "foo" } { "origin" = "2001:4ca0:0:101::1" } { "origin" = "2001:4ca0:0:101::/64" } } { "#comment" = "Except" } { "access" = "+" { "user" = "ALL" } { "except" { "user" = "john" } { "netgroup" = "wheel" } } { "origin" = "ALL" } { "except" { "origin" = "LOCAL" } { "origin" = ".win.tue.nl" } } } { "#comment" = "No spaces" } { "access" = "+" { "user" = "root" } { "origin" = ".example.com" } }

Test the full conf
Get test against tree structure
Get test against tree structure

> test AFS_cellalias.lns get conf = { "#comment" = "Cell Aliases are meant to act like symlinks like '/afs/openafs.org -> oao'" } { "#comment" = "in root.afs, so sites relying on such a link for their cell can use dynroot." } { "#comment" = "These aliases are set with 'fs newalias', or read from" } { "#comment" = "/usr/vice/etc/CellAlias" } { } { "#comment" = "Formatting for /usr/vice/etc/CellAlias is in the form" } { "#comment" = "<target> <alias>" } { "#comment" = "an example would be" } { "#comment" = "fnal.gov/common/usr usr" } { } { "target" = "fnal.gov" { "linkname" = "fnal" } } { "target" = "fnal.gov/files" { "linkname" = "fnal-files" } }

Test the full conf

> test Aliases.lns get file = { } { "#comment" = "Aliases in this file will NOT be expanded in the header from" } { "#comment" = "Mail, but WILL be visible over networks or from /bin/mail." } {} { "#comment" = "Basic system aliases -- these MUST be present." } { "1" { "name" = "mailer-daemon" } { "value" = "postmaster" } } { "2" { "name" = "postmaster" } { "value" = "root" } } {} { "#comment" = "General redirections for pseudo accounts." } { "3" { "name" = "bin" } { "value" = "root" } { "value" = "adm" } { "value" = "bob" } } { "4" { "name" = "daemon" } { "value" = "root" } } { "5" { "name" = "adm" } { "value" = "root" } } { "6" { "name" = "file" } { "value" = "/var/foo" } } { "7" { "name" = "pipe1" } { "value" = "|/bin/ls" } } { "8" { "name" = "pipe2" } { "value" = "|\"/usr/bin/ls args,\"" } }

Testing Aliases.lns on file

> test Anacron.lns get conf = { "#comment" = "/etc/anacrontab: configuration file for anacron" } { } { "SHELL" = "/bin/sh" } { "PATH" = "/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" } { } { "#comment" = "These replace cron's entries" } { "entry" = "nice run-parts --report /etc/cron.daily" { "period" = "1" } { "delay" = "5" } { "job-identifier" = "cron.daily" } } { "entry" = "nice run-parts --report /etc/cron.weekly" { "period" = "7" } { "delay" = "10" } { "job-identifier" = "cron.weekly" } } { "entry" = "nice run-parts --report /etc/cron.monthly" { "period_name" = "monthly" } { "delay" = "15" } { "job-identifier" = "cron.monthly" } }

> test Approx.lns get default_approx = { "#comment" = "The following are the defaults, so there is no need" } { "#comment" = "to uncomment them unless you want a different value." } { "#comment" = "See approx.conf(5) for details." } { } { "$interface" = "any" } { "$port" = "9999" } { "$interval" = "720" } { "$max_wait" = "10" } { "$max_rate" = "unlimited" } { "$debug" = "false" } { } { "#comment" = "Here are some examples of remote repository mappings." } { "#comment" = "See http://www.debian.org/mirror/list for mirror sites." } { } { "debian" = "http://ftp.nl.debian.org/debian" } { "debian-volatile" = "http://ftp.nl.debian.org/debian-volatile" } { "security" = "http://security.debian.org" }

Testing Approx.lns on default_approx

> test Apt_Update_Manager.lns get meta_release = { "#comment" = "default location for the meta-release file" } { } { "METARELEASE" { "URI" = "http://changelogs.ubuntu.com/meta-release" } { "URI_LTS" = "http://changelogs.ubuntu.com/meta-release-lts" } { "URI_UNSTABLE_POSTFIX" = "-development" } { "URI_PROPOSED_POSTFIX" = "-proposed" } }

> test Authorized_keys.lns get "command=\"echo 'Please login as the user \\\"blaauser\\\" rather than the user \\\"root\\\".';echo;sleep 10\" ssh-rsa DEADBEEF== username1\n" = { "key" = "DEADBEEF==" { "options" { "command" = "echo 'Please login as the user \\\"blaauser\\\" rather than the user \\\"root\\\".';echo;sleep 10" } } { "type" = "ssh-rsa" } { "comment" = "username1" } }

GH 165

> test Authorized_Keys.lns get keys = { "#comment" = "Example keys, one of each type" } { } { "key" = "AAAAB3NzaC1yc2EAAAADAQABAAABAQDpWrKYsEsVUyuwMN4ReBN/TMGsaUWzDKDz/uQr6MlNNM95MDK/BPyJ+DiBiNMFVLpRt3gH3eCJBLJKMuUDaTNy5uym2zNgAaAIVct6M2GHI68W3iY3Ja8/MaRPbyTpMh1O74S+McpAW1SGL2YzFchYMjTnu/kOD3lxiWNiDLvdLFZu0wPOi7CYG37VXR4Thb0cC92zqnCjaP1TwfhpEYUZoowElYkoV2vG+19O6cRm/zduYcf8hmegZKB4GFUJTtZ2gZ18XJDSQd0ykK3KPt/+bKskdrtfiOwSZAmUZmd2YuAlY6+CBn1T3UBdQntueukd0z1xhd6SX7Bl8+qyqLQ3" { "type" = "ssh-rsa" } { "comment" = "user@example" } } { "key" = "AAAA" { "type" = "ssh-dsa" } { "comment" = "user@example" } } { "key" = "AAAA" { "type" = "ecdsa-sha2-nistp256" } { "comment" = "user@example" } } { "key" = "AAAA" { "type" = "ssh-ed25519" } { "comment" = "user@example" } } { } { "#comment" = "Example comments" } { "key" = "AAAA" { "type" = "ssh-dsa" } } { "key" = "AAAA" { "type" = "ssh-dsa" } { "comment" = "user@example" } }

> test Channels.lns get conf = { "entry" = "Direct 8 TV" { "provider" = "SES ASTRA" } { "frequency" = "12551" } { "parameter" = "VC56M2O0S0" } { "signal_source" = "S19.2E" } { "symbol_rate" = "22000" } { "vpid" = "1111" { "codec" = "2" } } { "apid" = "1112" { "lang" = "fra" } { "codec" = "3" } } { "tpid" = "1116" } { "caid" = "0" } { "sid" = "12174" } { "nid" = "1" } { "tid" = "1108" } { "rid" = "0" } } { "group" = "FAVORIS" { "entry" = "Direct 8 TV" { "provider" = "SES ASTRA" } { "frequency" = "12551" } { "parameter" = "VC56M2O0S0" } { "signal_source" = "S19.2E" } { "symbol_rate" = "22000" } { "vpid" = "1111" { "codec" = "2" } } { "apid" = "1112" { "lang" = "fra" } { "codec" = "3" } } { "tpid" = "1116" } { "caid" = "0" } { "sid" = "12175" } { "nid" = "1" } { "tid" = "1108" } { "rid" = "0" } } { "entry" = "TF1" { "provider" = "CSAT" } { "frequency" = "11895" } { "parameter" = "VC34M2O0S0" } { "signal_source" = "S19.2E" } { "symbol_rate" = "27500" } { "vpid" = "171" { "codec" = "2" } } { "apid" = "124" { "lang" = "fra" } { "lang" = "spa" } { "codec" = "4" } } { "apid" = "125" { "lang" = "eng" } { "codec" = "4" } } { "apid_dolby" = "126" { "lang" = "deu" } { "codec" = "4" } } { "tpid" = "53" } { "caid" = "500" } { "caid" = "1811" } { "caid" = "1863" } { "caid" = "100" } { "sid" = "8371" } { "nid" = "1" } { "tid" = "1074" } { "rid" = "0" } } } { "group" = "TNT" { "entry" = "TF1" { "provider" = "SMR6" } { "frequency" = "690167" } { "parameter" = "I999B8C999D999M998T999G999Y0" } { "signal_source" = "T" } { "symbol_rate" = "27500" } { "vpid" = "120" { "codec" = "2" } } { "apid" = "130" { "lang" = "fra" } { "codec" = "3" } } { "apid" = "131" { "lang" = "eng" } { "codec" = "3" } } { "apid" = "133" { "lang" = "qad" } { "codec" = "3" } } { "tpid" = "140" } { "tpid_bylang" = "150" { "lang" = "fra" } } { "tpid_bylang" = "151" { "lang" = "eng" } } { "caid" = "0" } { "sid" = "1537" } { "nid" = "8442" } { "tid" = "6" } { "rid" = "0" } } { "#comment" = "this is a comment" } { "entry" = "France 5" { "provider" = "GR1" } { "frequency" = "618167" } { "parameter" = "I999B8C999D999M998T999G999Y0" } { "signal_source" = "T" } { "symbol_rate" = "27500" } { "vpid" = "374" } { "vpid_pcr" = "320" { "codec" = "2" } } { "apid" = "330" { "lang" = "fra" } { "codec" = "3" } } { "apid" = "331" { "lang" = "qad" } { "codec" = "3" } } { "tpid" = "0" } { "tpid_bylang" = "340" { "lang" = "fra" } } { "caid" = "0" } { "sid" = "260" } { "nid" = "8442" } { "tid" = "1" } { "rid" = "0" } } { "entry" = "CANAL+ FAMILY HD" { "frequency" = "12012" } { "parameter" = "VC23M5O35S1" } { "signal_source" = "S19.2E" } { "symbol_rate" = "27500" } { "vpid" = "164" { "codec" = "27" } } { "apid" = "0" } { "apid_dolby" = "98" { "codec" = "106" } } { "apid_dolby" = "99" { "lang" = "eng" } { "codec" = "106" } } { "tpid" = "0" } { "tpid_bylang" = "45" { "lang" = "fra" } { "lang" = "fra" } } { "caid" = "1811" } { "caid" = "500" } { "caid" = "1863" } { "caid" = "100" } { "caid" = "9C4" } { "caid" = "9C7" } { "caid" = "9AF" } { "sid" = "8825" } { "nid" = "1" } { "tid" = "1080" } { "rid" = "0" } } }

Test the full conf

> test Collectd.lns get simple = { "directive" = "LoadPlugin" { "arg" = "contextswitch" } } { "directive" = "LoadPlugin" { "arg" = "cpu" } } { "directive" = "FQDNLookup" { "arg" = "\"true\"" } } { "directive" = "Include" { "arg" = "\"/var/lib/puppet/modules/collectd/plugins/*.conf\"" } }

> test CPanel.lns get config = { "#comment" = "### NOTICE ####" } { "#comment" = "After manually editing any configuration settings in this file," } { "#comment" = "please run '/usr/local/cpanel/whostmgr/bin/whostmgr2 --updatetweaksettings'" } { "#comment" = "to fully update your server's configuration." } { } { "skipantirelayd" = "1" } { "ionice_optimizefs" = "6" } { "account_login_access" = "owner_root" } { "enginepl" = "cpanel.pl" } { "stats_log" = "/usr/local/cpanel/logs/stats_log" } { "cpaddons_notify_users" = "Allow users to choose" } { "apache_port" = "0.0.0.0:80" } { "allow_server_info_status_from" = "" } { "system_diskusage_warn_percent" = "82.5500" } { "maxemailsperhour" } { "email_send_limits_max_defer_fail_percentage" } { "default_archive-logs" = "1" } { "SecurityPolicy::xml-api" = "1" }

Get config

> test FAI_DiskConfig.lns get simple_config = { "#comment" = "A comment" } { "disk_config" = "disk2" { "raw-disk" { "mountpoint" = "-" } { "size" = "0" } { "filesystem" = "-" } { "mount_options" { "1" = "-" } } } } { } { "disk_config" = "lvm" { "vg" { "name" = "my_pv" } { "disk" = "sda2" } } { "vg" { "name" = "test" } { "disk" = "disk1" { "partition" = "9" } } } { "lv" { "vg" = "my_pv" } { "name" = "_swap" } { "mountpoint" = "swap" } { "size" = "2048" } { "filesystem" = "swap" } { "mount_options" { "1" = "sw" } } } { "lv" { "vg" = "my_pv" } { "name" = "_root" } { "mountpoint" = "/" } { "size" = "2048" } { "filesystem" = "ext3" } { "mount_options" { "1" = "rw" } { "2" = "errors" { "value" = "remount-ro" } } } } } { } { "disk_config" = "raid" { "raid1" { "mountpoint" = "/boot" } { "disk" = "disk1" { "partition" = "1" } } { "disk" = "disk2" { "partition" = "1" } } { "disk" = "disk3" { "partition" = "1" } } { "disk" = "disk4" { "partition" = "1" } } { "disk" = "disk5" { "partition" = "1" } } { "disk" = "disk6" { "partition" = "1" } } { "filesystem" = "ext3" } { "mount_options" { "1" = "rw" } } } { "raid1" { "mountpoint" = "swap" } { "disk" = "disk1" { "partition" = "2" } } { "disk" = "disk2" { "partition" = "2" } } { "disk" = "disk3" { "partition" = "2" } } { "disk" = "disk4" { "partition" = "2" } } { "disk" = "disk5" { "partition" = "2" } } { "disk" = "disk6" { "partition" = "2" } } { "filesystem" = "swap" } { "mount_options" { "1" = "sw" } } } { "raid5" { "mountpoint" = "/srv/data" } { "disk" = "disk1" { "partition" = "11" } } { "disk" = "disk2" { "partition" = "11" } } { "disk" = "disk3" { "partition" = "11" } } { "disk" = "disk4" { "partition" = "11" } } { "disk" = "disk5" { "partition" = "11" } } { "disk" = "disk6" { "partition" = "11" } } { "filesystem" = "ext3" } { "mount_options" { "1" = "ro" } } { "fs_options" { "createopts" = "-m 0" } } } { "raid0" { "mountpoint" = "-" } { "disk" = "disk2" { "partition" = "2" } } { "disk" = "sdc1" } { "disk" = "sde1" { "spare" } { "missing" } } { "filesystem" = "ext2" } { "mount_options" { "1" = "default" } } } } { } { "disk_config" = "tmpfs" { "tmpfs" { "mountpoint" = "/var/opt/hosting/tmp" } { "size" = "500" } { "mount_options" { "1" = "defaults" } } } }

Testing the full FAI_DiskConfig.lns on simple_config

> test Fonts.lns get conf = { "#declaration" { "#attribute" { "version" = "1.0" } } } { "!DOCTYPE" = "fontconfig" { "SYSTEM" = "fonts.dtd" } } { "#comment" = " /etc/fonts/fonts.conf file to configure system font access " } { "fontconfig" { "#text" = " " } { "#comment" = " DO NOT EDIT THIS FILE. IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED. LOCAL CHANGES BELONG IN 'local.conf'. The intent of this standard configuration file is to be adequate for most environments. If you have a reasonably normal environment and have found problems with this configuration, they are probably things that others will also want fixed. Please submit any problems to the fontconfig bugzilla system located at fontconfig.org Note that the normal 'make install' procedure for fontconfig is to replace any existing fonts.conf file with the new version. Place any local customizations in local.conf which this file references. Keith Packard " } { "#text" = " " } { "#comment" = " Font directory list " } { "#text" = " " } { "dir" { "#text" = "/usr/share/fonts" } } { "#text" = " " } { "dir" { "#text" = "/usr/X11R6/lib/X11/fonts" } } { "#text" = " " } { "dir" { "#text" = "/usr/local/share/fonts" } } { "#text" = " " } { "dir" { "#text" = "~/.fonts" } } { "#text" = " " } { "#comment" = " Accept deprecated 'mono' alias, replacing it with 'monospace' " } { "#text" = " " } { "match" { "#attribute" { "target" = "pattern" } } { "#text" = " " } { "test" { "#attribute" { "qual" = "any" } { "name" = "family" } } { "#text" = " " } { "string" { "#text" = "mono" } } { "#text" = " " } } { "#text" = " " } { "edit" { "#attribute" { "name" = "family" } { "mode" = "assign" } } { "#text" = " " } { "string" { "#text" = "monospace" } } { "#text" = " " } } { "#text" = " " } } { "#text" = " " } { "#comment" = " Accept alternate 'sans serif' spelling, replacing it with 'sans-serif' " } { "#text" = " " } { "match" { "#attribute" { "target" = "pattern" } } { "#text" = " " } { "test" { "#attribute" { "qual" = "any" } { "name" = "family" } } { "#text" = " " } { "string" { "#text" = "sans serif" } } { "#text" = " " } } { "#text" = " " } { "edit" { "#attribute" { "name" = "family" } { "mode" = "assign" } } { "#text" = " " } { "string" { "#text" = "sans-serif" } } { "#text" = " " } } { "#text" = " " } } { "#text" = " " } { "#comment" = " Accept deprecated 'sans' alias, replacing it with 'sans-serif' " } { "#text" = " " } { "match" { "#attribute" { "target" = "pattern" } } { "#text" = " " } { "test" { "#attribute" { "qual" = "any" } { "name" = "family" } } { "#text" = " " } { "string" { "#text" = "sans" } } { "#text" = " " } } { "#text" = " " } { "edit" { "#attribute" { "name" = "family" } { "mode" = "assign" } } { "#text" = " " } { "string" { "#text" = "sans-serif" } } { "#text" = " " } } { "#text" = " " } } { "#text" = " " } { "#comment" = " Load local system customization file " } { "#text" = " " } { "include" { "#attribute" { "ignore_missing" = "yes" } } { "#text" = "conf.d" } } { "#text" = " " } { "#comment" = " Font cache directory list " } { "#text" = " " } { "cachedir" { "#text" = "/var/cache/fontconfig" } } { "#text" = " " } { "cachedir" { "#text" = "~/.fontconfig" } } { "#text" = " " } { "config" { "#text" = " " } { "#comment" = " These are the default Unicode chars that are expected to be blank in fonts. All other blank chars are assumed to be broken and won't appear in the resulting charsets " } { "#text" = " " } { "blank" { "#text" = " " } { "int" { "#text" = "0x0020" } } { "#text" = " " } { "#comment" = " SPACE " } { "#text" = " " } { "int" { "#text" = "0x00A0" } } { "#text" = " " } { "#comment" = " NO-BREAK SPACE " } { "#text" = " " } { "int" { "#text" = "0x00AD" } } { "#text" = " " } { "#comment" = " SOFT HYPHEN " } { "#text" = " " } { "int" { "#text" = "0x034F" } } { "#text" = " " } { "#comment" = " COMBINING GRAPHEME JOINER " } { "#text" = " " } { "int" { "#text" = "0x0600" } } { "#text" = " " } { "#comment" = " ARABIC NUMBER SIGN " } { "#text" = " " } { "int" { "#text" = "0x0601" } } { "#text" = " " } { "#comment" = " ARABIC SIGN SANAH " } { "#text" = " " } { "int" { "#text" = "0x0602" } } { "#text" = " " } { "#comment" = " ARABIC FOOTNOTE MARKER " } { "#text" = " " } { "int" { "#text" = "0x0603" } } { "#text" = " " } { "#comment" = " ARABIC SIGN SAFHA " } { "#text" = " " } { "int" { "#text" = "0x06DD" } } { "#text" = " " } { "#comment" = " ARABIC END OF AYAH " } { "#text" = " " } { "int" { "#text" = "0x070F" } } { "#text" = " " } { "#comment" = " SYRIAC ABBREVIATION MARK " } { "#text" = " " } { "int" { "#text" = "0x115F" } } { "#text" = " " } { "#comment" = " HANGUL CHOSEONG FILLER " } { "#text" = " " } { "int" { "#text" = "0x1160" } } { "#text" = " " } { "#comment" = " HANGUL JUNGSEONG FILLER " } { "#text" = " " } { "int" { "#text" = "0x1680" } } { "#text" = " " } { "#comment" = " OGHAM SPACE MARK " } { "#text" = " " } { "int" { "#text" = "0x17B4" } } { "#text" = " " } { "#comment" = " KHMER VOWEL INHERENT AQ " } { "#text" = " " } { "int" { "#text" = "0x17B5" } } { "#text" = " " } { "#comment" = " KHMER VOWEL INHERENT AA " } { "#text" = " " } { "int" { "#text" = "0x180E" } } { "#text" = " " } { "#comment" = " MONGOLIAN VOWEL SEPARATOR " } { "#text" = " " } { "int" { "#text" = "0x2000" } } { "#text" = " " } { "#comment" = " EN QUAD " } { "#text" = " " } { "int" { "#text" = "0x2001" } } { "#text" = " " } { "#comment" = " EM QUAD " } { "#text" = " " } { "int" { "#text" = "0x2002" } } { "#text" = " " } { "#comment" = " EN SPACE " } { "#text" = " " } { "int" { "#text" = "0x2003" } } { "#text" = " " } { "#comment" = " EM SPACE " } { "#text" = " " } { "int" { "#text" = "0x2004" } } { "#text" = " " } { "#comment" = " THREE-PER-EM SPACE " } { "#text" = " " } { "int" { "#text" = "0x2005" } } { "#text" = " " } { "#comment" = " FOUR-PER-EM SPACE " } { "#text" = " " } { "int" { "#text" = "0x2006" } } { "#text" = " " } { "#comment" = " SIX-PER-EM SPACE " } { "#text" = " " } { "int" { "#text" = "0x2007" } } { "#text" = " " } { "#comment" = " FIGURE SPACE " } { "#text" = " " } { "int" { "#text" = "0x2008" } } { "#text" = " " } { "#comment" = " PUNCTUATION SPACE " } { "#text" = " " } { "int" { "#text" = "0x2009" } } { "#text" = " " } { "#comment" = " THIN SPACE " } { "#text" = " " } { "int" { "#text" = "0x200A" } } { "#text" = " " } { "#comment" = " HAIR SPACE " } { "#text" = " " } { "int" { "#text" = "0x200B" } } { "#text" = " " } { "#comment" = " ZERO WIDTH SPACE " } { "#text" = " " } { "int" { "#text" = "0x200C" } } { "#text" = " " } { "#comment" = " ZERO WIDTH NON-JOINER " } { "#text" = " " } { "int" { "#text" = "0x200D" } } { "#text" = " " } { "#comment" = " ZERO WIDTH JOINER " } { "#text" = " " } { "int" { "#text" = "0x200E" } } { "#text" = " " } { "#comment" = " LEFT-TO-RIGHT MARK " } { "#text" = " " } { "int" { "#text" = "0x200F" } } { "#text" = " " } { "#comment" = " RIGHT-TO-LEFT MARK " } { "#text" = " " } { "int" { "#text" = "0x2028" } } { "#text" = " " } { "#comment" = " LINE SEPARATOR " } { "#text" = " " } { "int" { "#text" = "0x2029" } } { "#text" = " " } { "#comment" = " PARAGRAPH SEPARATOR " } { "#text" = " " } { "int" { "#text" = "0x202A" } } { "#text" = " " } { "#comment" = " LEFT-TO-RIGHT EMBEDDING " } { "#text" = " " } { "int" { "#text" = "0x202B" } } { "#text" = " " } { "#comment" = " RIGHT-TO-LEFT EMBEDDING " } { "#text" = " " } { "int" { "#text" = "0x202C" } } { "#text" = " " } { "#comment" = " POP DIRECTIONAL FORMATTING " } { "#text" = " " } { "int" { "#text" = "0x202D" } } { "#text" = " " } { "#comment" = " LEFT-TO-RIGHT OVERRIDE " } { "#text" = " " } { "int" { "#text" = "0x202E" } } { "#text" = " " } { "#comment" = " RIGHT-TO-LEFT OVERRIDE " } { "#text" = " " } { "int" { "#text" = "0x202F" } } { "#text" = " " } { "#comment" = " NARROW NO-BREAK SPACE " } { "#text" = " " } { "int" { "#text" = "0x205F" } } { "#text" = " " } { "#comment" = " MEDIUM MATHEMATICAL SPACE " } { "#text" = " " } { "int" { "#text" = "0x2060" } } { "#text" = " " } { "#comment" = " WORD JOINER " } { "#text" = " " } { "int" { "#text" = "0x2061" } } { "#text" = " " } { "#comment" = " FUNCTION APPLICATION " } { "#text" = " " } { "int" { "#text" = "0x2062" } } { "#text" = " " } { "#comment" = " INVISIBLE TIMES " } { "#text" = " " } { "int" { "#text" = "0x2063" } } { "#text" = " " } { "#comment" = " INVISIBLE SEPARATOR " } { "#text" = " " } { "int" { "#text" = "0x206A" } } { "#text" = " " } { "#comment" = " INHIBIT SYMMETRIC SWAPPING " } { "#text" = " " } { "int" { "#text" = "0x206B" } } { "#text" = " " } { "#comment" = " ACTIVATE SYMMETRIC SWAPPING " } { "#text" = " " } { "int" { "#text" = "0x206C" } } { "#text" = " " } { "#comment" = " INHIBIT ARABIC FORM SHAPING " } { "#text" = " " } { "int" { "#text" = "0x206D" } } { "#text" = " " } { "#comment" = " ACTIVATE ARABIC FORM SHAPING " } { "#text" = " " } { "int" { "#text" = "0x206E" } } { "#text" = " " } { "#comment" = " NATIONAL DIGIT SHAPES " } { "#text" = " " } { "int" { "#text" = "0x206F" } } { "#text" = " " } { "#comment" = " NOMINAL DIGIT SHAPES " } { "#text" = " " } { "int" { "#text" = "0x2800" } } { "#text" = " " } { "#comment" = " BRAILLE PATTERN BLANK " } { "#text" = " " } { "int" { "#text" = "0x3000" } } { "#text" = " " } { "#comment" = " IDEOGRAPHIC SPACE " } { "#text" = " " } { "int" { "#text" = "0x3164" } } { "#text" = " " } { "#comment" = " HANGUL FILLER " } { "#text" = " " } { "int" { "#text" = "0xFEFF" } } { "#text" = " " } { "#comment" = " ZERO WIDTH NO-BREAK SPACE " } { "#text" = " " } { "int" { "#text" = "0xFFA0" } } { "#text" = " " } { "#comment" = " HALFWIDTH HANGUL FILLER " } { "#text" = " " } { "int" { "#text" = "0xFFF9" } } { "#text" = " " } { "#comment" = " INTERLINEAR ANNOTATION ANCHOR " } { "#text" = " " } { "int" { "#text" = "0xFFFA" } } { "#text" = " " } { "#comment" = " INTERLINEAR ANNOTATION SEPARATOR " } { "#text" = " " } { "int" { "#text" = "0xFFFB" } } { "#text" = " " } { "#comment" = " INTERLINEAR ANNOTATION TERMINATOR " } { "#text" = " " } } { "#comment" = " Rescan configuration every 30 seconds when FcFontSetList is called " } { "#text" = " " } { "rescan" { "#text" = " " } { "int" { "#text" = "30" } } { "#text" = " " } } { "#text" = " " } } { "#text" = " " } }

> test Fuse.lns get conf = { "#comment" = "Set the maximum number of FUSE mounts allowed to non-root users." } { "mount_max" = "1000" } { } { "#comment" = "Allow non-root users to specify the 'allow_other' or 'allow_root'" } { "user_allow_other" }

> test GtkBookmarks.lns get "ftp://user@myftp.com/somedir\n" = { "bookmark" = "ftp://user@myftp.com/somedir" }

Test without label

> test Inputrc.lns get conf = { "#comment" = "/etc/inputrc - global inputrc for libreadline" } { "#comment" = "See readline(3readline) and `info rluserman' for more information." } { } { "#comment" = "Be 8 bit clean." } { "input-meta" = "on" } { "output-meta" = "on" } { } { "#comment" = "To allow the use of 8bit-characters like the german umlauts, uncomment" } { "#comment" = "the line below. However this makes the meta key not work as a meta key," } { "#comment" = "which is annoying to those which don't need to type in 8-bit characters." } { } { "#comment" = "set convert-meta off" } { } { "#comment" = "try to enable the application keypad when it is called. Some systems" } { "#comment" = "need this to enable the arrow keys." } { "#comment" = "set enable-keypad on" } { } { "#comment" = "see /usr/share/doc/bash/inputrc.arrows for other codes of arrow keys" } { } { "#comment" = "do not bell on tab-completion" } { "#comment" = "set bell-style none" } { "#comment" = "set bell-style visible" } { } { "#comment" = "some defaults / modifications for the emacs mode" }

> test Iscsid.lns get conf = { "#comment" = "###############" } { "#comment" = "iSNS settings" } { "#comment" = "###############" } { "#comment" = "Address of iSNS server" } { "isns.address" = "127.0.0.1" } { "isns.port" = "3260" } { } { "#comment" = "*************" } { "#comment" = "CHAP Settings" } { "#comment" = "*************" } { } { "#comment" = "To enable CHAP authentication set node.session.auth.authmethod" } { "#comment" = "to CHAP. The default is None." } { "node.session.auth.authmethod" = "CHAP" } { } { "#comment" = "To set a CHAP username and password for initiator" } { "#comment" = "authentication by the target(s), uncomment the following lines:" } { "node.session.auth.username" = "someuser1" } { "node.session.auth.password" = "somep$31#$^&7!" } { } { "#comment" = "To enable CHAP authentication for a discovery session to the target" } { "#comment" = "set discovery.sendtargets.auth.authmethod to CHAP. The default is None." } { "discovery.sendtargets.auth.authmethod" = "CHAP" } { } { "#comment" = "To set a discovery session CHAP username and password for the initiator" } { "#comment" = "authentication by the target(s), uncomment the following lines:" } { "discovery.sendtargets.auth.username" = "someuser3" }

Test the full conf
Get test against tree structure
Get test against tree structure
Get test against tree structure

> test Kdump.lns get conf = { "#comment" = "this is a comment" } { "#comment" = "another commented line" } { } { "#comment" = "comment after empty line" } { } { "#comment" = "comment after empty comment" } { "path" = "/var/crash" { "#comment" = "comment after entry" } } { "core_collector" = "makedumpfile -c" } { "default" = "poweroff" } { "raw" = "/dev/sda5" } { "ext3" = "/dev/sda3" } { "net" = "my.server.com:/export/tmp" } { "nfs" = "my.server.com:/export/tmp" } { "net" = "user@my.server.com" } { "ssh" = "user@my.server.com" } { "link_delay" = "60" } { "kdump_pre" = "/var/crash/scripts/kdump-pre.sh" } { "kdump_post" = "/var/crash/scripts/kdump-post.sh" } { "#comment" = "extra_bins /usr/bin/lftp /a/b/c" } { "extra_bins" { "1" = "/usr/bin/lftp" } { "2" = "/a/b/c" } { "#comment" = "comment" } } { "disk_timeout" = "30" } { "extra_modules" { "1" = "gfs2" } { "2" = "extra" } { "3" = "modules" } { "4" = "more" } } { "options" { "babla" { "labl" } { "kbak" } { "df" = "dfg" } } } { "options" { "babla" { "labl" } { "kbak" } { "df" = "dfg" } } } { "options" { "babla" { "labl" } { "kbak" } { "df" = "dfg" } } { "#comment" = "comment" } } { "sshkey" = "/root/.ssh/kdump_id_rsa" } { "force_rebuild" = "1" } { "override_resettable" = "1" } { "dracut_args" = "--omit-drivers \"cfg80211 snd\" --add-drivers \"ext2 ext3\"" } { "fence_kdump_args" = "-p 7410 -f auto" } { "fence_kdump_nodes" { "1" = "192.168.1.10" } { "2" = "10.34.63.155" } } { "debug_mem_level" = "3" } { "blacklist" { "1" = "gfs2" } }

Check whole config file

> test Keepalived.lns get conf = { "#comment" = "This is a comment" } { "#comment" = "Configuration File for keepalived" } {} { "global_defs" { "#comment" = "this is who emails will go to on alerts" } { "notification_email" { "email" = "admins@example.com" } { "email" = "fakepager@example.com" } { "#comment" = "add a few more email addresses here if you would like" } } { "notification_email_from" = "admins@example.com" } { } { "smtp_server" = "127.0.0.1" { "#comment" = "I use the local machine to relay mail" } } { "smtp_connect_timeout" = "30" } {} { "#comment" = "each load balancer should have a different ID" } { "#comment" = "this will be used in SMTP alerts, so you should make" } { "#comment" = "each router easily identifiable" } { "lvs_id" = "LVS_EXAMPLE_01" } {} { "vrrp_mcast_group4" = "224.0.0.18" } { "vrrp_mcast_group6" = "ff02::12" } } {} { "vrrp_sync_group" = "VG1" { "group" { "inside_network" { "#comment" = "name of vrrp_instance (below)" } } { "outside_network" { "#comment" = "One for each moveable IP." } } } { "notify" = "/usr/bin/foo" } { "notify_master" = "/usr/bin/foo" } { "smtp_alert" } } {}

Test the full conf

> test Known_Hosts.lns get "# A comment foo.example.com,foo ecdsa-sha2-nistp256 AAABBBDKDFX= bar.example.com,bar ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN9NJSjDZh4+K6WBS16iX7ZndnwbGsaEbLwHlCEhZmef |1|FhUqf1kMlRWNfK6InQSAmXiNiSY=|jwbKFwD4ipl6D0k6OoshmW7xOao= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIvNOU8OedkWalFmoFcJWP3nasnCLx6M78F9y0rzTQtplggNd0dvR0A4SQOBfHInmk5dH6YGGcpT3PM3cJBR7rI=\n" = { "#comment" = "A comment" } { "1" = "foo.example.com" { "alias" = "foo" } { "type" = "ecdsa-sha2-nistp256" } { "key" = "AAABBBDKDFX=" } } { "2" = "bar.example.com" { "alias" = "bar" } { "type" = "ssh-ed25519" } { "key" = "AAAAC3NzaC1lZDI1NTE5AAAAIN9NJSjDZh4+K6WBS16iX7ZndnwbGsaEbLwHlCEhZmef" } } { "3" = "|1|FhUqf1kMlRWNfK6InQSAmXiNiSY=|jwbKFwD4ipl6D0k6OoshmW7xOao=" { "type" = "ecdsa-sha2-nistp256" } { "key" = "AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIvNOU8OedkWalFmoFcJWP3nasnCLx6M78F9y0rzTQtplggNd0dvR0A4SQOBfHInmk5dH6YGGcpT3PM3cJBR7rI=" } }

Simple get test

> test Ldso.lns get conf = { "include" = "/etc/ld.so.conf.d/*.conf" } { } { "#comment" = "libc default configuration" } { "path" = "/usr/local/lib" } { } { "hwcap" { "bit" = "1" } { "name" = "nosegneg" } }

> test LVM.lns get conf = { "#comment" = "Generated by LVM2: date" } {} { "contents" { "str" = "Text Format Volume Group" } } { "version" { "int" = "1" } } {} { "description" { "str" = "Created *after* executing 'eek'" } } {} { "creation_host" { "str" = "eek" } { "#comment" = "Linux eek" } } { "creation_time" { "int" = "6666666666" } { "#comment" = "eeeek" } } {} { "VG1" { "dict" { "id" { "str" = "uuid-uuid-uuid-uuid" } } { "seqno" { "int" = "2" } } { "status" { "list" { "1" { "str" = "RESIZEABLE" } } { "2" { "str" = "READ" } } { "3" { "str" = "WRITE" } } } } { "extent_size" { "int" = "8192" } { "#comment" = "4 Megabytes" } } { "max_lv" { "int" = "0" } } { "max_pv" { "int" = "0" } } { "process_priority" { "int" = "-18" } } {} { "physical_volumes" { "dict" { "pv0" { "dict" { "id" { "str" = "uuid-uuid-uuid-uuid" } } { "device" { "str" = "/dev/sda6" } { "#comment" = "Hint only" } } {} { "status" { "list" { "1" { "str" = "ALLOCATABLE" } } } } { "pe_start" { "int" = "123" } } { "pe_count" { "int" = "123456" } { "#comment" = "many Gigabytes" } } } } } } {} { "logical_volumes" { "dict" { "LogicalEek" { "dict" { "id" { "str" = "uuid-uuid-uuid-uuid" } } { "status" { "list" { "1" { "str" = "READ" } } { "2" { "str" = "WRITE" } } { "3" { "str" = "VISIBLE" } } } } { "segment_count" { "int" = "1" } } {} { "segment1" { "dict" { "start_extent" { "int" = "0" } } { "extent_count" { "int" = "123456" } { "#comment" = "beaucoup Gigabytes" } } {} { "type" { "str" = "striped" } } { "stripe_count" { "int" = "1" } { "#comment" = "linear" } } {} { "stripes" { "list" { "1" { "str" = "pv0" } } { "2" { "int" = "0" } } } } } } } } } } } }

Test the full conf

> test MongoDBServer.lns get conf = { "port" = "27017" } { "fork" = "true" } { "pidfilepath" = "/var/run/mongodb/mongodb.pid" } { "logpath" = "/var/log/mongodb/mongodb.log" } { "dbpath" = "/var/lib/mongodb" } { "journal" = "true" } { "nohttpinterface" = "true" }

> test NetworkManager.lns get conf = { "connection" { "id" = "wifoobar" } { "uuid" = "16fa8830-cf15-4523-8c1f-c6c635246855" } { "permissions" = "user:foo:;" } { "type" = "802-11-wireless" } { } } { "802-11-wireless" { "ssid" = "wifoobar" } { "mode" = "infrastructure" } { "mac-address" = "11:00:99:33:33:AA" } { "security" = "802-11-wireless-security" } { } } { "802-11-wireless-security" { "key-mgmt" = "none" } { "wep-key0" = "123abc123abc" } { } } { "ipv4" { "method" = "auto" } { } } { "ipv6" { "method" = "auto" } { } } { "vpn" { "NAT Traversal Mode" = "natt" } { "DPD idle timeout (our side)" = "0" } }

> test OpenShift_Config.lns get conf = { "CLOUD_DOMAIN" = "example.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" }

Get test against tree structure

> test OpenShift_Quickstarts.lns get conf = { "array" { } { "dict" { "entry" = "quickstart" { "dict" { } { "entry" = "id" { "string" = "1" } } { } { "entry" = "name" { "string" = "CakePHP" } } { } { "entry" = "website" { "string" = "http://cakephp.org/" } } { } { "entry" = "initial_git_url" { "string" = "git://github.com/openshift/cakephp-example.git" } } { } { "entry" = "cartridges" { "array" { "string" = "php-5.4" } { "string" = "mysql-5.1" } } } { } { "entry" = "summary" { "string" = "CakePHP is a rapid development framework for PHP which uses commonly known design patterns like Active Record, Association Data Mapping, Front Controller and MVC." } } { } { "entry" = "tags" { "array" { "string" = "php" } { "string" = "cakephp" } { "string" = "framework" } } } { } { "entry" = "admin_tags" { "array" } } } } } { } { "dict" { "entry" = "quickstart" { "dict" { } { "entry" = "id" { "string" = "2" } } { } { "entry" = "name" { "string" = "Django" } } { } { "entry" = "website" { "string" = "https://www.djangoproject.com/" } } { } { "entry" = "initial_git_url" { "string" = "git://github.com/openshift/django-example.git" } } { } { "entry" = "cartridges" { "array" { "string" = "python-2.7" } } } { } { "entry" = "summary" { "string" = "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." } } { } { "entry" = "tags" { "array" { "string" = "python" } { "string" = "django" } { "string" = "framework" } } } { } { "entry" = "admin_tags" { "array" } } } } } { } { "dict" { "entry" = "quickstart" { "dict" { } { "entry" = "id" { "string" = "4" } } { } { "entry" = "name" { "string" = "Drupal" } } { } { "entry" = "website" { "string" = "http://drupal.org/" } } { } { "entry" = "initial_git_url" { "string" = "git://github.com/openshift/drupal-example.git" } } { } { "entry" = "cartridges" { "array" { "string" = "php-5.4" } { "string" = "mysql-5.1" } } } { } { "entry" = "summary" { "string" = "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." } } { } { "entry" = "tags" { "array" { "string" = "php" } { "string" = "drupal" } { "string" = "wiki" } { "string" = "framework" } { "string" = "instant_app" } } } { } { "entry" = "admin_tags" { "array" } } } } } { } { "dict" { "entry" = "quickstart" { "dict" { } { "entry" = "id" { "string" = "6" } } { } { "entry" = "name" { "string" = "Ruby on Rails" } } { } { "entry" = "website" { "string" = "http://rubyonrails.org/" } } { } { "entry" = "initial_git_url" { "string" = "git://github.com/openshift/rails-example.git" } } { } { "entry" = "cartridges" { "array" { "string" = "ruby-1.9" } { "string" = "mysql-5.1" } } } { } { "entry" = "summary" { "string" = "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." } } { } { "entry" = "tags" { "array" { "string" = "ruby" } { "string" = "rails" } { "string" = "framework" } } } { } { "entry" = "admin_tags" { "array" } } } } } { } { "dict" { "entry" = "quickstart" { "dict" { } { "entry" = "id" { "string" = "8" } } { } { "entry" = "name" { "string" = "WordPress" } } { } { "entry" = "website" { "string" = "http://wordpress.org" } } { } { "entry" = "initial_git_url" { "string" = "git://github.com/openshift/wordpress-example.git" } } { } { "entry" = "cartridges" { "array" { "string" = "php-5.4" } { "string" = "mysql-5.1" } } } { } { "entry" = "summary" { "string" = "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." } } { } { "entry" = "tags" { "array" { "string" = "php" } { "string" = "wordpress" } { "string" = "blog" } { "string" = "framework" } { "string" = "instant_app" } } } { } { "entry" = "admin_tags" { "array" } } } } { } } }

> test Postfix_Passwordmap.lns get conf = { "#comment" = "comment" } { "pattern" = "*" { "username" = "username" } { "password" = "password" } } { "pattern" = "[mail.isp.example]" { "username" = "username" } { "password" = "password" } } { "pattern" = "[mail.isp.example]:submission" { "username" = "username" } { "password" = "password" } } { "pattern" = "[mail.isp.example]:587" { "username" = "username" } { "password" = "password" } } { "pattern" = "mail.isp.example" { "username" = "username" } { "password" = "password" } } { "pattern" = "user@mail.isp.example" { "username" = "username" } { "password" } } { "pattern" = "mail.isp.example" { "username" = "username2" } { "password" = "password2" } }

> test Postfix_Transport.lns get conf = { "#comment" = "a comment" } { "pattern" = "the.backed-up.domain.tld" { "transport" = "relay" } { "nexthop" = "[their.mail.host.tld]" } } { "pattern" = ".my.domain" { "transport" } { "nexthop" } } { "pattern" = "*" { "transport" = "smtp" } { "nexthop" = "outbound-relay.my.domain" } } { "pattern" = "example.com" { "transport" = "uucp" } { "nexthop" = "example" } } { "pattern" = "example.com" { "transport" = "slow" } { "nexthop" } } { "pattern" = "example.com" { "transport" } { "nexthop" = "[gateway.example.com]" } } { "pattern" = "user.foo@example.com" { "transport" = "smtp" } { "nexthop" = "bar.example:2025" } } { "pattern" = ".example.com" { "transport" = "error" } { "nexthop" = "mail for *.example.com is not deliverable" } }

> test Postfix_Virtual.lns get conf = { "#comment" = "a comment" } { "pattern" = "virtual-alias.domain" { "destination" = "anything" } } { "pattern" = "postmaster@virtual-alias.domain" { "destination" = "postmaster" } } { "pattern" = "user1@virtual-alias.domain" { "destination" = "address1" } } { "pattern" = "user2@virtual-alias.domain" { "destination" = "address2" } { "destination" = "address3" } } { "pattern" = "root" { "destination" = "robert.oot@domain.com" } } { "pattern" = "@example.net" { "destination" = "root" } { "destination" = "postmaster" } } { "pattern" = "postmaster" { "destination" = "mtaadmin+root=mta1" } } { "pattern" = "some_user" { "destination" = "localuser" } }

> test Postgresql.lns get conf = { "data_directory" = "/var/lib/postgresql/8.4/main" { "#comment" = "use data in another directory" } } { "hba_file" = "/etc/postgresql/8.4/main/pg_hba.conf" { "#comment" = "host-based authentication file" } } { "ident_file" = "/etc/postgresql/8.4/main/pg_ident.conf" { "#comment" = "ident configuration file" } } { } { "#comment" = "If external_pid_file is not explicitly set, no extra PID file is written." } { "external_pid_file" = "/var/run/postgresql/8.4-main.pid" { "#comment" = "write an extra PID file" } } { "listen_addresses" = "localhost" { "#comment" = "what IP address(es) to listen on;" } } { "port" = "5432" { "#comment" = "(change requires restart)" } } { "max_connections" = "100" { "#comment" = "(change requires restart)" } } { "superuser_reserved_connections" = "3" { "#comment" = "(change requires restart)" } } { "unix_socket_directory" = "/var/run/postgresql" { "#comment" = "(change requires restart)" } } { "unix_socket_group" = "" { "#comment" = "(change requires restart)" } } { "unix_socket_permissions" = "0777" { "#comment" = "begin with 0 to use octal notation" } } { "#comment" = "(change requires restart)" } { "bonjour_name" = "" { "#comment" = "defaults to the computer name" } } { } { "authentication_timeout" = "1min" { "#comment" = "1s-600s" } } { "ssl" = "true" { "#comment" = "(change requires restart)" } } { "ssl_ciphers" = "ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH" { "#comment" = "allowed SSL ciphers" } } { "ssl_renegotiation_limit" = "512MB" { "#comment" = "amount of data between renegotiations" } } { "password_encryption" = "on" } { "db_user_namespace" = "off" } { } { "search_path" = "\"$user\",public" { "#comment" = "schema names" } } { "default_tablespace" = "" { "#comment" = "a tablespace name, '' uses the default" } } { "temp_tablespaces" = "" { "#comment" = "a list of tablespace names, '' uses" } } { } { "datestyle" = "iso, mdy" } { "intervalstyle" = "postgres" } { "timezone" = "unknown" { "#comment" = "actually, defaults to TZ environment" } }

> test Protocols.lns get conf = { "#comment" = "Internet (IP) protocols" } { } { "1" { "protocol" = "ip" } { "number" = "0" } { "alias" = "IP" } { "#comment" = "internet protocol, pseudo protocol number" } } { "#comment" = "hopopt 0 HOPOPT # IPv6 Hop-by-Hop Option [RFC1883]" } { "2" { "protocol" = "icmp" } { "number" = "1" } { "alias" = "ICMP" } { "#comment" = "internet control message protocol" } } { "3" { "protocol" = "igmp" } { "number" = "2" } { "alias" = "IGMP" } { "#comment" = "Internet Group Management" } } { "4" { "protocol" = "tp++" } { "number" = "39" } { "alias" = "TP++" } { "#comment" = "TP++ Transport Protocol" } } { "5" { "protocol" = "a/n" } { "number" = "107" } { "alias" = "A/N" } { "#comment" = "Active Networks" } }

> test Puppet_Auth.lns get full = { "path" = "^/file_(metadata|content)/user_files/" { "operator" = "~" } { "#comment" = "Set environments" } { "environment" { "1" = "production" } { "2" = "development" } } { "environment" { "3" = "foo" } } { "method" { "1" = "find" } { "2" = "search" } } { "auth" = "yes" } { "method" { "3" = "save" } } { "allow" { "1" = "/^(.+\.)?example.com$/" } } { "allow_ip" { "1" = "192.168.100.0/24" } { "#comment" = "Added in Puppet 3.0.0" } } { "#comment" = "This overrides the previous auth" } { "auth" = "any" } }

> test Puppetfile.lns get "forge \"https://forgeapi.puppetlabs.com\" # the default forge mod 'puppetlabs-razor' mod 'puppetlabs-ntp', \"0.0.3\" mod 'puppetlabs-apt', :git => \"git://github.com/puppetlabs/puppetlabs-apt.git\" mod 'puppetlabs-stdlib', :git => \"git://github.com/puppetlabs/puppetlabs-stdlib.git\" mod 'puppetlabs-apache', '0.6.0', :github_tarball => 'puppetlabs/puppetlabs-apache' metadata # we want metadata\n" = { "forge" = "https://forgeapi.puppetlabs.com" { "#comment" = "the default forge" } } { } { "1" = "puppetlabs-razor" } { "2" = "puppetlabs-ntp" { "@version" = "0.0.3" } } { } { "3" = "puppetlabs-apt" { "git" = "git://github.com/puppetlabs/puppetlabs-apt.git" } } { } { "4" = "puppetlabs-stdlib" { "git" = "git://github.com/puppetlabs/puppetlabs-stdlib.git" } } { } { "5" = "puppetlabs-apache" { "@version" = "0.6.0" } { "github_tarball" = "puppetlabs/puppetlabs-apache" } } { } { "metadata" { "#comment" = "we want metadata" } }

> test Qpid.lns get qpidd = { "#comment" = "Configuration file for qpidd. Entries are of the form:" } { "#comment" = "name=value" } { } { "#comment" = "(Note: no spaces on either side of '='). Using default settings:" } { "#comment" = "\"qpidd --help\" or \"man qpidd\" for more details." } { "cluster-mechanism" = "ANONYMOUS" } { "auth" = "no" } { "max-connections" = "22000" } { "syslog-name" = "qpidd1" }

> test Rabbitmq.lns get " % A standard configuration [ {rabbit, [ {ssl_listeners, [5671]}, {ssl_options, [{cacertfile,\"/path/to/testca/cacert.pem\"}, {certfile,\"/path/to/server/cert.pem\"}, {keyfile,\"/path/to/server/key.pem\"}, {verify,verify_peer}, {fail_if_no_peer_cert,false}]} ]} ]. % EOF\n" = { } { "#comment" = "A standard configuration" } { "rabbit" { "ssl_listeners" { "value" = "5671" } } { "ssl_options" { "cacertfile" = "/path/to/testca/cacert.pem" } { "certfile" = "/path/to/server/cert.pem" } { "keyfile" = "/path/to/server/key.pem" } { "verify" = "verify_peer" } { "fail_if_no_peer_cert" = "false" } } } { "#comment" = "EOF" }

Top-level test

> test Redis.lns get "notify-keyspace-events \"\"\n" = { "notify-keyspace-events" = "" }

Empty value (GH issue #115)

> test Reprepro_Uploaders.lns get conf = { "#comment" = "ftpmaster" } { "allow" = "*" { "by" = "key" { "key" = "74BF771E" } } } { } { "allow" { "and" { "or" = "sections" { "or" = "desktop/*" } } } { "by" = "anybody" } } { "allow" { "and" { "or" = "sections" { "or" = "gforge/*" } } } { "and" { "or" = "binaries" { "contain" } { "or" = "bzr" } } { "or" = "source" { "not" } { "or" = "*melanie*" } { "or" = "katya" } } } { "by" = "key" { "key" = "any" } } }

Testing the full conf against Reprepro_Uploaders.lns

> test Rsyslog.lns get conf = { "#comment" = "rsyslog v5 configuration file" } { } { "$ModLoad" = "imuxsock" { "#comment" = "provides support for local system logging (e.g. via logger command)" } } { "$ModLoad" = "imklog" { "#comment" = "provides kernel logging support (previously done by rklogd)" } } { "module" { "load" = "immark" } { "markmessageperiod" = "60" } { "fakeoption" = "bar" } { "#comment" = "provides --MARK-- message capability" } } { } { "timezone" { "id" = "CET" } { "offset" = "+01:00" } } { } { "$UDPServerRun" = "514" } { "$InputTCPServerRun" = "514" } { "$ActionFileDefaultTemplate" = "RSYSLOG_TraditionalFileFormat" } { "$ActionFileEnableSync" = "on" } { "$IncludeConfig" = "/etc/rsyslog.d/*.conf" } { } { "entry" { "selector" { "facility" = "*" } { "level" = "info" } } { "selector" { "facility" = "mail" } { "level" = "none" } } { "selector" { "facility" = "authpriv" } { "level" = "none" } } { "selector" { "facility" = "cron" } { "level" = "none" } } { "action" { "file" = "/var/log/messages" } } } { "entry" { "selector" { "facility" = "authpriv" } { "level" = "*" } } { "action" { "file" = "/var/log/secure" } } } { "entry" { "selector" { "facility" = "*" } { "level" = "emerg" } } { "action" { "user" = "*" } } } { "entry" { "selector" { "facility" = "*" } { "level" = "*" } } { "action" { "protocol" = "@" } { "hostname" = "2.7.4.1" } } } { "entry" { "selector" { "facility" = "*" } { "level" = "*" } } { "action" { "protocol" = "@@" } { "hostname" = "2.7.4.1" } } } { "entry" { "selector" { "facility" = "*" } { "level" = "emerg" } } { "action" { "omusrmsg" = "*" } } } { "entry" { "selector" { "facility" = "*" } { "level" = "emerg" } } { "action" { "omusrmsg" = "foo" } { "omusrmsg" = "bar" } } } { "entry" { "selector" { "facility" = "*" } { "level" = "emerg" } } { "action" { "pipe" = "/dev/xconsole" } } }

> test Semanage.lns get phony_conf = { "#comment" = "this is a comment" } { } { "mykey" = "myvalue" { "#comment" = "eol comment" } } { "anotherkey" = "another value" }

> test Simplelines.lns get conf = { "#comment" = "This is a comment" } { } { "1" = "word" } { "2" = "a line" } { "3" = "indented line" } { "4" = "with $péci@l cH@r2ct3rs" }

> test Simplevars.lns get conf = { "#comment" = "this is a comment" } { } { "mykey" = "myvalue" { "#comment" = "eol comment" } } { "anotherkey" = "another value" }

> test Ssh.lns get "Proxycommand ssh -q

Proxycommand is case-insensitive

> test Sshd.lns put match_blocks after set "Match[1]/Settings/PermitRootLogin" "yes"; set "Match[1]/Settings/#comment" "a comment" = "X11Forwarding yes Match User sarko Group pres.* Banner /etc/bienvenue.txt X11Forwarding no PermitRootLogin yes # a comment Match User bush Group pres.* Host white.house.* Banner /etc/welcome.txt\n"

Indent when adding to a Match group

> test Subversion.lns get conf = { "#comment" = "This file configures various client-side behaviors." } { "auth" { "password-stores" { "1" = "gnome-keyring" } { "2" = "kwallet" } } { "store-passwords" = "no" } { "store-auth-creds" = "no" } { } } { "helpers" { "editor-cmd" = "/usr/bin/vim" } { "diff-cmd" = "/usr/bin/diff" } { "diff3-cmd" = "/usr/bin/diff3" } { "diff3-has-program-arg" = "yes" } { } } { "tunnels" { "ssh" = "$SVN_SSH ssh -o ControlMaster=no" } { "rsh" = "/path/to/rsh -l myusername" } { } } { "miscellany" { "global-ignores" { "1" = "*.o" } { "2" = "*.lo" } { "3" = "*.la" } { "4" = "*.al" } { "5" = ".libs" } { "6" = "*.so" } { "7" = "*.so.[0-9]*" } { "8" = "*.a" } { "9" = "*.pyc" } { "10" = "*.pyo" } { "11" = "*.rej" } { "12" = "*~" } { "13" = "#*#" } { "14" = ".#*" } { "15" = ".*.swp" } { "16" = ".DS_Store" } } { "#comment" = "Set log-encoding to the default encoding for log messages" } { "log-encoding" = "latin1" } { "use-commit-times" = "yes" } { "no-unlock" = "yes" } { "mime-types-file" = "/path/to/mime.types" } { "preserved-conflict-file-exts" { "1" = "doc" } { "2" = "ppt" } { "3" = "xls" } { "4" = "od?" } } { "enable-auto-props" = "yes" } { "interactive-conflicts" = "no" } { } } { "auto-props" { "*.c" = "svn:eol-style=native" } { "*.cpp" = "svn:eol-style=native" } { "*.h" = "svn:eol-style=native" } { "*.dsp" = "svn:eol-style=CRLF" } { "*.dsw" = "svn:eol-style=CRLF" } { "*.sh" = "svn:eol-style=native;svn:executable" } { "*.txt" = "svn:eol-style=native" } { "*.png" = "svn:mime-type=image/png" } { "*.jpg" = "svn:mime-type=image/jpeg" } { "Makefile" = "svn:eol-style=native" } }

> test Sysconfig_Route.lns get "10.40.11.102/32 via 10.40.8.1\n10.1.8.0/24 via 10.40.8.254\n" = { "10.40.8.1" = "10.40.11.102/32" } { "10.40.8.254" = "10.1.8.0/24" }

> test Sysctl.lns get default_sysctl = { "#comment" = "Kernel sysctl configuration file" } { "#comment" = "Controls IP packet forwarding"} { "net.ipv4.ip_forward" = "0" } { } { "net.ipv4.conf.default.rp_filter" = "1" } { "net.ipv4.conf.default.accept_source_route" = "0" } { "kernel.sysrq" = "0" } { } { "#comment" = "Semicolon comments are also allowed" } { "net.ipv4.tcp_mem" = "393216 524288 786432" }

> test Systemd.lns get desc = { "Unit" { "Description" { "value" = "RPC" } } { "Description" { "value" = "RPC bind service" } } { "Description" { "value" = "RPC bind\ service" } } { "Description" { "value" = "Resets System Activity Logs" } } }

> test Up2date.lns get conf = { "#comment" = "Red Hat Update Agent config file." } { "#comment" = "Format: 1.0" } { } { "1" = "debug[comment]" { "value" = "Whether or not debugging is enabled" } } { "2" = "debug" { "value" = "0" } } { } { "3" = "systemIdPath[comment]" { "value" = "Location of system id" } } { "4" = "systemIdPath" { "value" = "/etc/sysconfig/rhn/systemid" } } { } { "5" = "serverURL[comment]" { "value" = "Remote server URL (use FQDN)" } } { "#comment" = "serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC" } { "6" = "serverURL" { "value" = "https://enter.your.server.url.here/XMLRPC" } } { } { "7" = "hostedWhitelist[comment]" { "value" = "RHN Hosted URL's" } } { "8" = "hostedWhitelist" } { } { "9" = "enableProxy[comment]" { "value" = "Use a HTTP Proxy" } } { "10" = "enableProxy" { "value" = "0" } } { } { "11" = "versionOverride[comment]" { "value" = "Override the automatically determined system version" } } { "12" = "versionOverride" } { } { "13" = "httpProxy[comment]" { "value" = "HTTP proxy in host:port format, e.g. squid.redhat.com:3128" } } { "14" = "httpProxy" } { } { "15" = "noReboot[comment]" { "value" = "Disable the reboot actions" } } { "16" = "noReboot" { "value" = "0" } } { } { "17" = "networkRetries[comment]" { "value" = "Number of attempts to make at network connections before giving up" } } { "18" = "networkRetries" { "value" = "1" } } { } { "19" = "disallowConfChanges[comment]" { "value" = "Config options that can not be overwritten by a config update action" } } { "20" = "disallowConfChanges" { "values" { "1" = "noReboot" } { "2" = "sslCACert" } { "3" = "useNoSSLForPackages" } { "4" = "noSSLServerURL" } { "5" = "serverURL" } { "6" = "disallowConfChanges" } } } { } { "21" = "sslCACert[comment]" { "value" = "The CA cert used to verify the ssl server" } } { "22" = "sslCACert" { "value" = "/usr/share/rhn/RHNS-CA-CERT" } } { } { "#comment" = "Akamai does not support http protocol, therefore setting this option as side effect disable \"Location aware\" function" } { "23" = "useNoSSLForPackages[comment]" { "value" = "Use the noSSLServerURL for package, package list, and header fetching (disable Akamai)" } } { "24" = "useNoSSLForPackages" { "value" = "0" } } { } { "25" = "retrieveOnly[comment]" { "value" = "Retrieve packages only" } } { "26" = "retrieveOnly" { "value" = "0" } } { } { "27" = "skipNetwork[comment]" { "value" = "Skips network information in hardware profile sync during registration." } } { "28" = "skipNetwork" { "value" = "0" } } { } { "29" = "tmpDir[comment]" { "value" = "Use this Directory to place the temporary transport files" } } { "30" = "tmpDir" { "value" = "/tmp" } } { } { "31" = "writeChangesToLog[comment]" { "value" = "Log to /var/log/up2date which packages has been added and removed" } } { "32" = "writeChangesToLog" { "value" = "0" } } { } { "33" = "stagingContent[comment]" { "value" = "Retrieve content of future actions in advance" } } { "34" = "stagingContent" { "value" = "1" } } { } { "35" = "stagingContentWindow[comment]" { "value" = "How much forward we should look for future actions. In hours." } } { "36" = "stagingContentWindow" { "value" = "24" } }

> test UpdateDB.lns get "# A comment PRUNEPATHS=\"/tmp /var/spool /media /home/.ecryptfs\" PRUNEFS= \"NFS nfs nfs4 rpc_pipefs\" PRUNE_BIND_MOUNTS = \"yes\"\n" = { "#comment" = "A comment" } { "PRUNEPATHS" { "entry" = "/tmp" } { "entry" = "/var/spool" } { "entry" = "/media" } { "entry" = "/home/.ecryptfs" } } { "PRUNEFS" { "entry" = "NFS" } { "entry" = "nfs" } { "entry" = "nfs4" } { "entry" = "rpc_pipefs" } } { "PRUNE_BIND_MOUNTS" = "yes" }

Simple get test

> test VMware_Config.lns get conf = { "libdir" = "/usr/lib/vmware" } { "dhcpd.fullpath" = "/usr/bin/vmnet-dhcpd" } { "authd.fullpath" = "/usr/sbin/vmware-authd" } { "authd.client.port" = "902" } { "loop.fullpath" = "/usr/bin/vmware-loop" } { "vmware.fullpath" = "/usr/bin/vmware" } { "control.fullpath" = "/usr/bin/vmware-cmd" } { "serverd.fullpath" = "/usr/sbin/vmware-serverd" } { "wizard.fullpath" = "/usr/bin/vmware-wizard" } { "serverd.init.fullpath" = "/usr/lib/vmware/serverd/init.pl" } { "serverd.vpxuser" = "vpxuser" } { "serverd.snmpdconf.subagentenabled" = "TRUE" } { "template.useFlatDisks" = "TRUE" } { "autoStart.defaultStartDelay" = "60" } { "autoStart.enabled" = "True" } { "autoStart.defaultStopDelay" = "60" }

> test Xml.lns put "<a></a >" after set "/a/#text[1]" "foo"; set "/a/#text[2]" "bar" = "<a>foobar</a >"

> test Yum.lns get "\n" = { }

Check that we can parse an empty line, to fix test-save

> let lns = ( empty | comment | record ) *

The tmpfiles lens.

> test Toml.lns get "# Globals foo = \"bar\"\n" = { "#comment" = "Globals" } { "entry" = "foo" { "string" = "bar" } }

Global parameters

> test Trapperkeeper.lns get config = { } { "#comment" = "This is a comment" } { "@hash" = "webserver" { "@hash" = "bar" { "#comment" = "A comment" } { "@simple" = "host" { "@value" = "localhost" } } { "@simple" = "port" { "@value" = "9000" } } { "@simple" = "default-server" { "@value" = "true" } } } { } { "@hash" = "foo" { "@simple" = "host" { "@value" = "localhost" } } { "@simple" = "port" { "@value" = "10000" } } } } { } { "@hash" = "jruby-puppet" { "#comment" = "This setting determines where JRuby will look for gems. It is also" } { "#comment" = "used by the `puppetserver gem` command line tool." } { "@simple" = "gem-home" { "@value" = "/var/lib/puppet/jruby-gems" } } { } { "#comment" = "(optional) path to puppet conf dir; if not specified, will use the puppet default" } { "@simple" = "master-conf-dir" { "@value" = "/etc/puppet" } } { } { "#comment" = "(optional) path to puppet var dir; if not specified, will use the puppet default" } { "@simple" = "master-var-dir" { "@value" = "/var/lib/puppet" } } { } { "#comment" = "(optional) maximum number of JRuby instances to allow; defaults to <num-cpus>+2" } { "#comment" = "max-active-instances: 1" } } { } { } { "#comment" = "CA-related settings" } { "@hash" = "certificate-authority" { "#comment" = "settings for the certificate_status HTTP endpoint" } { "@hash" = "certificate-status" { "#comment" = "this setting contains a list of client certnames who are whitelisted to" } { "#comment" = "have access to the certificate_status endpoint. Any requests made to" } { "#comment" = "this endpoint that do not present a valid client cert mentioned in" } { "#comment" = "this list will be denied access." } { "@array" = "client-whitelist" } } } { } { "@hash" = "os-settings" { "@array" = "ruby-load-path" { "1" = "/usr/lib/ruby/vendor_ruby" } { "2" = "/home/foo/ruby" } } } { }

Test full config file

> let lns = (Util.empty | Util.comment | entry)*

> let lns = (Util.empty|Util.comment|list|bool)*

The UpdateDB lens

> let lns = (Util.empty | Util.comment | entry)*

> let lns = ( empty | comment | section )*

The xorg.conf lens

> let lns = ( rule | macrodefinition | include | empty | comment )*

The Xymon_Alerting lens

> let lns = ((empty|comment)* . header)? . (sequence | entry | comment | empty)*

The yaml lens

> let lns_ace = IniFile.lns record_ace comment_ace

> let lns_acf = IniFile.lns_noempty record_acf comment_acf

> let lns_ade = IniFile.lns record_ade comment_ade

> let lns_adf = IniFile.lns_noempty record_adf comment_adf

> let lns_bce = IniFile.lns record_bce comment_bce

> let lns_bcf = IniFile.lns_noempty record_bce comment_bcf

> let lns_bde = IniFile.lns record_bde comment_bde

> let lns_bdf = IniFile.lns_noempty record_bdf comment_bdf

> let lns_loose = let l_comment = comment comment_re comment_default in let l_sep = sep sep_re sep_default in let l_entry = indented_entry entry_re l_sep l_comment in let l_title = indented_title_label "section" (record_label_re - ".anon") in let l_record = record l_title l_entry in (record_anon l_entry)? . l_record*

> test IniFile.lns_loose get conf_ace = { "section" = ".anon" { "#comment" = "comment with sharp" } { } } { "section" = "section1" { "test_ace" = "value" { "#comment" = "end of line comment" } } { "test_ace" } { "test_ace" = "value with spaces" } { "#comment" = "comment with colon" } { } }

> let lns_loose_multiline = let l_comment = comment comment_re comment_default in let l_sep = sep sep_re sep_default in let l_entry = entry_multiline entry_re l_sep l_comment in let l_title = title_label "section" (record_label_re - ".anon") in let l_record = record l_title l_entry in (record_anon l_entry)? . l_record*

> test IniFile.lns_loose_multiline get conf_ace = { "section" = ".anon" { "#comment" = "comment with sharp" } { } } { "section" = "section1" { "test_ace" = "value" { "#comment" = "end of line comment" } } { "test_ace" } { "test_ace" = "value with spaces" } { "#comment" = "comment with colon" } { } }

> let lns_noempty (record:lens) (comment:lens) = comment* . record*

Generic INI File lens with no empty lines

> let lns_semicol = lns_generic ";"

A semicolon-separated value lens

> let local = [ Util.indent . key "local" . ( space . ( [ key local_flags ] | [ key local_options . space . store no_space ] ) )* . eol ]

local has specific syntax

> let local_flags = "orphan"

local options without values

> let local_options = "stratum"|"distance"

local options with values

> let log_flag_list = [ space . key log_flags ]

> let log_flags = "measurements"|"rawmeasurements"|"refclocks"|"rtc" |"statistics"|"tempcomp"|"tracking"

log has a specific options list

> let log_levels = let category = Erlang.tuple Erlang.bare Erlang.bare in Erlang.list "log_levels" category

> test Rabbitmq.log_levels get "{log_levels, [{connection, info}]}" = { "log_levels" { "tuple" { "value" = "connection" } { "value" = "info" } } }

> let log_list = [ Util.indent . key "log" . log_flag_list+ . eol ]

log has a specific options list

> let loghost = [label "protocol" . store protocol] . [ label "hostname" . store loghost_r ] . (colon . [ label "port" . store /[0-9]+/ ] )?

a loghost is an @ sign followed by the hostname and a possible port

> let loghost_r = /[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]*[a-zA-Z0-9])?)*/ | "[" . Rx.ipv6 . "]"

Matches a hostname, that is labels speparated by dots, labels can’t start or end with a “-”.

> let logic_construct_condition (kw:string) (lns:lens) = [ label kw . lns ] . [ Sep.space . key kw . Sep.space . lns ]*

A logical construction for condition and condition_list

> let logic_construct_field (kw:string) (sep:string) (lns:lens) = [ label kw . lns ] . [ Build.xchgs sep kw . lns ]*

A generic definition for condition_field
Lense for login.defs

> let logprogram = pipe . [ label "program" . store /[^ \t\n][^\n]+[^ \t\n]/ ]

a log program begins with a pipe

> let logrotate_block = let entry = [ key Rx.word ] in let filename = [ label "file" . store /\/[^,#= \n\t{}]+/ ] in let filename_sep = del /[ \t\n]+/ " " in let filenames = Build.opt_list filename filename_sep in [ label "rule" . filenames . Build.block entry ]

A minimalistic logrotate block
Parse the config file for lokkit from system-config-firewall

> let lookup = let lookup_entry = Build.flag("bind"|"file"|"yp") in Build.key_value_line_comment "lookup" Sep.space (Build.opt_list lookup_entry Sep.space) comment_eol

> let lrspace (char:string) = del (/[ \t\n]*/ . char . /[ \t\n]*/ ) char

Add spaces to the left or right of char

> let ls = Build.key_value_line "ls" space (store fspath)

ls [directory]

> let lspace (char:string) = del (/[ \t\n]*/ . char) char

Add spaces to the left of char
Parses LVM metadata.

> let lvmoption =

> let lvs_conf = virtual_server | virtual_server_group

contains subblocks of Virtual server group(s) and Virtual server(s)
Close