Fix ImageBackendFixture not to support direct_snapshot
Fix ImageBackendFixture not to support direct_snapshot

The ImageBackendFixture mocks returns a mocked disk and that disk
blindly supports the direct_snapshot call by returning a MagicMock as a
result. A real imagebacked returns the location of the snapshot instead.
When the result of the snapshot is uploaded to the GlanceFixture the
fixtures stores the metadata including the MagicMock. Later when such
snapshot is downloaded from the fixture (e.g. during unshelve) the
Glance fixture tries to deepcopy the metadata to avoid clients modifying
the returned data to affect the internal state of the fixture. But
MagicMock cannot be deep copied.

An easy fix is to declare direct_snapshot not supported for
ImageBackendFixture by raising NotImplementedError. This is already
handled by the virt driver as we have real backends that are not
supporting the direct snapshot call. This way the whole issue in the
GlanceFixture can be avoided.

Change-Id: Ia222e0f64b932e6aefe779b168d0aa4e9ff48075

mahak/nova,openstack/nova,openstack/nova,mahak/nova,openstack/nova,mahak/nova