cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject git commit: updated refs/heads/4.2 to 4653cff
Date Tue, 30 Jul 2013 13:30:28 GMT
Updated Branches:
  refs/heads/4.2 1550f5e26 -> 4653cff88


CLOUDSTACK-3642: [Usage][PortableIP] CS is not generating usage events
for portable IPs

generating usage event for acquire and release


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/4653cff8
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/4653cff8
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/4653cff8

Branch: refs/heads/4.2
Commit: 4653cff88b5cc0df33ac36ac1730769adf13b0df
Parents: 1550f5e
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Tue Jul 30 18:58:12 2013 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Tue Jul 30 19:00:13 2013 +0530

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkManagerImpl.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4653cff8/server/src/com/cloud/network/NetworkManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkManagerImpl.java b/server/src/com/cloud/network/NetworkManagerImpl.java
index 7ebcb44..b112199 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -539,8 +539,7 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
             String guestType = vlan.getVlanType().toString();
 
             if (!isIpDedicated(addr)) {
-                String eventType =  addr.isPortable() ? EventTypes.EVENT_PORTABLE_IP_ASSIGN
: EventTypes.EVENT_NET_IP_ASSIGN;
-                UsageEventUtils.publishUsageEvent(eventType, owner.getId(),
+                UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_ASSIGN, owner.getId(),
                         addr.getDataCenterId(), addr.getId(), addr.getAddress().toString(),
addr.isSourceNat(), guestType,
                         addr.getSystem(), addr.getClass().getName(), addr.getUuid());
             }
@@ -843,6 +842,11 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
             ipaddr.setAllocatedToAccountId(ipOwner.getId());
             ipaddr= _ipAddressDao.persist(ipaddr);
 
+            String guestType = vlan.getVlanType().toString();
+            UsageEventUtils.publishUsageEvent(EventTypes.EVENT_PORTABLE_IP_ASSIGN, ipaddr.getId(),
+                    ipaddr.getDataCenterId(), ipaddr.getId(), ipaddr.getAddress().toString(),
ipaddr.isSourceNat(), null,
+                    ipaddr.getSystem(), ipaddr.getClass().getName(), ipaddr.getUuid());
+
             txn.commit();
 
         } finally {


Mime
View raw message