)]}'
{"oslo_versionedobjects/examples/iot_bulb_remoted.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23f58e7a30fe246ded6a7a8617c9c94572da1988","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # Make sure it\u0027s bound to the object (vs not); this ensures"},{"line_number":49,"context_line":"            # that the first argument is \u0027self\u0027 (aka the object that"},{"line_number":50,"context_line":"            # the method is dispatching to)."},{"line_number":51,"context_line":"            method \u003d functools.partial(method, objinst)"},{"line_number":52,"context_line":"        result \u003d self._object_dispatch(method, args, kwargs)"},{"line_number":53,"context_line":"        changes \u003d {}"},{"line_number":54,"context_line":"        return changes, result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_44e48f0c","line":51,"updated":"2016-03-21 01:59:41.000000000","message":"I don\u0027t understand what case you\u0027re handling here.","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"85d8427d34b415be8f3ae9cba5adff2fcfa315e7","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # Make sure it\u0027s bound to the object (vs not); this ensures"},{"line_number":49,"context_line":"            # that the first argument is \u0027self\u0027 (aka the object that"},{"line_number":50,"context_line":"            # the method is dispatching to)."},{"line_number":51,"context_line":"            method \u003d functools.partial(method, objinst)"},{"line_number":52,"context_line":"        result \u003d self._object_dispatch(method, args, kwargs)"},{"line_number":53,"context_line":"        changes \u003d {}"},{"line_number":54,"context_line":"        return changes, result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_f7391743","line":51,"in_reply_to":"fa0719c6_44e48f0c","updated":"2016-03-21 03:40:07.000000000","message":"Without doing this (commenting it out) the following happens.\n\nhttps://gist.github.com/harlowja/98fd66f18820bb4a783e\n\nSo seems like I need to ensure the original function is bound to the object (because at decoration time it afaik isn\u0027t and  therefore causes that issue when its called later).","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"5816c843c94fb93341553d51a431ec7f9aaf216d","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # Make sure it\u0027s bound to the object (vs not); this ensures"},{"line_number":49,"context_line":"            # that the first argument is \u0027self\u0027 (aka the object that"},{"line_number":50,"context_line":"            # the method is dispatching to)."},{"line_number":51,"context_line":"            method \u003d functools.partial(method, objinst)"},{"line_number":52,"context_line":"        result \u003d self._object_dispatch(method, args, kwargs)"},{"line_number":53,"context_line":"        changes \u003d {}"},{"line_number":54,"context_line":"        return changes, result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_7b5d5714","line":51,"in_reply_to":"fa0719c6_8f4749bb","updated":"2016-03-23 16:26:24.000000000","message":"Seems fair to me.","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"3ae62805a87b1a8712129581b9ed163065345bdf","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # Make sure it\u0027s bound to the object (vs not); this ensures"},{"line_number":49,"context_line":"            # that the first argument is \u0027self\u0027 (aka the object that"},{"line_number":50,"context_line":"            # the method is dispatching to)."},{"line_number":51,"context_line":"            method \u003d functools.partial(method, objinst)"},{"line_number":52,"context_line":"        result \u003d self._object_dispatch(method, args, kwargs)"},{"line_number":53,"context_line":"        changes \u003d {}"},{"line_number":54,"context_line":"        return changes, result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_cfa2e1ad","line":51,"in_reply_to":"fa0719c6_a995ed33","updated":"2016-03-23 15:45:39.000000000","message":"Seems fair, I was going to make it like dispatch via reading a response from a file. That might be more realistic-like (although not fully remoted, which I guess I could create a simple kombu in-memory transport mini-server or something to do that in the future).","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"357d45a86be901f78614982aa08799821f291f98","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # Make sure it\u0027s bound to the object (vs not); this ensures"},{"line_number":49,"context_line":"            # that the first argument is \u0027self\u0027 (aka the object that"},{"line_number":50,"context_line":"            # the method is dispatching to)."},{"line_number":51,"context_line":"            method \u003d functools.partial(method, objinst)"},{"line_number":52,"context_line":"        result \u003d self._object_dispatch(method, args, kwargs)"},{"line_number":53,"context_line":"        changes \u003d {}"},{"line_number":54,"context_line":"        return changes, result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_8f4749bb","line":51,"in_reply_to":"fa0719c6_cfa2e1ad","updated":"2016-03-23 15:47:24.000000000","message":"Actually, what if you just define a function above, outside this api module and call it \"fake_local_rpc_dispatch_thingy\" (naming optional) and comment that as a big hack to simulate local rpc? That keeps this implementation cleaner and isolates the hack a bit.","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"edf0088b5fda0116cc46033fed6078526a3e4d6b","unresolved":false,"context_lines":[{"line_number":48,"context_line":"            # Make sure it\u0027s bound to the object (vs not); this ensures"},{"line_number":49,"context_line":"            # that the first argument is \u0027self\u0027 (aka the object that"},{"line_number":50,"context_line":"            # the method is dispatching to)."},{"line_number":51,"context_line":"            method \u003d functools.partial(method, objinst)"},{"line_number":52,"context_line":"        result \u003d self._object_dispatch(method, args, kwargs)"},{"line_number":53,"context_line":"        changes \u003d {}"},{"line_number":54,"context_line":"        return changes, result"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_a995ed33","line":51,"in_reply_to":"fa0719c6_f7391743","updated":"2016-03-23 15:23:46.000000000","message":"Hmm, we don\u0027t do this anywhere else, so I\u0027m not sure it\u0027s good to have it in an example. I guess that this is because you\u0027re trying to simulate a remoted environment by drilling into the original_fn. We don\u0027t have that because we don\u0027t have indirection_api set on the service that actually implements the other side of this api, so we can call right through the decorator.\n\nMaybe just put some more text in the comment about how the extra manipulation is due to the fact that we\u0027re simulating the remote environment or something?\n\nI dunno, I just don\u0027t want to confuse people with python-fu and them putting this in their stuff because it\u0027s here.","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"23f58e7a30fe246ded6a7a8617c9c94572da1988","unresolved":false,"context_lines":[{"line_number":84,"context_line":""},{"line_number":85,"context_line":"# Ensure that we always register our object with the global object"},{"line_number":86,"context_line":"# registry, so that it can be deserialized from its primitive form."},{"line_number":87,"context_line":"base.VersionedObjectRegistry.register(IOTLightbulb)"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"# Now do some basic operations on a light bulb."},{"line_number":90,"context_line":"bulb \u003d IOTLightbulb(context\u003d{}, serial\u003d\u0027abc-123\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa0719c6_84eea7ea","line":87,"updated":"2016-03-21 01:59:41.000000000","message":"Same comment here about decorator syntax.","commit_id":"67e2836681e84ff9726e200b1fd2abe3df17e983"}]}
