cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alena1...@apache.org
Subject [1/4] git commit: updated refs/heads/master to 1300fc8
Date Thu, 30 May 2013 20:10:44 GMT
Updated Branches:
  refs/heads/master 9378820b9 -> 1300fc812


Removed unused code from ManagementServerImpl


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

Branch: refs/heads/master
Commit: 4701dd760b3ddec5463bf6a8e21d35ce2d982b7d
Parents: 0ea4095
Author: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Authored: Tue May 28 16:18:52 2013 -0700
Committer: Alena Prokharchyk <alena.prokharchyk@citrix.com>
Committed: Thu May 30 11:18:31 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/server/ManagementServer.java  |   34 ------------
 .../src/com/cloud/server/ManagementServerImpl.java |   40 ++-------------
 2 files changed, 4 insertions(+), 70 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4701dd76/server/src/com/cloud/server/ManagementServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServer.java b/server/src/com/cloud/server/ManagementServer.java
index 969bc65..f60ce48 100755
--- a/server/src/com/cloud/server/ManagementServer.java
+++ b/server/src/com/cloud/server/ManagementServer.java
@@ -16,19 +16,11 @@
 // under the License.
 package com.cloud.server;
 
-import java.util.Date;
 import java.util.List;
 
-import com.cloud.exception.ConcurrentOperationException;
-import com.cloud.exception.ManagementServerException;
-import com.cloud.exception.ResourceUnavailableException;
-import com.cloud.exception.VirtualMachineMigrationException;
-import org.apache.cloudstack.api.command.admin.systemvm.ScaleSystemVMCmd;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 
-import com.cloud.event.EventVO;
 import com.cloud.host.HostVO;
-import com.cloud.info.ConsoleProxyInfo;
 import com.cloud.storage.GuestOSVO;
 import com.cloud.utils.Pair;
 import com.cloud.utils.component.PluggableService;
@@ -59,30 +51,6 @@ public interface ManagementServer extends ManagementService, PluggableService
 {
      */
     HostVO getHostBy(long hostId);
 
-    /**
-     * Retrieves all Events between the start and end date specified
-     * 
-     * @param userId
-     *            unique id of the user, pass in -1 to retrieve events for all users
-     * @param accountId
-     *            unique id of the account (which could be shared by many users), pass in
-1 to retrieve events for all accounts
-     * @param domainId
-     *            the id of the domain in which to search for users (useful when -1 is passed
in for userId)
-     * @param type
-     *            the type of the event.
-     * @param level
-     *            INFO, WARN, or ERROR
-     * @param startDate
-     *            inclusive.
-     * @param endDate
-     *            inclusive. If date specified is greater than the current time, the system
will use the current time.
-     * @return List of events
-     */
-    List<EventVO> getEvents(long userId, long accountId, Long domainId, String type,
String level, Date startDate, Date endDate);
-
-    //FIXME - move all console proxy related commands to corresponding managers
-    ConsoleProxyInfo getConsoleProxyForVm(long dataCenterId, long userVmId);
-
     String getConsoleAccessUrlRoot(long vmId);
     
     GuestOSVO getGuestOs(Long guestOsId);
@@ -103,7 +71,5 @@ public interface ManagementServer extends ManagementService, PluggableService
 {
     String getEncryptionKey();
     String getEncryptionIV();
     void resetEncryptionKeyIV();
-    
-    public void enableAdminUser(String password);
 
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/4701dd76/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index d5d95f8..cf50e61d 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -922,38 +922,6 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
         }
     }
 
-    @Override
-    public List<EventVO> getEvents(long userId, long accountId, Long domainId, String
type, String level, Date startDate, Date endDate) {
-        SearchCriteria<EventVO> sc = _eventDao.createSearchCriteria();
-        if (userId > 0) {
-            sc.addAnd("userId", SearchCriteria.Op.EQ, userId);
-        }
-        if (accountId > 0) {
-            sc.addAnd("accountId", SearchCriteria.Op.EQ, accountId);
-        }
-        if (domainId != null) {
-            sc.addAnd("domainId", SearchCriteria.Op.EQ, domainId);
-        }
-        if (type != null) {
-            sc.addAnd("type", SearchCriteria.Op.EQ, type);
-        }
-        if (level != null) {
-            sc.addAnd("level", SearchCriteria.Op.EQ, level);
-        }
-        if (startDate != null && endDate != null) {
-            startDate = massageDate(startDate, 0, 0, 0);
-            endDate = massageDate(endDate, 23, 59, 59);
-            sc.addAnd("createDate", SearchCriteria.Op.BETWEEN, startDate, endDate);
-        } else if (startDate != null) {
-            startDate = massageDate(startDate, 0, 0, 0);
-            sc.addAnd("createDate", SearchCriteria.Op.GTEQ, startDate);
-        } else if (endDate != null) {
-            endDate = massageDate(endDate, 23, 59, 59);
-            sc.addAnd("createDate", SearchCriteria.Op.LTEQ, endDate);
-        }
-
-        return _eventDao.search(sc, null);
-    }
 
     @Override
     public boolean archiveEvents(ArchiveEventsCmd cmd) {
@@ -2229,8 +2197,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
         return new Pair<List<? extends GuestOsCategory>, Integer>(result.first(),
result.second());
     }
 
-    @Override
-    public ConsoleProxyInfo getConsoleProxyForVm(long dataCenterId, long userVmId) {
+
+    protected ConsoleProxyInfo getConsoleProxyForVm(long dataCenterId, long userVmId) {
         return _consoleProxyMgr.assignProxy(dataCenterId, userVmId);
     }
 
@@ -4134,8 +4102,8 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
 
     }
 
-    @Override
-    public void enableAdminUser(String password) {
+
+    private void enableAdminUser(String password) {
         String encodedPassword = null;
 
         UserVO adminUser = _userDao.getUser(2);


Mime
View raw message