Function: | BcAdminProxy.perform()
|
|
| Starts the action specified in action for the proxy. |
Parameters: | bc_object (BcObject of type BcObjectType.PROXY )
|
|
| Proxy that is to be administered. |
| action (String)
|
|
| Action that is to be started for the specified proxy. Possible values are (see BcDef.ACTION_xxx in the MC-CLI-JavaDoc) |
|
| check-adm
| Checks the proxy's administration status. |
|
| check-avail
| Checks the proxy's availability. First of all the availability of the proxy container is checked. This is followed by a check of the proxy's components and communication partners. |
|
| restart
| Terminates and restarts the proxy. |
|
| save
| Saves the changes that have been made for this proxy in this session. |
|
| start
| Starts the proxy. |
|
| stop
| Terminates the proxy. |
|
| update-config
| Enters the saved changes in the configuration of the proxy. |
| params (kw)
|
|
| Dictionary with the key-value pairs for the parameters that are to be passed to the specified action. If action=check-avail then the following key-value pair can be specified in the dictionary params : key="all-components“
value=BcDef.BOOL_TRUE if the availability of all the components of the proxy is to be checked.
value=BcDef.BOOL_FALSE if only the availability of the proxy container is to be checked (default).
If action=start , stop , restart or update-config , then the following key-value pair can be specified in the dictionary params: |
|
| key = | value = |
|
| all-components
| BcDef.BOOL_TRUE / BcDef.BOOL_FALSE
|
|
| container
| BcDef.BOOL_TRUE / BcDef.BOOL_FALSE
|
|
| communication-service
| BcDef.BOOL_TRUE / BcDef.BOOL_FALSE
|
|
| lu62gateway
| BcDef.BOOL_TRUE / BcDef.BOOL_FALSE / BcDef.COLDSTART (only possible for action=start )
|
|
| The following meanings apply: key="all-components“ Specifies whether the action should be performed for all components.
key=container Specifies whether the action should be performed for the container of the proxy.
key=communication-service Specifies whether the action should be performed for the communication service of the proxy.
key=lu62gateway Specifies whether the action should be performed for the openUTM-LU62 Gateway of the proxy.
value=BcDef.BOOL_TRUE The specified action should be performed for this component of the proxy.
value=BcDef.BOOL_FALSE The specified action should not be performed for this component of the proxy (default).
value=BcDef.COLDSTART The specified action should be performed as a cold start for this component of the proxy (only permitted for action=start and key=lu62gateway ).
|
Return: | (BcObject of type BcObjectType.ACTION ) |
|
| Contains all information about the started action and all its subactions. To obtain more detailed information, you can call a function of the BcAdminAction module with this object as parameter. |
Exceptions: | BcParameterException , BcObjectException , BcToolException
|
Note: | If the proxy object belongs to a proxy cluster then the "save" action cannot be initiated with BcAdminProxy.perform() . The modified properties are saved directly in the modifyProperties() call or via BcAdminProxyCluster.perform() . If the proxy object belongs to a proxy cluster then the "update-config" action cannot be initiated with BcAdminProxy.perform() . It must be initiated using BcAdminProxyCluster.perform() . If the key-value pair "all-components ", BcDef.BOOL_TRUE is specified in params for the actions start /stop /restart then other key-value pairs are ignored.
|
Example: |
...
import BcAdminProxy
...
proxy_obj=BcAdminProxy.getObject("proxy")
bcaction=BcAdminProxy.perform(proxy_obj,"check-avail")
...
|