def collect(self, config):
ds0 = config.datasources[0]
credentials = (ds0.zWBEMUsername, ds0.zWBEMPassword)
url = '{0}://{1}:{2}'.format(
'https' if ds0.zWBEMUseSSL else 'http',
ds0.manageIp, ds0.zWBEMPort
)
def _inner():
return WBEMConnection(url, credentials).ExecQuery(
ds0.params['query_language'],
ds0.params['query'],
namespace=ds0.params['namespace'])
return threads.deferToThread(_inner)
评论列表
文章目录