From 2acc84dc69bc79dfd0e12db574776dc374effaf9 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 23 Apr 2024 18:55:05 +0800 Subject: [PATCH] fix: Adhoc support mariadb with module of mysql --- apps/ops/models/job.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/ops/models/job.py b/apps/ops/models/job.py index f1fd8adb9..15724ec3d 100644 --- a/apps/ops/models/job.py +++ b/apps/ops/models/job.py @@ -67,6 +67,7 @@ class JMSPermedInventory(JMSInventory): protocol_supported_modules_mapping = { 'mysql': ['mysql'], + 'mariadb': ['mysql'], 'postgresql': ['postgresql'], 'sqlserver': ['sqlserver'], 'ssh': ['shell', 'python', 'win_shell', 'raw', 'huawei'], @@ -77,7 +78,7 @@ class JMSPermedInventory(JMSInventory): host['error'] = "Module {} is not suitable for this asset".format(self.module) return host - if protocol.name in ('mysql', 'postgresql', 'sqlserver'): + if protocol.name in ('mariadb', 'mysql', 'postgresql', 'sqlserver'): host['login_host'] = asset.address host['login_port'] = protocol.port host['login_user'] = account.username