Add wait for location import task

We are working to get support of new location APIs in glance,
where we are adding hash calculation mechanism once the image
location is added. Since new location api is async,
we need to wait for the task to finish before performing the
cleanup else we will fail due to the existing bug [1].

[1]: https://bugs.launchpad.net/glance/+bug/2045769

Change-Id: Ibde7620c9388fdbc93f741e38c9d63fca44a1bbb
1 file changed