Skip to content

Instantly share code, notes, and snippets.

@WaltHP
Created September 29, 2016 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save WaltHP/13c4557565bba0e601eae133343dcd94 to your computer and use it in GitHub Desktop.
Save WaltHP/13c4557565bba0e601eae133343dcd94 to your computer and use it in GitHub Desktop.
import libiscsi
target_portal = "10.52.1.11:3260"
my_iqn = "iqn.1993-08.org.debian:01:cb66a7b3fa5"
iscsi_ctx = libiscsi.iscsi_create_context(my_iqn)
#libiscsi.iscsi_set_alias(iscsi_ctx, "walt")
ass = libiscsi.iscsi_connect_sync(iscsi_ctx, target_portal)
print(ass)
@WaltHP
Copy link
Author

WaltHP commented Sep 29, 2016

vagrant@ubuntubox:: $ python ass3.py
0
vagrant@ubuntubox:
: $ whoami
vagrant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment