Make consoleauth token verification pass an Instance object
The consoleauth manager looks up and passes a SQLite model to the compute_rpcapi.validate_console_port() method, which is expecting an Instance object now. This fixes that by replacing the direct call with an object lookup. Change-Id: I48a63805e4691899396559f48b29bef3030d5ef8
This commit is contained in:
parent
0bcf22e71d
commit
30ac71b587
|
@ -24,6 +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.openstack.common.gettextutils import _
|
||||
from nova.openstack.common import jsonutils
|
||||
from nova.openstack.common import log as logging
|
||||
|
@ -103,7 +104,7 @@ class ConsoleAuthManager(manager.Manager):
|
|||
return self.cells_rpcapi.validate_console_port(context,
|
||||
instance_uuid, token['port'], token['console_type'])
|
||||
|
||||
instance = self.db.instance_get_by_uuid(context, instance_uuid)
|
||||
instance = instance_obj.Instance.get_by_uuid(context, instance_uuid)
|
||||
|
||||
return self.compute_rpcapi.validate_console_port(context,
|
||||
instance,
|
||||
|
|
Loading…
Reference in New Issue