Fixes two errors in cloud.py in the nova_orm branch:

a) self.network is actually called network_manager
b) the logic for describe-instances check on is_admin was reversed
This commit is contained in:
Vishvananda Ishaya
2010-09-20 02:33:28 +00:00
committed by Tarmac

View File

@@ -385,7 +385,7 @@ class CloudController(object):
instances = db.instance_get_by_reservation(context, instances = db.instance_get_by_reservation(context,
reservation_id) reservation_id)
else: else:
if not context.user.is_admin(): if context.user.is_admin():
instances = db.instance_get_all(context) instances = db.instance_get_all(context)
else: else:
instances = db.instance_get_by_project(context, instances = db.instance_get_by_project(context,
@@ -665,7 +665,7 @@ class CloudController(object):
# NOTE(vish): Currently, nothing needs to be done on the # NOTE(vish): Currently, nothing needs to be done on the
# network node until release. If this changes, # network node until release. If this changes,
# we will need to cast here. # we will need to cast here.
self.network.deallocate_fixed_ip(context, address) self.network_manager.deallocate_fixed_ip(context, address)
host = instance_ref['host'] host = instance_ref['host']
if host: if host: