如何使用wls获得python脚本的部署

2024-03-28 13:31:03 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图通过python脚本访问web逻辑服务器中的部署运行状况。我的状态是ACTIVE或INACTIVE,但我不知道如何获取运行状况以了解部署是否正常或处于警告helath状态。你知道吗

这适用于带有web logic 10.3的suse linux 10服务器。你知道吗

cd ('AppDeployments')
myapps=cmo.getAppDeployments()
for appName in myapps:
        domainConfig()
        cd ('/AppDeployments/'+appName.getName()+'/Targets')
        mytargets = ls(returnMap='true')
        domainRuntime()
        cd('AppRuntimeStateRuntime')
        cd('AppRuntimeStateRuntime')
        for targetinst in mytargets:
            curstate4=cmo.getIntendedState(appName.getName(),targetinst)
            lines=[curstate4, '|', targetinst, '|', appName.getName(), '\n']

然后我将行写入文件。你知道吗

我想从部署中获取运行状况,而不是获取状态。你知道吗


Tags: in服务器webfor状态部署cd运行状况