Search in sources :

Example 6 with StartupStorageCommand

use of com.cloud.legacymodel.communication.command.startup.StartupStorageCommand in project cosmic by MissionCriticalCloud.

the class DummySecondaryStorageResource method initialize.

@Override
public StartupCommand[] initialize() {
    final StartupStorageCommand cmd = new StartupStorageCommand("dummy", StoragePoolType.NetworkFilesystem, 1024 * 1024 * 1024 * 100L, new HashMap<>());
    cmd.setResourceType(StorageResourceType.SECONDARY_STORAGE);
    cmd.setIqn(null);
    cmd.setNfsShare(this._guid);
    fillNetworkInformation(cmd);
    cmd.setDataCenter(this._dc);
    cmd.setPod(this._pod);
    cmd.setGuid(this._guid);
    cmd.setName(this._guid);
    cmd.setVersion(DummySecondaryStorageResource.class.getPackage().getImplementationVersion());
    /* gather TemplateInfo in second storage */
    cmd.setTemplateInfo(getDefaultSystemVmTemplateInfo());
    cmd.getHostDetails().put("mount.parent", "dummy");
    cmd.getHostDetails().put("mount.path", "dummy");
    cmd.getHostDetails().put("orig.url", this._guid);
    final String[] tok = this._dummyPath.split(":");
    cmd.setPrivateIpAddress(tok[0]);
    return new StartupCommand[] { cmd };
}
Also used : StartupCommand(com.cloud.legacymodel.communication.command.startup.StartupCommand) StartupStorageCommand(com.cloud.legacymodel.communication.command.startup.StartupStorageCommand)

Aggregations

StartupStorageCommand (com.cloud.legacymodel.communication.command.startup.StartupStorageCommand)6 StartupCommand (com.cloud.legacymodel.communication.command.startup.StartupCommand)5 StartupRoutingCommand (com.cloud.legacymodel.communication.command.startup.StartupRoutingCommand)2 XenAPIException (com.xensource.xenapi.Types.XenAPIException)2 XmlRpcException (org.apache.xmlrpc.XmlRpcException)2 Response (com.cloud.common.transport.Response)1 StartupAnswer (com.cloud.legacymodel.communication.answer.StartupAnswer)1 CheckHealthCommand (com.cloud.legacymodel.communication.command.CheckHealthCommand)1 Command (com.cloud.legacymodel.communication.command.Command)1 PingCommand (com.cloud.legacymodel.communication.command.PingCommand)1 PingRoutingCommand (com.cloud.legacymodel.communication.command.PingRoutingCommand)1 ReadyCommand (com.cloud.legacymodel.communication.command.ReadyCommand)1 ShutdownCommand (com.cloud.legacymodel.communication.command.ShutdownCommand)1 AgentControlCommand (com.cloud.legacymodel.communication.command.agentcontrol.AgentControlCommand)1 StartupProxyCommand (com.cloud.legacymodel.communication.command.startup.StartupProxyCommand)1 StartupSecondaryStorageCommand (com.cloud.legacymodel.communication.command.startup.StartupSecondaryStorageCommand)1 StoragePoolInfo (com.cloud.legacymodel.storage.StoragePoolInfo)1 Connection (com.xensource.xenapi.Connection)1 Host (com.xensource.xenapi.Host)1 Pool (com.xensource.xenapi.Pool)1