use of com.emc.storageos.recoverpoint.exceptions.RecoverPointException 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.exceptions.RecoverPointException in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method testEnableDisableRPBookmarks.
// @Test
public void testEnableDisableRPBookmarks() throws InterruptedException {
boolean foundError = false;
logger.info("Testing RecoverPoint Enable/Disable Bookmark");
MultiCopyEnableImageRequestParams enableParams = new MultiCopyEnableImageRequestParams();
MultiCopyDisableImageRequestParams disableParams = new MultiCopyDisableImageRequestParams();
try {
recreateCGAndBookmark();
enableParams.setBookmark(Bookmarkname);
Set<String> WWNSetForTest = new HashSet<String>();
WWNSetForTest.add(BourneRPTestCRRLUN1WWN);
WWNSetForTest.add(BourneRPTestCRRLUN2WWN);
enableParams.setVolumeWWNSet(WWNSetForTest);
disableParams.setVolumeWWNSet(WWNSetForTest);
disableParams.setEmName(Bookmarkname);
rpClient.enableImageCopies(enableParams);
logger.info("Sleep 15 seconds before disable of image");
Thread.sleep(15000);
rpClient.disableImageCopies(disableParams);
} catch (RecoverPointException e) {
foundError = true;
fail(e.getMessage());
}
if (!foundError) {
logger.info("TestEnableDisableRPBookmarks PASSED");
}
}
use of com.emc.storageos.recoverpoint.exceptions.RecoverPointException 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.exceptions.RecoverPointException 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.exceptions.RecoverPointException in project coprhd-controller by CoprHD.
the class RecoverPointClientTest method testPing.
@Test
public void testPing() throws FunctionalAPIActionFailedException_Exception, FunctionalAPIInternalError_Exception {
logger.info("Testing RecoverPoint Service ping");
int retVal = 0;
logger.info("Testing good credentials");
// ----- EasyMock Setup -----//
ClusterUID localClusterUID = buildLocalClusterUID();
expect(mockFunctionalAPIImpl.getLocalCluster()).andReturn(localClusterUID);
// ----- EasyMock Start -----//
replay(mockFunctionalAPIImpl);
try {
// ----- Main Test Method -----//
retVal = rpClient.ping();
} catch (RecoverPointException e) {
fail(e.getMessage());
}
// ----- EasyMock Verify -----//
verify(mockFunctionalAPIImpl);
assertEquals(0, retVal);
}
Aggregations