mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
Removed unused code from ManagementServerImpl
This commit is contained in:
parent
0ea409546e
commit
4701dd760b
@ -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);
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user