'Test that the create will fail if there is no image
and no bdms supplied in the request'

def test_create_instance_with_volumes_enabled_no_image(self):

    old_create = compute_api.API.create
    def create(*args, **kwargs):
        self.assertNotIn('imageRef', kwargs)
        return old_create(*args, **kwargs)
    self.stub_out('nova.compute.api.API.create', create)
    self.assertRaises(exc.HTTPBadRequest, self._test_create, {}, no_image=True)
