Skip to content

Instantly share code, notes, and snippets.

@kskilling
Last active May 27, 2019 14:57
Show Gist options
  • Select an option

  • Save kskilling/c88926b0f3740c9bc81a502a6b9c5010 to your computer and use it in GitHub Desktop.

Select an option

Save kskilling/c88926b0f3740c9bc81a502a6b9c5010 to your computer and use it in GitHub Desktop.
Additional code to capture the current recovery settings of a SRM protected VM from the output of a SOAP operation
status = response.getOutParameter("returnval.status");
recoveryPriority = response.getOutParameter("returnval.recoveryPriority");
skipGuestShutdown = response.getOutParameter("returnval.skipGuestShutdown");
powerOffTimeoutSeconds = response.getOutParameter("returnval.powerOffTimeoutSeconds");
finalPowerState = response.getOutParameter("returnval.finalPowerState");
localFaultToleranceState = response.getOutParameter("returnval.localFaultToleranceState");
remoteFaultToleranceState = response.getOutParameter("returnval.remoteFaultToleranceState");
powerOnTimeoutSeconds = response.getOutParameter("returnval.powerOnTimeoutSeconds");
powerOnDelaySeconds = response.getOutParameter("returnval.powerOnDelaySeconds");
changeVersion = response.getOutParameter("returnval.changeVersion");
//check if ip customisation settings are defined
var ipCustomisationData = response.getOutParameter("returnval.vmIpCustomizationData");
if(ipCustomisationData !== null){
localSiteUuid = response.getOutParameter("returnval.vmIpCustomizationData.ipCustomizationMappings[0].siteUuid");
remoteSiteUuid = response.getOutParameter("returnval.vmIpCustomizationData.ipCustomizationMappings[1].siteUuid");
localSiteDeviceId = response.getOutParameter("returnval.vmIpCustomizationData.ipCustomizationMappings[0].deviceId");
remoteSiteDeviceId = response.getOutParameter("returnval.vmIpCustomizationData.ipCustomizationMappings[1].deviceId");
}
else{
System.log('IP Customisation settings not defined');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment