cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [4/5] git commit: updated refs/heads/vmsync to d71e358
Date Wed, 12 Jun 2013 14:18:44 GMT
some unfinished cleanup on removing the caller and account


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

Branch: refs/heads/vmsync
Commit: 1310535be5345636cccc60bae251c8e782da39b1
Parents: 33dfe4f
Author: Alex Huang <alex.huang@gmail.com>
Authored: Tue Jun 11 16:45:18 2013 -0700
Committer: Alex Huang <alex.huang@gmail.com>
Committed: Tue Jun 11 16:45:18 2013 -0700

----------------------------------------------------------------------
 .../components-api/src/com/cloud/vm/VirtualMachineManager.java | 5 ++---
 server/src/com/cloud/vm/UserVmManagerImpl.java                 | 4 +---
 server/src/com/cloud/vm/VirtualMachineManagerImpl.java         | 6 +++---
 .../test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java | 6 ++----
 4 files changed, 8 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1310535b/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
----------------------------------------------------------------------
diff --git a/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java b/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
index 1a647e1..5e5c3e9 100644
--- a/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
+++ b/engine/components-api/src/com/cloud/vm/VirtualMachineManager.java
@@ -42,7 +42,6 @@ import com.cloud.storage.StoragePool;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.Volume;
 import com.cloud.user.Account;
-import com.cloud.user.User;
 import com.cloud.utils.Pair;
 import com.cloud.utils.component.Manager;
 import com.cloud.utils.fsm.NoTransitionException;
@@ -125,9 +124,9 @@ public interface VirtualMachineManager extends Manager {
     VirtualMachine migrateWithStorage(String vmUuid, long srcId, long destId, Map<Volume,
StoragePool> volumeToPool) throws ResourceUnavailableException,
             ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException;
 
-    void reboot(String vmUuid, User caller, Account account);
+    void reboot(String vmUuid);
 
-    void advanceReboot(String vmUuid, User caller, Account account) throws InsufficientCapacityException,
+    void advanceReboot(String vmUuid) throws InsufficientCapacityException,
             ResourceUnavailableException, ConcurrentOperationException, OperationTimedoutException;
 
     VirtualMachine storageMigration(String vmUuid, StoragePool storagePoolId);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1310535b/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index e248c43..7a79fc6 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -740,8 +740,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
 
     private UserVm rebootVirtualMachine(long userId, long vmId) {
         UserVmVO vm = _vmDao.findById(vmId);
-        User caller = _accountMgr.getActiveUser(userId);
-        Account owner = _accountMgr.getAccount(vm.getAccountId());
 
         if (vm == null || vm.getState() == State.Destroyed
                 || vm.getState() == State.Expunging || vm.getRemoved() != null) {
@@ -751,7 +749,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
 
         if (vm.getState() == State.Running && vm.getHostId() != null) {
             collectVmDiskStatistics(vm);
-            _itMgr.reboot(vm.getUuid(), caller, owner);
+            _itMgr.reboot(vm.getUuid());
             return _vmDao.findById(vmId);
         } else {
             s_logger.error("Vm id=" + vmId

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1310535b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
index d1a557d..57c6852 100755
--- a/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
+++ b/server/src/com/cloud/vm/VirtualMachineManagerImpl.java
@@ -2145,9 +2145,9 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     @Override
-    public void reboot(String vmUuid, User caller, Account account) {
+    public void reboot(String vmUuid) {
         try {
-            advanceReboot(vmUuid, caller, account);
+            advanceReboot(vmUuid);
         } catch (ConcurrentOperationException e) {
             throw new CloudRuntimeException("Unable to reboot a VM due to concurrent operation",
e).add(VirtualMachine.class, vmUuid);
         } catch (InsufficientCapacityException e) {
@@ -2160,7 +2160,7 @@ public class VirtualMachineManagerImpl extends ManagerBase implements
VirtualMac
     }
 
     @Override
-    public void advanceReboot(String vmUuid, User caller, Account account) throws InsufficientCapacityException,
+    public void advanceReboot(String vmUuid) throws InsufficientCapacityException,
             ConcurrentOperationException, ResourceUnavailableException, OperationTimedoutException
{
         VMInstanceVO vm = _vmDao.findByUuid(vmUuid);
         if (vm.getHostId() == null) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1310535b/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java b/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
index 80fe930..77b9268 100644
--- a/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
+++ b/server/test/com/cloud/vm/VmWorkMockVirtualMachineManagerImpl.java
@@ -52,7 +52,6 @@ import com.cloud.storage.StoragePool;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.Volume;
 import com.cloud.user.Account;
-import com.cloud.user.User;
 import com.cloud.utils.Pair;
 import com.cloud.utils.fsm.NoTransitionException;
 import com.cloud.vm.VirtualMachine.Event;
@@ -230,13 +229,12 @@ public class VmWorkMockVirtualMachineManagerImpl implements VirtualMachineManage
 	}
 
 	@Override
-    public void reboot(String vmUuid,
-            User caller, Account account) {
+    public void reboot(String vmUuid) {
 		// TODO Auto-generated method stub
 	}
 
 	@Override
-    public void advanceReboot(String vmUuid, User caller, Account account)
+    public void advanceReboot(String vmUuid)
 			throws InsufficientCapacityException, ResourceUnavailableException,
 			ConcurrentOperationException, OperationTimedoutException {
 		// TODO Auto-generated method stub


Mime
View raw message