Skip to content

Commit

Permalink
add bidirectional forwarding detection (BFD) to cli (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
rcgoodfellow authored Feb 2, 2024
1 parent c3075b4 commit eabcb82
Show file tree
Hide file tree
Showing 6 changed files with 2,340 additions and 1 deletion.
73 changes: 73 additions & 0 deletions cli/docs/cli.json
Original file line number Diff line number Diff line change
Expand Up @@ -2826,6 +2826,79 @@
}
]
},
{
"name": "bfd",
"subcommands": [
{
"name": "disable",
"about": "Disable a BFD session.",
"args": [
{
"long": "json-body",
"help": "Path to a file that contains the full json body."
},
{
"long": "json-body-template",
"help": "XXX"
},
{
"long": "remote",
"help": "Address of the remote peer to disable a BFD session for."
},
{
"long": "switch",
"help": "The switch to enable this session on. Must be `switch0` or `switch1`."
}
]
},
{
"name": "enable",
"about": "Enable a BFD session.",
"args": [
{
"long": "detection-threshold",
"help": "The negotiated Control packet transmission interval, multiplied by this variable, will be the Detection Time for this session (as seen by the remote system)"
},
{
"long": "json-body",
"help": "Path to a file that contains the full json body."
},
{
"long": "json-body-template",
"help": "XXX"
},
{
"long": "local",
"help": "Address the Oxide switch will listen on for BFD traffic. If `None` then the unspecified address (0.0.0.0 or ::) is used."
},
{
"long": "mode",
"values": [
"single_hop",
"multi_hop"
],
"help": "Select either single-hop (RFC 5881) or multi-hop (RFC 5883)"
},
{
"long": "remote",
"help": "Address of the remote peer to establish a BFD session with."
},
{
"long": "required-rx",
"help": "The minimum interval, in microseconds, between received BFD Control packets that this system requires"
},
{
"long": "switch",
"help": "The switch to enable this session on. Must be `switch0` or `switch1`."
}
]
},
{
"name": "status",
"about": "Get BFD status."
}
]
},
{
"name": "bgp-announce-set",
"subcommands": [
Expand Down
7 changes: 6 additions & 1 deletion cli/src/cli_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,10 @@ fn xxx<'a>(command: CliCommand) -> Option<&'a str> {
Some("system networking bgp-imported-routes-ipv4 get")
}

CliCommand::NetworkingBfdStatus => Some("system networking bfd status"),
CliCommand::NetworkingBfdEnable => Some("system networking bfd enable"),
CliCommand::NetworkingBfdDisable => Some("system networking bfd disable"),

CliCommand::NetworkingBgpStatus => Some("system networking bgp-status get"),

// Subcommand: disk
Expand Down Expand Up @@ -488,7 +492,8 @@ fn xxx<'a>(command: CliCommand) -> Option<&'a str> {
| CliCommand::SiloMetric
| CliCommand::SystemMetric
| CliCommand::UserBuiltinList
| CliCommand::UserBuiltinView => None,
| CliCommand::UserBuiltinView
| CliCommand::InstanceSshPublicKeyList => None,
}
}

Expand Down
Loading

0 comments on commit eabcb82

Please sign in to comment.