(* View: sto_num *)
let sto_num = store Rx.relinteger
+(* View: sto_ipv6 *)
+let sto_ipv6 = store Rx.ipv6
+
(* View: sto_to_eol *)
let sto_to_eol = store /[^#! \t\n][^#!\n]*[^#! \t\n]|[^#! \t\n]/
An IP <space> port pair *)
let ip_port = [ label "ip" . sto_word ] . sep_spc . [ label "port" . sto_num ]
-(* View: lens_block
+(* View: lens_block
A generic block with a title lens.
The definition is very similar to Build.block_newlines
but uses a different type of <comment>. *)
A simple block with just a block title *)
let block (kw:regexp) (sto:lens) = lens_block (key kw) sto
-(* View: named_block
+(* View: named_block
A block with a block title and name *)
let named_block (kw:string) (sto:lens) = lens_block (key kw . sep_spc . sto_word) sto
(* View: named_block_arg_title
A title lens for named_block_arg *)
-let named_block_arg_title (kw:string) (name:string) (arg:string) =
+let named_block_arg_title (kw:string) (name:string) (arg:string) =
key kw . sep_spc
. [ label name . sto_word ]
. sep_spc
(* View: named_block_arg
A block with a block title, a name and an argument *)
-let named_block_arg (kw:string) (name:string) (arg:string) (sto:lens) =
+let named_block_arg (kw:string) (name:string) (arg:string) (sto:lens) =
lens_block (named_block_arg_title kw name arg) sto
(* View: global_defs_field
Possible fields in the global_defs block *)
let global_defs_field =
- let word_re = "smtp_server"|"lvs_id"|"router_id"
+ let word_re = "smtp_server"|"lvs_id"|"router_id"|"vrrp_mcast_group4"
+ in let ipv6_re = "vrrp_mcast_group6"
in let num_re = "smtp_connect_timeout"
in block "notification_email" email
| field "notification_email_from" sto_email_addr
| field word_re sto_word
| field num_re sto_num
+ | field ipv6_re sto_ipv6
(* View: global_defs
A global_defs block *)
| block "static_routes" static_routes_field
-(* View: global_conf
+(* View: global_conf
A global configuration entry *)
let global_conf = global_defs | static_routes
*************************************************************************)
(*View: vrrp_sync_group_field *)
-let vrrp_sync_group_field = block "group" [ indent . key word . comment_or_eol ]
+let vrrp_sync_group_field =
+ let to_eol_re = /notify(_master|_backup|_fault|_stop|_deleted)?/
+ in let flag_re = "smtp_alert"
+ in field to_eol_re sto_to_eol
+ | flag flag_re
+ | block "group" [ indent . key word . comment_or_eol ]
(* View: vrrp_sync_group *)
let vrrp_sync_group = named_block "vrrp_sync_group" vrrp_sync_group_field
(* View: vrrp_instance_field *)
let vrrp_instance_field =
let word_re = "state" | "interface" | "lvs_sync_daemon_interface"
- in let num_re = "virtual_router_id" | "priority" | "advert_int" | "garp_master_delay"
- in let to_eol_re = /notify_(master|backup|fault)/
- in let flag_re = "smtp_alert" | "nopreempt" | "ha_suspend" | "debug"
+ in let num_re = "virtual_router_id" | "priority" | "advert_int" | /garp_master_(delay|repeat|refresh|refresh_repeat)/
+ in let to_eol_re = /notify(_master|_backup|_fault|_stop|_deleted)?/ | /(mcast|unicast)_src_ip/
+ in let flag_re = "smtp_alert" | "nopreempt" | "ha_suspend" | "debug" | "use_vmac" | "vmac_xmit_base" | "native_ipv6" | "dont_track_primary" | "preempt_delay"
in field word_re sto_word
| field num_re sto_num
| field to_eol_re sto_to_eol
)
| block "virtual_ipaddress" static_ipaddress_field
| block /track_(interface|script)/ ( flag word )
+ | block "unicast_peer" static_ipaddress_field
(* View: vrrp_instance *)
let vrrp_instance = named_block "vrrp_instance" vrrp_instance_field
(* View: vrrp_script_field *)
let vrrp_script_field =
- let num_re = "interval" | "weight"
+ let num_re = "interval" | "weight" | "fall" | "raise"
in let to_eol_re = "script"
in field to_eol_re sto_to_eol
| field num_re sto_num