dog/vdi: remove unused parameter in argument list of find_vdi_name

Because for_snapshot is never used in the function find_vdi_name,
removing it is safe and reasonable.

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
dog/vdi: enhance find_vdi_name to allow returning SD_RES_XXX

Current return value of the function find_vdi_name is quite simple. -1
stands for failure and 0 stands for success. It is not enough if caller
A expects it returns information of a VDI and caller B expects it
returns the VDI is existed or not.

So, it is better to enhance it to return SD_RES_XXX.

As a result, the error message printed inside the function should be
moved to the callers.

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
test/func: update output results because find_vdi_name is changed

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
dog/vdi: check tag name is existed or not before creating snapshot

Otherwise, duplicated tag for two or more snapshots may lead to
unexpected problem.

Reported-by: Valerio Pachera <sirio81@gmail.com>
Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
test/func: add test case for duplicated snapshot tag

Signed-off-by: Ruoyu <liangry@ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>