use of com.emc.storageos.hds.model.ReplicationGroup in project coprhd-controller by CoprHD.
the class HDSApiProtectionManager method getReplicationGroupObjectId.
/**
* Returns ViPR-Replication-Group objectID collected from Device manager to create ShadowImage pair on
* Hitachi StorageSystem.
*
* @return replicationGroup's objectID
* @throws Exception
*/
public String getReplicationGroupObjectId() throws Exception {
List<HDSHost> hostList = getHDSHostList();
String replicationGroupObjectId = null;
HDSHost pairMgmtServer = null;
if (hostList != null) {
outerloop: for (HDSHost hdsHost : hostList) {
log.info("HDSHost :{}", hdsHost.toXMLString());
if (hdsHost != null && hdsHost.getConfigFileList() != null && !hdsHost.getConfigFileList().isEmpty()) {
for (ConfigFile configFile : hdsHost.getConfigFileList()) {
if (configFile != null) {
ReplicationGroup replicationGroup = configFile.getReplicationGroup();
if (replicationGroup != null && HDSConstants.VIPR_REPLICATION_GROUP_NAME.equalsIgnoreCase(replicationGroup.getGroupName())) {
pairMgmtServer = hdsHost;
log.info("Pair management server {} found", pairMgmtServer.getName());
replicationGroupObjectId = replicationGroup.getObjectID();
log.info("ViPR Replication Group {} found", replicationGroup.toXMLString());
break outerloop;
}
}
}
}
}
}
return replicationGroupObjectId;
}
Aggregations