diff --git a/core/src/com/cloud/consoleproxy/ConsoleProxyManager.java b/core/src/com/cloud/consoleproxy/ConsoleProxyManager.java deleted file mode 100644 index ca36c338f82..00000000000 --- a/core/src/com/cloud/consoleproxy/ConsoleProxyManager.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * Copyright (C) 2010 Cloud.com, Inc. All rights reserved. - * - * This software is licensed under the GNU General Public License v3 or later. - * - * It is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or any later version. - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * - */ - -package com.cloud.consoleproxy; - -import com.cloud.agent.api.AgentControlAnswer; -import com.cloud.agent.api.ConsoleAccessAuthenticationCommand; -import com.cloud.agent.api.ConsoleProxyLoadReportCommand; -import com.cloud.agent.api.StartupCommand; -import com.cloud.host.HostVO; -import com.cloud.host.Status; -import com.cloud.utils.component.Manager; -import com.cloud.vm.ConsoleProxyVO; - -public interface ConsoleProxyManager extends Manager { - public static final int DEFAULT_PROXY_CAPACITY = 50; - public static final int DEFAULT_STANDBY_CAPACITY = 10; - public static final int DEFAULT_PROXY_VM_RAMSIZE = 1024; // 1G - - public static final int DEFAULT_PROXY_CMD_PORT = 8001; - public static final int DEFAULT_PROXY_VNC_PORT = 0; - public static final int DEFAULT_PROXY_URL_PORT = 80; - public static final int DEFAULT_PROXY_SESSION_TIMEOUT = 300000; // 5 minutes - - public static final String ALERT_SUBJECT = "proxy-alert"; - - public ConsoleProxyVO assignProxy(long dataCenterId, long userVmId); - - public ConsoleProxyVO startProxy(long proxyVmId, long startEventId); - public boolean stopProxy(long proxyVmId, long startEventId); - public boolean rebootProxy(long proxyVmId, long startEventId); - public boolean destroyProxy(long proxyVmId, long startEventId); - - public void onLoadReport(ConsoleProxyLoadReportCommand cmd); - public AgentControlAnswer onConsoleAccessAuthentication(ConsoleAccessAuthenticationCommand cmd); - - public void onAgentConnect(HostVO host, StartupCommand cmd); - public void onAgentDisconnect(long agentId, Status state); -} diff --git a/server/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java b/server/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java index 1fb444af877..77cc60d256a 100644 --- a/server/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java +++ b/server/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java @@ -24,21 +24,20 @@ import java.util.Map; import org.apache.log4j.Logger; +import com.cloud.api.BaseAsyncCmd; import com.cloud.api.BaseCmd; +import com.cloud.api.Implementation; import com.cloud.api.Parameter; import com.cloud.api.ServerApiException; +import com.cloud.api.BaseCmd.Manager; import com.cloud.utils.Pair; import com.cloud.vm.ConsoleProxyVO; - -public class DestroyConsoleProxyCmd extends BaseCmd { + +@Implementation(method="destroyConsoleProxy", manager=Manager.ConsoleProxyManager) +public class DestroyConsoleProxyCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(DestroyConsoleProxyCmd.class.getName()); private static final String s_name = "destroyconsoleproxyresponse"; - private static final List> s_properties = new ArrayList>(); - - static { - s_properties.add(new Pair(BaseCmd.Properties.ID, Boolean.TRUE)); - } ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -65,10 +64,6 @@ public class DestroyConsoleProxyCmd extends BaseCmd { return s_name; } - public List> getProperties() { - return s_properties; - } - public List> execute(Map params) { Long proxyId = (Long)params.get(BaseCmd.Properties.ID.getName()); @@ -89,5 +84,12 @@ public class DestroyConsoleProxyCmd extends BaseCmd { List> returnValues = new ArrayList>(); returnValues.add(new Pair(BaseCmd.Properties.JOB_ID.getName(), Long.valueOf(jobId))); return returnValues; - } + } + + + @Override + public String getResponse() { + // TODO Auto-generated method stub + return null; + } }