private void handle(APIUpdateHostMsg msg) { HostVO vo = updateHost(msg); if (vo != null) { self = dbf.updateAndRefresh(vo); } APIUpdateHostEvent evt = new APIUpdateHostEvent(msg.getId()); evt.setInventory(getSelfInventory()); bus.publish(evt); }
public static APIUpdateHostEvent __example__() { APIUpdateHostEvent event = new APIUpdateHostEvent(); HostInventory hi = new HostInventory (); hi.setAvailableCpuCapacity(2L); hi.setAvailableMemoryCapacity(4L); hi.setClusterUuid(uuid()); hi.setManagementIp("192.168.0.1"); hi.setName("example"); hi.setState(HostState.Enabled.toString()); hi.setStatus(HostStatus.Connected.toString()); hi.setClusterUuid(uuid()); hi.setZoneUuid(uuid()); hi.setUuid(uuid()); hi.setTotalCpuCapacity(4L); hi.setTotalMemoryCapacity(4L); hi.setHypervisorType("KVM"); hi.setDescription("example"); event.setInventory(hi); return event; }