String ipAddress = uri.getHost();
//String numRetries = params.get("numretries");
//String timeout = params.get("timeout");
TrafficSentinelResource resource = new TrafficSentinelResource();
String guid = getTrafficMonitorGuid(zoneId, NetworkUsageResourceName.TrafficSentinel, ipAddress);
Map<String, Object> hostParams = new HashMap<String, Object>();
hostParams.put("zone", String.valueOf(zoneId));
hostParams.put("ipaddress", ipAddress);
hostParams.put("url", cmd.getUrl());
hostParams.put("inclZones", (cmd.getInclZones() != null) ? cmd.getInclZones() : _TSinclZones);
hostParams.put("exclZones", (cmd.getExclZones() != null) ? cmd.getExclZones() : _TSexclZones);
hostParams.put("guid", guid);
hostParams.put("name", guid);
try {
resource.configure(guid, hostParams);
} catch (ConfigurationException e) {
throw new CloudRuntimeException(e.getMessage());
}
Map<String, String> hostDetails = new HashMap<String, String>();