Add service records for nova-api services
This adds service records for the API services for the purpose of version-tracking. Unlike other services, these records are not periodically updated, so this adds no additional runtime database burden. The API services update the version (if necessary) of their record at startup. This also adds filtering in three places to prevent us from exposing API service records out of the hosts and availability-zone APIs. Related to blueprint service-version-behavior Change-Id: I66becb14788de42bee35064d1155dd919059bcb7
This commit is contained in:
@@ -155,7 +155,9 @@ class TestTimeout(testtools.TestCase):
|
||||
|
||||
|
||||
class TestOSAPIFixture(testtools.TestCase):
|
||||
def test_responds_to_version(self):
|
||||
@mock.patch('nova.objects.Service.get_by_host_and_binary')
|
||||
@mock.patch('nova.objects.Service.create')
|
||||
def test_responds_to_version(self, mock_service_create, mock_get):
|
||||
"""Ensure the OSAPI server responds to calls sensibly."""
|
||||
self.useFixture(fixtures.OutputStreamCapture())
|
||||
self.useFixture(fixtures.StandardLogging())
|
||||
|
||||
Reference in New Issue
Block a user