private List<GlobalConfigVO> listGlobalConfig(APIListGlobalConfigMsg msg) { return dbf.listAll(msg.getOffset(), msg.getLength(), GlobalConfigVO.class); }
private void handle(APIGetNetworkServiceTypesMsg msg) { Map<String, List<String>> ret = new HashMap<String, List<String>>(); List<NetworkServiceTypeVO> types = dbf.listAll(NetworkServiceTypeVO.class); for (NetworkServiceTypeVO vo : types) { List<String> providers = ret.get(vo.getType()); if (providers == null) { providers = new ArrayList<String>(); ret.put(vo.getType(), providers); } providers.add(vo.getNetworkServiceProviderUuid()); } APIGetNetworkServiceTypesReply reply = new APIGetNetworkServiceTypesReply(); reply.setServiceAndProviderTypes(ret); bus.reply(msg, reply); }
private void handle(APIListManagementNodeMsg msg) { List<ManagementNodeVO> vos = dbf.listAll(ManagementNodeVO.class); APIListManagementNodeReply reply = new APIListManagementNodeReply(); reply.setInventories(ManagementNodeInventory.valueOf(vos)); bus.reply(msg, reply); }
private void handle(APIListApplianceVmMsg msg) { List<ApplianceVmVO> vos = dbf.listAll(ApplianceVmVO.class); List<ApplianceVmInventory> invs = ApplianceVmInventory.valueOf1(vos); APIListApplianceVmReply reply = new APIListApplianceVmReply(); reply.setInventories(invs); bus.reply(msg, reply); }
private void handle(APIListImageMsg msg) { List<ImageVO> vos = dbf.listAll(ImageVO.class); List<ImageInventory> invs = ImageInventory.valueOf(vos); APIListImageReply reply = new APIListImageReply(); reply.setInventories(invs); bus.reply(msg, reply); }
private void handle(APIGetZoneMsg msg) { APIGetZoneReply reply = new APIGetZoneReply(); if (msg.getUuid() != null) { ZoneVO vo = dbf.findByUuid(msg.getUuid(), ZoneVO.class); reply.setInventories(asList(ZoneInventory.valueOf(vo))); } else { reply.setInventories(ZoneInventory.valueOf(dbf.listAll(ZoneVO.class))); } bus.reply(msg, reply); }