Logical Partitions and Disk Management
Processing order
The Action interface
The Information interface
The Status interface
Messages
Validation of the XML
Version
Terminology
Logical Partition Markup Language (LPML) is defined as LPARConfigurationScript. Disk Management Markup Language (DMML) is defined as DMConfigurationScript.
To work with Logical Partitions or Disk Management in V5R1 or later, new XML based languages are being provided. These new interfaces provide the ability to view current configuration information, change configurations, and check the status of configuration change requests. Before you can use these interfaces, it is necessary to understand how Logical Partitioning or Disk Management works. Once you have this information, this document will explain how to write XML to build requests to send to the server and interpret the results returned.
Both DMConfigurationScript and LPARConfigurationScript use the same design. This design breaks requests and responses into three types: Informational, Status, and Action. These three types are identified by the tags <Info>, <Status>, and <Action> respectively. A single request or response may consist of one or more of these types in no particular order. The format for all data sent should have this basic structure:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action>
<!-- Requests to perform a configuration change go here
-->
</Action>
<Info>
<!-- Requests for information about the current configuration go
here -->
</Info>
<Status>
<!-- Requests for information about the status of a
configuration
change request goes here -->
</Status>
</DMConfigurationScript>
The format for data returned may look like:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action>
<!-- will contain ActionProfile with request results
-->
</Action>
<Info>
<!-- will contain Information Requested
-->
</Info>
<Status>
<!-- will contain Status information requested
-->
</Status>
</DMConfigurationScript>
In general, tags are processed in the order in which they are listed in the
script. Thus, a script may include an Status
request (a), followed by an Info request (b),
followed by another Status request (c). The requests will be
processed and responded to in the order they were received (a, b, c). Action
requests are processed slightly differently. (See Processing order in
The Action interface.)
Any request for a configuration change is requested as an
action. For LPAR actions, the user must explicitely send an
<CommitActions> request in order to commit any previously
requested actions. If a <CloseSession> is requested before
an action is committed, all requested changes will be lost. No such tag is
necessary for Disk Management. The following are the guidelines for using an
action.
The status of an action can be one of the following:
Open the action interface:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action>
<OpenSession/>
</Action>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action Handle="808AE63AD3EB002A"
ActionStatus="Successful">
<ActionProfile ActionType="OpenSession">
</ActionProfile>
</Action>
</DMConfigurationScript>
Request the scan disk:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action Handle="808AE63AD3EB002A">
<ScanDisk>
<Disk Name="DD002"/>
</ScanDisk>
</Action>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action>
<ActionProfile ActionType="ScanDisk" ActionID="0">
</ActionProfile>
</Action>
</DMConfigurationScript>
Check the Status:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Status Handle="808AE63AD3EB002A">
<ActionProfile ActionType="ScanDisk" ActionID="0">
</ActionProfile>
</Status>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Status>
<ActionProfile ActionType="ScanDisk"
ActionID="0"
PercentDone="24"
ActionState="Running">
</ActionProfile>
</Status>
</DMConfigurationScript>
Close the action interface:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action Handle="808AE63AD3EB002A">
<CloseSession/>
</Action>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action ActionStatus="Successful">
<ActionProfile ActionType="CloseSession">
</ActionProfile>
</Action>
</DMConfigurationScript>
Information requests may be requested regardless of the current state of the action interface. The information returned will be the most up to date information possible. The information interface may also be used to find out about proposed configuration changes. If a script contains an Info request after an Action request, the Info request will be run after the actions are verified, but before the actions have been run. The system state shown by this info request will not be affected by the requested actions until these actions have completed.
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Info>
<IOPInfo Format="All">
<IOPFilter Value="All"/>
</IOPInfo>
</Info>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Info>
<IOPInfo>
<IOP
Number="1"
Name="CMB01"
NumberOfControllers="6"
NumberOfDisks="4"
SerialNumber="10-5059003"
</IOP>
</IOPInfo>
</Info>
</DMConfigurationScript>
The purpose of the status interface is to show the status of action requests. It is also to be used to keep the action interface open for a particular client. Status can be checked for all actions, actions owned by the client that have the action interface open, or for an action specified by the actionID. If an action fails when it is running, the status interface can be used to retrieve error information about the failure. For long running actions, the status may also return the percent done of the action and the stage of the action. Actions are not required to provide the percent done or the stage. If the stage is provided, the action description will identify the possible values for this attribute. Up to 512 ActionProfiles are stored on the system, however this data is lost when the system is IPLed.
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Status Handle="80A186238C9B0061">
</Status>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Status>
<ActionProfile>
ActionType="ScanDisk">
ActionID="1">
PercentDone="24">
ActionState="Running">
</ActionProfile>
</Status>
</DMConfigurationScript>
Messages are used to return information about a request. They may occur anywhere in the response and are the primary means for the system to communicate errors, warnings and information about an action. Messages will always contain a message ID, and may contain one or more pieces of data to further explain the message. For example, if an <OpenSession> tag is sent while the interface is already open, the response will be the following:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action>
<OpenSession/>
</Action>
</DMConfigurationScript>
Response:
<?xml version = "1.0" ?>
<DMConfigurationScript DTDVersion="1">
<Action ActionStatus="Failed">
<Message
MessageID="2"
MessageType="Error">
<MessageData
Type="SessionType"
Value="GUI"/>
</Message>
</Action>
</DMConfigurationScript>
When a script is received by the system, the syntax and
data are validated. If there are any errors, the script will
not be processed. It is advised to validate the request
against the Document Type Definition (DTD) before sending the
request as syntax errors will be rejected without any
information about where the error occurred. Data errors will be rejected with
a message that identifies the type of error and the data in error. Errors that
occur during the running of an action may be identified through the status
interface.
The version of the markup language will start at 1 and will be incremented every time the language is modified. All versions of DMConfigurationScript and LPARConfigurationScript and any other Hardware Configuration Markup Language are guaranteed to be upward compatible. Therefore if a client understands version 2 and the server understands version 3, this is a valid configuration. However if the client only understands version 3 and the server understands version 2, communications will not be possible. The user interface may be written to work with any version of the server by conditionally allowing newer actions only for systems that support these actions. Tags that are added or changed will be identified in the documentation along with the version in which they changed. To get the version of the server, the client can send an empty request to the server with version 1 specified. The server will respond back with its version.
Request:
<?xml version = "1.0" ?>
LPARConfigurationScript DTDVersion="1">
</LPARConfigurationScript>
Response:
<?xml version = "1.0" ?>
<LPARConfigurationScript DTDVersion="3">
</LPARConfigurationScript>