Fix the rest of direct uses of instance module objects
This switches the remaining occurences of nova.objects.instance.Instance* to nova.objects.Instance*. Partial-Blueprint: object-subclassing Change-Id: I3017c149cc9fbc6b1fbecb003dc55455b1dcd12c
This commit is contained in:
@@ -24,7 +24,7 @@ from oslo import messaging
|
||||
from nova.cells import rpcapi as cells_rpcapi
|
||||
from nova.compute import rpcapi as compute_rpcapi
|
||||
from nova import manager
|
||||
from nova.objects import instance as instance_obj
|
||||
from nova import objects
|
||||
from nova.openstack.common.gettextutils import _, _LW
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import log as logging
|
||||
@@ -111,7 +111,7 @@ class ConsoleAuthManager(manager.Manager):
|
||||
return self.cells_rpcapi.validate_console_port(context,
|
||||
instance_uuid, token['port'], token['console_type'])
|
||||
|
||||
instance = instance_obj.Instance.get_by_uuid(context, instance_uuid)
|
||||
instance = objects.Instance.get_by_uuid(context, instance_uuid)
|
||||
|
||||
return self.compute_rpcapi.validate_console_port(context,
|
||||
instance,
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
|
||||
from nova import db
|
||||
from nova import exception
|
||||
from nova import objects
|
||||
from nova.objects import base
|
||||
from nova.objects import fields
|
||||
from nova.objects import instance as instance_obj
|
||||
from nova.openstack.common import uuidutils
|
||||
|
||||
|
||||
@@ -154,8 +154,8 @@ class InstanceGroup(base.NovaPersistentObject, base.NovaObject):
|
||||
if exclude:
|
||||
filter_uuids = set(filter_uuids) - set(exclude)
|
||||
filters = {'uuid': filter_uuids, 'deleted': False}
|
||||
instances = instance_obj.InstanceList.get_by_filters(context,
|
||||
filters=filters)
|
||||
instances = objects.InstanceList.get_by_filters(context,
|
||||
filters=filters)
|
||||
return list(set([instance.host for instance in instances
|
||||
if instance.host]))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user