Skip to content

Commit

Permalink
Merge pull request #4251 from c-po/xml-cleanup
Browse files Browse the repository at this point in the history
xml: T5738: re-use XML building blocks for interfaces as much as possible
  • Loading branch information
c-po authored Dec 26, 2024
2 parents 77d5b09 + 020f217 commit 214448b
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 91 deletions.
17 changes: 1 addition & 16 deletions interface-definitions/high-availability.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -247,22 +247,7 @@
<help>Disable track state of main interface</help>
</properties>
</leafNode>
<leafNode name="interface">
<properties>
<help>Interface name state check</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces --broadcast</script>
</completionHelp>
<valueHelp>
<format>txt</format>
<description>Interface name</description>
</valueHelp>
<constraint>
#include <include/constraint/interface-name.xml.i>
</constraint>
<multi/>
</properties>
</leafNode>
#include <include/generic-interface-multi-broadcast.xml.i>
</children>
</node>
#include <include/vrrp-transition-script.xml.i>
Expand Down
10 changes: 1 addition & 9 deletions interface-definitions/include/bgp/protocol-common-config.xml.i
Original file line number Diff line number Diff line change
Expand Up @@ -721,15 +721,7 @@
<help>Apply local policy routing to interface</help>
</properties>
<children>
<leafNode name="interface">
<properties>
<help>Interface</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
<multi/>
</properties>
</leafNode>
#include <include/generic-interface-multi.xml.i>
</children>
</node>
</children>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- include start from generic-interface-broadcast.xml.i -->
<leafNode name="interface">
<properties>
<help>Interface to use</help>
<help>Interface</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces --broadcast</script>
</completionHelp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- include start from generic-interface-multi-broadcast.xml.i -->
<leafNode name="interface">
<properties>
<help>Interface to use</help>
<help>Interface</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces --broadcast</script>
</completionHelp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- include start from generic-interface-multi-wildcard.xml.i -->
<leafNode name="interface">
<properties>
<help>Interface to use</help>
<help>Interface</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- include start from generic-interface-multi.xml.i -->
<leafNode name="interface">
<properties>
<help>Interface to use</help>
<help>Interface</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
Expand Down
2 changes: 1 addition & 1 deletion interface-definitions/include/generic-interface.xml.i
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- include start from generic-interface.xml.i -->
<leafNode name="interface">
<properties>
<help>Interface to use</help>
<help>Interface</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
Expand Down
17 changes: 0 additions & 17 deletions interface-definitions/include/static/static-route-interface.xml.i

This file was deleted.

2 changes: 1 addition & 1 deletion interface-definitions/include/static/static-route.xml.i
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<children>
#include <include/generic-disable-node.xml.i>
#include <include/static/static-route-distance.xml.i>
#include <include/static/static-route-interface.xml.i>
#include <include/generic-interface.xml.i>
#include <include/static/static-route-vrf.xml.i>
<node name="bfd">
<properties>
Expand Down
2 changes: 1 addition & 1 deletion interface-definitions/include/static/static-route6.xml.i
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
<children>
#include <include/generic-disable-node.xml.i>
#include <include/static/static-route-distance.xml.i>
#include <include/static/static-route-interface.xml.i>
#include <include/generic-interface.xml.i>
#include <include/static/static-route-segments.xml.i>
#include <include/static/static-route-vrf.xml.i>
<node name="bfd">
Expand Down
2 changes: 1 addition & 1 deletion interface-definitions/protocols_failover.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
</leafNode>
</children>
</node>
#include <include/static/static-route-interface.xml.i>
#include <include/generic-interface.xml.i>
<leafNode name="metric">
<properties>
<help>Route metric for this gateway</help>
Expand Down
32 changes: 2 additions & 30 deletions interface-definitions/service_dhcpv6-server.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,7 @@
<children>
#include <include/generic-disable-node.xml.i>
#include <include/generic-description.xml.i>
<leafNode name="interface">
<properties>
<help>Optional interface for this shared network to accept requests from</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
<valueHelp>
<format>txt</format>
<description>Interface name</description>
</valueHelp>
<constraint>
#include <include/constraint/interface-name.xml.i>
</constraint>
</properties>
</leafNode>
#include <include/generic-interface.xml.i>
#include <include/dhcp/option-v6.xml.i>
<tagNode name="subnet">
<properties>
Expand All @@ -77,21 +63,7 @@
</properties>
<children>
#include <include/dhcp/option-v6.xml.i>
<leafNode name="interface">
<properties>
<help>Optional interface for this subnet to accept requests from</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
<valueHelp>
<format>txt</format>
<description>Interface name</description>
</valueHelp>
<constraint>
#include <include/constraint/interface-name.xml.i>
</constraint>
</properties>
</leafNode>
#include <include/generic-interface.xml.i>
<tagNode name="range">
<properties>
<help>Parameters setting ranges for assigning IPv6 addresses</help>
Expand Down
12 changes: 1 addition & 11 deletions interface-definitions/service_ndp-proxy.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -111,17 +111,7 @@
</properties>
<defaultValue>static</defaultValue>
</leafNode>
<leafNode name="interface">
<properties>
<help>Interface to forward Neighbor Solicitation message through. Required for "iface" mode</help>
<completionHelp>
<script>${vyos_completion_dir}/list_interfaces</script>
</completionHelp>
<constraint>
#include <include/constraint/interface-name.xml.i>
</constraint>
</properties>
</leafNode>
#include <include/generic-interface.xml.i>
</children>
</tagNode>
</children>
Expand Down

0 comments on commit 214448b

Please sign in to comment.