Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions server/src/main/java/com/cloud/alert/AlertManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -738,13 +738,14 @@ public void sendAlert(AlertType alertType, DataCenter dataCenter, Pod pod, Clust
AlertVO alert = null;
Long clusterId = cluster == null ? null : cluster.getId();
Long podId = pod == null ? null : pod.getId();
long dcId = dataCenter == null ? 0L : dataCenter.getId();
if ((alertType != AlertManager.AlertType.ALERT_TYPE_HOST) && (alertType != AlertManager.AlertType.ALERT_TYPE_USERVM)
&& (alertType != AlertManager.AlertType.ALERT_TYPE_DOMAIN_ROUTER) && (alertType != AlertManager.AlertType.ALERT_TYPE_CONSOLE_PROXY)
&& (alertType != AlertManager.AlertType.ALERT_TYPE_SSVM) && (alertType != AlertManager.AlertType.ALERT_TYPE_STORAGE_MISC)
&& (alertType != AlertManager.AlertType.ALERT_TYPE_MANAGEMENT_NODE) && (alertType != AlertManager.AlertType.ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED)
&& (alertType != AlertManager.AlertType.ALERT_TYPE_UPLOAD_FAILED) && (alertType != AlertManager.AlertType.ALERT_TYPE_OOBM_AUTH_ERROR)
&& (alertType != AlertManager.AlertType.ALERT_TYPE_HA_ACTION) && (alertType != AlertManager.AlertType.ALERT_TYPE_CA_CERT)) {
alert = _alertDao.getLastAlert(alertType.getType(), dataCenter.getId(), podId, clusterId);
alert = _alertDao.getLastAlert(alertType.getType(), dcId, podId, clusterId);
}

if (alert == null) {
Expand All @@ -754,7 +755,7 @@ public void sendAlert(AlertType alertType, DataCenter dataCenter, Pod pod, Clust
newAlert.setContent(content);
newAlert.setClusterId(clusterId);
newAlert.setPodId(podId);
newAlert.setDataCenterId(dataCenter.getId());
newAlert.setDataCenterId(dcId);
newAlert.setSentCount(1);
newAlert.setLastSent(new Date());
newAlert.setName(alertType.getName());
Expand Down
6 changes: 3 additions & 3 deletions server/src/main/java/com/cloud/bgp/BGPServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,9 @@
netName = network.getName();
}

LOGGER.debug("Allocating the AS Number {} to {} on zone {}", asNumber::toString,
(Objects.nonNull(vpcId) ? "VPC " + vpc : "network " + network)::toString,
() -> dataCenterDao.findById(zoneId));
String logMsg = Objects.nonNull(vpcId) ? ("VPC " + vpc) : ("network " + network);
LOGGER.debug("Allocating the AS Number {} to {} on zone {}", asNumberVO::toString,
logMsg::toString, () -> dataCenterDao.findById(zoneId));

Check warning on line 260 in server/src/main/java/com/cloud/bgp/BGPServiceImpl.java

View check run for this annotation

Codecov / codecov/patch

server/src/main/java/com/cloud/bgp/BGPServiceImpl.java#L259-L260

Added lines #L259 - L260 were not covered by tests
asNumberVO.setAllocated(true);
asNumberVO.setAllocatedTime(new Date());
if (Objects.nonNull(vpcId)) {
Expand Down
Loading