Parts
Use the command-line interface to work with the Part object.
Part object
A Part object represents a particular part defined to PureApplication® Software. Use the Part object to query and manipulate the part definition. Attributes of the part and relationships between the part and other resources in PureApplication Software are represented as Jython attributes on the Part object. Manipulate these Jython attributes using standard Jython mechanisms to change the corresponding data on the IBM® PureApplication Software.
Help
is available for the Part object
on the command-line interface.
To get help, pass it as an argument to the help() function,
as shown in the following example:
>>> help(deployer.part)
Part attributes
The Part object has the following attributes:
- created
- The creation time of the part, as number of seconds since midnight, January 1, 1970 UTC. When the part is displayed, this value is shown as the date and time in the local timezone. This value is numeric and is automatically generated by the system. This attribute is read-only.
- currentmessage
- The message associated with the currentstatus of the part. This field is an eight character string value that is automatically generated by the system. This attribute is read-only.
- currentmessage_text
- Specifies the textual representation of the currentmessage attribute. This field is a string representation of the currentmessage attribute in the preferred language of the requester and is automatically generated by the system. This attribute is read-only.
- currentstatus
- Specifies a string constant representing the currentstatus of the classic virtual system pattern. This field is an eight character string value that is automatically generated by the system.
- currentstatus_text
- Specifies the textual representation of currentstatus. This string represents the currentstatus in the preferred language of the requester and is automatically generated by the system. This attribute is read-only.
- description
- The description of the part. This field is a string value with a maximum of 1024 characters. This attribute is read-only.
- id
- The ID of the part. This numeric value is automatically generated by the system. This attribute is read-only.
- label
- The label of this part. This field is a string value with a maximum of 1024 characters. This attribute is read-only.
- name
- The name of this part. This field is a string value with a maximum of 1024 characters. This attribute is read-only.
- owner
- A User object that references
the owner of this part. For more information about the properties
and methods supported by User objects,
enter the following command:
For more information about working with users and groups on the command-line, see User and user group management.>>> help(deployer.user)
- productids
- This attributes specifies all of the product IDs associated with this virtual image part.
- updated
- The time the part was last updated, as number of seconds since midnight, January 1, 1970 UTC. When the part is displayed, this value is shown as the date and time in the local timezone. This value is numeric and is automatically generated by the system. This attribute is read-only.
- validationmessage
- The message associated with the validationstatus attribute of the part. This attribute is read-only.
- validationmessage_text
- The textual representation of the validationmessage attribute. This attribute is read-only.
- validationstatus
- The status associated with validation of the part. This attribute is read-only.
- validationstatus_text
- The textual representation of the validationstatus attribute. This attribute is read-only.
- virtualimage
- A reference to the virtual image that defined this part. For
more information about the properties and methods supported by virtualimage objects, enter the following
command:
This value is automatically generated and cannot be changed. For more information about working with virtual images on the command-line, see the Related reference section.>>> help(deployer.virtualimage)
Part methods
The Part object has the following methods:
- isConceptual
- Indicates if this part is conceptual. A conceptual part is not tied to any particular virtual image until deployment time.
- addProductid
- Add a new product ID to the virtual image part. This method accepts
the following parameters:
- productid
- The product ID that you want to add. This parameter is required.
- licensetype
- The license type for this product ID. Valid values are:
- PVU
- Server
- licensecpu
- The CPU count limit for this server license. This parameter is required for the server license type.
- licensememory
- The memory limit in GB for this server license. This parameter
is required for the server license type, as shown in the following
example:
>>> mypart[0].addProductid('5724-X89', 'PVU') >>> mypart[0].addProductid('5724-X89', 'Server', 4, 32)
- deleteProductid
- Delete a product ID from the virtual image part. This method
accepts the following parameters:
- productid
- The product ID that you want to delete. This parameter is required.
- licensetype
- The license type for this product ID. Valid values are:
- PVU
- Server
>>> mypart[0].deleteProductid('5724-X89', 'PVU')
For more information about working with resource objects, see the Related reference section.