Administer managed domains, firmware, and settings versions using scripting
Use the wsadmin tool to administer managed domain and firmware version history for the DataPower appliance manager. We can revert to previous domain and firmware versions that exist in the DataPower appliance manager.
Before beginning, set up the DataPower appliance manager by adding and configuring appliances and managed sets.
When a DataPower administrator modifies the domain, firmware, or settings, the DataPower appliance manager automatically creates a copy of the previous configuration as domain, firmware, and settings versions if the following conditions apply:
- The DataPower appliance manager creates domain versions if the appliance is in a managed set and the domain is managed.
- The DataPower appliance manager only creates firmware versions when the administrator adds new firmware versions to the DataPower appliance manager.
- The DataPower appliance manager creates settings versions if the appliance is configured in a managed set.
Use the wsadmin tool to view a history of versions, revert to a previous domains version, or copy a domain version to another managed set. This topic provides examples for modifying the domain, firmware, and settings versions. To view additional information and examples for the commands in this topic, refer to the documentation for the dpManagerCommands .
Tasks
- Administer managed domain versions.
- Start the wsadmin scripting tool.
- Display the IDs of the managed sets in the configuration.
Use the dpGetAllManagedSetIDs command to display the IDs of each managed set in the DataPower appliance manager configuration.:
AdminTask.dpGetAllManagedSetIds()- Display each domain managed by a specific managed set.
Use the dpGetAllMSDomainIds command to display the domain IDs for each domain in a specific managed set:
AdminTask.dpGetAllMSDomainIds('[-managedSetId myManagedSet]')- Display each domain version that exists for a specific domain.
Use the dpGetAllMSDomainVersionIds command to display the domain version IDs for each domain version that exists for a specific domain:
AdminTask.dpGetAllMSDomainVersionIds('[-msDomainId myManagedSet:domain1]')For this example, the command returns the following output:
[myManagedSet:domain1:1, myManagedSet:domain1:2, myManagedSet:domain1:3, myManagedSet:domain1:4]- Display domain version information.
Use the dpGetMSDomainVersion command to display detailed domain version information, including the time that the DataPower appliance manager created the version and comments:
AdminTask.dpGetMSDomainVersion('[-msDomainVersionId myManagedSet:domain1:1]')- Specify a comment for a domain version.
Use the dpSetDomainVersion command to specify a comment for a domain, as the following example demonstrates:
AdminTask.dpSetFirmwareVersion('-firmwareVersionId "XS40:9002::DataGlue;JAXP-API;PKCS7-SMIME;HSM;:3.6.0.15" -userComment "revert to firmware version 3.6.0.15"')- Change to the first version of the domain.
Use the dpSetMSDomainVersion command to modify the version of the domain that the managed set uses:
AdminTask.dpSetMSDomainVersion('[-msDomainVersionId myManagedSet:domain1:2 -userComment "revert to previous version"]')
- Administer firmware versions.
- Start the wsadmin scripting tool.
- Display the IDs of the firmware in the configuration.
Use the dpGetAllFirmwareIds command to display the IDs of each firmware in the DataPower appliance manager configuration.:
AdminTask.dpGetAllFirmwareIds()- Display the firmware versions that exist for a specific firmware.
Use the dpGetAllFirmwareVersionIds command to display each firmware version ID for the firmware of interest, as the following example demonstrates:
AdminTask.dpGetAllFirmwareVersionIds('-firmwareId "XS40:9002::DataGlue;JAXP-API;PKCS7-SMIME;HSM;"')For this example, the command returns the following output:
[XS40:9002::DataGlue;JAXP-API;PKCS7-SMIME;HSM;:3.6.0.15, XS40:9002::DataGlue;JAXP-API;PKCS7-SMIME;HSM;:3.6.0.16]- Specify a comment for a firmware version.
Use the dpSetFirmwareVersion command to specify a comment for a firmware version:
AdminTask.dpSetFirmwareVersion('-firmwareVersionId "XS40:9002::DataGlue;JAXP-API;PKCS7-SMIME;HSM;:3.6.0.15" -userComment "revert to firmware version 3.6.0.15"')- Set the firmware version for the managed set.
Use the dpSetManagedSet command to assign the firmware version to the managed set:
AdminTask.dpSetManagedSet('-managedSetId testSet -desiredFirmwareVersionId XS40:9002::DataGlue;JAXP-API;PKCS7-SMIME;HSM;:3.6.0.15')
- Administer settings versions.
- Display the IDs of the managed sets in the configuration.
Use the dpGetAllManagedSetIDs command to display the IDs of each managed set in the DataPower appliance manager configuration.:
AdminTask.dpGetAllManagedSetIds()- Display additional information about the managed set of interest.
Use the dpGetManagedSet command do display the configuration attributes for the managed set. The value of the settingsId attribute represents the settings object of the managed set of interest.
AdminTask.dpGetManagedSet('-managedSetId myManagedSet')- Display each version of the settings of interest.
Use the dpGetAllMSSettingsVersionIds command to display the ID of each settings version for the settings of interest:
AdminTask.dpGetAllMSSettingsVersionIds('-msSettingsId mySettings')For this example, the command returns the following output:
[myManagedSet:1, myManagedSet:2, MyManagedSet:3]- Determine the settings version that the managed set currently uses.
Use the dpGetMSSettings command to display the configuration attributes for the settings version that the managed set currently uses. In the command output, the value of the desiredSettingsVersionId attribute represents the settings version that the managed set uses.
AdminTask.dpGetMSSettings('-msSettingsId mySettings')For this example, the command returns the following output:
[MyManagedSet:3]- Set the settings version that the managed set uses.
Use the dpSetMSSettings command to set the settings version to use for the managed set:
AdminTask.dpSetMSSettings('-msSettingsId myMS1 -desiredSettingsVersionId myMS1:1')- Specify a comment for a settings version.
Use the dpSetMSSettingsVersion command to specify a comment for a settings version in the configuration:
AdminTask.dpSetMSSettingsVersion('[-msSettingsVersionId myManagedSet:2 -userComment "added new timeserver"]')
What to do next
Use the wsadmin tool to manage appliances, firmware, domains, managed sets, and appliance-specific settings.
Related:
WebSphere DataPower appliance manager overview Update firmware versions for DataPower appliances using scripting Set up the DataPower appliance manager using scripting Copying DataPower appliance domains between managed sets using scripting Manage versions of sharable appliance settings Administer managed domain versions dpManagerCommands