Ignore COMPUTE_NET_ATTACH_INTERFACE trait when waiting for placement

As of Stein, nova adds a 'COMPUTE_NET_ATTACH_INTERFACE' trait to ironic
resource providers in placement. This means that they no longer match our
expected set of traits.

This patch removes this trait from the list of expected traits.

Change-Id: I84bf367d31b10144617c0d66cc21dbcb5b0908a8
Story: 2005309
Task: 30210
This commit is contained in:
Mark Goddard 2019-03-27 14:47:46 +00:00
parent 3e8fecd33e
commit bda7320d6e

View File

@ -239,9 +239,12 @@ def are_resources_available(module, specifiers, expected):
""" """
providers_raw = get_providers(module) providers_raw = get_providers(module)
providers = [] providers = []
nova_internal_traits = {'COMPUTE_NET_ATTACH_INTERFACE'}
for provider in providers_raw: for provider in providers_raw:
uuid = provider["uuid"] uuid = provider["uuid"]
traits = get_traits(module, uuid) traits = get_traits(module, uuid)
# Don't include traits assigned by the nova compute driver.
traits = traits - nova_internal_traits
inventory = get_inventory(module, uuid) inventory = get_inventory(module, uuid)
provider = Provider( provider = Provider(
uuid=uuid, uuid=uuid,