mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-10-26 08:42:29 +01:00 
			
		
		
		
	Merge branch '2.1.refactor' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 2.1.refactor
This commit is contained in:
		
						commit
						716271fca1
					
				
							
								
								
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1,4 +1,5 @@ | ||||
| build/build.number | ||||
| build.number | ||||
| bin | ||||
| cloudstack-proprietary | ||||
| .lock-wscript | ||||
|  | ||||
| @ -1,3 +0,0 @@ | ||||
| #Build Number for ANT. Do not edit! | ||||
| #Sat Aug 07 12:54:57 PDT 2010 | ||||
| build.number=927 | ||||
| @ -15,20 +15,23 @@ | ||||
|  * along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||
|  *  | ||||
|  */ | ||||
| package com.cloud.agent; | ||||
| package com.cloud.agent.manager; | ||||
| 
 | ||||
| import java.net.URI; | ||||
| import java.util.List; | ||||
| import java.util.Set; | ||||
| 
 | ||||
| import com.cloud.agent.Listener; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.api.commands.DeleteHostCmd; | ||||
| import com.cloud.dc.DataCenterVO; | ||||
| import com.cloud.dc.HostPodVO; | ||||
| import com.cloud.dc.PodCluster; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
| import com.cloud.exception.DiscoveryException; | ||||
| import com.cloud.exception.InternalErrorException; | ||||
| import com.cloud.exception.InvalidParameterValueException; | ||||
| import com.cloud.exception.OperationTimedoutException; | ||||
| import com.cloud.host.Host; | ||||
| import com.cloud.host.HostStats; | ||||
| @ -168,6 +171,14 @@ public interface AgentManager extends Manager { | ||||
|      * @param true if deleted, false otherwise | ||||
|      */ | ||||
|     boolean deleteHost(long hostId); | ||||
|      | ||||
| 	/** | ||||
|      * Deletes a host | ||||
|      *  | ||||
|      * @param cmd | ||||
|      * @param true if deleted, false otherwise | ||||
|      */ | ||||
|     boolean deleteHost(DeleteHostCmd cmd) throws InvalidParameterValueException;  | ||||
| 	 | ||||
| 	/** | ||||
| 	 * Find a pod based on the user id, template, and data center. | ||||
| @ -40,7 +40,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.Listener; | ||||
| import com.cloud.agent.api.AgentControlAnswer; | ||||
| import com.cloud.agent.api.AgentControlCommand; | ||||
| @ -70,6 +69,9 @@ import com.cloud.agent.transport.Request; | ||||
| import com.cloud.agent.transport.Response; | ||||
| import com.cloud.agent.transport.UpgradeResponse; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.api.BaseCmd; | ||||
| import com.cloud.api.ServerApiException; | ||||
| import com.cloud.api.commands.DeleteHostCmd; | ||||
| import com.cloud.capacity.CapacityVO; | ||||
| import com.cloud.capacity.dao.CapacityDao; | ||||
| import com.cloud.configuration.dao.ConfigurationDao; | ||||
| @ -87,6 +89,7 @@ import com.cloud.event.dao.EventDao; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
| import com.cloud.exception.DiscoveryException; | ||||
| import com.cloud.exception.InternalErrorException; | ||||
| import com.cloud.exception.InvalidParameterValueException; | ||||
| import com.cloud.exception.OperationTimedoutException; | ||||
| import com.cloud.exception.UnsupportedVersionException; | ||||
| import com.cloud.ha.HighAvailabilityManager; | ||||
| @ -566,6 +569,24 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory { | ||||
|             return false; | ||||
|         } | ||||
|     } | ||||
|      | ||||
|     public boolean deleteHost(DeleteHostCmd cmd) throws InvalidParameterValueException{ | ||||
|     	Long id = cmd.getId(); | ||||
|     	 | ||||
|     	//Verify that host exists | ||||
|     	HostVO host = _hostDao.findById(id); | ||||
|     	if (host == null) { | ||||
|     		throw new InvalidParameterValueException("Host with id " + id.toString() + " doesn't exist"); | ||||
|     	} | ||||
|     	 | ||||
|     	if (deleteHost(id)) { | ||||
|     		return true; | ||||
|     	} | ||||
|     	else { | ||||
|     		return false; | ||||
|     	} | ||||
|     } | ||||
|      | ||||
| 
 | ||||
|     @DB | ||||
|     protected boolean deleteSecondaryStorageHost(HostVO secStorageHost) { | ||||
|  | ||||
| @ -25,7 +25,7 @@ import javax.ejb.Local; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.agent.manager.allocator.HostAllocator; | ||||
| import com.cloud.dc.ClusterVO; | ||||
| import com.cloud.dc.DataCenterVO; | ||||
|  | ||||
| @ -46,9 +46,9 @@ public abstract class BaseCmd { | ||||
|     public enum CommandType { | ||||
|         BOOLEAN, DATE, FLOAT, INTEGER, LIST, LONG, OBJECT, MAP, STRING, TZDATE | ||||
|     } | ||||
| 
 | ||||
| 
 | ||||
|     public enum Manager { | ||||
|     	ConfigManager, ManagementServer, NetworkGroupManager, NetworkManager, StorageManager, UserVmManager, AccountManager | ||||
|     	ConfigManager, ManagementServer, NetworkGroupManager, NetworkManager, StorageManager, UserVmManager, AccountManager, AgentManager | ||||
|     } | ||||
| 
 | ||||
|     // FIXME:  Extract these out into a separate file | ||||
|  | ||||
| @ -18,27 +18,19 @@ | ||||
| 
 | ||||
| package com.cloud.api.commands; | ||||
| 
 | ||||
| import java.util.ArrayList; | ||||
| import java.util.List; | ||||
| import java.util.Map; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.api.BaseCmd; | ||||
| import com.cloud.api.BaseCmd.Manager; | ||||
| import com.cloud.api.Implementation; | ||||
| import com.cloud.api.Parameter; | ||||
| import com.cloud.api.ServerApiException; | ||||
| import com.cloud.host.HostVO; | ||||
| import com.cloud.utils.Pair; | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @Implementation(method="deleteHost", manager=Manager.AgentManager) | ||||
| public class DeleteHostCmd extends BaseCmd { | ||||
|     public static final Logger s_logger = Logger.getLogger(DeleteHostCmd.class.getName()); | ||||
| 
 | ||||
|     private static final String s_name = "deletehostresponse"; | ||||
|     private static final List<Pair<Enum, Boolean>> s_properties = new ArrayList<Pair<Enum, Boolean>>(); | ||||
| 
 | ||||
|     static { | ||||
|         s_properties.add(new Pair<Enum, Boolean>(BaseCmd.Properties.ID, Boolean.TRUE)); | ||||
|     } | ||||
| 
 | ||||
|     ///////////////////////////////////////////////////// | ||||
|     //////////////// API parameters ///////////////////// | ||||
| @ -65,35 +57,30 @@ public class DeleteHostCmd extends BaseCmd { | ||||
|     public String getName() { | ||||
|         return s_name; | ||||
|     } | ||||
|      | ||||
|     @Override | ||||
|     public List<Pair<Enum, Boolean>> getProperties() { | ||||
|         return s_properties; | ||||
|     } | ||||
| 
 | ||||
|     @Override | ||||
|     public List<Pair<String, Object>> execute(Map<String, Object> params) { | ||||
|     	Long hostId = (Long)params.get(BaseCmd.Properties.ID.getName()); | ||||
|     	 | ||||
|     	//verify input parameters | ||||
|     	HostVO host = getManagementServer().getHostBy(hostId); | ||||
|     	if (host == null) { | ||||
|     		throw new ServerApiException(BaseCmd.PARAM_ERROR, "Host with id " + hostId.toString() + " doesn't exist"); | ||||
|     	} | ||||
|   | ||||
|     	boolean success = false; | ||||
|     	try { | ||||
|     		success = getManagementServer().deleteHost(hostId); | ||||
|     	} catch (Exception ex) { | ||||
|     	    s_logger.warn("Unable to delete host " + hostId, ex); | ||||
|     		throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete the host " + hostId.toString() + ". Current host status is " + host.getStatus()); | ||||
|     	} | ||||
|          | ||||
|         if (success == false) { | ||||
|             throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete the host with id " + hostId.toString()); | ||||
|         } | ||||
|         List<Pair<String, Object>> returnValues = new ArrayList<Pair<String, Object>>(); | ||||
|         returnValues.add(new Pair<String, Object>(BaseCmd.Properties.SUCCESS.getName(), Boolean.valueOf(success).toString())); | ||||
|         return returnValues; | ||||
|     } | ||||
| //    @Override | ||||
| //    public List<Pair<String, Object>> execute(Map<String, Object> params) { | ||||
| //    	Long hostId = (Long)params.get(BaseCmd.Properties.ID.getName()); | ||||
| //    	 | ||||
| //    	//verify input parameters | ||||
| //    	HostVO host = getManagementServer().getHostBy(hostId); | ||||
| //    	if (host == null) { | ||||
| //    		throw new ServerApiException(BaseCmd.PARAM_ERROR, "Host with id " + hostId.toString() + " doesn't exist"); | ||||
| //    	} | ||||
| //  | ||||
| //    	boolean success = false; | ||||
| //    	try { | ||||
| //    		success = getManagementServer().deleteHost(hostId); | ||||
| //    	} catch (Exception ex) { | ||||
| //    	    s_logger.warn("Unable to delete host " + hostId, ex); | ||||
| //    		throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete the host " + hostId.toString() + ". Current host status is " + host.getStatus()); | ||||
| //    	} | ||||
| //         | ||||
| //        if (success == false) { | ||||
| //            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete the host with id " + hostId.toString()); | ||||
| //        } | ||||
| //        List<Pair<String, Object>> returnValues = new ArrayList<Pair<String, Object>>(); | ||||
| //        returnValues.add(new Pair<String, Object>(BaseCmd.Properties.SUCCESS.getName(), Boolean.valueOf(success).toString())); | ||||
| //        return returnValues; | ||||
| //    } | ||||
| } | ||||
| @ -18,7 +18,7 @@ | ||||
| 
 | ||||
| package com.cloud.async; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.async.dao.AsyncJobDao; | ||||
| import com.cloud.event.dao.EventDao; | ||||
| import com.cloud.network.NetworkManager; | ||||
|  | ||||
| @ -23,7 +23,7 @@ import java.util.Map; | ||||
| import javax.ejb.Local; | ||||
| import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.async.dao.AsyncJobDao; | ||||
| import com.cloud.event.dao.EventDao; | ||||
| import com.cloud.network.NetworkManager; | ||||
|  | ||||
| @ -21,7 +21,7 @@ import java.util.ArrayList; | ||||
| import java.util.HashMap; | ||||
| import java.util.List; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.ha.HighAvailabilityManager; | ||||
| import com.cloud.network.NetworkManager; | ||||
| import com.cloud.server.ManagementServer; | ||||
|  | ||||
| @ -25,7 +25,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.AgentControlAnswer; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.ConsoleAccessAuthenticationAnswer; | ||||
| @ -35,6 +34,7 @@ import com.cloud.agent.api.GetVncPortAnswer; | ||||
| import com.cloud.agent.api.GetVncPortCommand; | ||||
| import com.cloud.agent.api.StartupCommand; | ||||
| import com.cloud.agent.api.StopCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.configuration.dao.ConfigurationDao; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
| import com.cloud.exception.ConcurrentOperationException; | ||||
|  | ||||
| @ -39,7 +39,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.AgentControlAnswer; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.CheckVirtualMachineAnswer; | ||||
| @ -57,6 +56,7 @@ import com.cloud.agent.api.StartupCommand; | ||||
| import com.cloud.agent.api.StopAnswer; | ||||
| import com.cloud.agent.api.StopCommand; | ||||
| import com.cloud.agent.api.proxy.ConsoleProxyLoadAnswer; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.async.AsyncJobExecutor; | ||||
| import com.cloud.async.AsyncJobManager; | ||||
| import com.cloud.async.AsyncJobVO; | ||||
|  | ||||
| @ -21,9 +21,9 @@ import javax.ejb.Local; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.CheckVirtualMachineAnswer; | ||||
| import com.cloud.agent.api.CheckVirtualMachineCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
| import com.cloud.exception.OperationTimedoutException; | ||||
| import com.cloud.host.HostVO; | ||||
|  | ||||
| @ -33,10 +33,10 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.MigrateCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.configuration.dao.ConfigurationDao; | ||||
| import com.cloud.dc.DataCenterVO; | ||||
|  | ||||
| @ -26,9 +26,9 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.PingTestCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
| import com.cloud.exception.OperationTimedoutException; | ||||
| import com.cloud.host.Host; | ||||
|  | ||||
| @ -21,7 +21,6 @@ import java.util.List; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.Listener; | ||||
| import com.cloud.agent.api.AgentControlAnswer; | ||||
| import com.cloud.agent.api.AgentControlCommand; | ||||
| @ -30,6 +29,7 @@ import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.PingRoutingCommand; | ||||
| import com.cloud.agent.api.StartupCommand; | ||||
| import com.cloud.agent.api.StartupRoutingCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
| import com.cloud.host.HostVO; | ||||
| import com.cloud.host.Status; | ||||
|  | ||||
| @ -23,10 +23,10 @@ import javax.ejb.Local; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.CheckOnHostAnswer; | ||||
| import com.cloud.agent.api.CheckOnHostCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.host.HostVO; | ||||
| import com.cloud.host.Status; | ||||
| import com.cloud.host.dao.HostDao; | ||||
|  | ||||
| @ -33,7 +33,6 @@ import javax.naming.ConfigurationException; | ||||
| import org.apache.log4j.Logger; | ||||
| import org.apache.xmlrpc.XmlRpcException; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.Listener; | ||||
| import com.cloud.agent.api.AgentControlAnswer; | ||||
| import com.cloud.agent.api.AgentControlCommand; | ||||
| @ -41,6 +40,7 @@ import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.StartupCommand; | ||||
| import com.cloud.agent.api.StartupStorageCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.configuration.Config; | ||||
| import com.cloud.dc.ClusterVO; | ||||
|  | ||||
| @ -32,7 +32,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.CheckVirtualMachineAnswer; | ||||
| import com.cloud.agent.api.CheckVirtualMachineCommand; | ||||
| @ -55,6 +54,7 @@ import com.cloud.agent.api.routing.LoadBalancerCfgCommand; | ||||
| import com.cloud.agent.api.routing.SavePasswordCommand; | ||||
| import com.cloud.agent.api.routing.SetFirewallRuleCommand; | ||||
| import com.cloud.agent.api.routing.VmDataCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.api.commands.AssignToLoadBalancerRuleCmd; | ||||
| import com.cloud.api.commands.CreateIPForwardingRuleCmd; | ||||
|  | ||||
| @ -23,7 +23,6 @@ import java.util.Set; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.Listener; | ||||
| import com.cloud.agent.api.AgentControlAnswer; | ||||
| import com.cloud.agent.api.AgentControlCommand; | ||||
| @ -32,6 +31,7 @@ import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.NetworkIngressRuleAnswer; | ||||
| import com.cloud.agent.api.PingRoutingWithNwGroupsCommand; | ||||
| import com.cloud.agent.api.StartupCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.host.HostVO; | ||||
| import com.cloud.host.Status; | ||||
| import com.cloud.network.security.NetworkGroupWorkVO.Step; | ||||
|  | ||||
| @ -37,10 +37,10 @@ import javax.naming.ConfigurationException; | ||||
| import org.apache.commons.codec.digest.DigestUtils; | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.NetworkIngressRulesCmd; | ||||
| import com.cloud.agent.api.NetworkIngressRulesCmd.IpPortAndProto; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.api.commands.CreateNetworkGroupCmd; | ||||
| import com.cloud.configuration.dao.ConfigurationDao; | ||||
| import com.cloud.domain.DomainVO; | ||||
|  | ||||
| @ -214,7 +214,7 @@ public interface ManagementServer { | ||||
|      | ||||
|     /** | ||||
|      * Enables an account by accountId | ||||
|      * @param accountId | ||||
|      * @param cmd | ||||
|      * @return true if enable was successful, false otherwise | ||||
|      */ | ||||
|     boolean enableAccount(EnableAccountCmd cmd) throws InvalidParameterValueException; | ||||
| @ -227,17 +227,16 @@ public interface ManagementServer { | ||||
|     boolean lockAccount(long accountId); | ||||
| 
 | ||||
|     /** | ||||
|      * Updates an account name by accountId | ||||
|      * @param accountId | ||||
|      * @param accountName | ||||
|      * Updates an account name | ||||
|      * @param cmd | ||||
|      * @return true if update was successful, false otherwise | ||||
|      */ | ||||
|      | ||||
|     boolean updateAccount(UpdateAccountCmd cmd) throws InvalidParameterValueException; | ||||
| 
 | ||||
|     /** | ||||
|      * Enables a user by userId | ||||
|      * @param userId | ||||
|      * Enables a user | ||||
|      * @param cmd | ||||
|      * @return true if enable was successful, false otherwise | ||||
|      */ | ||||
|     boolean enableUser(EnableUserCmd cmd) throws InvalidParameterValueException; | ||||
| @ -851,13 +850,13 @@ public interface ManagementServer { | ||||
|      */ | ||||
|     void updateHost(long hostId, long guestOSCategoryId) throws InvalidParameterValueException; | ||||
|      | ||||
|     /** | ||||
|      * Deletes a host | ||||
|      *  | ||||
|      * @param hostId | ||||
|      * @param true if deleted, false otherwise | ||||
|      */ | ||||
|     boolean deleteHost(long hostId); | ||||
| //    /** | ||||
| //     * Deletes a host | ||||
| //     *  | ||||
| //     * @param hostId | ||||
| //     * @param true if deleted, false otherwise | ||||
| //     */ | ||||
| //    boolean deleteHost(long hostId); | ||||
|      | ||||
|     /** | ||||
|      * Retrieves all Events between the start and end date specified | ||||
| @ -1147,14 +1146,8 @@ public interface ManagementServer { | ||||
|     VlanVO findVlanById(long vlanDbId); | ||||
|      | ||||
|     /** | ||||
|      * Creates a new template with the specified parameters | ||||
|      * @param id | ||||
|      * @param name | ||||
|      * @param displayText | ||||
|      * @param String format | ||||
|      * @param Long guestOsId | ||||
|      * @param Boolean passwordEnabled | ||||
|      * @param Boolean bootable | ||||
|      * Creates a new template | ||||
|      * @param cmd | ||||
|      * @return success/failure | ||||
|      */ | ||||
|     boolean updateTemplate(UpdateTemplateCmd cmd) throws InvalidParameterValueException; | ||||
| @ -1540,6 +1533,8 @@ public interface ManagementServer { | ||||
|      * @return domainVO the domain with the matching path, or null if no domain with the given path exists | ||||
|      */ | ||||
|     DomainVO findDomainByPath(String domainPath); | ||||
|      | ||||
|      | ||||
| 
 | ||||
|     /** | ||||
|      * Finds accounts with account identifiers similar to the parameter | ||||
|  | ||||
| @ -51,9 +51,9 @@ import javax.crypto.spec.SecretKeySpec; | ||||
| import org.apache.commons.codec.binary.Base64; | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.GetVncPortAnswer; | ||||
| import com.cloud.agent.api.GetVncPortCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.alert.AlertVO; | ||||
| import com.cloud.alert.dao.AlertDao; | ||||
| @ -2901,9 +2901,9 @@ public class ManagementServerImpl implements ManagementServer { | ||||
|     	_agentMgr.updateHost(hostId, guestOSCategoryId); | ||||
|     } | ||||
|      | ||||
|     public boolean deleteHost(long hostId) { | ||||
|         return _agentMgr.deleteHost(hostId); | ||||
|     } | ||||
| //    public boolean deleteHost(long hostId) { | ||||
| //        return _agentMgr.deleteHost(hostId); | ||||
| //    } | ||||
| 
 | ||||
|     @Override | ||||
|     public long getId() { | ||||
|  | ||||
| @ -31,13 +31,13 @@ import java.util.concurrent.TimeUnit; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.GetFileStatsCommand; | ||||
| import com.cloud.agent.api.GetStorageStatsCommand; | ||||
| import com.cloud.agent.api.HostStatsEntry; | ||||
| import com.cloud.agent.api.VmStatsEntry; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.capacity.CapacityVO; | ||||
| import com.cloud.capacity.dao.CapacityDao; | ||||
| import com.cloud.exception.AgentUnavailableException; | ||||
|  | ||||
| @ -39,7 +39,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.BackupSnapshotCommand; | ||||
| import com.cloud.agent.api.Command; | ||||
| @ -57,6 +56,7 @@ import com.cloud.agent.api.storage.DeleteTemplateCommand; | ||||
| import com.cloud.agent.api.storage.DestroyCommand; | ||||
| import com.cloud.agent.api.to.DiskCharacteristicsTO; | ||||
| import com.cloud.agent.api.to.VolumeTO; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.api.BaseCmd; | ||||
| import com.cloud.api.commands.StopVMCmd; | ||||
|  | ||||
| @ -32,13 +32,13 @@ import javax.ejb.Local; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.Listener; | ||||
| import com.cloud.agent.api.Command; | ||||
| import com.cloud.agent.api.storage.DeleteTemplateCommand; | ||||
| import com.cloud.agent.api.storage.DownloadCommand; | ||||
| import com.cloud.agent.api.storage.DownloadProgressCommand; | ||||
| import com.cloud.agent.api.storage.DownloadProgressCommand.RequestType; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.async.AsyncInstanceCreateStatus; | ||||
| import com.cloud.configuration.dao.ConfigurationDao; | ||||
| import com.cloud.dc.DataCenterVO; | ||||
|  | ||||
| @ -34,7 +34,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.CheckVirtualMachineAnswer; | ||||
| import com.cloud.agent.api.CheckVirtualMachineCommand; | ||||
| @ -49,6 +48,7 @@ import com.cloud.agent.api.StartSecStorageVmCommand; | ||||
| import com.cloud.agent.api.StartupCommand; | ||||
| import com.cloud.agent.api.StopAnswer; | ||||
| import com.cloud.agent.api.StopCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.async.AsyncJobExecutor; | ||||
| import com.cloud.async.AsyncJobManager; | ||||
| import com.cloud.async.AsyncJobVO; | ||||
|  | ||||
| @ -28,7 +28,6 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.BackupSnapshotAnswer; | ||||
| import com.cloud.agent.api.BackupSnapshotCommand; | ||||
| @ -38,6 +37,7 @@ import com.cloud.agent.api.ManageSnapshotAnswer; | ||||
| import com.cloud.agent.api.ManageSnapshotCommand; | ||||
| import com.cloud.agent.api.ValidateSnapshotAnswer; | ||||
| import com.cloud.agent.api.ValidateSnapshotCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.api.BaseCmd; | ||||
| import com.cloud.api.commands.CreateSnapshotCmd; | ||||
| import com.cloud.api.commands.CreateVolumeCmd; | ||||
|  | ||||
| @ -27,11 +27,11 @@ import javax.naming.ConfigurationException; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.storage.DestroyCommand; | ||||
| import com.cloud.agent.api.storage.DownloadAnswer; | ||||
| import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.configuration.ResourceCount.ResourceType; | ||||
| import com.cloud.configuration.dao.ConfigurationDao; | ||||
| import com.cloud.dc.DataCenterVO; | ||||
|  | ||||
| @ -41,7 +41,6 @@ import net.sf.ehcache.config.Configuration; | ||||
| 
 | ||||
| import org.apache.log4j.Logger; | ||||
| 
 | ||||
| import com.cloud.agent.AgentManager; | ||||
| import com.cloud.agent.api.Answer; | ||||
| import com.cloud.agent.api.AttachIsoCommand; | ||||
| import com.cloud.agent.api.AttachVolumeAnswer; | ||||
| @ -63,6 +62,7 @@ import com.cloud.agent.api.StopCommand; | ||||
| import com.cloud.agent.api.VmStatsEntry; | ||||
| import com.cloud.agent.api.storage.CreatePrivateTemplateAnswer; | ||||
| import com.cloud.agent.api.storage.CreatePrivateTemplateCommand; | ||||
| import com.cloud.agent.manager.AgentManager; | ||||
| import com.cloud.alert.AlertManager; | ||||
| import com.cloud.api.BaseCmd; | ||||
| import com.cloud.api.ServerApiException; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user