def run_compute_api_method(self, message, method_info):
        method = method_info['method']
        fn = getattr(self.compute_api, method, None)
        if not fn:
            detail = _("Unknown method '%(method)s' in compute API")
            raise exception.CellServiceAPIMethodNotFound(
                    detail=detail % {'method': method})
        args = list(method_info['method_args'])
        # 1st arg is instance_uuid that we need to turn into the
        # instance object.
        instance_uuid = args[0]
        # NOTE: compute/api.py loads these when retrieving an instance for an
        # API request, so there's a good chance that this is what was loaded.
        expected_attrs = ['metadata', 'system_metadata', 'security_groups',
                          'info_cache']

        try:
            instance = objects.Instance.get_by_uuid(message.ctxt,
                    instance_uuid, expected_attrs=expected_attrs)
            args[0] = instance
        except exception.InstanceNotFound:
            with excutils.save_and_reraise_exception():
                # Must be a race condition.  Let's try to resolve it by
                # telling the top level cells that this instance doesn't
                # exist.
                instance = objects.Instance(context=message.ctxt,
                                            uuid=instance_uuid)
                self.msg_runner.instance_destroy_at_top(message.ctxt,
                                                        instance)
        return fn(message.ctxt, *args, **method_info['method_kwargs'])
If the L{Deferred} returned from the C{startProducing} method of the
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/cells/messaging.py/_TargetedMessageMethods.run_compute_api_method--crossover with--dataset/ETHPy150Open twisted/twisted/twisted/web/test/test_newclient.py/RequestTests.test_sendRequestBodyWithError