summaryrefslogtreecommitdiff
path: root/interface-definitions
diff options
context:
space:
mode:
authorNataliia Solomko <natalirs1985@gmail.com>2026-09-25 16:51:50 +0300
committerNataliia Solomko <natalirs1985@gmail.com>2026-10-07 16:45:58 +0300
commit575f265daf973428ed1b910f91fb124615fbebd4 (patch)
tree31abbc8c6095b17661f65743d30c46ce490139b7 /interface-definitions
parent87e0a46281746f92a0dde4c7d71c86aa00ec90ea (diff)
downloadvyos-1x-575f265daf973428ed1b910f91fb124615fbebd4.tar.gz
vyos-1x-575f265daf973428ed1b910f91fb124615fbebd4.zip
config-management: T6304: Rewrite commit-archive location into a structured CLI
Replace the free-form 'commit-archive location <url>' leafNode with a structured, per-destination tagNode: `set system config-management commit-archive location <name> <protocol> \ authentication { username | password } | server | port | path` Each location selects exactly one transport protocol (scp, sftp, ssh, ftp, ftps, http, https, git, tftp). 'git' additionally accepts a 'transport' (https/http/ssh, default https). 'source-address' and 'vrf' stay under 'commit-archive' and apply to every location, as before.
Diffstat (limited to 'interface-definitions')
-rw-r--r--interface-definitions/include/config-management/remote-auth.xml.i12
-rw-r--r--interface-definitions/include/config-management/remote.xml.i34
-rw-r--r--interface-definitions/include/version/config-management-version.xml.i2
-rw-r--r--interface-definitions/system_config-management.xml.in138
4 files changed, 152 insertions, 34 deletions
diff --git a/interface-definitions/include/config-management/remote-auth.xml.i b/interface-definitions/include/config-management/remote-auth.xml.i
new file mode 100644
index 000000000..c7b4bd81c
--- /dev/null
+++ b/interface-definitions/include/config-management/remote-auth.xml.i
@@ -0,0 +1,12 @@
+<!-- include start from config-management/remote-auth.xml.i -->
+<node name="authentication">
+ <properties>
+ <help>Authentication settings for remote server</help>
+ </properties>
+ <children>
+ #include <include/generic-username.xml.i>
+ #include <include/generic-password.xml.i>
+ </children>
+</node>
+#include <include/config-management/remote.xml.i>
+<!-- include end -->
diff --git a/interface-definitions/include/config-management/remote.xml.i b/interface-definitions/include/config-management/remote.xml.i
new file mode 100644
index 000000000..9f85ec9e1
--- /dev/null
+++ b/interface-definitions/include/config-management/remote.xml.i
@@ -0,0 +1,34 @@
+<!-- include start from config-management/remote.xml.i -->
+<leafNode name="server">
+ <properties>
+ <help>Remote server to connect to</help>
+ <valueHelp>
+ <format>ipv4</format>
+ <description>Server IPv4 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ipv6</format>
+ <description>Server IPv6 address</description>
+ </valueHelp>
+ <valueHelp>
+ <format>hostname</format>
+ <description>Server hostname/FQDN</description>
+ </valueHelp>
+ <constraint>
+ <validator name="ip-address"/>
+ <validator name="fqdn"/>
+ </constraint>
+ <constraintErrorMessage>Server must be an IPv4/IPv6 address or a hostname</constraintErrorMessage>
+ </properties>
+</leafNode>
+#include <include/port-number.xml.i>
+<leafNode name="path">
+ <properties>
+ <help>Remote path used to store the archived configuration</help>
+ <valueHelp>
+ <format>txt</format>
+ <description>Remote path</description>
+ </valueHelp>
+ </properties>
+</leafNode>
+<!-- include end -->
diff --git a/interface-definitions/include/version/config-management-version.xml.i b/interface-definitions/include/version/config-management-version.xml.i
index 695ba09ab..d5664790c 100644
--- a/interface-definitions/include/version/config-management-version.xml.i
+++ b/interface-definitions/include/version/config-management-version.xml.i
@@ -1,3 +1,3 @@
<!-- include start from include/version/config-management-version.xml.i -->
-<syntaxVersion component='config-management' version='1'></syntaxVersion>
+<syntaxVersion component='config-management' version='2'></syntaxVersion>
<!-- include end -->
diff --git a/interface-definitions/system_config-management.xml.in b/interface-definitions/system_config-management.xml.in
index 319611266..bbbcd9c6a 100644
--- a/interface-definitions/system_config-management.xml.in
+++ b/interface-definitions/system_config-management.xml.in
@@ -13,44 +13,116 @@
<help>Commit archive settings</help>
</properties>
<children>
- <leafNode name="location">
+ <tagNode name="location">
<properties>
<help>Commit archive location</help>
<valueHelp>
- <format>http://&lt;user&gt;:&lt;passwd&gt;@&lt;host&gt;/&lt;path&gt;</format>
- <description/>
+ <format>txt</format>
+ <description>Name of the commit archive location</description>
</valueHelp>
- <valueHelp>
- <format>https://&lt;user&gt;:&lt;passwd&gt;@&lt;host&gt;/&lt;path&gt;</format>
- <description/>
- </valueHelp>
- <valueHelp>
- <format>ftp://&lt;user&gt;:&lt;passwd&gt;@&lt;host&gt;/&lt;path&gt;</format>
- <description/>
- </valueHelp>
- <valueHelp>
- <format>sftp://&lt;user&gt;:&lt;passwd&gt;@&lt;host&gt;/&lt;path&gt;</format>
- <description/>
- </valueHelp>
- <valueHelp>
- <format>scp://&lt;user&gt;:&lt;passwd&gt;@&lt;host&gt;/&lt;path&gt;</format>
- <description/>
- </valueHelp>
- <valueHelp>
- <format>tftp://&lt;host&gt;/&lt;path&gt;</format>
- <description/>
- </valueHelp>
- <valueHelp>
- <format>git+https://&lt;user&gt;:&lt;passwd&gt;@&lt;host&gt;/&lt;path&gt;</format>
- <description/>
- </valueHelp>
- <constraint>
- <validator name="url --file-transport"/>
- <regex>(ssh|git|git\+(\w+)):\/\/.*</regex>
- </constraint>
- <multi/>
</properties>
- </leafNode>
+ <children>
+ <node name="scp">
+ <properties>
+ <help>Archive configuration using SCP</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="sftp">
+ <properties>
+ <help>Archive configuration using SFTP</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="ssh">
+ <properties>
+ <help>Archive configuration using SSH</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="ftp">
+ <properties>
+ <help>Archive configuration using FTP</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="ftps">
+ <properties>
+ <help>Archive configuration using FTP over TLS</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="http">
+ <properties>
+ <help>Archive configuration using HTTP</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="https">
+ <properties>
+ <help>Archive configuration using HTTPS</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="git">
+ <properties>
+ <help>Archive configuration using git</help>
+ </properties>
+ <children>
+ <leafNode name="transport">
+ <properties>
+ <help>Transport used to reach the git remote</help>
+ <completionHelp>
+ <list>https http ssh file</list>
+ </completionHelp>
+ <valueHelp>
+ <format>https</format>
+ <description>Push over HTTPS</description>
+ </valueHelp>
+ <valueHelp>
+ <format>http</format>
+ <description>Push over plain HTTP</description>
+ </valueHelp>
+ <valueHelp>
+ <format>ssh</format>
+ <description>Push over SSH</description>
+ </valueHelp>
+ <valueHelp>
+ <format>file</format>
+ <description>Push to a local repository (set path, no server)</description>
+ </valueHelp>
+ <constraint>
+ <regex>(https|http|ssh|file)</regex>
+ </constraint>
+ </properties>
+ </leafNode>
+ #include <include/config-management/remote-auth.xml.i>
+ </children>
+ </node>
+ <node name="tftp">
+ <properties>
+ <help>Archive configuration using TFTP</help>
+ </properties>
+ <children>
+ #include <include/config-management/remote.xml.i>
+ </children>
+ </node>
+ </children>
+ </tagNode>
#include <include/source-address-ipv4-ipv6.xml.i>
#include <include/interface/vrf.xml.i>
</children>