Merge "Add filtering for stack-list by stack_id"

This commit is contained in:
Jenkins 2015-04-23 04:01:06 +00:00 committed by Gerrit Code Review
commit a41bb3a6e5
2 changed files with 4 additions and 1 deletions

View File

@ -171,6 +171,7 @@ class StackController(object):
def _index(self, req, tenant_safe=True):
filter_whitelist = {
'id': 'mixed',
'status': 'mixed',
'name': 'mixed',
'action': 'mixed',

View File

@ -435,6 +435,7 @@ class StackControllerTest(ControllerTest, common.HeatTestCase):
def test_index_whitelist_filter_params(self, mock_call, mock_enforce):
self._mock_enforce_setup(mock_enforce, 'index', True)
params = {
'id': 'fake id',
'status': 'fake status',
'name': 'fake name',
'action': 'fake action',
@ -453,7 +454,8 @@ class StackControllerTest(ControllerTest, common.HeatTestCase):
self.assertIn('filters', engine_args)
filters = engine_args['filters']
self.assertEqual(6, len(filters))
self.assertEqual(7, len(filters))
self.assertIn('id', filters)
self.assertIn('status', filters)
self.assertIn('name', filters)
self.assertIn('action', filters)