| 201 | } |
| 202 | |
| 203 | bool NsClient::ShowOPStatus(::fedb::nameserver::ShowOPStatusResponse& response, |
| 204 | const std::string& name, uint32_t pid, |
| 205 | std::string& msg) { |
| 206 | ::fedb::nameserver::ShowOPStatusRequest request; |
| 207 | if (!name.empty()) { |
| 208 | request.set_name(name); |
| 209 | request.set_db(GetDb()); |
| 210 | } |
| 211 | if (pid != INVALID_PID) { |
| 212 | request.set_pid(pid); |
| 213 | } |
| 214 | bool ok = |
| 215 | client_.SendRequest(&::fedb::nameserver::NameServer_Stub::ShowOPStatus, |
| 216 | &request, &response, FLAGS_request_timeout_ms, 1); |
| 217 | msg = response.msg(); |
| 218 | if (ok && response.code() == 0) { |
| 219 | return true; |
| 220 | } |
| 221 | return false; |
| 222 | } |
| 223 | |
| 224 | bool NsClient::CancelOP(uint64_t op_id, std::string& msg) { |
| 225 | ::fedb::nameserver::CancelOPRequest request; |
no test coverage detected