mirror of https://github.com/jumpserver/jumpserver
parent
9d898f0aec
commit
758d6ae81b
|
@ -33,7 +33,7 @@ class PingGatewayManager:
|
|||
err = _('No account')
|
||||
return False, err
|
||||
|
||||
logger.debug('Test account: {}'.format(account))
|
||||
print('Test account: {}'.format(account))
|
||||
try:
|
||||
proxy.connect(
|
||||
gateway.address,
|
||||
|
@ -91,7 +91,7 @@ class PingGatewayManager:
|
|||
|
||||
@staticmethod
|
||||
def on_host_success(gateway, account):
|
||||
logger.info('\033[32m {} -> {}\033[0m\n'.format(gateway, account))
|
||||
print('\033[32m {} -> {}\033[0m\n'.format(gateway, account))
|
||||
gateway.set_connectivity(Connectivity.OK)
|
||||
if not account:
|
||||
return
|
||||
|
@ -99,7 +99,7 @@ class PingGatewayManager:
|
|||
|
||||
@staticmethod
|
||||
def on_host_error(gateway, account, error):
|
||||
logger.info('\033[31m {} -> {} 原因: {} \033[0m\n'.format(gateway, account, error))
|
||||
print('\033[31m {} -> {} 原因: {} \033[0m\n'.format(gateway, account, error))
|
||||
gateway.set_connectivity(Connectivity.ERR)
|
||||
if not account:
|
||||
return
|
||||
|
@ -107,7 +107,7 @@ class PingGatewayManager:
|
|||
|
||||
@staticmethod
|
||||
def before_runner_start():
|
||||
logger.info(">>> 开始执行测试网关可连接性任务")
|
||||
print(">>> 开始执行测试网关可连接性任务")
|
||||
|
||||
def get_accounts(self, gateway):
|
||||
account = gateway.select_account
|
||||
|
|
Loading…
Reference in New Issue