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

Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Merge pull request #217 from yangdongsheng/attach_dev

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