

def _validate_token(self, context, token):
    instance_uuid = token['instance_uuid']
    if (instance_uuid is None):
        return False
    if CONF.cells.enable:
        return self.cells_rpcapi.validate_console_port(context, instance_uuid, token['port'], token['console_type'])
    instance = objects.Instance.get_by_uuid(context, instance_uuid)
    return self.compute_rpcapi.validate_console_port(context, instance, token['port'], token['console_type'])

dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/consoleauth/manager.py ConsoleAuthManager._validate_token/original