本文整理匯總了Python中mysql.utilities.common.server.Server.supports_plugin方法的典型用法代碼示例。如果您正苦於以下問題:Python Server.supports_plugin方法的具體用法?Python Server.supports_plugin怎麽用?Python Server.supports_plugin使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mysql.utilities.common.server.Server
的用法示例。
在下文中一共展示了Server.supports_plugin方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: check_audit_log
# 需要導入模塊: from mysql.utilities.common.server import Server [as 別名]
# 或者: from mysql.utilities.common.server.Server import supports_plugin [as 別名]
def check_audit_log(self):
"""Verify if the audit log plugin is installed on the server.
Return the message error if not, or None.
"""
error = None
server = Server({'conn_info': self.options.get("server_vals", None)})
server.connect()
# Check to see if the plug-in is installed
if not server.supports_plugin("audit"):
error = "The audit log plug-in is not installed on this " + \
"server or is not enabled."
server.disconnect()
return error