Loading Makefile +3 −23 Original line number Diff line number Diff line Loading @@ -235,13 +235,6 @@ start_simulator: sleep 3 @echo STARTED SIMULATOR!!! erase_simulator: start_simulator @echo ERASING SIMULATOR... sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh sleep 1 @echo ERASED SIMULATOR!!! stop_simulator: @echo STOPPING SIMULATOR... sleep 1 Loading @@ -249,8 +242,6 @@ stop_simulator: sleep 1 @echo STOPPED SIMULATOR!!! .PHONY: erase_simulator #=============================================================================== # Test Utility Build Support Loading Loading @@ -286,14 +277,12 @@ SIM_RUNNER = com.seagate.kinetic.simulator.internal.SimulatorRunner SIM_ADMIN = com.seagate.kinetic.admin.cli.KineticAdminCLI run: $(UTIL_EXEC) start_simulator sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh &> /dev/null; sleep 1 @echo @echo -------------------------------------------------------------------------------- @echo Running test utility: $(UTIL_EXEC) @echo -------------------------------------------------------------------------------- @echo $(UTIL_EXEC) instanterase $(UTIL_EXEC) noop exec $(UTIL_EXEC) put get delete @echo Loading @@ -315,12 +304,9 @@ list_examples: echo $(example_executables) $(BIN_DIR)/examples/%: $(EXAMPLE_SRC)/%.c $(KINETIC_LIB) sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh &> /dev/null; sleep 1 @echo @echo ================================================================================ @echo Building example: $< @echo Building example: '$<' @echo -------------------------------------------------------------------------------- $(CC) -o $@ $< $(CFLAGS) -I$(PUB_INC) $(UTIL_LDFLAGS) $(KINETIC_LIB) @echo ================================================================================ Loading @@ -329,7 +315,6 @@ $(BIN_DIR)/examples/%: $(EXAMPLE_SRC)/%.c $(KINETIC_LIB) build_examples: $(example_executables) test_example_%: $(BIN_DIR)/examples/% sleep 1 @echo @echo ================================================================================ @echo Executing example: '$<' Loading @@ -337,14 +322,9 @@ test_example_%: $(BIN_DIR)/examples/% $< @echo ================================================================================ @echo test_example_%: start_simulator erase_simulator test_example_%: start_simulator run_example_%: $(BIN_DIR)/examples/% run_example_%: $(BIN_DIR)/examples/% sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh &> /dev/null; sleep 1 @echo @echo ================================================================================ @echo Executing example: '$<' Loading Rakefile +1 −7 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ Dir['test/integration/test_*.c'].each do |test_file| task test_file => ['java_sim:shutdown', 'ruby_sim:start'] end Dir['test/system/test_*.c'].each do |test_file| task test_file => ['ruby_sim:shutdown', 'java_sim:erase', 'java_sim:start'] task test_file => ['ruby_sim:shutdown', 'java_sim:start'] end namespace :system do Loading Loading @@ -295,7 +295,6 @@ namespace :tests do task :system => ['java_sim:start'] do report_banner "Running System Tests" shutdown_ruby_server java_sim_erase_drive java_sim_start Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/system') Loading @@ -308,7 +307,6 @@ namespace :tests do desc "Run system test #{basename}" task basename do shutdown_ruby_server java_sim_erase_drive java_sim_start Rake::Task[test].reenable Rake::Task[test].invoke Loading @@ -333,7 +331,6 @@ namespace :tests do end task :noop => ['ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing NoOp Operation") do execute_command "./kinetic-c noop" execute_command "./kinetic-c --host localhost noop" Loading @@ -343,14 +340,12 @@ namespace :tests do end task :put => ['ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing Put operation") do execute_command "./kinetic-c put" end end task :get => ['ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing Get operation") do execute_command "./kinetic-c put" execute_command "./kinetic-c get" Loading @@ -359,7 +354,6 @@ namespace :tests do end task :delete => ['release', 'ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing Get operation") do execute_command "./kinetic-c put" execute_command "./kinetic-c get" Loading include/kinetic_client.h +9 −0 Original line number Diff line number Diff line Loading @@ -161,4 +161,13 @@ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, KineticDeviceInfo** info, KineticCompletionClosure* closure); /** * @brief Executes an InstantSecureErase command to erase all data from the Kinetic device. * * @param handle KineticSessionHandle for a connected session. * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_InstantSecureErase(KineticSessionHandle handle); #endif // _KINETIC_CLIENT_H src/lib/kinetic_client.c +11 −0 Original line number Diff line number Diff line Loading @@ -211,3 +211,14 @@ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, // Execute the operation return KineticController_ExecuteOperation(operation, closure); } KineticStatus KineticClient_InstantSecureErase(KineticSessionHandle handle) { assert(handle != KINETIC_HANDLE_INVALID); KineticOperation* operation = KineticController_CreateOperation(handle); if (operation == NULL) {return KINETIC_STATUS_MEMORY_ERROR;} KineticOperation_BuildInstantSecureErase(operation); return KineticController_ExecuteOperation(operation, NULL); } src/lib/kinetic_logger.c +12 −0 Original line number Diff line number Diff line Loading @@ -625,6 +625,18 @@ void KineticLogger_LogProtobuf(int log_level, const KineticProto_Message* msg) #endif } if (cmd->body->pinOp) { LOG_PROTO_LEVEL_START("pinOp"); { if (cmd->body->pinOp->has_pinOpType) { const ProtobufCEnumValue* eVal = protobuf_c_enum_descriptor_get_value( &KineticProto_command_pin_operation_pin_op_type__descriptor, cmd->body->pinOp->pinOpType); KineticLogger_LogPrintf(log_level, "%spinOpType: %s", _indent, eVal->name); } } LOG_PROTO_LEVEL_END(); } // Get Log // Loading Loading
Makefile +3 −23 Original line number Diff line number Diff line Loading @@ -235,13 +235,6 @@ start_simulator: sleep 3 @echo STARTED SIMULATOR!!! erase_simulator: start_simulator @echo ERASING SIMULATOR... sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh sleep 1 @echo ERASED SIMULATOR!!! stop_simulator: @echo STOPPING SIMULATOR... sleep 1 Loading @@ -249,8 +242,6 @@ stop_simulator: sleep 1 @echo STOPPED SIMULATOR!!! .PHONY: erase_simulator #=============================================================================== # Test Utility Build Support Loading Loading @@ -286,14 +277,12 @@ SIM_RUNNER = com.seagate.kinetic.simulator.internal.SimulatorRunner SIM_ADMIN = com.seagate.kinetic.admin.cli.KineticAdminCLI run: $(UTIL_EXEC) start_simulator sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh &> /dev/null; sleep 1 @echo @echo -------------------------------------------------------------------------------- @echo Running test utility: $(UTIL_EXEC) @echo -------------------------------------------------------------------------------- @echo $(UTIL_EXEC) instanterase $(UTIL_EXEC) noop exec $(UTIL_EXEC) put get delete @echo Loading @@ -315,12 +304,9 @@ list_examples: echo $(example_executables) $(BIN_DIR)/examples/%: $(EXAMPLE_SRC)/%.c $(KINETIC_LIB) sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh &> /dev/null; sleep 1 @echo @echo ================================================================================ @echo Building example: $< @echo Building example: '$<' @echo -------------------------------------------------------------------------------- $(CC) -o $@ $< $(CFLAGS) -I$(PUB_INC) $(UTIL_LDFLAGS) $(KINETIC_LIB) @echo ================================================================================ Loading @@ -329,7 +315,6 @@ $(BIN_DIR)/examples/%: $(EXAMPLE_SRC)/%.c $(KINETIC_LIB) build_examples: $(example_executables) test_example_%: $(BIN_DIR)/examples/% sleep 1 @echo @echo ================================================================================ @echo Executing example: '$<' Loading @@ -337,14 +322,9 @@ test_example_%: $(BIN_DIR)/examples/% $< @echo ================================================================================ @echo test_example_%: start_simulator erase_simulator test_example_%: start_simulator run_example_%: $(BIN_DIR)/examples/% run_example_%: $(BIN_DIR)/examples/% sleep 1 ./vendor/kinetic-simulator/eraseSimulator.sh &> /dev/null; sleep 1 @echo @echo ================================================================================ @echo Executing example: '$<' Loading
Rakefile +1 −7 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ Dir['test/integration/test_*.c'].each do |test_file| task test_file => ['java_sim:shutdown', 'ruby_sim:start'] end Dir['test/system/test_*.c'].each do |test_file| task test_file => ['ruby_sim:shutdown', 'java_sim:erase', 'java_sim:start'] task test_file => ['ruby_sim:shutdown', 'java_sim:start'] end namespace :system do Loading Loading @@ -295,7 +295,6 @@ namespace :tests do task :system => ['java_sim:start'] do report_banner "Running System Tests" shutdown_ruby_server java_sim_erase_drive java_sim_start Rake::Task['test:path'].reenable Rake::Task['test:path'].invoke('test/system') Loading @@ -308,7 +307,6 @@ namespace :tests do desc "Run system test #{basename}" task basename do shutdown_ruby_server java_sim_erase_drive java_sim_start Rake::Task[test].reenable Rake::Task[test].invoke Loading @@ -333,7 +331,6 @@ namespace :tests do end task :noop => ['ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing NoOp Operation") do execute_command "./kinetic-c noop" execute_command "./kinetic-c --host localhost noop" Loading @@ -343,14 +340,12 @@ namespace :tests do end task :put => ['ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing Put operation") do execute_command "./kinetic-c put" end end task :get => ['ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing Get operation") do execute_command "./kinetic-c put" execute_command "./kinetic-c get" Loading @@ -359,7 +354,6 @@ namespace :tests do end task :delete => ['release', 'ruby_sim:shutdown'] do java_sim_erase_drive with_test_server("Testing Get operation") do execute_command "./kinetic-c put" execute_command "./kinetic-c get" Loading
include/kinetic_client.h +9 −0 Original line number Diff line number Diff line Loading @@ -161,4 +161,13 @@ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, KineticDeviceInfo** info, KineticCompletionClosure* closure); /** * @brief Executes an InstantSecureErase command to erase all data from the Kinetic device. * * @param handle KineticSessionHandle for a connected session. * * @return Returns the resulting KineticStatus */ KineticStatus KineticClient_InstantSecureErase(KineticSessionHandle handle); #endif // _KINETIC_CLIENT_H
src/lib/kinetic_client.c +11 −0 Original line number Diff line number Diff line Loading @@ -211,3 +211,14 @@ KineticStatus KineticClient_GetLog(KineticSessionHandle handle, // Execute the operation return KineticController_ExecuteOperation(operation, closure); } KineticStatus KineticClient_InstantSecureErase(KineticSessionHandle handle) { assert(handle != KINETIC_HANDLE_INVALID); KineticOperation* operation = KineticController_CreateOperation(handle); if (operation == NULL) {return KINETIC_STATUS_MEMORY_ERROR;} KineticOperation_BuildInstantSecureErase(operation); return KineticController_ExecuteOperation(operation, NULL); }
src/lib/kinetic_logger.c +12 −0 Original line number Diff line number Diff line Loading @@ -625,6 +625,18 @@ void KineticLogger_LogProtobuf(int log_level, const KineticProto_Message* msg) #endif } if (cmd->body->pinOp) { LOG_PROTO_LEVEL_START("pinOp"); { if (cmd->body->pinOp->has_pinOpType) { const ProtobufCEnumValue* eVal = protobuf_c_enum_descriptor_get_value( &KineticProto_command_pin_operation_pin_op_type__descriptor, cmd->body->pinOp->pinOpType); KineticLogger_LogPrintf(log_level, "%spinOpType: %s", _indent, eVal->name); } } LOG_PROTO_LEVEL_END(); } // Get Log // Loading