use of com.emc.storageos.security.geo.GeoClientCacheManager in project coprhd-controller by CoprHD.
the class IPSecMonitor method getIpsecPropsThroughHTTPS.
private Map<String, String> getIpsecPropsThroughHTTPS(String node) {
Map<String, String> props = new HashMap<String, String>();
try {
GeoClientCacheManager geoClientMgr = getGeoClientManager();
if (geoClientMgr != null) {
GeoServiceClient geoClient = geoClientMgr.getGeoClient(getVdcShortIdByIp(node));
String version = geoClient.getViPRVersion();
if (version.compareTo("vipr-2.5") < 0) {
log.info("remote vdc version is less than 2.5, skip getting ipsec properties");
return props;
}
VdcIpsecPropertiesResponse ipsecProperties = geoClient.getIpsecProperties();
if (ipsecProperties != null) {
props.put(IPSEC_KEY, ipsecProperties.getIpsecKey());
props.put(VDC_CONFIG_VERSION, ipsecProperties.getVdcConfigVersion());
props.put(IPSEC_STATUS, ipsecProperties.getIpsecStatus());
}
} else {
log.warn("GeoClientCacheManager is null, skip getting ipsec properties from " + node);
}
} catch (Exception e) {
log.warn("can't get ipsec properties from remote vdc: " + node, e);
}
return props;
}
Aggregations