return converted; PhysicalHost physicalHost = data.physicalHosts.get(host.getPhysicalHostId()); Map<String, Object> fields = converted.getFields(); fields.put(HostConstants.FIELD_INSTANCE_IDS, data.instancesPerHost.get(host.getId()));
Long physicalHostId = ((Host) obj).getPhysicalHostId(); obj = objectManager.loadResource(PhysicalHost.class, physicalHostId);
if (physicalHostId.equals(host.getPhysicalHostId()) && host.getAgentId() == null) { PhysicalHost physicalHost = objectManager.loadResource(PhysicalHost.class, physicalHostId); if (!physicalHostId.equals(host.getPhysicalHostId())) { updates.put(HOST.PHYSICAL_HOST_ID, physicalHostId);
@Override public HandlerResult handle(ProcessState state, ProcessInstance process) { Host host = (Host)state.getResource(); String driver = getDriver(host); if (StringUtils.isBlank(driver)) { driver = getDriverFromHostTemplate(host); } if (StringUtils.isBlank(driver)) { return new HandlerResult().withChainProcessName(HostConstants.PROCESS_ACTIVATE); } PhysicalHost phyHost = objectManager.loadResource(PhysicalHost.class, host.getPhysicalHostId()); if (phyHost == null) { phyHost = hostDao.createMachineForHost(host, driver); } return new HandlerResult(MachineConstants.FIELD_DRIVER, driver).withChainProcessName(HostConstants.PROCESS_PROVISION); }
@Override public HandlerResult handle(final ProcessState state, ProcessInstance process) { final Host host = (Host) state.getResource(); removeInstances(host); removeIps(host); removePools(host); PhysicalHost physHost = objectManager.loadResource(PhysicalHost.class, host.getPhysicalHostId()); if (physHost != null) { deactivateThenScheduleRemove(physHost, null); } return null; }
@Override public HandlerResult handle(ProcessState state, ProcessInstance process) { final Host host = (Host)state.getResource(); PhysicalHost physicalHost = objectManager.loadResource(PhysicalHost.class, host.getPhysicalHostId()); if (physicalHost == null) { return null;
setAgentId(from.getAgentId()); setZoneId(from.getZoneId()); setPhysicalHostId(from.getPhysicalHostId()); setIsPublic(from.getIsPublic()); setAgentState(from.getAgentState());