Repository navigation
Add logout, task management and session controls; free resources - #15
Open
bmeagherix wants to merge 1 commit into
Open
bmeagherix wants to merge 1 commit into
bmeagherix wants to merge 1 commit into
Conversation
Add Context.logout(), separate from disconnect(): logout sends an iSCSI Logout and waits for the reply, while disconnect() still just closes the socket, which is useful for simulating an unclean connection drop. Also expose: - abort_task_set(), target_warm_reset(), target_cold_reset() - is_logged_in, set_timeout(), set_immediate_data(), set_initial_r2t() - set_noautoreconnect(); its prototype is declared locally because it was only added to the public iscsi.h in libiscsi 1.19, although the library has exported it since before 1.13 Include the libiscsi error string (iscsi_get_error) in all exceptions. Free the iscsi context, SCSI tasks and URLs on deallocation. Destroying a Context does not send a Logout. A URL keeps its Context alive. Context.command() now raises RuntimeError if the command could not be sent (for example, when not logged in). Before, it failed silently and task.status read as GOOD.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Context.logout(), separate from disconnect(): logout sends an iSCSI Logout and waits for the reply, while disconnect() still just closes the socket, which is useful for simulating an unclean connection drop.
Also expose:
Include the libiscsi error string (iscsi_get_error) in all exceptions.
Free the iscsi context, SCSI tasks and URLs on deallocation. Destroying a Context does not send a Logout. A URL keeps its Context alive.
Context.command() now raises RuntimeError if the command could not be sent (for example, when not logged in). Before, it failed silently and task.status read as GOOD.