Merge "Allow filtering of stacks by username, tenant and owner_id"
This commit is contained in:
commit
d905dbcfaf
@ -158,6 +158,9 @@ class StackController(object):
|
||||
'status': 'mixed',
|
||||
'name': 'mixed',
|
||||
'action': 'mixed',
|
||||
'tenant': 'mixed',
|
||||
'username': 'mixed',
|
||||
'owner_id': 'mixed',
|
||||
}
|
||||
whitelist = {
|
||||
'limit': 'single',
|
||||
|
@ -411,6 +411,9 @@ class StackControllerTest(ControllerTest, HeatTestCase):
|
||||
'status': 'fake status',
|
||||
'name': 'fake name',
|
||||
'action': 'fake action',
|
||||
'username': 'fake username',
|
||||
'tenant': 'fake tenant',
|
||||
'owner_id': 'fake owner-id',
|
||||
'balrog': 'you shall not pass!'
|
||||
}
|
||||
req = self._get('/stacks', params=params)
|
||||
@ -423,10 +426,13 @@ class StackControllerTest(ControllerTest, HeatTestCase):
|
||||
self.assertIn('filters', engine_args)
|
||||
|
||||
filters = engine_args['filters']
|
||||
self.assertEqual(3, len(filters))
|
||||
self.assertEqual(6, len(filters))
|
||||
self.assertIn('status', filters)
|
||||
self.assertIn('name', filters)
|
||||
self.assertIn('action', filters)
|
||||
self.assertIn('username', filters)
|
||||
self.assertIn('tenant', filters)
|
||||
self.assertIn('owner_id', filters)
|
||||
self.assertNotIn('balrog', filters)
|
||||
|
||||
def test_index_returns_stack_count_if_with_count_is_true(
|
||||
|
Loading…
Reference in New Issue
Block a user