Modifies _clean_empties function to take forbidden traits into account
in addition to required traits.
Added unit test test_resources_from_request_spec_flavor_forbidden_trait
to test that a single forbidden trait doesn't get lost in the
resources_from_request_spec function.
Also updated the functional test
test_flavor_forbidden_traits_based_scheduling to do the right thing.
NOTE: test_utils needed a tweak in this (rocky) cherry-pick to reference
RequestGroup from placement/lib since objects.RequestGroup wasn't
introduced until stein [1].
[1] I46c97d2641d9685ef59771314665a17a5236097d
Change-Id: I491b10c9c202baae4a37034848147f910a50eebf
Closes-Bug: #1821824
(cherry picked from commit c088856c8c08f0ab0746db7c120da494c9dd42d4)
(cherry picked from commit 6a5be4ae250b9ff1b8e48947ab80a65827460513)
Reviewed: https:/ /review. openstack. org/649603 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=6f07f769020 bdbe5328b3991fc 5e9bc89815a970
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 6f07f769020bdbe 5328b3991fc5e9b c89815a970
Author: mb <email address hidden>
Date: Fri Mar 29 10:20:58 2019 +0100
Fix bug preventing forbidden traits from working
Modifies _clean_empties function to take forbidden traits into account
in addition to required traits.
Added unit test test_resources_ from_request_ spec_flavor_ forbidden_ trait from_request_ spec function.
to test that a single forbidden trait doesn't get lost in the
resources_
Also updated the functional test flavor_ forbidden_ traits_ based_schedulin g to do the right thing.
test_
NOTE: test_utils needed a tweak in this (rocky) cherry-pick to reference RequestGroup wasn't
RequestGroup from placement/lib since objects.
introduced until stein [1].
[1] I46c97d2641d968 5ef59771314665a 17a5236097d
Change-Id: I491b10c9c202ba ae4a37034848147 f910a50eebf b0746db7c120da4 94c9dd42d4) 1b8e48947ab80a6 5827460513)
Closes-Bug: #1821824
(cherry picked from commit c088856c8c08f0a
(cherry picked from commit 6a5be4ae250b9ff