use of com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method recreateCGSmall.
@Test
public void recreateCGSmall() throws RecoverPointException {
RecoverPointVolumeProtectionInfo protectionInfo = null;
try {
protectionInfo = rpClient.getProtectionInfoForVolume(BourneRPTestProdLUN1WWN);
} catch (RecoverPointException e) {
logger.info("Ignore getProtectionInfoForVolume error");
}
if (protectionInfo != null) {
logger.info("Delete previous CG (if it exists)");
rpClient.deleteCG(protectionInfo);
}
logger.info("Create the CG with one replication set");
// CGRequestParams createCGParams = CreateCGParamsHelper(true, true, 1);
// rpClient.createCG(createCGParams);
}
use of com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method testUpdateProtectionJournal.
// @Test
public void testUpdateProtectionJournal() throws InterruptedException {
logger.info("Testing RecoverPoint Update CG Protection Journal");
try {
recreateCGSmall();
RecoverPointVolumeProtectionInfo protectionTargetInfo = rpClient.getProtectionInfoForVolume(BourneRPTestCRRLUN1WWN);
RecoverPointVolumeProtectionInfo protectionProdInfo = rpClient.getProtectionInfoForVolume(BourneRPTestProdLUN1WWN);
// rpClient.addJournalToCopy(protectionTargetInfo, BourneRPTestJrnlLUN6WWN);
// rpClient.addJournalToCopy(protectionProdInfo, BourneRPTestJrnlLUN3WWN);
logger.info("Journals added. Sleep 10 seconds before removing them");
Thread.sleep(10000);
rpClient.deleteJournalFromCopy(protectionTargetInfo, BourneRPTestJrnlLUN6WWN);
rpClient.deleteJournalFromCopy(protectionProdInfo, BourneRPTestJrnlLUN3WWN);
logger.info("TestUpdateProtectionJournal PASSED");
} catch (RecoverPointException e) {
fail(e.getMessage());
}
}
use of com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method recreateCG.
public void recreateCG() throws RecoverPointException {
RecoverPointVolumeProtectionInfo protectionInfo = null;
try {
protectionInfo = rpClient.getProtectionInfoForVolume(BourneRPTestProdLUN1WWN);
} catch (RecoverPointException e) {
logger.info("Ignore getProtectionInfoForVolume error");
}
if (protectionInfo != null) {
logger.info("Delete previous CG (if it exists)");
rpClient.deleteCG(protectionInfo);
}
logger.info("Create the CG with two replication sets");
CGRequestParams createCGParams = createCGParamsHelper(true, true, 2);
rpClient.createCG(createCGParams, false, false);
}
use of com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo in project coprhd-controller by CoprHD.
the class RecoverPointClient method getCopyAccessStates.
/**
* Checks to see if the given copy is in direct access state.
*
* @param copyToExamine the copy to check for direct access state
* @return true if the given copy is in direct access state, false otherwise
*/
public Map<String, String> getCopyAccessStates(Set<String> rpWWNs) {
Map<String, String> copyAccessStates = new HashMap<String, String>();
if (rpWWNs != null) {
for (String wwn : rpWWNs) {
RecoverPointVolumeProtectionInfo protectionInfo = getProtectionInfoForVolume(wwn);
ConsistencyGroupCopyUID cgCopyUID = RecoverPointUtils.mapRPVolumeProtectionInfoToCGCopyUID(protectionInfo);
if (cgCopyUID != null) {
RecoverPointImageManagementUtils imageManager = new RecoverPointImageManagementUtils();
ConsistencyGroupCopyState copyState = imageManager.getCopyState(functionalAPI, cgCopyUID);
if (copyState != null) {
StorageAccessState copyAccessState = copyState.getStorageAccessState();
copyAccessStates.put(wwn, copyAccessState.name());
}
}
}
}
logger.info(String.format("Access states for requested copies: %s", copyAccessStates));
return copyAccessStates;
}
use of com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo in project coprhd-controller by CoprHD.
the class RecoverPointClient method failoverCopyTestCancel.
/**
* Cancel a failover test for a consistency group copy specified by the input request params.
*
* @param RPCopyRequestParams copyToFailoverTo - Volume info for the CG that a previous failover test was performed on
*
* @return void
*
* @throws RecoverPointException
*/
public void failoverCopyTestCancel(RPCopyRequestParams copyToFailoverTo) throws RecoverPointException {
RecoverPointVolumeProtectionInfo failoverCopyInfo = copyToFailoverTo.getCopyVolumeInfo();
resumeTransfer(failoverCopyInfo);
RecoverPointImageManagementUtils imageManager = new RecoverPointImageManagementUtils();
imageManager.disableCopyImage(functionalAPI, copyToFailoverTo);
}
Aggregations