You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by mc...@apache.org on 2013/07/27 02:35:10 UTC

git commit: updated refs/heads/4.2 to a2e2ef6

Updated Branches:
  refs/heads/4.2 47fb13f78 -> a2e2ef6a7


CLOUDSTACK-3857:[Object_Store_Refactor][Usage] Two VOLUME_CREATE usage
events are generated for one data disk after creating and attaching to
VM.

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

Branch: refs/heads/4.2
Commit: a2e2ef6a763dff188eb24d4e098b7f1faf37e4f3
Parents: 47fb13f
Author: Min Chen <mi...@citrix.com>
Authored: Fri Jul 26 17:34:06 2013 -0700
Committer: Min Chen <mi...@citrix.com>
Committed: Fri Jul 26 17:34:06 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/storage/VolumeManagerImpl.java | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a2e2ef6a/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index d7d62b0..bee6f79 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -72,10 +72,6 @@ import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
 import org.apache.cloudstack.storage.image.datastore.ImageStoreEntity;
-import org.apache.commons.lang.StringUtils;
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
 import com.cloud.agent.api.storage.CreateVolumeOVAAnswer;
@@ -1038,15 +1034,6 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager {
         }
 
         volume = _volsDao.persist(volume);
-        if (cmd.getSnapshotId() == null) {
-            // for volume created from snapshot, create usage event after volume
-            // creation
-            UsageEventVO usageEvent = new UsageEventVO(
-                    EventTypes.EVENT_VOLUME_CREATE, volume.getAccountId(),
-                    volume.getDataCenterId(), volume.getId(), volume.getName(),
-                    diskOfferingId, null, size);
-            _usageEventDao.persist(usageEvent);
-        }
 
         UserContext.current().setEventDetails("Volume Id: " + volume.getId());