make pyflakes happly, remove the unused import module

remove the unused import module.
make pyflakes happly before introduce pyflakes.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
make pyflakes happly, remove unused availables

remove unused availables
make pyflakes happly before introduce pyflakes.

1. the info is unused when start the vm, remove the statement.
2. the AsyncTask, we use it to create a task and run the task.
3. the Exception, we just catch it and do not use it.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
add template_delete to rollback after create a template

We know ModelTests will tear down the template datebase.
But it is better to delete the template explicitly.
In this way, the test case also can test the template_delete.

Also this can make pyflakes happy.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>
run pyflakes when make check

Pyflakes analyzes programs and detects various errors. It works by
parsing the source file, not importing it, so it is safe to use on
modules with side effects. It's also much faster.

This is important to improve the code quality.

Signed-off-by: ShaoHe Feng <shaohef@linux.vnet.ibm.com>
Signed-off-by: Zhou Zheng Sheng <zhshzhou@linux.vnet.ibm.com>