diff options
| author | Eldar Nugaev <enugaev@griddynamics.com> | 2010-12-29 19:51:25 +0300 |
|---|---|---|
| committer | Eldar Nugaev <enugaev@griddynamics.com> | 2010-12-29 19:51:25 +0300 |
| commit | d30ec2b5814480010d1b42ce2e9bed9fbc441fd1 (patch) | |
| tree | 20a3a0821411b97178f096211bea44fff35855bb /nova/tests | |
| parent | 0dd84453db5d8a3293421049b92385b00a602fc3 (diff) | |
Added implementation availability_zones to EC2 API
Diffstat (limited to 'nova/tests')
| -rw-r--r-- | nova/tests/test_cloud.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/nova/tests/test_cloud.py b/nova/tests/test_cloud.py index 70d2c44da..d7e99b3c8 100644 --- a/nova/tests/test_cloud.py +++ b/nova/tests/test_cloud.py @@ -133,6 +133,23 @@ class CloudTestCase(test.TestCase): db.volume_destroy(self.context, vol1['id']) db.volume_destroy(self.context, vol2['id']) + def test_describe_availability_zones(self): + """Makes sure describe_availability_zones works and filters results.""" + service1 = db.service_create(self.context, {'host': 'host1_describe_zones', + 'binary': "nova-compute", + 'topic': 'compute', + 'report_count': 0, + 'availability_zone': "zone1"}) + service2 = db.service_create(self.context, {'host': 'host2_describe_zones', + 'binary': "nova-compute", + 'topic': 'compute', + 'report_count': 0, + 'availability_zone': "zone2"}) + result = self.cloud.describe_availability_zones(self.context) + self.assertEqual(len(result['availabilityZoneInfo']), 3) + db.service_destroy(self.context, service1['id']) + db.service_destroy(self.context, service2['id']) + def test_console_output(self): image_id = FLAGS.default_image instance_type = FLAGS.default_instance_type |
