summaryrefslogtreecommitdiff
path: root/src/migration-scripts
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2025-04-14 11:56:36 +0100
committerDaniil Baturin <daniil@baturin.org>2025-04-14 16:49:52 +0100
commit5797e2c0f489272f2ff32b3884ea756f306b50e4 (patch)
tree2f3d13abe9e2dfb737941e3edc3ee2ffacb82e56 /src/migration-scripts
parent29cc3d790fa690356016a7df21ec75b12b84cb3c (diff)
downloadvyos-1x-5797e2c0f489272f2ff32b3884ea756f306b50e4.tar.gz
vyos-1x-5797e2c0f489272f2ff32b3884ea756f306b50e4.zip
ids: T7241: remove Fastnetmon from the base system
It will eventually be moved to an addon
Diffstat (limited to 'src/migration-scripts')
-rw-r--r--src/migration-scripts/ids/1-to-230
1 files changed, 30 insertions, 0 deletions
diff --git a/src/migration-scripts/ids/1-to-2 b/src/migration-scripts/ids/1-to-2
new file mode 100644
index 000000000..4c0333c88
--- /dev/null
+++ b/src/migration-scripts/ids/1-to-2
@@ -0,0 +1,30 @@
+# Copyright 2025 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/>.
+
+# T: Migrate threshold and add new threshold types
+
+from vyos.configtree import ConfigTree
+
+# The old 'service ids' path was only used for FastNetMon
+# Suricata is in 'service suricata',
+# so this isn't an overreach
+base = ['service', 'ids']
+
+def migrate(config: ConfigTree) -> None:
+ if not config.exists(base):
+ # Nothing to do
+ return
+ else:
+ config.delete(base)