VMware VC-SRM4-A Developer's Guide - Page 24

GetResult, GetProtectionStatus, GetInfo, GetPeer, Example 3-16.

Page 24 highlights

Site Recovery Manager API Developer's Guide  isDone - true if the task has completed, false if not GetResult This method gets detailed results of a completed protection task. Example 3-16. Method to get protection task results TaskInfoObj[] = _service.GetResult(_svcRef); Parameters and return value:  _svcRef - managed object reference to an SrmProtectionTask object  TaskInfoObj[] - data object with at least 20 task properties set during task execution; for details see TaskInfo in the API Reference Guide GetProtectionStatus This method gets the virtual machine protection status after completion of ProtectVms or UnprotectVms. Example 3-17. Method to get protection task results protectionInfo[] = _service.GetProtectionStatus(_svcRef); Parameters and return value:  _svcRef - managed object reference to an SrmProtectionTask object  protectionInfo[] - data object with 9 properties indicating the protection status of a virtual machine; for details see SrmProtectionGroupVmProtectionInfo in the API Reference Guide GetInfo This method retrieves basic information about the specified protection group. To get an SrmProtectionGroup managed object reference, see "ListProtectionGroups" on page 22. Example 3-18. Method to get protection group information ptGrpInfo = _service.GetInfo(_svcPtGrp); Parameter and return value:  _svcPtGrp - managed object reference to an SrmProtectionGroup object  ptGrpInfo - information about the protection group  description - protection group description  name - protection group name  type - either san for array based replication, or vr for vSphere replication GetPeer Given an SrmProtectionGroup on the local site, this method retrieves the SrmProtectionGroup at the peer site. Example 3-19. Method to get peer protection group peerPtGrp = _service.GetPeer(_svcPtGrp); Parameter and return value:  _svcPtGrp - managed object reference to the local SrmProtectionGroup object 24 VMware, Inc.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38

Site Recovery Manager API Developer’s Guide
24
VMware, Inc.
isDone
– true if the task has completed, false if not
GetResult
This method gets detailed results of a completed protection task.
Example 3-16.
Method to get protection task results
TaskInfoObj[] = _service.GetResult(_svcRef);
Parameters and return value:
_svcRef
– managed object reference to an SrmProtectionTask object
TaskInfoObj[]
– data object with at least 20 task properties set during task execution; for details see
TaskInfo in the
API Reference Guide
GetProtectionStatus
This method gets the virtual machine protection status after completion of ProtectVms or UnprotectVms.
Example 3-17.
Method to get protection task results
protectionInfo[] = _service.GetProtectionStatus(_svcRef);
Parameters and return value:
_svcRef
– managed object reference to an SrmProtectionTask object
protectionInfo[]
– data object with 9 properties indicating the protection status of a virtual machine;
for details see SrmProtectionGroupVmProtectionInfo in the
API Reference Guide
GetInfo
This method retrieves basic information about the specified protection group. To get an SrmProtectionGroup
managed object reference, see
“ListProtectionGroups”
on page 22.
Example 3-18.
Method to get protection group information
ptGrpInfo = _service.GetInfo(_svcPtGrp);
Parameter and return value:
_svcPtGrp
– managed object reference to an SrmProtectionGroup object
ptGrpInfo
– information about the protection group
description – protection group description
name – protection group name
type – either
san
for array based replication, or
vr
for vSphere replication
GetPeer
Given an SrmProtectionGroup on the local site, this method retrieves the SrmProtectionGroup at the peer site.
Example 3-19.
Method to get peer protection group
peerPtGrp = _service.GetPeer(_svcPtGrp);
Parameter and return value:
_svcPtGrp
– managed object reference to the local SrmProtectionGroup object