-
Notifications
You must be signed in to change notification settings - Fork 389
T5942: Make failover support dhcp-interface #4783
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hedrok
wants to merge
2
commits into
vyos:current
Choose a base branch
from
hedrok:T5942-failover-dhcp-gateway
base: current
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,8 @@ | ||
<!-- include start from dhcp-interface-multi.xml.i --> | ||
<leafNode name="dhcp-interface"> | ||
<properties> | ||
<help>DHCP interface supplying next-hop IP address</help> | ||
<completionHelp> | ||
<script>${vyos_completion_dir}/list_interfaces</script> | ||
</completionHelp> | ||
<valueHelp> | ||
<format>txt</format> | ||
<description>DHCP interface name</description> | ||
</valueHelp> | ||
<constraint> | ||
#include <include/constraint/interface-name.xml.i> | ||
</constraint> | ||
<multi/> | ||
</properties> | ||
<leafNode name="dhcp-interface"> | ||
<properties> | ||
#include <include/dhcp-interface-properties.xml.i> | ||
<multi/> | ||
</properties> | ||
</leafNode> | ||
<!-- include end --> | ||
<!-- include end --> |
13 changes: 13 additions & 0 deletions
13
interface-definitions/include/dhcp-interface-properties.xml.i
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- include end --> | ||
<help>DHCP interface supplying next-hop IP address</help> | ||
<completionHelp> | ||
<script>${vyos_completion_dir}/list_interfaces</script> | ||
</completionHelp> | ||
<valueHelp> | ||
<format>txt</format> | ||
<description>DHCP interface name</description> | ||
</valueHelp> | ||
<constraint> | ||
#include <include/constraint/interface-name.xml.i> | ||
</constraint> | ||
<!-- include end --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
<!-- include start from dhcp-interface.xml.i --> | ||
<leafNode name="dhcp-interface"> | ||
<properties> | ||
<help>DHCP interface supplying next-hop IP address</help> | ||
<completionHelp> | ||
<script>${vyos_completion_dir}/list_interfaces</script> | ||
</completionHelp> | ||
<valueHelp> | ||
<format>txt</format> | ||
<description>DHCP interface name</description> | ||
</valueHelp> | ||
<constraint> | ||
#include <include/constraint/interface-name.xml.i> | ||
</constraint> | ||
#include <include/dhcp-interface-properties.xml.i> | ||
</properties> | ||
</leafNode> | ||
<!-- include end --> |
105 changes: 105 additions & 0 deletions
105
interface-definitions/include/failover/common-failover.xml.i
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,105 @@ | ||
<!-- include start from include/failover/common-failover.xml.i --> | ||
<children> | ||
<node name="check"> | ||
<properties> | ||
<help>Check target options</help> | ||
</properties> | ||
<children> | ||
<leafNode name="policy"> | ||
<properties> | ||
<help>Policy for check targets</help> | ||
<completionHelp> | ||
<list>any-available all-available</list> | ||
</completionHelp> | ||
<valueHelp> | ||
<format>all-available</format> | ||
<description>All targets must be alive</description> | ||
</valueHelp> | ||
<valueHelp> | ||
<format>any-available</format> | ||
<description>Any target must be alive</description> | ||
</valueHelp> | ||
<constraint> | ||
<regex>(all-available|any-available)</regex> | ||
</constraint> | ||
</properties> | ||
<defaultValue>any-available</defaultValue> | ||
</leafNode> | ||
#include <include/port-number.xml.i> | ||
<tagNode name="target"> | ||
<properties> | ||
<help>Check target address</help> | ||
<valueHelp> | ||
<format>ipv4</format> | ||
<description>Address to check</description> | ||
</valueHelp> | ||
<constraint> | ||
<validator name="ipv4-address"/> | ||
</constraint> | ||
</properties> | ||
<children> | ||
#include <include/interface/vrf.xml.i> | ||
#include <include/generic-interface.xml.i> | ||
</children> | ||
</tagNode> | ||
<leafNode name="timeout"> | ||
<properties> | ||
<help>Timeout between checks</help> | ||
<valueHelp> | ||
<format>u32:1-300</format> | ||
<description>Timeout in seconds between checks</description> | ||
</valueHelp> | ||
<constraint> | ||
<validator name="numeric" argument="--range 1-255"/> | ||
</constraint> | ||
</properties> | ||
<defaultValue>10</defaultValue> | ||
</leafNode> | ||
<leafNode name="type"> | ||
<properties> | ||
<help>Check type</help> | ||
<completionHelp> | ||
<list>arp icmp tcp</list> | ||
</completionHelp> | ||
<valueHelp> | ||
<format>arp</format> | ||
<description>Check target by ARP</description> | ||
</valueHelp> | ||
<valueHelp> | ||
<format>icmp</format> | ||
<description>Check target by ICMP</description> | ||
</valueHelp> | ||
<valueHelp> | ||
<format>tcp</format> | ||
<description>Check target by TCP</description> | ||
</valueHelp> | ||
<constraint> | ||
<regex>(arp|icmp|tcp)</regex> | ||
</constraint> | ||
</properties> | ||
<defaultValue>icmp</defaultValue> | ||
</leafNode> | ||
</children> | ||
</node> | ||
#include <include/generic-interface.xml.i> | ||
<leafNode name="metric"> | ||
<properties> | ||
<help>Route metric for this gateway</help> | ||
<valueHelp> | ||
<format>u32:1-255</format> | ||
<description>Route metric</description> | ||
</valueHelp> | ||
<constraint> | ||
<validator name="numeric" argument="--range 1-255"/> | ||
</constraint> | ||
</properties> | ||
<defaultValue>1</defaultValue> | ||
</leafNode> | ||
<leafNode name="onlink"> | ||
<properties> | ||
<help>The next hop is directly connected to the interface, even if it does not match interface prefix</help> | ||
<valueless/> | ||
</properties> | ||
</leafNode> | ||
</children> | ||
<!-- include end --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.