generate an action event when portable IP association is transferred

from a network to different network
This commit is contained in:
Murali Reddy 2013-05-25 17:46:13 +05:30
parent 82974458a6
commit ad48c83808
2 changed files with 5 additions and 0 deletions

View File

@ -436,6 +436,7 @@ public class EventTypes {
public static final String EVENT_PORTABLE_IP_RANGE_CREATE = "PORTABLE.IP.RANGE.CREATE";
public static final String EVENT_PORTABLE_IP_RANGE_DELETE = "PORTABLE.IP.RANGE.DELETE";
public static final String EVENT_PORTABLE_IP_TRANSFER = "PORTABLE.IP.TRANSFER";
static {

View File

@ -39,6 +39,7 @@ import com.cloud.deploy.DeployDestination;
import com.cloud.deploy.DeploymentPlan;
import com.cloud.domain.Domain;
import com.cloud.domain.dao.DomainDao;
import com.cloud.event.ActionEventUtils;
import com.cloud.event.EventTypes;
import com.cloud.event.UsageEventUtils;
import com.cloud.event.dao.UsageEventDao;
@ -1063,6 +1064,9 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager, L
_ipAddressDao.update(ipAddrId, ip);
txn.commit();
ActionEventUtils.onActionEvent(User.UID_SYSTEM, Account.ACCOUNT_ID_SYSTEM, Domain.ROOT_DOMAIN,
EventTypes.EVENT_PORTABLE_IP_TRANSFER, "Portable IP associated is transferred from network "
+ currentNetworkId + " to " + newNetworkId);
}
@Override