Loading include/kinetic/blocking_kinetic_connection.h +1 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ class BlockingKineticConnection { virtual KineticStatus GetLog(unique_ptr<DriveLog>& drive_log); virtual KineticStatus GetLog(Command_GetLog_Type type, unique_ptr<DriveLog>& drive_log); virtual KineticStatus GetLog(const vector<Command_GetLog_Type>& types, unique_ptr<DriveLog>& drive_log); virtual KineticStatus UpdateFirmware(const shared_ptr<const string> new_firmware); Loading include/kinetic/nonblocking_kinetic_connection.h +1 −1 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ class NonblockingKineticConnection { virtual HandlerKey SetClusterVersion(int64_t new_cluster_version, const shared_ptr<SimpleCallbackInterface> callback); virtual HandlerKey GetLog(const shared_ptr<GetLogCallbackInterface> callback); virtual HandlerKey GetLog(Command_GetLog_Type type, virtual HandlerKey GetLog(const vector<Command_GetLog_Type>& types, const shared_ptr<GetLogCallbackInterface> callback); virtual HandlerKey UpdateFirmware(const shared_ptr<const string> new_firmware, const shared_ptr<SimpleCallbackInterface> callback); Loading src/main/blocking_kinetic_connection.cc +2 −2 Original line number Diff line number Diff line Loading @@ -291,9 +291,9 @@ KineticStatus BlockingKineticConnection::GetLog(unique_ptr<DriveLog>& drive_log) return RunOperation(callback, nonblocking_connection_->GetLog(callback)); } KineticStatus BlockingKineticConnection::GetLog(Command_GetLog_Type type, unique_ptr<DriveLog>& drive_log) { KineticStatus BlockingKineticConnection::GetLog(const vector<Command_GetLog_Type>& types, unique_ptr<DriveLog>& drive_log) { auto callback = make_shared<GetLogCallback>(drive_log); return RunOperation(callback, nonblocking_connection_->GetLog(type, callback)); return RunOperation(callback, nonblocking_connection_->GetLog(types, callback)); } KineticStatus BlockingKineticConnection::UpdateFirmware(const shared_ptr<const string> Loading src/main/nonblocking_kinetic_connection.cc +14 −18 Original line number Diff line number Diff line Loading @@ -490,33 +490,29 @@ HandlerKey NonblockingKineticConnection::SetClusterVersion(int64_t new_cluster_v HandlerKey NonblockingKineticConnection::GetLog( const shared_ptr<GetLogCallbackInterface> callback) { vector<Command_GetLog_Type> types; types.push_back(Command_GetLog_Type_UTILIZATIONS); types.push_back(Command_GetLog_Type_TEMPERATURES); types.push_back(Command_GetLog_Type_CAPACITIES); types.push_back(Command_GetLog_Type_CONFIGURATION); types.push_back(Command_GetLog_Type_STATISTICS); types.push_back(Command_GetLog_Type_MESSAGES); types.push_back(Command_GetLog_Type_LIMITS); unique_ptr<Message> msg(new Message()); msg->set_authtype(Message_AuthType_HMACAUTH); unique_ptr<Command> request = NewCommand(Command_MessageType_GETLOG); auto mutable_getlog = request->mutable_body()->mutable_getlog(); mutable_getlog->add_types(Command_GetLog_Type_UTILIZATIONS); mutable_getlog->add_types(Command_GetLog_Type_TEMPERATURES); mutable_getlog->add_types(Command_GetLog_Type_CAPACITIES); mutable_getlog->add_types(Command_GetLog_Type_CONFIGURATION); mutable_getlog->add_types(Command_GetLog_Type_STATISTICS); mutable_getlog->add_types(Command_GetLog_Type_MESSAGES); mutable_getlog->add_types(Command_GetLog_Type_LIMITS); unique_ptr<GetLogHandler> handler(new GetLogHandler(callback)); return service_->Submit(move(msg), move(request), empty_str_, move(handler)); return GetLog(types, callback); } HandlerKey NonblockingKineticConnection::GetLog(Command_GetLog_Type type, HandlerKey NonblockingKineticConnection::GetLog(const vector<Command_GetLog_Type>& types, const shared_ptr<GetLogCallbackInterface> callback) { unique_ptr<Message> msg(new Message()); msg->set_authtype(Message_AuthType_HMACAUTH); unique_ptr<Command> request = NewCommand(Command_MessageType_GETLOG); for(auto type : types){ auto mutable_getlog = request->mutable_body()->mutable_getlog(); mutable_getlog->add_types(type); } unique_ptr<GetLogHandler> handler(new GetLogHandler(callback)); return service_->Submit(move(msg), move(request), empty_str_, move(handler)); Loading Loading
include/kinetic/blocking_kinetic_connection.h +1 −1 Original line number Diff line number Diff line Loading @@ -158,7 +158,7 @@ class BlockingKineticConnection { virtual KineticStatus GetLog(unique_ptr<DriveLog>& drive_log); virtual KineticStatus GetLog(Command_GetLog_Type type, unique_ptr<DriveLog>& drive_log); virtual KineticStatus GetLog(const vector<Command_GetLog_Type>& types, unique_ptr<DriveLog>& drive_log); virtual KineticStatus UpdateFirmware(const shared_ptr<const string> new_firmware); Loading
include/kinetic/nonblocking_kinetic_connection.h +1 −1 Original line number Diff line number Diff line Loading @@ -290,7 +290,7 @@ class NonblockingKineticConnection { virtual HandlerKey SetClusterVersion(int64_t new_cluster_version, const shared_ptr<SimpleCallbackInterface> callback); virtual HandlerKey GetLog(const shared_ptr<GetLogCallbackInterface> callback); virtual HandlerKey GetLog(Command_GetLog_Type type, virtual HandlerKey GetLog(const vector<Command_GetLog_Type>& types, const shared_ptr<GetLogCallbackInterface> callback); virtual HandlerKey UpdateFirmware(const shared_ptr<const string> new_firmware, const shared_ptr<SimpleCallbackInterface> callback); Loading
src/main/blocking_kinetic_connection.cc +2 −2 Original line number Diff line number Diff line Loading @@ -291,9 +291,9 @@ KineticStatus BlockingKineticConnection::GetLog(unique_ptr<DriveLog>& drive_log) return RunOperation(callback, nonblocking_connection_->GetLog(callback)); } KineticStatus BlockingKineticConnection::GetLog(Command_GetLog_Type type, unique_ptr<DriveLog>& drive_log) { KineticStatus BlockingKineticConnection::GetLog(const vector<Command_GetLog_Type>& types, unique_ptr<DriveLog>& drive_log) { auto callback = make_shared<GetLogCallback>(drive_log); return RunOperation(callback, nonblocking_connection_->GetLog(type, callback)); return RunOperation(callback, nonblocking_connection_->GetLog(types, callback)); } KineticStatus BlockingKineticConnection::UpdateFirmware(const shared_ptr<const string> Loading
src/main/nonblocking_kinetic_connection.cc +14 −18 Original line number Diff line number Diff line Loading @@ -490,33 +490,29 @@ HandlerKey NonblockingKineticConnection::SetClusterVersion(int64_t new_cluster_v HandlerKey NonblockingKineticConnection::GetLog( const shared_ptr<GetLogCallbackInterface> callback) { vector<Command_GetLog_Type> types; types.push_back(Command_GetLog_Type_UTILIZATIONS); types.push_back(Command_GetLog_Type_TEMPERATURES); types.push_back(Command_GetLog_Type_CAPACITIES); types.push_back(Command_GetLog_Type_CONFIGURATION); types.push_back(Command_GetLog_Type_STATISTICS); types.push_back(Command_GetLog_Type_MESSAGES); types.push_back(Command_GetLog_Type_LIMITS); unique_ptr<Message> msg(new Message()); msg->set_authtype(Message_AuthType_HMACAUTH); unique_ptr<Command> request = NewCommand(Command_MessageType_GETLOG); auto mutable_getlog = request->mutable_body()->mutable_getlog(); mutable_getlog->add_types(Command_GetLog_Type_UTILIZATIONS); mutable_getlog->add_types(Command_GetLog_Type_TEMPERATURES); mutable_getlog->add_types(Command_GetLog_Type_CAPACITIES); mutable_getlog->add_types(Command_GetLog_Type_CONFIGURATION); mutable_getlog->add_types(Command_GetLog_Type_STATISTICS); mutable_getlog->add_types(Command_GetLog_Type_MESSAGES); mutable_getlog->add_types(Command_GetLog_Type_LIMITS); unique_ptr<GetLogHandler> handler(new GetLogHandler(callback)); return service_->Submit(move(msg), move(request), empty_str_, move(handler)); return GetLog(types, callback); } HandlerKey NonblockingKineticConnection::GetLog(Command_GetLog_Type type, HandlerKey NonblockingKineticConnection::GetLog(const vector<Command_GetLog_Type>& types, const shared_ptr<GetLogCallbackInterface> callback) { unique_ptr<Message> msg(new Message()); msg->set_authtype(Message_AuthType_HMACAUTH); unique_ptr<Command> request = NewCommand(Command_MessageType_GETLOG); for(auto type : types){ auto mutable_getlog = request->mutable_body()->mutable_getlog(); mutable_getlog->add_types(type); } unique_ptr<GetLogHandler> handler(new GetLogHandler(callback)); return service_->Submit(move(msg), move(request), empty_str_, move(handler)); Loading