Make Runtime work with capsule

Change-Id: I513c3b7088fa09cc14a9a541609bfa0f2b0bad60
Partially-Implements: blueprint runtime-aware-scheduling
This commit is contained in:
Feng Shengqin 2018-08-25 11:10:10 +08:00
parent 8d104b327f
commit 37871e80b5

View File

@ -26,7 +26,7 @@ class RuntimeFilter(filters.BaseHostFilter):
run_filter_once_per_request = True
def host_passes(self, host_state, container, extra_spec):
if not container.runtime:
if not hasattr(container, 'runtime') or not container.runtime:
return True
if container.runtime not in host_state.runtimes: