diff options
| author | Vishvananda Ishaya <vishvananda@gmail.com> | 2011-02-23 21:25:36 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-02-23 21:25:36 +0000 |
| commit | ed9bdfc8b61470bbe3f61ef7bf3f3044f8483b8a (patch) | |
| tree | 96853b32eb4860da17bd2c7a1894e52014a5bceb /nova/api | |
| parent | f066b83f89f0fb633b2a23108b3efd2d27f3d710 (diff) | |
| parent | 21ebea24b4b77f8bd1fd42152454f1b0189843d4 (diff) | |
| download | nova-ed9bdfc8b61470bbe3f61ef7bf3f3044f8483b8a.tar.gz nova-ed9bdfc8b61470bbe3f61ef7bf3f3044f8483b8a.tar.xz nova-ed9bdfc8b61470bbe3f61ef7bf3f3044f8483b8a.zip | |
Fixes the describe_availability_zones to use an elevated context when getting services and the db calls to pass parameters correctly so is_admin check works.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/ec2/cloud.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nova/api/ec2/cloud.py b/nova/api/ec2/cloud.py index e219fb30c..7458d307a 100644 --- a/nova/api/ec2/cloud.py +++ b/nova/api/ec2/cloud.py @@ -198,8 +198,9 @@ class CloudController(object): return self._describe_availability_zones(context, **kwargs) def _describe_availability_zones(self, context, **kwargs): - enabled_services = db.service_get_all(context) - disabled_services = db.service_get_all(context, True) + ctxt = context.elevated() + enabled_services = db.service_get_all(ctxt) + disabled_services = db.service_get_all(ctxt, True) available_zones = [] for zone in [service.availability_zone for service in enabled_services]: |
