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

def test_create_instance_with_oversubscribed_ram_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_mem_mb = resources['memory_mb']
    oversub_limit_mb = (total_mem_mb * 1.5)
    instance_mb = int((total_mem_mb * 1.55))
    params = {'flavor': {'memory_mb': instance_mb, 'root_gb': 128, 'ephemeral_gb': 128}}
    instance = self._create_fake_instance_obj(params)
    filter_properties = {'limits': {'memory_mb': oversub_limit_mb}}
    self.compute.build_and_run_instance(self.context, instance, {}, {}, filter_properties, block_device_mapping=[])
