Application properties
Use the APIs in this category to define and retrieve application properties.
Description: Use this interface to set the predefined properties for an application type object. Application type objects are application instance, application unit, and application file.
If you want to set custom or user defined properties, use the set_custom_property API.
The below table lists the properties for application instance, unit, and file.
Table: Properties for application instance, unit, and file
Property name | Description | Expected value | Comments |
|---|---|---|---|
VERSION | Version number | Any valid string value. | |
OWNER | Owner name | Any valid string value. | |
STATE | State | Online or offline. | This property is mandatory for application instance. |
IS_PARALLEL | Whether the application supports parallel instances. | Yes or no. | If your application supports parallel instances then set this property to yes otherwise no. This is applicable for application instance and unit. |
HOMEDIR | Home directory | Any valid string value. | This is applicable for application instance and unit. |
TOTAL_SIZE | Total size | Any valid string value. | This is applicable for application instance and unit. |
USED_SIZE | Used size | Any valid string value. | This is applicable for application instance and unit. |
TYPE | Type | Any valid string value. | This is applicable for application unit and file. For application file, set this property to Data if you want to the Resiliency Platform to consider this file for disaster recovery (DR) configuration. |
SIZE | Size | Any valid string value. | This is applicable only for application file. |
PERMISSION | Permission of an application file. | This is applicable only for application file. | |
FILE_PATH | This is applicable only for application file. Set this property to full path of an application file if you want the Resiliency Platform to consider this file for DR configuration. |
Is mandatory: No
Input parameter: String: Attribute name and attribute value
Return value: 0 if successful, else any positive number.
Example:
Application instance:
my $inst = $appObj->add_application_inst("app_inst");
if (defined $inst)
{
$inst->set_property("FRIENDLY_NAME", "MyAppInstance");
}
Application unit:
my $inst = $appObj->add_application_inst("app_inst");
if (defined $inst)
{
my $unit = $inst->add_application_unit("app_unit");
$unit->set_property("OWNER", "MyOwner");
}
Application file:
my $inst = $appObj->add_application_inst("app_inst");
if (defined $inst)
{
my $file = $inst->add_application_file("app.data");
$file->set_property("SIZE", "100");
}Description: Use this interface to define custom property of your choice.
You can use this interface to set custom defined properties for an application instance, application unit, and application file.
Is mandatory: No
Input parameter: String: Attribute name, attribute value, is_secure (true or false), and attribute type. Attribute is_secure and type are optional. If is_secure is set to true, then property value is encrypted.
Return value: 0 if property is added successfully, else any positive number.
Example:
Application instance:
my $inst = $appObj->add_application_inst("app_inst");
if (defined $inst)
{
$inst->set_custom_property("HOMEDIR", "MyDir");
}
Application unit:
my $inst = $appObj->add_application_inst("app_inst");
if (defined $inst)
{
my $unit = $inst->add_application_unit("app_unit");
$unit->set_custom_property("USER", "MyUser");
}
Application file:
my $inst = $appObj->add_application_inst("app_inst");
if (defined $inst)
{
my $file = $inst->add_application_file("app.data");
$file->set_custom_property("CHECKSUM", "123456789");
}