add hints to list_services for templated backend

a positional argument is missing and surfacing as a stack trace,
set it to None since there is no need for hints in a templated
backend.

Closes-Bug: 1550742

Change-Id: If0007887f4f638b8aae8d2c3ce5c7611e5a24384
This commit is contained in:
Steve Martinelli 2016-02-29 11:32:46 -05:00
parent 1ee14754ea
commit 773525317c
2 changed files with 17 additions and 1 deletions

View File

@ -143,7 +143,7 @@ class Catalog(core.Driver):
}
def list_services(self, hints):
return list(self._list_services())
return list(self._list_services(hints=None))
def get_service(self, service_id):
for service in self._list_services(hints=None):

View File

@ -159,6 +159,22 @@ class TestTemplatedCatalog(unit.TestCase, test_backend.CatalogTests):
def test_service_filtering(self):
self.skipTest("Templated backend doesn't support filtering")
def test_list_services_with_hints(self):
hints = {}
services = self.catalog_api.list_services(hints=hints)
exp_services = [
{'type': 'compute',
'description': '',
'enabled': True,
'name': "'Compute Service'",
'id': 'compute'},
{'type': 'identity',
'description': '',
'enabled': True,
'name': "'Identity Service'",
'id': 'identity'}]
self.assertItemsEqual(exp_services, services)
# NOTE(dstanek): the following methods have been overridden
# from test_backend.CatalogTests