'Test passing of oversubscribed disk policy from the scheduler, but
with insufficient disk.'

def test_create_instance_with_oversubscribed_disk_fail(self):

    self.flags(reserved_host_disk_mb=0, reserved_host_memory_mb=0)
    self.rt.update_available_resource(self.context.elevated(), NODENAME)
    resources = self.compute.driver.get_available_resource(NODENAME)
    total_disk_gb = resources['local_gb']
    oversub_limit_gb = (total_disk_gb * 1.5)
    instance_gb = int((total_disk_gb * 1.55))
    params = {'flavor': {'root_gb': instance_gb, 'memory_mb': 10}}
    instance = self._create_fake_instance_obj(params)
    limits = {'disk_gb': oversub_limit_gb}
    self.compute.build_and_run_instance(self.context, instance, {}, {}, {}, block_device_mapping=[], limits=limits)
    self.assertEqual(vm_states.ERROR, instance.vm_state)
