go-os-brick: go-os-brick is Go port of os-brick
go-os-brick provide function that connect / disconnect iSCSI volume.
- for multi path
ConnectMultiPathVolume()
DisconnectVolume()
- for single path
ConnectSinglePathVolume()
DisconnectSinglePathVolume()
go-os-brick execute a some commands. please install before use.
iscsiadm(8)
blockdev(8)
qemu-img(1)
- if you use
QEMUToRaw()
- if you use
multipath(8)
- if you use multi path
backend is gostor/gotgt via goroutine. This test need some kernel modules.
$ sudo go test -v ./...
WARNING: DO NOT EXECUTE YOUR WORKSPACE!!
This test execute script in a host.
backend is open-iscsi targetd in a host machine. This test need some kernel modules.
$ sudo go test -tags=host -v ./...
you can use real iSCSI target as backend for testing.
please set environment value
OS_BRICK_TEST_PORTAL_ADDRESS
OS_BRICK_TEST_TARGET_IQN
$ export OS_BRICK_TEST_PORTAL_ADDRESS="192.0.2.1"
$ export ...
$ sudo go test -v ./...