A10_LADS_Connector.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Phantom-Cyber 作者: joelwking 项目源码 文件源码
def _test_connectivity(self, param, LADS):
        """
        Called when the user depresses the test connectivity button on the Phantom UI.
        This query returns a list of configured applications
            https://api.a10networks.com/api/v2/applications
        """
        self.debug_print("%s _test_connectivity %s" % (A10_LADS_Connector.BANNER, param))

        msg = "test connectivity to %s status_code: " % (LADS.dashboard)

        if LADS.genericGET(uri="/api/v2/applications"):
            # True is success
            return self.set_status_save_progress(phantom.APP_SUCCESS, msg + "%s %s apps: %s" %
                   (LADS.status_code, httplib.responses[LADS.status_code], LADS.get_names(LADS.response)))
        else:
            # None or False, is a failure based on incorrect IP address, username, passords
            return self.set_status_save_progress(phantom.APP_ERROR, msg + "%s %s" % (LADS.status_code, LADS.response))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号