bug 6643: when configuring vlan IP ranges, account might not be specified (zone wide IP range), so assign the configuration event to the SYSTEM account in those cases.

status 6643: resolved fixed
This commit is contained in:
Kris McQueen 2010-10-19 16:27:02 -07:00
parent 3e40809e75
commit 47e26af419
1 changed files with 3 additions and 2 deletions

View File

@ -1504,8 +1504,9 @@ public class ConfigurationManagerImpl implements ConfigurationManager {
eventMsg += ", end IP = " + endIP;
}
eventMsg += ".";
saveConfigurationEvent(userId, account.getId(), EventTypes.EVENT_VLAN_IP_RANGE_CREATE, eventMsg, "vlanType=" + vlanType, "dcId=" + zoneId,
"accountId=" + account.getId(), "podId=" + podId,
Long accountId = ((account == null) ? Account.ACCOUNT_ID_SYSTEM : account.getId());
saveConfigurationEvent(userId, accountId, EventTypes.EVENT_VLAN_IP_RANGE_CREATE, eventMsg, "vlanType=" + vlanType, "dcId=" + zoneId,
"accountId=" + accountId, "podId=" + podId,
"vlanId=" + vlanId, "vlanGateway=" + vlanGateway,
"vlanNetmask=" + vlanNetmask, "startIP=" + startIP,
"endIP=" + endIP);