VMware Cloud Community
stucky101
Contributor
Contributor

RecoveryPlanPause or RecoveryPlanAnswerPrompt in SRM 5.8 API ?

Everyone

I'm trying to script a full DR plan via API and I almost have it all, except one thing. I have added a prompt after 3 VMs have come up because I need to start a bunch of

other stuff before the other VMs can come back so it needs user interference.

I can click "Dismiss" manually on the screen to continue but I need a way to answer this via the API.

Is this something "RecoveryPlanAnswerPrompt" is for ? I don't see a method to "Dismiss" a prompt and that is what I'm really doing here, rather than answering it.

The API doc isn't particularly verbose. For this method it shows this:

void _service.AnswerPrompt(_srm.plan, key, cancel, response);

I know _srm.plan is the moref but the other 3 are rather obscure:

1. key - string with the key value for responding to the prompt

2. cancel - true is you want to halt further processing on this virtual machine, false otherwise

3. response - a text string that will be recorded as the answer to this prompt

1. Is this the "name" of the prompt ? I gave it a custom name "Wait for CIFS" but when I pass that it always returns "PromptNotFound"

2. There is no "cancel", instead if you pass that it complains that it is missing arg "cancelVmRecovery". I had to change that to even get it to pass.

There is not a word about such an arg in the 5.8 api ref. https://www.vmware.com/support/developer/srm-api/srm_58_api.pdf

Besides, what does answering a prompt have to do with wanting to cancel recovery ? That would depend on the prompt I'd say. Not sure I follow.

3. What is this for ? A random string that is recorded ? For which purpose ? Like I said this isn't so much an answer as the clicking on the "Dismiss" button.

After adding srm-Service.wsdl to SoapUI I see that RecoveryPlanPause, RecoveryPlanResume and RecoveryPlanAnswerPrompt still exist,

yet the API doc for 5.8 list them as "Deprecated 1.0 Methods". Yet, 5 lines down it says "Old version 1.0 API, still provided for backward compatibility" and lists these as "Local Methods".

I poked through the SDK and found java classes like "RecoveryPlanPauseRequestType.java" and "RecoveryPlanPauseResponse.java", making me think these are still available

but they don't quite match.

Q1. Can you pause a recovery plan on SRM5.8 via API ?

Q2. If not can you create a prompt that could be answered via API ?

I need a way to pause the plan to spin up a bunch of cifs stuff on the DR Filer before the other VMs can come up and use those.

There is little out there in terms of how to use this API...I'm so close !!! Any help would be greatly appreciated.

Thx

Reply
0 Kudos
0 Replies