use of com.cloud.agent.api.StartupCommand in project CloudStack-archive by CloudStack-extras.
the class ConsoleProxyResource method initialize.
@Override
public synchronized StartupCommand[] initialize() {
final StartupProxyCommand cmd = new StartupProxyCommand();
fillNetworkInformation(cmd);
cmd.setProxyPort(_proxyPort);
cmd.setProxyVmId(_proxyVmId);
if (_pubIp != null)
cmd.setPublicIpAddress(_pubIp);
return new StartupCommand[] { cmd };
}
use of com.cloud.agent.api.StartupCommand in project CloudStack-archive by CloudStack-extras.
the class DummyResource method initialize.
@Override
public StartupCommand[] initialize() {
Map<String, VmState> changes = null;
final List<Object> info = getHostInfo();
final StartupRoutingCommand cmd = new StartupRoutingCommand((Integer) info.get(0), (Long) info.get(1), (Long) info.get(2), (Long) info.get(4), (String) info.get(3), HypervisorType.KVM, RouterPrivateIpStrategy.HostLocal, changes);
fillNetworkInformation(cmd);
cmd.getHostDetails().putAll(getVersionStrings());
cmd.setCluster(getConfiguredProperty("cluster", "1"));
StoragePoolInfo pi = initializeLocalStorage();
StartupStorageCommand sscmd = new StartupStorageCommand();
sscmd.setPoolInfo(pi);
sscmd.setGuid(pi.getUuid());
sscmd.setDataCenter((String) _params.get("zone"));
sscmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL);
return new StartupCommand[] { cmd, sscmd };
}
use of com.cloud.agent.api.StartupCommand in project CloudStack-archive by CloudStack-extras.
the class SimulatorDiscoverer method createHostVOForDirectConnectAgent.
@Override
public HostVO createHostVOForDirectConnectAgent(HostVO host, StartupCommand[] startup, ServerResource resource, Map<String, String> details, List<String> hostTags) {
StartupCommand firstCmd = startup[0];
if (!(firstCmd instanceof StartupRoutingCommand)) {
return null;
}
StartupRoutingCommand ssCmd = ((StartupRoutingCommand) firstCmd);
if (ssCmd.getHypervisorType() != HypervisorType.Simulator) {
return null;
}
return _resourceMgr.fillRoutingHostVO(host, ssCmd, HypervisorType.Simulator, details, hostTags);
}
use of com.cloud.agent.api.StartupCommand in project CloudStack-archive by CloudStack-extras.
the class SimulatorSecondaryDiscoverer method createHostVOForDirectConnectAgent.
@Override
public HostVO createHostVOForDirectConnectAgent(HostVO host, StartupCommand[] startup, ServerResource resource, Map<String, String> details, List<String> hostTags) {
//for detecting SSVM dispatch
StartupCommand firstCmd = startup[0];
if (!(firstCmd instanceof StartupSecondaryStorageCommand)) {
return null;
}
host.setType(com.cloud.host.Host.Type.SecondaryStorageVM);
return host;
}
use of com.cloud.agent.api.StartupCommand in project cloudstack by apache.
the class OvmResourceBase method initialize.
@Override
public StartupCommand[] initialize() {
try {
StartupRoutingCommand cmd = new StartupRoutingCommand();
fillHostInfo(cmd);
cmd.setCaps("hvm");
return new StartupCommand[] { cmd };
} catch (Exception e) {
s_logger.debug("Ovm resource initializes failed", e);
return null;
}
}
Aggregations