diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-01-31 14:00:38 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-01-31 14:00:38 +0000 |
| commit | 98e37e905349c576f0550bec15d65d101c8bce3e (patch) | |
| tree | d98f38e75517eb7e91f5e14b87ae7ebb781c533b /nova/tests | |
| parent | 194ec6204ee3a67193b1ffd63de073d50878ce77 (diff) | |
| parent | d3b62c1b49e4dc05d266ce679724c236456f863d (diff) | |
Merge "Pass parameter 'filter' back to model layer"
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/api/ec2/test_cloud.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/nova/tests/api/ec2/test_cloud.py b/nova/tests/api/ec2/test_cloud.py index a00dceff1..c60a0148e 100644 --- a/nova/tests/api/ec2/test_cloud.py +++ b/nova/tests/api/ec2/test_cloud.py @@ -824,6 +824,19 @@ class CloudTestCase(test.TestCase): self.cloud.describe_instances, self.context, instance_id=[instance_id]) + def test_describe_instances_with_filters(self): + # Makes sure describe_instances works and filters results. + filters = {'filter': [{'name': 'test', + 'value': ['a', 'b']}, + {'name': 'another_test', + 'value': 'a string'}]} + + self._stub_instance_get_with_fixed_ips('get_all') + self._stub_instance_get_with_fixed_ips('get') + + result = self.cloud.describe_instances(self.context, **filters) + self.assertEqual(result, {'reservationSet': []}) + def test_describe_instances_sorting(self): # Makes sure describe_instances works and is sorted as expected. self.flags(use_ipv6=True) |
