cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [01/12] git commit: updated refs/heads/vmsync to cbdc406
Date Wed, 15 May 2013 17:13:03 GMT
Updated Branches:
  refs/heads/vmsync 2fa361209 -> cbdc4063c


Some small changes before the move of the async job


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

Branch: refs/heads/vmsync
Commit: bb242a840e0a691ed1416772a4cd775c6014c0c9
Parents: 2fa3612
Author: Alex Huang <alex.huang@gmail.com>
Authored: Tue May 14 14:13:14 2013 -0700
Committer: Alex Huang <alex.huang@gmail.com>
Committed: Tue May 14 14:13:14 2013 -0700

----------------------------------------------------------------------
 .../cloud/entity/api/VMEntityManagerImpl.java      |   14 ++++++++++----
 .../engine/cloud/entity/dao/VMEntityDaoImpl.java   |   13 ++++---------
 2 files changed, 14 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb242a84/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
----------------------------------------------------------------------
diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
index 2292fac..b9b71ca 100755
--- a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
+++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java
@@ -24,21 +24,23 @@ import java.util.UUID;
 
 import javax.inject.Inject;
 
+import org.springframework.stereotype.Component;
+
 import org.apache.cloudstack.engine.cloud.entity.VMEntityVO;
 import org.apache.cloudstack.engine.cloud.entity.VMReservationVO;
 import org.apache.cloudstack.engine.cloud.entity.dao.VMEntityDao;
 import org.apache.cloudstack.engine.cloud.entity.dao.VMReservationDao;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
-import org.springframework.stereotype.Component;
 
+import com.cloud.dao.EntityManager;
 import com.cloud.dc.DataCenter;
 import com.cloud.deploy.DataCenterDeployment;
 import com.cloud.deploy.DeployDestination;
 import com.cloud.deploy.DeploymentPlan;
 import com.cloud.deploy.DeploymentPlanner;
-import com.cloud.deploy.DeploymentPlanningManager;
 import com.cloud.deploy.DeploymentPlanner.ExcludeList;
+import com.cloud.deploy.DeploymentPlanningManager;
 import com.cloud.exception.AffinityConflictException;
 import com.cloud.exception.AgentUnavailableException;
 import com.cloud.exception.ConcurrentOperationException;
@@ -69,7 +71,11 @@ import com.cloud.vm.dao.VMInstanceDao;
 public class VMEntityManagerImpl implements VMEntityManager {
 
     @Inject
+    protected EntityManager _eneityMgr;
+
+    @Inject
     protected VMInstanceDao _vmDao;
+
     @Inject
     protected VMTemplateDao _templateDao = null;
 
@@ -105,6 +111,7 @@ public class VMEntityManagerImpl implements VMEntityManager {
 
     @Inject
     protected PrimaryDataStoreDao _storagePoolDao;
+
     @Inject
     DataStoreManager dataStoreMgr;
 
@@ -113,7 +120,6 @@ public class VMEntityManagerImpl implements VMEntityManager {
 
 	@Override
 	public VMEntityVO loadVirtualMachine(String vmId) {
-		// TODO Auto-generated method stub
 		return _vmEntityDao.findByUuid(vmId);
 	}
 
@@ -141,7 +147,7 @@ public class VMEntityManagerImpl implements VMEntityManager {
         List<VolumeVO> vols = _volsDao.findReadyRootVolumesByInstance(vm.getId());
         if(!vols.isEmpty()){
             VolumeVO vol = vols.get(0);
-            StoragePool pool = (StoragePool)this.dataStoreMgr.getPrimaryDataStore(vol.getPoolId());
+            StoragePool pool = (StoragePool)dataStoreMgr.getPrimaryDataStore(vol.getPoolId());
 
             if (!pool.isInMaintenance()) {
                 long rootVolDcId = pool.getDataCenterId();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/bb242a84/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/dao/VMEntityDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/dao/VMEntityDaoImpl.java
b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/dao/VMEntityDaoImpl.java
index bf153bc..716c91b 100644
--- a/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/dao/VMEntityDaoImpl.java
+++ b/engine/schema/src/org/apache/cloudstack/engine/cloud/entity/dao/VMEntityDaoImpl.java
@@ -5,7 +5,7 @@
 // to you under the Apache License, Version 2.0 (the
 // "License"); you may not use this file except in compliance
 // with the License.  You may obtain a copy of the License at
-// 
+//
 //   http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing,
@@ -17,8 +17,6 @@
 package org.apache.cloudstack.engine.cloud.entity.dao;
 
 
-import java.sql.PreparedStatement;
-import java.sql.SQLException;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -26,20 +24,17 @@ import javax.annotation.PostConstruct;
 import javax.ejb.Local;
 import javax.inject.Inject;
 
-import org.apache.cloudstack.engine.cloud.entity.VMEntityVO;
-import org.apache.cloudstack.engine.cloud.entity.VMReservationVO;
-
 import org.apache.log4j.Logger;
 import org.springframework.stereotype.Component;
 
+import org.apache.cloudstack.engine.cloud.entity.VMEntityVO;
+import org.apache.cloudstack.engine.cloud.entity.VMReservationVO;
 
 import com.cloud.network.dao.NetworkDao;
 import com.cloud.network.dao.NetworkVO;
-import com.cloud.utils.Pair;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.GenericDaoBase;
 import com.cloud.utils.db.Transaction;
-import com.cloud.vm.NicProfile;
 
 
 
@@ -158,7 +153,7 @@ public class VMEntityDaoImpl extends GenericDaoBase<VMEntityVO, Long>
implements
             return;
         }
 
-        _vmComputeTagDao.persist(vmId, computeTags);        
+        _vmComputeTagDao.persist(vmId, computeTags);
     }
 
     private void saveVmReservation(VMEntityVO vm) {


Mime
View raw message