// update 'gslbsite' object representing a site
private static void updateSite(nitro_service client, String siteType, String siteName,
String siteIP, String sitePublicIP) throws ExecutionException {
try {
gslbsite site;
site = getSiteObject(client, siteName);
if (site == null) {
if (s_logger.isDebugEnabled()) {
s_logger.warn("Ignoring update request for non existing GSLB site: " + siteName);
}
return;
}
assert ("LOCAL".equalsIgnoreCase(siteType) || "REMOTE".equalsIgnoreCase(siteType));
site.set_sitetype(siteType);
site.set_sitename(siteName);
site.set_siteipaddress(siteIP);
site.set_publicip(sitePublicIP);
site.set_metricexchange("ENABLED");
site.set_nwmetricexchange("ENABLED");
site.set_sessionexchange("ENABLED");
gslbsite.update(client, site);
if (s_logger.isDebugEnabled()) {
s_logger.debug("Successfully updated GSLB site: " + siteName);
}