Cancel; Listprompts; Answerprompt; Gethistory - VMware VC-SRM4-A - vCenter Site Recovery Manager Developer's Manual

Site recovery manager api
Table of Contents

Advertisement

test – run a test failover to the peer (recovery) site, without halting the local (protected) site
failover – move to the peer (recovery) site; when all groups are moved the recovery plan is complete
revert – reverse a failover, powering on virtual machines at the local site and abandoning the peer site
reprotect – the peer site becomes the protected site, and the local site becomes the recovery site

Cancel

This method cancels the specified recovery plan peer, in the specified mode. It can take some time to cancel a 
recovery plan depending on its operation state. In addition to cancel, SRM 1.0 had pause and resume APIs, but 
in SRM 5.0, these old APIs are no‐ops.
Example 3-32. Method to cancel recovery plan
void _service.Cancel(_srm.plan);
There is no return value. Parameter is as follows:
_srm.plan – managed object reference to an SrmRecoveryPlan object

ListPrompts

This method lists the current prompts that are waiting on user input. Prompts appear in the order in which 
virtual machines are scheduled to power on. When a prompt step is reached, the recovery plan remains in a 
waiting state until the user answers the prompt or a program calls AnswerPrompt.
Example 3-33. Method to list prompts
prompts[] = _service.ListPrompts(_srm.plan);
Parameters and return value:
_srm.plan – managed object reference to an SrmRecoveryPlan object
prompts[] – array of data objects containing the prompt, and the key for responding to the prompt

AnswerPrompt

This method answers the current prompt step in a recovery plan, and requires test or failover privilege 
depending on the mode of recovery.
Example 3-34. Method to answer prompt
void _service.AnswerPrompt(_srm.plan, key, cancel, response);
There is no return value. Parameters are as follows:
_srm.plan – managed object reference to an SrmRecoveryPlan object 
key – string with the key value for responding to the prompt
cancel – true is you want to halt further processing on this virtual machine, false otherwise
response – a text string that will be recorded as the answer to this prompt

GetHistory

This method retrieves the history of a given recovery plan.
VMware, Inc.
Chapter 3 Logical Order API Usage
29

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vcenter site recovery manager 5.0

Table of Contents