Skip to content

Commit af4cccb

Browse files
committed
Merge branch 'high-availability'
2 parents eb66176 + 3973a6e commit af4cccb

File tree

3 files changed

+323
-0
lines changed

3 files changed

+323
-0
lines changed

example/mx-22.4R3-S2.11.rb

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23680,6 +23680,162 @@
2368023680
"use-actual-mac-on-physical-interfaces" /* Use Hypervisor provided MAC for physical interfaces on virtual platforms */,
2368123681
"use-active-child-mac-on-reth" /* Copy Child's physical MAC on RETH parent's current MAC */
2368223682
)
23683+
),
23684+
"high-availability" ( /* Enable High Availability mode */
23685+
c(
23686+
"hardware-upgrade" /* Enable hardware upgrade state */,
23687+
"local-id" ( /* Local Identifier */
23688+
sc(
23689+
arg,
23690+
"local-ip" ( /* Local IPv4/IPv6 address */
23691+
ipaddr /* Local IPv4/IPv6 address */
23692+
)
23693+
)
23694+
).as(:oneline),
23695+
"peer-id" arg ( /* Peer related information */
23696+
c(
23697+
"desc" arg /* Peer Description */,
23698+
"peer-ip" ( /* Peer IPv4/IPv6 address */
23699+
ipaddr /* Peer IPv4/IPv6 address */
23700+
),
23701+
"interface" ( /* Name of the interface */
23702+
interface_name /* Name of the interface */
23703+
),
23704+
"routing-instance" arg /* Routing instance to locate the peer route */,
23705+
"vpn-profile" arg /* VPN Profile name for HA link Encryption */,
23706+
"liveness-detection" ( /* Bidirectional Forwarding Detection options for the peer */
23707+
c(
23708+
"version" ( /* BFD protocol version number */
23709+
("0" | "1" | "automatic")
23710+
),
23711+
"minimum-interval" arg /* Minimum transmit and receive interval */,
23712+
"minimum-transmit-interval" arg /* Minimum transmit interval */,
23713+
"minimum-receive-interval" arg /* Minimum receive interval */,
23714+
"multiplier" arg /* Detection time multiplier */,
23715+
c(
23716+
"no-adaptation" /* Disable adaptation */
23717+
),
23718+
"transmit-interval" ( /* Transmit-interval options */
23719+
c(
23720+
"minimum-interval" arg /* Minimum transmit interval */,
23721+
"threshold" arg /* High transmit interval triggering a trap */
23722+
)
23723+
),
23724+
"detection-time" ( /* Detection-time options */
23725+
c(
23726+
"threshold" arg /* High detection-time triggering a trap */
23727+
)
23728+
)
23729+
)
23730+
)
23731+
)
23732+
),
23733+
"traceoptions" ( /* Set chassis l3-ha traceoptions */
23734+
c(
23735+
"no-remote-trace" /* Disable remote tracing */,
23736+
"file" ( /* Trace file information */
23737+
sc(
23738+
arg,
23739+
"size" arg /* Maximum trace file size */,
23740+
"files" arg /* Maximum number of trace files */,
23741+
"world-readable" /* Allow any user to read the log file */,
23742+
"no-world-readable" /* Don't allow any user to read the log file */,
23743+
"match" ( /* Regular expression for lines to be logged */
23744+
regular_expression /* Regular expression for lines to be logged */
23745+
)
23746+
)
23747+
).as(:oneline),
23748+
"flag" enum(("cli" | "configuration" | "eventlib" | "fsm" | "heartbeat" | "interface" | "routing-socket" | "uspipc" | "init" | "socket" | "snmp" | "ip-monitoring" | "hw-monitoring" | "fabric-monitoring" | "health-monitoring" | "schedule-monitoring" | "heartbeat-tlv" | "ha-peer" | "srg" | "all")) /* Tracing parameters */.as(:oneline),
23749+
"level" ( /* Set level of tracing */
23750+
("emergency" | "alert" | "critical" | "error" | "warning" | "notice" | "info" | "debug" | "all")
23751+
)
23752+
)
23753+
),
23754+
"services-redundancy-group" arg ( /* Define the services level failover domain */
23755+
c(
23756+
"shutdown-on-failure" arg /* Interfaces to be shut down in case of internal failures */,
23757+
"deployment-type" ( /* Deployment type of the Services Redundancy Group */
23758+
("cloud" | "hybrid" | "routing" | "switching")
23759+
),
23760+
"peer-id" ( /* Peer related information */
23761+
c(
23762+
arg
23763+
)
23764+
),
23765+
"activeness-probe" ( /* The probe destination IP for activeness determination */
23766+
c(
23767+
"dest-ip" ( /* Destination IPV4/IPV6 address */
23768+
c(
23769+
"src-ip" ( /* Source IPV4/IPV6 address for activeness probe */
23770+
ipaddr /* Source IPV4/IPV6 address for activeness probe */
23771+
),
23772+
"routing-instance" arg /* Routing instance */,
23773+
ipaddr /* Destination IPV4/IPV6 address */
23774+
)
23775+
),
23776+
"minimum-interval" arg /* Define the time interval in milliseconds between activeness probing retries. */,
23777+
"multiplier" arg /* Number of retries needed to declare activeness probing failure */
23778+
)
23779+
),
23780+
"virtual-ip" arg ( /* HA virtual IP */
23781+
c(
23782+
"ip" ( /* IPV4/IPV6 prefix, should be in the same subnet as the interface IP */
23783+
ipprefix_mandatory /* IPV4/IPV6 prefix, should be in the same subnet as the interface IP */
23784+
),
23785+
"interface" ( /* Name of the interface */
23786+
interface_name /* Name of the interface */
23787+
),
23788+
"use-virtual-mac" /* Use virtual mac for SRG role enforcement */
23789+
)
23790+
),
23791+
"monitor" ( /* Configure the BFD and IP monitoring */
23792+
c(
23793+
"ip" arg ( /* Destination IPV4/IPV6 address for monitoring */
23794+
c(
23795+
"routing-instance" arg /* Routing instance to locate the destination route */
23796+
)
23797+
),
23798+
"bfd-liveliness" arg ( /* Configure BFD monitoring */
23799+
c(
23800+
"src-ip" ( /* Source IPV4 address for BFD monitoring */
23801+
ipv4addr /* Source IPV4 address for BFD monitoring */
23802+
),
23803+
"routing-instance" arg /* Routing instance to locate the route */,
23804+
"session-type" ( /* BFD Mon Session Type */
23805+
("singlehop" | "multihop")
23806+
),
23807+
"interface" ( /* Name of the interface for single-hop sessions */
23808+
interface_name /* Name of the interface for single-hop sessions */
23809+
)
23810+
)
23811+
),
23812+
"interface" arg /* Define interfaces to monitor */
23813+
)
23814+
),
23815+
"active-signal-route" ( /* Configure the active signal route */
23816+
c(
23817+
ipv4addr /* Active IPv4 address */,
23818+
"routing-instance" arg /* Routing instance to install the active signal route */
23819+
)
23820+
),
23821+
"backup-signal-route" ( /* Configure the backup signal route */
23822+
c(
23823+
ipv4addr /* Backup IPv4 address */,
23824+
"routing-instance" arg /* Routing instance to install the backup signal route */
23825+
)
23826+
),
23827+
"prefix-list" arg ( /* Define a named set of address prefixes */
23828+
c(
23829+
"routing-instance" arg /* Routing instance */
23830+
)
23831+
),
23832+
"managed-services" enum(("ipsec")) /* Define a named set of services to be applicable for this SRG */.as(:oneline),
23833+
"preemption" /* Allow preemption of activeness based on priority */,
23834+
"process-packet-on-backup" /* Enable PFE to process packets on backup node */,
23835+
"activeness-priority" arg /* Activeness Priority of the node for this SRG */
23836+
)
23837+
)
23838+
)
2368323839
)
2368423840
# End of vSRX 22.4R1.10
2368523841
)

lib/junoser/parser.rb

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23779,6 +23779,162 @@ def enum(object)
2377923779
str("use-actual-mac-on-physical-interfaces"),
2378023780
str("use-active-child-mac-on-reth")
2378123781
)
23782+
),
23783+
b(str("high-availability"),
23784+
c(
23785+
str("hardware-upgrade"),
23786+
b(str("local-id"),
23787+
sc(
23788+
arg,
23789+
b(str("local-ip"),
23790+
ipaddr
23791+
)
23792+
)
23793+
).as(:oneline),
23794+
b(a(str("peer-id"), arg),
23795+
c(
23796+
a(str("desc"), arg),
23797+
b(str("peer-ip"),
23798+
ipaddr
23799+
),
23800+
b(str("interface"),
23801+
interface_name
23802+
),
23803+
a(str("routing-instance"), arg),
23804+
a(str("vpn-profile"), arg),
23805+
b(str("liveness-detection"),
23806+
c(
23807+
b(str("version"),
23808+
(str("0") | str("1") | str("automatic"))
23809+
),
23810+
a(str("minimum-interval"), arg),
23811+
a(str("minimum-transmit-interval"), arg),
23812+
a(str("minimum-receive-interval"), arg),
23813+
a(str("multiplier"), arg),
23814+
c(
23815+
str("no-adaptation")
23816+
),
23817+
b(str("transmit-interval"),
23818+
c(
23819+
a(str("minimum-interval"), arg),
23820+
a(str("threshold"), arg)
23821+
)
23822+
),
23823+
b(str("detection-time"),
23824+
c(
23825+
a(str("threshold"), arg)
23826+
)
23827+
)
23828+
)
23829+
)
23830+
)
23831+
),
23832+
b(str("traceoptions"),
23833+
c(
23834+
str("no-remote-trace"),
23835+
b(str("file"),
23836+
sc(
23837+
arg,
23838+
a(str("size"), arg),
23839+
a(str("files"), arg),
23840+
str("world-readable"),
23841+
str("no-world-readable"),
23842+
b(str("match"),
23843+
regular_expression
23844+
)
23845+
)
23846+
).as(:oneline),
23847+
a(str("flag"), enum(str("cli") | str("configuration") | str("eventlib") | str("fsm") | str("heartbeat") | str("interface") | str("routing-socket") | str("uspipc") | str("init") | str("socket") | str("snmp") | str("ip-monitoring") | str("hw-monitoring") | str("fabric-monitoring") | str("health-monitoring") | str("schedule-monitoring") | str("heartbeat-tlv") | str("ha-peer") | str("srg") | str("all"))).as(:oneline),
23848+
b(str("level"),
23849+
(str("emergency") | str("alert") | str("critical") | str("error") | str("warning") | str("notice") | str("info") | str("debug") | str("all"))
23850+
)
23851+
)
23852+
),
23853+
b(a(str("services-redundancy-group"), arg),
23854+
c(
23855+
a(str("shutdown-on-failure"), arg),
23856+
b(str("deployment-type"),
23857+
(str("cloud") | str("hybrid") | str("routing") | str("switching"))
23858+
),
23859+
b(str("peer-id"),
23860+
c(
23861+
arg
23862+
)
23863+
),
23864+
b(str("activeness-probe"),
23865+
c(
23866+
b(str("dest-ip"),
23867+
c(
23868+
b(str("src-ip"),
23869+
ipaddr
23870+
),
23871+
a(str("routing-instance"), arg),
23872+
ipaddr
23873+
)
23874+
),
23875+
a(str("minimum-interval"), arg),
23876+
a(str("multiplier"), arg)
23877+
)
23878+
),
23879+
b(a(str("virtual-ip"), arg),
23880+
c(
23881+
b(str("ip"),
23882+
ipprefix_mandatory
23883+
),
23884+
b(str("interface"),
23885+
interface_name
23886+
),
23887+
str("use-virtual-mac")
23888+
)
23889+
),
23890+
b(str("monitor"),
23891+
c(
23892+
b(a(str("ip"), arg),
23893+
c(
23894+
a(str("routing-instance"), arg)
23895+
)
23896+
),
23897+
b(a(str("bfd-liveliness"), arg),
23898+
c(
23899+
b(str("src-ip"),
23900+
ipv4addr
23901+
),
23902+
a(str("routing-instance"), arg),
23903+
b(str("session-type"),
23904+
(str("singlehop") | str("multihop"))
23905+
),
23906+
b(str("interface"),
23907+
interface_name
23908+
)
23909+
)
23910+
),
23911+
a(str("interface"), arg)
23912+
)
23913+
),
23914+
b(str("active-signal-route"),
23915+
c(
23916+
ipv4addr,
23917+
a(str("routing-instance"), arg)
23918+
)
23919+
),
23920+
b(str("backup-signal-route"),
23921+
c(
23922+
ipv4addr,
23923+
a(str("routing-instance"), arg)
23924+
)
23925+
),
23926+
b(a(str("prefix-list"), arg),
23927+
c(
23928+
a(str("routing-instance"), arg)
23929+
)
23930+
),
23931+
a(str("managed-services"), enum(str("ipsec"))).as(:oneline),
23932+
str("preemption"),
23933+
str("process-packet-on-backup"),
23934+
a(str("activeness-priority"), arg)
23935+
)
23936+
)
23937+
)
2378223938
)
2378323939
# End of vSRX 22.4R1.10
2378423940
)

test/test_valid_statements.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,17 @@ class TestValidStatements < Test::Unit::TestCase
185185
set chassis cluster redundancy-group 1 node 1 priority 50
186186
set security log stream SYSLOG_SERVER transport protocol tcp
187187
188+
set chassis high-availability local-id 1
189+
set chassis high-availability local-id local-ip 10.0.3.10
190+
set chassis high-availability peer-id 2 peer-ip 10.0.3.11
191+
set chassis high-availability peer-id 2 interface ge-0/0/0.0
192+
set chassis high-availability peer-id 2 liveness-detection minimum-interval 400
193+
set chassis high-availability peer-id 2 liveness-detection multiplier 5
194+
set chassis high-availability services-redundancy-group 1 deployment-type cloud
195+
set chassis high-availability services-redundancy-group 1 peer-id 2
196+
set chassis high-availability services-redundancy-group 1 preemption
197+
set chassis high-availability services-redundancy-group 1 activeness-priority 200
198+
188199
set policy-options policy-statement foo from policy (! bar)
189200
set system no-redirects
190201
set system no-redirects-ipv6

0 commit comments

Comments
 (0)