summaryrefslogtreecommitdiff
path: root/src/migration-scripts/ids/1-to-2
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2025-04-15 15:51:25 +0100
committerGitHub <noreply@github.com>2025-04-15 15:51:25 +0100
commit2f54cbc0504a20424274e45b9210467d33acf919 (patch)
tree7700bcea0ff83cbbce7c05b4880d1f8d2ff7a3c4 /src/migration-scripts/ids/1-to-2
parenta86a3980b4ffae9970de1abd123e02965ab3356a (diff)
parent5797e2c0f489272f2ff32b3884ea756f306b50e4 (diff)
downloadvyos-1x-2f54cbc0504a20424274e45b9210467d33acf919.tar.gz
vyos-1x-2f54cbc0504a20424274e45b9210467d33acf919.zip
Merge pull request #4214 from dmbaturin/T6919-good-bye-fastnetmon
ids: T7241: remove Fastnetmon from the base system
Diffstat (limited to 'src/migration-scripts/ids/1-to-2')
-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)