Network Deployment (Distributed operating systems), v8.0 > Reference > Jython script library
Business-level application configuration scripts
The scripting library provides multiple script procedures to automate the application server configurations. Use the scripts in this topic to create, query, and manage your business-level applications. We can run each script individually or combine procedures to create custom automation scripts.
The AdminBLA script procedures are located in the WAS_HOME/scriptLibraries/application/V70 directory.
Use the following script procedures to configure and administer your business-level applications:
- addCompUnit
- createEmptyBLA
- deleteAsset
- deleteBLA
- deleteCompUnit
- editAsset
- editCompUnit
- exportAsset
- importAsset
- startBLA
- stopBLA
Use the following script procedures to query your business-level application configurations:
The commands, viewBLA, viewAsset, and viewCompUnit only display output to the console and do not return data to the calling Jython script. These commands are not intended to be used as part of a script to store the output of the command to a string variable. By using these commands in a Jython script to store the output to a string variable, the string variable will only contain the value "Operation Successful!".
When invoked, as intended, with the Jython wsadmin interface, these commands properly display output to the console.
addCompUnit
This script adds assets, shared libraries, or additional business-level applications as composition units to the empty business-level application. A composition unit represents an asset in a business-level application. A configuration unit enables the asset contents to interact with other assets in the application. It also enables the product run time to load and run asset contents.
To run the script, specify the business-level application name and the composition unit source arguments, as defined in the following table:
addCompUnit argument descriptions. Run the script to add a composition unit to a business-level application.
Argument Description blaName Name of the business-level application to which the system adds the composition unit. compUnitID Name of the composition unit to add to the business-level application of interest. deployableUnit Optionally specifies the name of the deployable unit for the asset. A deployable unit is the smallest portion of an asset that can be individually chosen for deployment compUnitName Optionally specifies the name for the composition unit to add. compUnitDescription Optionally specifies a description for the new composition unit. startingWeight Optionally specifies the starting weight of the composition unit. target Optionally specifies the target to which the composition unit is mapped. activationPlan Optionally specifies the activation plan for the composition unit. Syntax
AdminBLA.addCompUnit(blaName, compUnitID, deployableUnit, compUnitName, compUnitDescription, startingWeight, target, activationPlan)Example usage
AdminBLA.addCompUnit("bla1", "asset1.zip", "default", "myCompositionUnit", "cu description", "1", "server1", "specname=actplan1")
createEmptyBLA
This script creates a new business-level application in the environment. Create an empty business-level application and then add assets, shared libraries, or business-level applications as composition units to the empty business-level application.
To run the script, specify the business-level application name argument, as defined in the following table:
createEmptyBLA argument descriptions. Run the script to create a business-level application.
Argument Description blaName Name to assign to the new business-level application. description Optionally specifies a description for the business-level application. Syntax
AdminBLA.createEmptyBLA(blaName, description)Example usage
AdminBLA.createEmptyBLA("myBLA", "bla to control transactions")
deleteAsset
This script removes a registered asset from the configuration.
To run the script, specify the asset ID argument, as defined in the following table:
deleteAsset argument description. Run the script to delete an asset.
Argument Description assetID Name of the asset to delete. Syntax
AdminBLA.deleteAsset(assetID)Example usage
AdminBLA.deleteAsset("asset.zip")
deleteBLA
This script removes a business-level application from the configuration.
To run the script, specify the business-level application name argument, as defined in the following table:
deleteBLA argument description. Run the script to delete a business-level application.
Argument Description blaName Name of the business-level application to delete. Syntax
AdminBLA.deleteBLA(blaName)Example usage
AdminBLA.deleteBLA("myBLA")
deleteCompUnit
This script removes a composition unit from a specific business-level application configuration.
To run the script, specify the business-level application name and composition unit arguments, as defined in the following table:
deleteCompUnit argument descriptions. Run the script to delete a composition unit from a business-level application.
Argument Description blaName Name of the business-level application of interest. compUnitID Identifier of the composition unit to delete. Syntax
AdminBLA.deleteCompUnit(blaName, compUnitID)Example usage
AdminBLA.deleteCompUnit("myBLA", "asset.zip")
editAsset
This script edits the metadata of a specific registered asset.
To run the script, specify the arguments that are defined in the following table:
editAsset argument descriptions. Run the script to change an asset.
Argument Description assetID Name of the asset to edit. assetDescription Optionally specifies the new description of the asset of interest. assetDestinationURL Optionally specifies the new destination URL for the asset of interest. assetTypeAspects Optionally specifies the new type aspects for the asset of interest. assetRelationships Optionally specifies the new asset relationship configurations. filePermission Optionally specifies the new file permission configuration for the asset of interest. validateAsset Optionally specifies whether the command validates the asset. Syntax
AdminBLA.editAsset(assetID, assetDescription, assetDestinationURL, assetTypeAspects, assetRelationships, filePermission, validateAsset)Example usage
AdminBLA.editAsset("asset1.zip", "asset for testing", "c:/installedAssets/asset1.zip", "WebSpere:spec=sharedlib", "", ".*\.dll=755#.*\.so=755#.*\.a=755#.*\.sl=755", "true")
editCompUnit
This script edits a specific composition unit within a business-level application.
To run the script, specify the business-level application name and composition unit ID arguments, as defined in the following table:
editCompUnit argument descriptions. Run the script to change a composition unit.
Argument Description blaName Name of the business-level application to which the composition unit is associated. compUnitID Name of the composition unit to edit. compUnitDescription Optionally specifies a new description for the composition unit. startingWeight Optionally specifies a new starting weight for the composition unit. target Optionally specifies a new target to which the composition unit is mapped. activationPlan Optionally specifies a new activation plan for the composition unit. Syntax
AdminBLA.editCompUnit(blaName, compUnitID, compUnitDescription, startingWeight, target, activationPlan)Example usage
AdminBLA.editCompUnit("bla1", "asset1.zip","cu description", "1", "server1", "specname=actplan1")
exportAsset
This script exports a registered asset to a file on the system.
To run the script, specify the asset ID and file name arguments, as defined in the following table:
exportAsset argument descriptions. Run the script to export an asset.
Argument Description assetID Identifier of the asset to export. fileName Fully qualified file path to which the system exports the asset. Syntax
AdminBLA.exportAsset(assetID, fileName)Example usage
(Windows)
AdminBLA.exportAsset("asset.zip", "c:\temp\a.zip")(AIX) (Solaris)AdminBLA.exportAsset("asset.zip", "/temp/a.zip")
importAsset
This script imports and registers an asset to a management domain in your configuration.
To run the script, specify the assetID, displayDescription, and deployableUnit arguments, as defined in the following table:
importAsset argument descriptions. Run the script to import an asset.
Argument Description assetID Asset to import. displayDescription Optionally specifies whether the script displays the description of the asset. dispDeployableUnit Optionally specifies whether the script displays the deployable units for the asset to import. Syntax
AdminBLA.importAsset(assetID, displayDescription, dispDeployableUnit)Example usage
AdminBLA.importAsset("asset.zip", "true", "true")
startBLA
This script starts the business-level application process in the configuration.
To run the script, specify business-level application name argument, as defined in the following table:
Table 10. startBLA argument description. Run the script to start a business-level application.
Argument Description blaName Name of the business-level application to start. Syntax
AdminBLA.startBLA(blaName)Example usage
AdminBLA.startBLA("myBLA")
stopBLA
This script stops the business-level application process in the configuration.
To run the script, specify the business-level application name argument, as defined in the following table:
Table 11. stopBLA argument description. Run the script to stop a business-level application.
Argument Description blaName Name of the business-level application to stop. Syntax
AdminBLA.stopBLA(blaName)Example usage
AdminBLA.stopBLA("myBLA")
help
Display the script procedures that the AdminBLA script library supports.
To display detailed help for a specific script, specify the name of the script of interest, as defined in the following table:
Table 12. help argument description. Run the script to display help.
Argument Description script Name of the script of interest. Syntax
AdminBLA.help(script)Example usage
AdminBLA.help("createEmptyBLA")
listAssets
Display the registered assets in the configuration.
To run the script, you can choose to specify the asset ID, display description, and display deployable units arguments, as defined in the following table:
Table 13. listAssets argument descriptions. Run the script to list assets.
Argument Description assetID Optionally specifies the group ID for which to display authorization groups. displayDescription Optionally specifies whether the command displays a description for each asset. Specify true to display descriptions. displayDeployUnits Optionally specifies whether the command displays the deployable units that are associated with the assets. Specify true to display the deployable units. Syntax
AdminBLA.listAssets(assetID, displayDescription, displayDeployUnits)Example usage
AdminBLA.listAssets("asset.zip", "true", "true")
listBLAs
Display each or specific business-level applications in your configuration.
To run the script, you can choose to specify the business-level application name and the display description arguments, as defined in the following table:
Table 14. listBLAs argument descriptions. Run the script to list business-level applications.
Argument Description blaName Optionally specifies the name of a business-level application of interest. displayDescription Optionally specifies whether the command displays a description for each business-level application. Specify true to display descriptions. Syntax
AdminBLA.listBLAs(blaName, displayDescription)Example usage
AdminBLA.listBLAs("", "true")
listCompUnits
Display composition units within a business-level application.
To run the script, specify the business-level application name argument, as defined in the following table:
Table 15. listCompUnits argument descriptions. Run the script to list composition units.
Argument Description blaName Name of the authorization group of interest. displayDescription Optionally specifies whether the command displays a description for each composition unit. Specify true to display descriptions. Syntax
AdminBLA.listCompUnits(blaName, displayDescription)Example usage
AdminBLA.listCompUnits("myBLA", "true")
viewBLA
Display the name and description of the business-level application of interest.
To run the script, specify the configuration ID argument of the business-level application of interest as defined in the following table:
Table 16. viewBLA argument description. Run the script to view information about a business-level application.
Argument Description blaID Configuration ID of the business-level asset of interest. Syntax
AdminBLA.viewBLA(blaID)Example usage
AdminBLA.viewBLA("bla01.zip")
viewAsset
Display the configuration attributes for a specific registered asset.
To run the script, specify the asset ID argument, as defined in the following table:
Table 17. viewAsset argument description. Run the script to view information about an asset.
Argument Description assetID Name of the asset of interest. Syntax
AdminBLA.viewAsset(assetID)Example usage
AdminBLA.viewAsset("asset.zip")
viewCompUnit
Display the configuration attributes for a specific composition unit within a business-level application.
To run the script, specify the business-level application and composition unit ID arguments, as defined in the following table:
Table 18. viewCompUnit argument descriptions. Run the script to view information about a composition unit.
Argument Description blaName Name of the business-level application of interest. compUnitID Identifier for the composition unit of interest. Syntax
AdminBLA.viewCompUnit(blaName, compUnitID)Example usage
AdminBLA.viewCompUnit("myBLA", "asset.zip")
Business-level applications
Assets
Composition units
Use the script library to automate the application serving environment using wsadmin.sh
Update business-level applications