Getprotectionstate; Listprotecteddatastores; Listprotectedvms - VMware VC-SRM4-A - vCenter Site Recovery Manager Developer's Manual

Site recovery manager api
Table of Contents

Advertisement

peerPtGrp – managed object reference to the SrmProtectionGroupPeer object

GetProtectionState

Get current state of the specified protection group. Not to be confused with "GetProtectionStatus" on page 24, 
which returns a virtual machine's (un)protect status, not the state of an entire protection group.
Example 3-20. Method to get protection state
ptState = _service.GetProtectionState(_svcPtGrp);
Parameter and return value:
_svcPtGrp – managed object reference to the local SrmProtectionGroup object
ptState – enumeration for SrmProtectionGroupProtectionState:
failedOver – the protection group has been failed‐over to the remote site
partiallyRecovered – the protection group is partially recovered
ready – the protection group is in a ready state
recovered – the protection group has been recovered
recovering – the protection group is in the process of being recovered
shadowing – this protection group is shadowing the remote‐site group that is in ready state
testing – the protection group is currently being tested 

ListProtectedDatastores

This method retrieves a list of datastores that are protected by the specified protection group. A datastore can 
be a VMFS volume, a NAS directory, or a local file system path.
Example 3-21. Method to list protected datastores
datastore[] = _service.ListProtectedDatastores(_svcPtGrp);
Parameter and return value:
_svcPtGrp – managed object reference to the local SrmProtectionGroup object
datastore[] – array of managed object references to Datastore objects

ListProtectedVms

This method retrieves a list of virtual machines that are protected by the specified protection group.
Example 3-22. Method to list protected virtual machines
protectedVm[] = _service.ListProtectedVms(_svcPtGrp);
Parameter and return value:
_svcPtGrp – managed object reference to the local SrmProtectionGroup object
protectedVm[] – array of SrmProtectionGroupProtectedVm data objects with the following fields:
faults – any faults associated with this protected virtual machine
needsConfiguration – the protected virtual machine needs to be configured or repaired
peerProtectedVm – the protected virtual machine identifier on the remote site
peerState – the protection state on the remote site
VMware, Inc.
Chapter 3 Logical Order API Usage
25

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vcenter site recovery manager 5.0

Table of Contents