python wlst 应用启停


startApplication
Command Category: Deployment Commands

Use with WLST: Online

启动一个应用, 让它对用户可用。

应用必须是完全配置的在WebLogic domain 是可用的

startApplication 命令返回一个WLSTProgress 对象 

你可以访问检查命令的状态。

例子:

下面的例子启动BigApp 应用使用特定的部署选项

wls:/mydomain/serverConfig/Servers> progress=startApplication('BigApp', stageMode='NOSTAGE', testMode='false') 
Starting the application...
Successfully started the application.



testMode—Boolean value specifying whether to start the Web application with restricted access. This option defaults to false.

testMode--- 布尔值 指定是否启动Web application 使用受限访问  选项默认是false


先前的例子存储WLSTProgress 对象,在这个例子,progress  

[weblogic@zjtlcb bin]$ cat startapp.py 
from java.util import *
from javax.management import *
import javax.management.Attribute
print 'starting the script .... '
connect(adminServerName="AdminServer")
progress=startApplication('DevOps', stageMode='STAGE', testMode='false')
print progress.getState()



停止app:

stopApplication
Command Category: Deployment Commands

Use with WLST: Online


描述:

停止应用,让它对用户不可用。  应用必须是完整配置和可用的

Example
The following example stops the BigApp application.

wls:/offline> progress=stopApplication('BigApp') 
Stopping the application...
Successfully stopped the application.
原文地址:https://www.cnblogs.com/hzcya1995/p/13348665.html