cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muralire...@apache.org
Subject [1/2] git commit: updated refs/heads/master to a5dcb27
Date Fri, 19 Jul 2013 13:24:52 GMT
Updated Branches:
  refs/heads/master 2d9566eb8 -> a5dcb2754


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

generating usage events for acquire/release of portable IP


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

Branch: refs/heads/master
Commit: 28aaa7534a9dec923c64a0da64267b54de7b6449
Parents: 2d9566e
Author: Murali Reddy <muralimmreddy@gmail.com>
Authored: Fri Jul 19 18:42:52 2013 +0530
Committer: Murali Reddy <muralimmreddy@gmail.com>
Committed: Fri Jul 19 18:45:14 2013 +0530

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/28aaa753/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 0fa58be..196f7de 100755
--- a/server/src/com/cloud/network/NetworkManagerImpl.java
+++ b/server/src/com/cloud/network/NetworkManagerImpl.java
@@ -535,7 +535,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
             String guestType = vlan.getVlanType().toString();
 
             if (!isIpDedicated(addr)) {
-                UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_ASSIGN, owner.getId(),
+                String eventType =  addr.isPortable() ? EventTypes.EVENT_PORTABLE_IP_ASSIGN
: EventTypes.EVENT_NET_IP_ASSIGN;
+                UsageEventUtils.publishUsageEvent(eventType, owner.getId(),
                         addr.getDataCenterId(), addr.getId(), addr.getAddress().toString(),
addr.isSourceNat(), guestType,
                         addr.getSystem(), addr.getClass().getName(), addr.getUuid());
             }
@@ -3531,7 +3532,8 @@ public class NetworkManagerImpl extends ManagerBase implements NetworkManager,
L
 
                 String guestType = vlan.getVlanType().toString();
                 if (!isIpDedicated(ip)) {
-                    UsageEventUtils.publishUsageEvent(EventTypes.EVENT_NET_IP_RELEASE,
+                    String eventType =  ip.isPortable() ? EventTypes.EVENT_PORTABLE_IP_RELEASE
: EventTypes.EVENT_NET_IP_RELEASE;
+                    UsageEventUtils.publishUsageEvent( eventType,
                             ip.getAllocatedToAccountId(), ip.getDataCenterId(), addrId, ip.getAddress().addr(),
                             ip.isSourceNat(), guestType, ip.getSystem(), ip.getClass().getName(),
ip.getUuid());
                 }


Mime
View raw message