Veritas™ Resiliency Platform 2.2 Application Enablement SDK
Sample script output
Below are outputs of some sample scripts with different use cases.
Args input file contains:
{"ARGS":{"AES_ARGS":{"OP_TYPE":"DISCOVERY","OP":"Probe"}}}
JSON output after script execution:
{ "APPLICATION" : { "APP_NAME" : "SampleApp", "OPERATION_TYPES" : { "START" : { "Name" : "START" }, "STOP" : { "Name" : "STOP" } }, "DISCOVERY_TYPES" : { "DEEP" : { "Name" : "DEEP" }, "PROBE" : { "Name" : "PROBE" } }, "AES_VERSION" : "1.0.0.0" }, "APPLICATION_INSTANCE" : { "SampleApp" : { "APP_ID" : "SampleApp", "NAME" : "SampleApp", "DISCOVERY_TYPE" : "discovered", "INFO_REQUIRED" : "no", "STATE" : "Online", "APP_TYPE" : "SampleApp" } }, "OPERATIONS" : { "PROBE" : { "OPERATION_NAME" : "PROBE", "APP_NAME" : "SampleApp", "OPERATION_ARGS" : { "INSTANCE_NAME" : "SampleApp" }, "OPERATION_EXECUTED" : 1, "RET_CODE" : 0, "AES_VERSION" : "1.0.0.0", "OPERATION_TYPE" : "DISCOVERY", "ERR_CODE" : 0, "RET_MSG" : "probe is successful" } } }
Args input file contains:
{"ARGS":{"AES_ARGS":{"OP_TYPE":"DISCOVERY","OP":"DEEP"}}}
JSON output after script execution:
{ "APPLICATION" : { "APP_NAME" : "SampleApp", "OPERATION_TYPES" : { "START" : { "Name" : "START" }, "STOP" : { "Name" : "STOP" } }, "DISCOVERY_TYPES" : { "DEEP" : { "Name" : "DEEP" }, "PROBE" : { "Name" : "PROBE" } }, "AES_VERSION" : "1.0.0.0" }, "APPLICATION_INSTANCE" : { "app_inst" : { "APP_ID" : "app_inst", "NAME" : "app_inst", "HOMEDIR" : "inst_homedir", "APPLICATION_INSTANCEProps" : { "SERVICEGROUPNAME" : { "PROP_TYPE" : "", "PROP_VALUE" : "sample_sg", "PROP_NAME" : "ServiceGroupName" }, "CLUSTERTYPE" : { "PROP_TYPE" : "", "PROP_VALUE" : "MSCS", "PROP_NAME" : "ClusterType" }, "ISCLUSTERED" : { "PROP_TYPE" : "", "PROP_VALUE" : "true", "PROP_NAME" : "IsClustered" }, "APP_DISP_NAME" : { "PROP_TYPE" : "", "PROP_VALUE" : "sample_instance", "PROP_NAME" : "app_disp_name" } }, "TOTAL_SIZE" : 100, "DISCOVERY_TYPE" : "discovered", "APP_INPUTS" : { "QID1" : { "QID" : 1, "QDescription" : "Specify the administrator user name to discover its data files.", "Mandatory" : "yes", "QText" : "Administrator user name", "Encrypted" : "no" }, "QID2" : { "QID" : 2, "QDescription" : "Specify the administrator user password to discover its data files.", "Mandatory" : "yes", "QText" : "Administrator password", "Encrypted" : "yes" } }, "APP_CATEGORY" : "database", "INFO_REQUIRED" : "yes", "APP_TYPE" : "SampleApp", "STATE" : "online", "VERSION" : 1, "USED_SIZE" : 90, "OWNER" : "Administrator" } }, "APPLICATION_FILE" : { "app_inst;app_file" : { "SIZE" : 10, "APP_ID" : "app_inst", "NAME" : "app_file", "APPLICATION_FILEProps" : { "FILE_DESC" : { "PROP_TYPE" : "", "PROP_VALUE" : "Database file", "PROP_NAME" : "file_desc" } }, "TYPE" : "data", "PERMISSION" : "all", "FILE_PATH" : "c:\\app_inst\\app_file.data", "FILE_ID" : "app_inst;app_file", "STATE" : "online", "VERSION" : 1, "OWNER" : "administrator" } }, "APPLICATION_UNIT" : { "app_inst;app_unit" : { "APP_ID" : "app_inst", "APPLICATION_UNITProps" : { "UNIT_DISP_NAME" : { "PROP_TYPE" : "", "PROP_VALUE" : "sample_unit", "PROP_NAME" : "unit_disp_name" } }, "NAME" : "app_unit", "HOMEDIR" : "unit_homedir", "TYPE" : "database", "APP_UNIT_ID" : "app_inst;app_unit", "TOTAL_SIZE" : 100, "STATE" : "online", "VERSION" : 1, "USED_SIZE" : 50, "OWNER" : "unit_owner" } }, "OPERATIONS" : { "DEEP" : { "OPERATION_NAME" : "DEEP", "APP_NAME" : "SampleApp", "OPERATION_EXECUTED" : 1, "RET_CODE" : 0, "AES_VERSION" : "1.0.0.0", "OPERATION_TYPE" : "DISCOVERY", "ERR_CODE" : 0, "RET_MSG" : "deep discovery is successful" } } }
Args input file contains:
{"ARGS":{"AES_ARGS":{"OP_TYPE":"OPERATION","OP":"START","APP_INST_ID" :"SampleApp"}}}
JSON output after script execution:
{ "APPLICATION" : { "APP_NAME" : "SampleApp", "OPERATION_TYPES" : { "START" : { "Name" : "START" }, "STOP" : { "Name" : "STOP" } }, "DISCOVERY_TYPES" : { "DEEP" : { "Name" : "DEEP" }, "PROBE" : { "Name" : "PROBE" } }, "AES_VERSION" : "1.0.0.0" }, "OPERATIONS" : { "START" : { "OPERATION_NAME" : "START", "APP_NAME" : "SampleApp", "OPERATION_ARGS" : { "INSTANCE_NAME" : "SampleApp" }, "OPERATION_EXECUTED" : 1, "RET_CODE" : 0, "AES_VERSION" : "1.0.0.0", "OPERATION_TYPE" : "OPERATION", "ERR_CODE" : 0, "RET_MSG" : "Start is successful" } } }
Args input file contains:
{"ARGS":{"AES_ARGS":{"OP_TYPE":"OPERATION","OP":"STOP","APP_INST_ID" :"SampleApp"}}}
JSON output after script execution:
{ "APPLICATION" : { "APP_NAME" : "SampleApp", "OPERATION_TYPES" : { "START" : { "Name" : "START" }, "STOP" : { "Name" : "STOP" } }, "DISCOVERY_TYPES" : { "DEEP" : { "Name" : "DEEP" }, "PROBE" : { "Name" : "PROBE" } }, "AES_VERSION" : "1.0.0.0" }, "OPERATIONS" : { "STOP" : { "OPERATION_NAME" : "STOP", "APP_NAME" : "SampleApp", "OPERATION_ARGS" : { "INSTANCE_NAME" : "SampleApp" }, "OPERATION_EXECUTED" : 1, "RET_CODE" : 0, "AES_VERSION" : "1.0.0.0", "OPERATION_TYPE" : "OPERATION", "ERR_CODE" : 0, "RET_MSG" : "Stop is successful" } } }
Check the following properties in the OPERATIONS tag in the JSON output after executing a script.
OPERATION_EXECUTED denotes whether the operation is executed. 1 indicates executed, 0 for not executed.
RET_CODE denotes whether the operation is successfully executed. 0 indicates success and any positive number for failure. This return code is set by the callback function for the respective operations.
ERR_CODE displays the error code when the operation fails. 0 indicates no error.
RET_MSG displays the return message for the respective operation. This return message is set by the callback function for the respective operations.