summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2023-11-13 12:54:25 +0100
committerChristian Breunig <christian@breunig.cc>2023-11-15 20:23:49 +0100
commit383231dae8c01ea58d0c956688ecd87f739be97e (patch)
tree676648c7478be7f1cd0331576b5c8fac519fca53 /interface-definitions
parent46bb847933c8352345b27d1402601a8cc931e2cc (diff)
downloadvyos-1x-383231dae8c01ea58d0c956688ecd87f739be97e.tar.gz
vyos-1x-383231dae8c01ea58d0c956688ecd87f739be97e.zip
igmp: T5736: migrate "protocols igmp" to "protocols pim"
IGMP and PIM are two different but related things. FRR has both combined in pimd. As we use get_config_dict() and FRR reload it is better to have both centrally stored under the same CLI node (as FRR does, too) to just "fire and forget" the commit to the daemon. "set protocols igmp interface eth1" -> "set protocols pim interface eth1 igmp" (cherry picked from commit bc83fb097719f5c4c803808572f690fbc367b9e5)
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/source-address-ipv4-multi.xml.i18
-rw-r--r--interface-definitions/include/version/pim-version.xml.i3
-rw-r--r--interface-definitions/protocols-igmp.xml.in95
-rw-r--r--interface-definitions/protocols-pim.xml.in43
-rw-r--r--interface-definitions/xml-component-version.xml.in1
5 files changed, 63 insertions, 97 deletions
diff --git a/interface-definitions/include/source-address-ipv4-multi.xml.i b/interface-definitions/include/source-address-ipv4-multi.xml.i
new file mode 100644
index 000000000..319a118f3
--- /dev/null
+++ b/interface-definitions/include/source-address-ipv4-multi.xml.i
@@ -0,0 +1,18 @@
+<!-- include start from source-address-ipv4-multi.xml.i -->
+<leafNode name="source-address">
+ <properties>
+ <help>IPv4 source address used to initiate connection</help>
+ <completionHelp>
+ <script>${vyos_completion_dir}/list_local_ips.sh --ipv4</script>
+ </completionHelp>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>IPv4 source address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ <multi/>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/version/pim-version.xml.i b/interface-definitions/include/version/pim-version.xml.i
new file mode 100644
index 000000000..24cc38cdf
--- /dev/null
+++ b/interface-definitions/include/version/pim-version.xml.i
@@ -0,0 +1,3 @@
+<!-- include start from include/version/pim-version.xml.i -->
+<syntaxVersion component='pim' version='1'></syntaxVersion>
+<!-- include end -->
diff --git a/interface-definitions/protocols-igmp.xml.in b/interface-definitions/protocols-igmp.xml.in
deleted file mode 100644
index a055db71e..000000000
--- a/interface-definitions/protocols-igmp.xml.in
+++ /dev/null
@@ -1,95 +0,0 @@
-<?xml version="1.0"?>
-<!-- Internet Group Management Protocol (IGMP) configuration -->
-<interfaceDefinition>
- <node name="protocols">
- <children>
- <node name="igmp" owner="${vyos_conf_scripts_dir}/protocols_igmp.py">
- <properties>
- <help>Internet Group Management Protocol (IGMP)</help>
- </properties>
- <children>
- <tagNode name="interface">
- <properties>
- <help>IGMP interface</help>
- <completionHelp>
- <script>${vyos_completion_dir}/list_interfaces</script>
- </completionHelp>
- </properties>
- <children>
- <tagNode name="join">
- <properties>
- <help>IGMP join multicast group</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Multicast group address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- </properties>
- <children>
- <leafNode name="source">
- <properties>
- <help>Source address</help>
- <valueHelp>
- <format>ipv4</format>
- <description>Source address</description>
- </valueHelp>
- <constraint>
- <validator name="ipv4-address"/>
- </constraint>
- <multi/>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- <leafNode name="version">
- <properties>
- <help>IGMP version</help>
- <completionHelp>
- <list>2 3</list>
- </completionHelp>
- <valueHelp>
- <format>2</format>
- <description>IGMP version 2</description>
- </valueHelp>
- <valueHelp>
- <format>3</format>
- <description>IGMP version 3</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 2-3"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="query-interval">
- <properties>
- <help>IGMP host query interval</help>
- <valueHelp>
- <format>u32:1-1800</format>
- <description>Query interval in seconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 1-1800"/>
- </constraint>
- </properties>
- </leafNode>
- <leafNode name="query-max-response-time">
- <properties>
- <help>IGMP max query response time</help>
- <valueHelp>
- <format>u32:10-250</format>
- <description>Query response value in deci-seconds</description>
- </valueHelp>
- <constraint>
- <validator name="numeric" argument="--range 10-250"/>
- </constraint>
- </properties>
- </leafNode>
- </children>
- </tagNode>
- </children>
- </node>
- </children>
- </node>
-</interfaceDefinition>
diff --git a/interface-definitions/protocols-pim.xml.in b/interface-definitions/protocols-pim.xml.in
index 02a8a6f5e..c1fa1b489 100644
--- a/interface-definitions/protocols-pim.xml.in
+++ b/interface-definitions/protocols-pim.xml.in
@@ -5,7 +5,7 @@
<children>
<node name="pim" owner="${vyos_conf_scripts_dir}/protocols_pim.py">
<properties>
- <help>Protocol Independent Multicast (PIM)</help>
+ <help>Protocol Independent Multicast (PIM) and IGMP</help>
<priority>400</priority>
</properties>
<children>
@@ -31,11 +31,50 @@
<help>Internet Group Management Protocol (IGMP) options</help>
</properties>
<children>
+ <tagNode name="join">
+ <properties>
+ <help>IGMP join multicast group</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Multicast group address</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ipv4-address"/>
+ </constraint>
+ </properties>
+ <children>
+ #include <include/source-address-ipv4-multi.xml.i>
+ </children>
+ </tagNode>
+ <leafNode name="query-interval">
+ <properties>
+ <help>IGMP host query interval</help>
+ <valueHelp>
+ <format>u32:1-1800</format>
+ <description>Query interval in seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 1-1800"/>
+ </constraint>
+ </properties>
+ </leafNode>
+ <leafNode name="query-max-response-time">
+ <properties>
+ <help>IGMP max query response time</help>
+ <valueHelp>
+ <format>u32:10-250</format>
+ <description>Query response value in deci-seconds</description>
+ </valueHelp>
+ <constraint>
+ <validator name="numeric" argument="--range 10-250"/>
+ </constraint>
+ </properties>
+ </leafNode>
<leafNode name="version">
<properties>
<help>Interface IGMP version</help>
<completionHelp>
- <list>1 2</list>
+ <list>2 3</list>
</completionHelp>
<valueHelp>
<format>2</format>
diff --git a/interface-definitions/xml-component-version.xml.in b/interface-definitions/xml-component-version.xml.in
index 8c9e816d1..51a28ef57 100644
--- a/interface-definitions/xml-component-version.xml.in
+++ b/interface-definitions/xml-component-version.xml.in
@@ -29,6 +29,7 @@
#include <include/version/ntp-version.xml.i>
#include <include/version/openconnect-version.xml.i>
#include <include/version/ospf-version.xml.i>
+ #include <include/version/pim-version.xml.i>
#include <include/version/policy-version.xml.i>
#include <include/version/pppoe-server-version.xml.i>
#include <include/version/pptp-version.xml.i>