diff --git a/nova/scheduler/host_manager.py b/nova/scheduler/host_manager.py index b1c284663d9..af59064f0a3 100644 --- a/nova/scheduler/host_manager.py +++ b/nova/scheduler/host_manager.py @@ -56,6 +56,7 @@ 'RetryFilter', 'AvailabilityZoneFilter', 'RamFilter', + 'DiskFilter', 'ComputeFilter', 'ComputeCapabilitiesFilter', 'ImagePropertiesFilter', diff --git a/nova/tests/unit/scheduler/test_caching_scheduler.py b/nova/tests/unit/scheduler/test_caching_scheduler.py index 5624b762819..c76b8187fab 100644 --- a/nova/tests/unit/scheduler/test_caching_scheduler.py +++ b/nova/tests/unit/scheduler/test_caching_scheduler.py @@ -105,6 +105,7 @@ def _get_fake_request_spec(self): "root_gb": 1, "ephemeral_gb": 1, "vcpus": 1, + "swap": 0, } instance_properties = { "os_type": "linux", @@ -127,6 +128,7 @@ def _get_fake_host_state(self, index=0): 'host_%s' % index, 'node_%s' % index) host_state.free_ram_mb = 50000 + host_state.free_disk_mb = 4096 host_state.service = { "disabled": False, "updated_at": timeutils.utcnow(),