summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-10-10 16:13:33 +0100
committerGitHub <noreply@github.com>2024-10-10 16:13:33 +0100
commit9615610ec9daf28d271afbdfb471426a7748db2b (patch)
treef64837212af055db0af54e2c87c8ff0426645637 /src/migration-scripts
parent3bc900722892dba525b7cd6bada4e6327b01fffe (diff)
parent7765e037b9fc9913b58a39bfa39209ebfd3b3f71 (diff)
downloadvyos-1x-9615610ec9daf28d271afbdfb471426a7748db2b.tar.gz
vyos-1x-9615610ec9daf28d271afbdfb471426a7748db2b.zip
Merge pull request #4147 from sarthurdev/haproxy
haproxy: T6745: Rename reverse-proxy to haproxy
Diffstat (limited to 'src/migration-scripts')
-rwxr-xr-xsrc/migration-scripts/reverse-proxy/1-to-227
1 files changed, 27 insertions, 0 deletions
diff --git a/src/migration-scripts/reverse-proxy/1-to-2 b/src/migration-scripts/reverse-proxy/1-to-2
new file mode 100755
index 000000000..61612bc36
--- /dev/null
+++ b/src/migration-scripts/reverse-proxy/1-to-2
@@ -0,0 +1,27 @@
+# Copyright 2024 VyOS maintainers and contributors <maintainers@vyos.io>
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this library. If not, see <http://www.gnu.org/licenses/>.
+
+# T6745: Rename base node to haproxy
+
+from vyos.configtree import ConfigTree
+
+base = ['load-balancing', 'reverse-proxy']
+
+def migrate(config: ConfigTree) -> None:
+ if not config.exists(base):
+ # Nothing to do
+ return
+
+ config.rename(base, 'haproxy')