attach_device: Add cases for --persistent and --current.

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>