KVM test: Add new utility functions to kvm_utils

Some distributors ship CD and DVD files with SHA1 hash sums instead
of MD5 hash sums, so let's extend the kvm_utils functions to
evaluate and compare SHA1 hashes:

* hash_file(): Calculate a hash sum for a file, supports SHA1 check as well,
replaces md5sum_file()
* unmap_url_cache(): Reimplementation of a function present on
autotest utils that downloads a file and caches it. The reason
I'm keeping it is that I want more testing before I move all
needed function definitions to the autotest API

Also, extend VM.create() method to support SHA1 check.

2nd try, addressing Uri's comments.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>



git-svn-id: http://test.kernel.org/svn/autotest/trunk@3874 592f7852-d20e-0410-864c-8624ca9c26a4
3 files changed