Search in sources :

Example 11 with RecoverPointException

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);
}
Also used : RecoverPointVolumeProtectionInfo(com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo) RecoverPointException(com.emc.storageos.recoverpoint.exceptions.RecoverPointException) Test(org.junit.Test)

Example 12 with RecoverPointException

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");
    }
}
Also used : RecoverPointException(com.emc.storageos.recoverpoint.exceptions.RecoverPointException) MultiCopyDisableImageRequestParams(com.emc.storageos.recoverpoint.requests.MultiCopyDisableImageRequestParams) MultiCopyEnableImageRequestParams(com.emc.storageos.recoverpoint.requests.MultiCopyEnableImageRequestParams) HashSet(java.util.HashSet)

Example 13 with RecoverPointException

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());
    }
}
Also used : RecoverPointVolumeProtectionInfo(com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo) RecoverPointException(com.emc.storageos.recoverpoint.exceptions.RecoverPointException)

Example 14 with RecoverPointException

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);
}
Also used : RecoverPointVolumeProtectionInfo(com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo) RecoverPointException(com.emc.storageos.recoverpoint.exceptions.RecoverPointException) CGRequestParams(com.emc.storageos.recoverpoint.requests.CGRequestParams)

Example 15 with RecoverPointException

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);
}
Also used : ClusterUID(com.emc.fapiclient.ws.ClusterUID) RecoverPointException(com.emc.storageos.recoverpoint.exceptions.RecoverPointException) Test(org.junit.Test)

Aggregations

RecoverPointException (com.emc.storageos.recoverpoint.exceptions.RecoverPointException)30 FunctionalAPIActionFailedException_Exception (com.emc.fapiclient.ws.FunctionalAPIActionFailedException_Exception)12 FunctionalAPIInternalError_Exception (com.emc.fapiclient.ws.FunctionalAPIInternalError_Exception)12 RecoverPointVolumeProtectionInfo (com.emc.storageos.recoverpoint.responses.RecoverPointVolumeProtectionInfo)12 FunctionalAPIValidationException_Exception (com.emc.fapiclient.ws.FunctionalAPIValidationException_Exception)10 HashSet (java.util.HashSet)9 ClusterUID (com.emc.fapiclient.ws.ClusterUID)6 HashMap (java.util.HashMap)6 ConsistencyGroupSettings (com.emc.fapiclient.ws.ConsistencyGroupSettings)5 ConsistencyGroupUID (com.emc.fapiclient.ws.ConsistencyGroupUID)5 URISyntaxException (java.net.URISyntaxException)5 ConsistencyGroupCopyUID (com.emc.fapiclient.ws.ConsistencyGroupCopyUID)4 URI (java.net.URI)4 Test (org.junit.Test)4 ClusterConfiguration (com.emc.fapiclient.ws.ClusterConfiguration)3 ConsistencyGroupSettingsChangesParam (com.emc.fapiclient.ws.ConsistencyGroupSettingsChangesParam)3 ReplicationSetSettings (com.emc.fapiclient.ws.ReplicationSetSettings)3 CreateBookmarkRequestParams (com.emc.storageos.recoverpoint.requests.CreateBookmarkRequestParams)3 RecoverPointImageManagementUtils (com.emc.storageos.recoverpoint.utils.RecoverPointImageManagementUtils)3 ArrayList (java.util.ArrayList)3