private void checkPhysicalInterface(CheckNetworkPhysicalInterfaceMsg msg, NoErrorCompletion completion) { checkState(); CheckPhysicalNetworkInterfaceCmd cmd = new CheckPhysicalNetworkInterfaceCmd(); cmd.addInterfaceName(msg.getPhysicalInterface()); CheckNetworkPhysicalInterfaceReply reply = new CheckNetworkPhysicalInterfaceReply(); CheckPhysicalNetworkInterfaceResponse rsp = restf.syncJsonPost(checkPhysicalNetworkInterfacePath, cmd, CheckPhysicalNetworkInterfaceResponse.class); if (!rsp.isSuccess()) { if (rsp.getFailedInterfaceNames().isEmpty()) { reply.setError(operr("operation error, because:%s", rsp.getError())); } else { reply.setError(operr("failed to check physical network interfaces[names : %s] on kvm host[uuid:%s, ip:%s]", msg.getPhysicalInterface(), context.getInventory().getUuid(), context.getInventory().getManagementIp())); } } bus.reply(msg, reply); completion.done(); }