change to direct agent

This commit is contained in:
Prasanna Santhanam 2011-12-19 11:50:42 +05:30
parent 18f865fc3e
commit f2241bfef6
1 changed files with 3 additions and 1 deletions

View File

@ -31,6 +31,7 @@ import com.cloud.agent.api.PrepareForMigrationAnswer;
import com.cloud.agent.api.PrepareForMigrationCommand;
import com.cloud.agent.api.StartupCommand;
import com.cloud.dc.dao.HostPodDao;
import com.cloud.host.Host;
import com.cloud.host.Host.Type;
import com.cloud.resource.AgentResourceBase;
import com.cloud.resource.AgentRoutingResource;
@ -266,7 +267,8 @@ public class MockAgentManagerImpl implements MockAgentManager {
storageResource.configure("secondaryStorage", params);
storageResource.start();
StartupCommand[] cmds = storageResource.initialize();
_resourceMgr.createHostVOForConnectedAgent(cmds);
//on the simulator the ssvm is as good as a direct agent
_resourceMgr.addHost(mockHost.getDataCenterId(), storageResource, Host.Type.SecondaryStorageVM, null);
_resources.put(this.guid, storageResource);
} catch (ConfigurationException e) {
s_logger.debug("Failed to load secondary storage resource: " + e.toString());