use of com.emc.storageos.recoverpoint.objectmodel.RPSystem in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method testGetAllArrays.
@Test
public void testGetAllArrays() {
RPSystem rpSystem = new RPSystem();
RPSite site = new RPSite();
Set<RPSite> siteList = new HashSet<RPSite>();
site.setCredentials(RP_USERNAME, RP_PASSWORD);
site.setSiteManagementIPv4(RPSiteToUse);
siteList.add(site);
rpSystem.setSites(siteList);
rpSystem.setName(RPSystemName);
setup();
logger.info("Testing RecoverPoint Service getArraysForCluster");
// NOSONAR
site.setSiteManagementIPv4(RPSiteToUse);
try {
Map<String, Set<String>> returnList;
setupClient(RPSiteToUse, RP_USERNAME, RP_PASSWORD);
returnList = rpClient.getArraysForClusters();
if (returnList.size() == 0) {
logger.info("getArraysForCluster FAILED");
fail();
}
} catch (Exception e) {
logger.error(e.toString());
logger.info("TestGetAllArrays FAILED");
fail();
}
}
use of com.emc.storageos.recoverpoint.objectmodel.RPSystem in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method testGetAllSites.
@Test
public void testGetAllSites() {
RPSystem rpSystem = new RPSystem();
RPSite site = new RPSite();
Set<RPSite> siteList = new HashSet<RPSite>();
site.setCredentials(RP_USERNAME, RP_PASSWORD);
site.setSiteManagementIPv4(RPSiteToUse);
siteList.add(site);
rpSystem.setSites(siteList);
rpSystem.setName(RPSystemName);
setup();
logger.info("Testing RecoverPoint Service getAllSites");
// NOSONAR
site.setSiteManagementIPv4(RPSiteToUse);
try {
Set<RPSite> returnList;
setupClient(RPSiteToUse, RP_USERNAME, RP_PASSWORD);
returnList = rpClient.getAssociatedRPSites();
if (returnList.isEmpty()) {
logger.info("getAssociatedRPSites FAILED");
fail();
}
} catch (Exception e) {
logger.error(e.toString());
logger.info("TestGetAllSites FAILED");
fail();
}
logger.info("Setting sitename to RPA IP address");
setup();
// NOSONAR
site.setSiteManagementIPv4(SITE_MGMT_IPV4);
try {
Set<RPSite> returnList;
setupClient(RPSiteToUse, RP_USERNAME, RP_PASSWORD);
returnList = rpClient.getAssociatedRPSites();
if (returnList.isEmpty()) {
logger.info("getAssociatedRPSites FAILED");
fail();
}
} catch (Exception e) {
logger.error(e.toString());
logger.info("TestGetAllSites FAILED");
fail();
}
}
use of com.emc.storageos.recoverpoint.objectmodel.RPSystem in project coprhd-controller by CoprHD.
the class RecoverPointClientIntegrationTest method testRecoverPointServiceGetSiteWWNs.
@Test
public void testRecoverPointServiceGetSiteWWNs() {
RPSystem rpSystem = new RPSystem();
RPSite site = new RPSite();
Set<RPSite> siteList = new HashSet<RPSite>();
site.setCredentials(RP_USERNAME, RP_PASSWORD);
site.setSiteManagementIPv4(RPSiteToUse);
siteList.add(site);
rpSystem.setSites(siteList);
rpSystem.setName(RPSystemName);
setup();
logger.info("Testing RecoverPoint Service getAllSites");
// NOSONAR
site.setSiteManagementIPv4(RPSiteToUse);
try {
Set<RPSite> returnList;
setupClient(RPSiteToUse, RP_USERNAME, RP_PASSWORD);
returnList = rpClient.getAssociatedRPSites();
if (returnList.isEmpty()) {
logger.info("getAssociatedRPSites FAILED");
fail();
}
for (RPSite rpSite : returnList) {
boolean foundError = false;
logger.info("Testing RecoverPoint Get Site WWNs");
Map<String, Map<String, String>> WWNs = null;
WWNs = rpClient.getInitiatorWWNs(rpSite.getInternalSiteName());
if (WWNs == null || WWNs.size() < 1) {
foundError = true;
fail("No WWNs were returned");
}
if (!foundError) {
logger.info("TestRecoverPointServiceGetSiteWWNs PASSED. Found " + WWNs.size() + " Initiator WWNs");
}
}
} catch (Exception e) {
logger.error(e.toString());
logger.info("TestGetAllSites FAILED");
fail();
}
}
Aggregations