From dd3a91d7b5c7512a6b6431396da2faec924b6eac Mon Sep 17 00:00:00 2001 From: Matt Riedemann Date: Tue, 30 Jan 2018 15:26:33 -0500 Subject: [PATCH] Add functional tests for traits-based scheduling This adds a couple of functional tests for the end-to-end flow of creating a server with a flavor that has a required trait. Each test has two computes. One test covers the case of a successful placement on a compute that has a trait where the other compute doesn't. The other test covers the case that none of the computes have the required trait so the server create request fails. Part of blueprint request-traits-in-nova Change-Id: Iacb9808ef7188e3419abfac9e8c5fb5a46c71c05 --- nova/tests/fixtures.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nova/tests/fixtures.py b/nova/tests/fixtures.py index 11a99646e..4dc2c892c 100644 --- a/nova/tests/fixtures.py +++ b/nova/tests/fixtures.py @@ -1658,6 +1658,10 @@ class PlacementApiClient(object): def get(self, url, **kwargs): return client.APIResponse(self.fixture._fake_get(None, url, **kwargs)) + def put(self, url, body, **kwargs): + return client.APIResponse( + self.fixture._fake_put(None, url, body, **kwargs)) + class PlacementFixture(fixtures.Fixture): """A fixture to placement operations.