)]}'
{"doc/specs/in-progress/rally_api.rst":[{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"8b9508bf631fc9142b06550905cc0affa7b58335","unresolved":false,"context_lines":[{"line_number":18,"context_line":"Enhance Rally API"},{"line_number":19,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"The current Rally API is not powerful enough to be used for Rally-as-a-Service. This is essentially blocking its development. Rally API should always return something that can be easily serialized and sent over HTTP."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Problem description"}],"source_content_type":"text/x-rst","patch_set":3,"id":"9a0c5dc1_13090296","line":21,"updated":"2015-05-12 13:03:39.000000000","message":"Breaking lines on length 80 chars (or a bit more) will make this spec much readable. It is hard to read this document in raw format, since parts of some lines are out of right side of screen. Please break all lines that are larger than at least 100 chars (however canonical 80-chars limit looks better for me)","commit_id":"780edc8181ae811dcf7b7a1d73b8bf697a9a6892"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # The only option"},{"line_number":77,"context_line":"        task_cfg \u003d {...}"},{"line_number":78,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":79,"context_line":"        api.Task.start(deployment.name, task_cfg, task.uuid)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_aaba5208","line":78,"updated":"2015-05-18 16:47:55.000000000","message":"What is the type of `task\u0027? If we need each api method to return something serializable, then this probably must be a dict","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        # The only option"},{"line_number":77,"context_line":"        task_cfg \u003d {...}"},{"line_number":78,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":79,"context_line":"        api.Task.start(deployment.name, task_cfg, task.uuid)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_60b7b23a","line":78,"in_reply_to":"7a016987_aaba5208","updated":"2015-05-20 11:22:28.000000000","message":"Agree, added a sentence about that above.","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # The only option"},{"line_number":77,"context_line":"        task_cfg \u003d {...}"},{"line_number":78,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":79,"context_line":"        api.Task.start(deployment.name, task_cfg, task.uuid)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_a7028b09","line":79,"updated":"2015-05-18 16:47:55.000000000","message":"1) We have already passed deployment name in Task.create - probably we do not need deployment for `start\u0027 anymore\n\n2) If we need each api method to return something serializable, then `task\u0027 probably must be a dict\n\n3) If that\u0027s all about task, then put task uuid to the first position\n\nSo, it seems that this call should look like that:\n\n api.Task.start(task[\"uuid\"], task_cfg)","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        # The only option"},{"line_number":77,"context_line":"        task_cfg \u003d {...}"},{"line_number":78,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":79,"context_line":"        api.Task.start(deployment.name, task_cfg, task.uuid)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_20d2da5c","line":79,"in_reply_to":"7a016987_a7028b09","updated":"2015-05-20 11:22:28.000000000","message":"Done","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"},{"line_number":83,"context_line":"    should be called inbetween when starting a task from CLI."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  - *Task.results* / *Task.raw_results*"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_aa47f249","line":83,"updated":"2015-05-18 16:47:55.000000000","message":"s/inbetween //","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"74308d97ab3ba1c65a66daf19bc6a8730209ddfa","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"},{"line_number":83,"context_line":"    should be called inbetween when starting a task from CLI."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  - *Task.results* / *Task.raw_results*"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_037b688d","line":83,"in_reply_to":"7a016987_a04daa3f","updated":"2015-05-20 11:56:27.000000000","message":"Sorry, I\u0027m mistaken again - this is OK","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"},{"line_number":83,"context_line":"    should be called inbetween when starting a task from CLI."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  - *Task.results* / *Task.raw_results*"},{"line_number":86,"context_line":""}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_a04daa3f","line":83,"in_reply_to":"7a016987_aa47f249","updated":"2015-05-20 11:22:28.000000000","message":"?","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"},{"line_number":83,"context_line":"    should be called inbetween when starting a task from CLI."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  - *Task.results* / *Task.raw_results*"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    There is currently no mechanism to return task results in Rally API."},{"line_number":88,"context_line":"    In Rally CLI, task results are retrieved from DB and processed inside"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_4a0d1e8f","line":85,"updated":"2015-05-18 16:47:55.000000000","message":"Do we really need two results structures?\nSince there is a spec draft for db scema refactoring, I think we have a chance to use raw results for all cases\n\nSpec: https://review.openstack.org/#/c/167060/","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"},{"line_number":83,"context_line":"    should be called inbetween when starting a task from CLI."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  - *Task.results* / *Task.raw_results*"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    There is currently no mechanism to return task results in Rally API."},{"line_number":88,"context_line":"    In Rally CLI, task results are retrieved from DB and processed inside"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_c0df8638","line":85,"in_reply_to":"7a016987_4a0d1e8f","updated":"2015-05-20 11:22:28.000000000","message":"Could you please elaborate on this? How will this help?","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"d9c8a6f992c37e61d8acbd8c35d07bcfa8b7ec55","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    already used in CLI like in *Option 1*, because then *self.use(...)*"},{"line_number":83,"context_line":"    should be called inbetween when starting a task from CLI."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  - *Task.results* / *Task.raw_results*"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    There is currently no mechanism to return task results in Rally API."},{"line_number":88,"context_line":"    In Rally CLI, task results are retrieved from DB and processed inside"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_2033fa15","line":85,"in_reply_to":"7a016987_c0df8638","updated":"2015-05-20 11:48:56.000000000","message":"Sorry, my comment above is mistaken","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"  To be used in Rally-as-a-Service, Rally API should return something that"},{"line_number":145,"context_line":"  can be easily serialized and sent over HTTP. The proposal is that every"},{"line_number":146,"context_line":"  API method returns a dictionary with 2 keys: *\"info\"* and *\"body\"*."},{"line_number":147,"context_line":"  *\"body\"* is what the method returns and *\"info\"* is added by a special"},{"line_number":148,"context_line":"  *@serialization* decorator. So all we need at this step is to implement"},{"line_number":149,"context_line":"  the *@serialization* decorator and use it in API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_aa025209","line":146,"updated":"2015-05-18 16:47:55.000000000","message":"1) Just proposal: rename \"body\" to \"data\" - this looks a bit more generic for me\n\n2) Let\u0027s put data from \"info\" on the same layer with \"data\" (flat is better than nested):\n\n {\n   \"data\": {here is api call result},\n   \"foo\": {...},\n   \"bar\": {...},\n   ...\n }","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":143,"context_line":""},{"line_number":144,"context_line":"  To be used in Rally-as-a-Service, Rally API should return something that"},{"line_number":145,"context_line":"  can be easily serialized and sent over HTTP. The proposal is that every"},{"line_number":146,"context_line":"  API method returns a dictionary with 2 keys: *\"info\"* and *\"body\"*."},{"line_number":147,"context_line":"  *\"body\"* is what the method returns and *\"info\"* is added by a special"},{"line_number":148,"context_line":"  *@serialization* decorator. So all we need at this step is to implement"},{"line_number":149,"context_line":"  the *@serialization* decorator and use it in API."}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_000c7eeb","line":146,"in_reply_to":"7a016987_aa025209","updated":"2015-05-20 11:22:28.000000000","message":"Agree, done","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        #   No exceptions \u003d\u003e 200"},{"line_number":161,"context_line":"        #   Not found \u003d\u003e 404"},{"line_number":162,"context_line":"        #   Not from predefined set of exceptions \u003d\u003e 500"},{"line_number":163,"context_line":"        \"status_code\": HTTP_STATUS_CODE,"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # Exceptions are caught by the decorator as well:"},{"line_number":166,"context_line":"        \"error\": {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_5d3baa9c","line":163,"updated":"2015-05-18 16:47:55.000000000","message":"Defining HTTP status code in API layer looks not good - this probably should be done on RaaS layer","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        #   No exceptions \u003d\u003e 200"},{"line_number":161,"context_line":"        #   Not found \u003d\u003e 404"},{"line_number":162,"context_line":"        #   Not from predefined set of exceptions \u003d\u003e 500"},{"line_number":163,"context_line":"        \"status_code\": HTTP_STATUS_CODE,"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # Exceptions are caught by the decorator as well:"},{"line_number":166,"context_line":"        \"error\": {"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_208ada1b","line":163,"in_reply_to":"7a016987_5d3baa9c","updated":"2015-05-20 11:22:28.000000000","message":"Makes sense. I will add a comment about this here.","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"03b69c0632fa04d58c9f43d2914e5191bd183a9c","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # Exceptions are caught by the decorator as well:"},{"line_number":166,"context_line":"        \"error\": {"},{"line_number":167,"context_line":"          \"message\": \u003cstr\u003e,"},{"line_number":168,"context_line":"          \"traceback\":  \u003cstr\u003e"},{"line_number":169,"context_line":"        }"},{"line_number":170,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_bdba9e21","line":167,"updated":"2015-05-18 16:47:55.000000000","message":"Exception type is also important, and exception code sometimes too","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"15b7cf1858b205a3383840d18c0b919133bdf61e","unresolved":false,"context_lines":[{"line_number":164,"context_line":""},{"line_number":165,"context_line":"        # Exceptions are caught by the decorator as well:"},{"line_number":166,"context_line":"        \"error\": {"},{"line_number":167,"context_line":"          \"message\": \u003cstr\u003e,"},{"line_number":168,"context_line":"          \"traceback\":  \u003cstr\u003e"},{"line_number":169,"context_line":"        }"},{"line_number":170,"context_line":"      }"}],"source_content_type":"text/x-rst","patch_set":4,"id":"7a016987_40fef6ae","line":167,"in_reply_to":"7a016987_bdba9e21","updated":"2015-05-20 11:22:28.000000000","message":"Done","commit_id":"8496a99421252913575333c6a604df8b50c334d3"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a20e8d2db7be6a8b6f7e776ddd7ebabf7c3a7acc","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"  - *Task.create* / *Task.start*"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    Two major issues with these methods:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    1. There are now two different methods to start a task, which is a bad sign:"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a016987_b0ffbca9","line":57,"updated":"2015-05-26 16:21:39.000000000","message":"s/Two/Three/","commit_id":"2522d4948872daf4f0414b7ace3ebcfe4aa17619"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"226612945c3eb9f9b9d9d54f63c421d68ec0a528","unresolved":false,"context_lines":[{"line_number":54,"context_line":""},{"line_number":55,"context_line":"  - *Task.create* / *Task.start*"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    Two major issues with these methods:"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    1. There are now two different methods to start a task, which is a bad sign:"},{"line_number":60,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5afe65bd_06e77de5","line":57,"in_reply_to":"7a016987_b0ffbca9","updated":"2015-06-02 09:25:24.000000000","message":"Done","commit_id":"2522d4948872daf4f0414b7ace3ebcfe4aa17619"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a20e8d2db7be6a8b6f7e776ddd7ebabf7c3a7acc","unresolved":false,"context_lines":[{"line_number":162,"context_line":"  returns) and auxiliary keys that contain the information about the response."},{"line_number":163,"context_line":"  This dictionary will be constructed by the *@serialization* decorator."},{"line_number":164,"context_line":"  So all we need at this step is to implement the *@serialization* decorator and"},{"line_number":165,"context_line":"  use it in Rally API."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"  The proposed dictionary structure is as follows:"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a016987_d048f8ce","line":165,"updated":"2015-05-26 16:21:39.000000000","message":"I have some issues with this section of the spec. I feel like this excessively optimizes for the REST API, while reducing usability as a library. When using Rally as a library, returning objects is likely to be more useful (and certainly more introspectable). I think it\u0027d be superior to offer a to_dict() method on all of the objects, so that the objects returned by the API methods a) are immediately and immanently usable within code that uses Rally as a library; and b) can easily be wrapped for use with the REST API.\n\nThe key difference is that the REST API must have a wrapper between the API return values and the end user, so we can do whatever arbitrary data transformation is necessary in that wrapper. The API itself should be optimized primarily for use as a library.","commit_id":"2522d4948872daf4f0414b7ace3ebcfe4aa17619"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"226612945c3eb9f9b9d9d54f63c421d68ec0a528","unresolved":false,"context_lines":[{"line_number":162,"context_line":"  returns) and auxiliary keys that contain the information about the response."},{"line_number":163,"context_line":"  This dictionary will be constructed by the *@serialization* decorator."},{"line_number":164,"context_line":"  So all we need at this step is to implement the *@serialization* decorator and"},{"line_number":165,"context_line":"  use it in Rally API."},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"  The proposed dictionary structure is as follows:"},{"line_number":168,"context_line":""}],"source_content_type":"text/x-rst","patch_set":5,"id":"5afe65bd_a148932e","line":165,"in_reply_to":"7a016987_d048f8ce","updated":"2015-06-02 09:25:24.000000000","message":"If we keep object instead of serializable output values, it will be very hard to handle exceptions that might be raised inside API method in a unified way. Besides, it is not that difficult to use the returned dicts, you basically have just to call return_value[\"data\"][\"some_property\"] instead of return_value[\"some_property\"].","commit_id":"2522d4948872daf4f0414b7ace3ebcfe4aa17619"},{"author":{"_account_id":11748,"name":"Chris St. Pierre","email":"cstpierr@cisco.com","username":"stpierre"},"change_message_id":"a20e8d2db7be6a8b6f7e776ddd7ebabf7c3a7acc","unresolved":false,"context_lines":[{"line_number":169,"context_line":"  .. code-block:: none"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    {"},{"line_number":172,"context_line":"      # Exceptions are caught by the decorator.      "},{"line_number":173,"context_line":"      # This info should be used then on the RaaS layer to return the status code:"},{"line_number":174,"context_line":"      #   No exceptions \u003d\u003e 200"},{"line_number":175,"context_line":"      #   Not found \u003d\u003e 404"}],"source_content_type":"text/x-rst","patch_set":5,"id":"7a016987_b0457cb4","line":172,"updated":"2015-05-26 16:21:39.000000000","message":"Trailing whitespace.","commit_id":"2522d4948872daf4f0414b7ace3ebcfe4aa17619"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"226612945c3eb9f9b9d9d54f63c421d68ec0a528","unresolved":false,"context_lines":[{"line_number":169,"context_line":"  .. code-block:: none"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    {"},{"line_number":172,"context_line":"      # Exceptions are caught by the decorator.      "},{"line_number":173,"context_line":"      # This info should be used then on the RaaS layer to return the status code:"},{"line_number":174,"context_line":"      #   No exceptions \u003d\u003e 200"},{"line_number":175,"context_line":"      #   Not found \u003d\u003e 404"}],"source_content_type":"text/x-rst","patch_set":5,"id":"5afe65bd_e6eb41af","line":172,"in_reply_to":"7a016987_b0457cb4","updated":"2015-06-02 09:25:24.000000000","message":"Done","commit_id":"2522d4948872daf4f0414b7ace3ebcfe4aa17619"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"- Rally as a Service"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"  Having a Rally deamon that gives access to Rally functionality via REST is"},{"line_number":43,"context_line":"  a highly desired feature. Its implementation is blocked by the current state"},{"line_number":44,"context_line":"  of the API."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_afd8791e","line":42,"updated":"2015-06-02 12:53:46.000000000","message":"I think we can not make SaaS interface RESTful - this will be RPC only","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"- Rally as a Service"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"  Having a Rally deamon that gives access to Rally functionality via REST is"},{"line_number":43,"context_line":"  a highly desired feature. Its implementation is blocked by the current state"},{"line_number":44,"context_line":"  of the API."},{"line_number":45,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_802c79ac","line":42,"in_reply_to":"5afe65bd_afd8791e","updated":"2015-06-05 11:07:25.000000000","message":"Done","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":51,"context_line":"1. Prepare Rally API for RaaS."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  To be used in Rally-as-a-Service, Rally API should return something that"},{"line_number":54,"context_line":"  can be easily serialized and sent over HTTP. The proposal is that every"},{"line_number":55,"context_line":"  API method returns a dictionary with the keys \"data\" (this is what the method"},{"line_number":56,"context_line":"  returns) and \"error\" keeping the error code if there was any exception."},{"line_number":57,"context_line":"  This dictionary will be constructed by the *@rpcable* decorator, that will be"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_3281924b","line":54,"updated":"2015-06-02 12:53:46.000000000","message":"It is important to explicitly mention JSON here (\"... to JSON and sent ...\")","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":51,"context_line":"1. Prepare Rally API for RaaS."},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"  To be used in Rally-as-a-Service, Rally API should return something that"},{"line_number":54,"context_line":"  can be easily serialized and sent over HTTP. The proposal is that every"},{"line_number":55,"context_line":"  API method returns a dictionary with the keys \"data\" (this is what the method"},{"line_number":56,"context_line":"  returns) and \"error\" keeping the error code if there was any exception."},{"line_number":57,"context_line":"  This dictionary will be constructed by the *@rpcable* decorator, that will be"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_c0acb1ef","line":54,"in_reply_to":"5afe65bd_3281924b","updated":"2015-06-05 11:07:25.000000000","message":"Done","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  can be easily serialized and sent over HTTP. The proposal is that every"},{"line_number":55,"context_line":"  API method returns a dictionary with the keys \"data\" (this is what the method"},{"line_number":56,"context_line":"  returns) and \"error\" keeping the error code if there was any exception."},{"line_number":57,"context_line":"  This dictionary will be constructed by the *@rpcable* decorator, that will be"},{"line_number":58,"context_line":"  also capable of deciding whether the API method call should be transformed"},{"line_number":59,"context_line":"  into an RPC call (when Rally works as a Service) or in a local method call"},{"line_number":60,"context_line":"  (when Rally is used as a Lib). This decorator will also ensure that no"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_72638ab2","line":57,"updated":"2015-06-02 12:53:46.000000000","message":"I propose to use `@rpcable\u0027 decorator only for setting some property (for example `fn._rpc_path \u003d \"/deployment/create\"\u0027) for wrapped method.\n\nBut dict can be made by some internal method called in the end of any api method","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":54,"context_line":"  can be easily serialized and sent over HTTP. The proposal is that every"},{"line_number":55,"context_line":"  API method returns a dictionary with the keys \"data\" (this is what the method"},{"line_number":56,"context_line":"  returns) and \"error\" keeping the error code if there was any exception."},{"line_number":57,"context_line":"  This dictionary will be constructed by the *@rpcable* decorator, that will be"},{"line_number":58,"context_line":"  also capable of deciding whether the API method call should be transformed"},{"line_number":59,"context_line":"  into an RPC call (when Rally works as a Service) or in a local method call"},{"line_number":60,"context_line":"  (when Rally is used as a Lib). This decorator will also ensure that no"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_c01dd110","line":57,"in_reply_to":"5afe65bd_72638ab2","updated":"2015-06-05 11:07:25.000000000","message":"Why? Isn\u0027t this going to be an overhead to call some method at the end of any api method? Won\u0027t this make it harder not to make mistakes while implementing new API methods?","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  into an RPC call (when Rally works as a Service) or in a local method call"},{"line_number":60,"context_line":"  (when Rally is used as a Lib). This decorator will also ensure that no"},{"line_number":61,"context_line":"  exceptions are raised in the API method calls."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  Here is the proposed implementation for the @rpcable decorator and basic"},{"line_number":64,"context_line":"  RaaS facilities:"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_7d36bb04","line":62,"updated":"2015-06-02 12:53:46.000000000","message":"Please also mention that all api methods become bounded (current api methods are classmethods)","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":59,"context_line":"  into an RPC call (when Rally works as a Service) or in a local method call"},{"line_number":60,"context_line":"  (when Rally is used as a Lib). This decorator will also ensure that no"},{"line_number":61,"context_line":"  exceptions are raised in the API method calls."},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"  Here is the proposed implementation for the @rpcable decorator and basic"},{"line_number":64,"context_line":"  RaaS facilities:"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_40ee8123","line":62,"in_reply_to":"5afe65bd_7d36bb04","updated":"2015-06-05 11:07:25.000000000","message":"Done","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def rpcable(path):"},{"line_number":71,"context_line":"        \"\"\"Decorator that maps a method to its RPC path."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        When called on the client side in RaaS mode, the wrapped method will based"},{"line_number":74,"context_line":"        transformed to an RPC call. When called locally on the client or on the"},{"line_number":75,"context_line":"        server, the actual method implementation will be executed."},{"line_number":76,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_d2491ed2","line":73,"updated":"2015-06-02 12:53:46.000000000","message":"s/based/be/","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    def rpcable(path):"},{"line_number":71,"context_line":"        \"\"\"Decorator that maps a method to its RPC path."},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"        When called on the client side in RaaS mode, the wrapped method will based"},{"line_number":74,"context_line":"        transformed to an RPC call. When called locally on the client or on the"},{"line_number":75,"context_line":"        server, the actual method implementation will be executed."},{"line_number":76,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_60e97d1a","line":73,"in_reply_to":"5afe65bd_d2491ed2","updated":"2015-06-05 11:07:25.000000000","message":"Done","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"                if not self.local:"},{"line_number":96,"context_line":"                    return json.load("},{"line_number":97,"context_line":"                        request(self.url + self.path, *args, **kwargs))"},{"line_number":98,"context_line":"                else:"},{"line_number":99,"context_line":"                    result \u003d {\"data\": None, \"error\": None}"},{"line_number":100,"context_line":"                    try:"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_d8beddfe","line":97,"updated":"2015-06-02 12:53:46.000000000","message":"1) s/self.path/path) # and L107 is not required\n\n2) I guess that here should be `self\u0027 called\n\n3) Where is dict {\"data\"..., \"error\":...} composed? As far as I understand, API method should return dict in any case\n\n4) `request\u0027 is something related to SaaS, it must be created in SaaS part, not in the api","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"                if not self.local:"},{"line_number":96,"context_line":"                    return json.load("},{"line_number":97,"context_line":"                        request(self.url + self.path, *args, **kwargs))"},{"line_number":98,"context_line":"                else:"},{"line_number":99,"context_line":"                    result \u003d {\"data\": None, \"error\": None}"},{"line_number":100,"context_line":"                    try:"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_40944136","line":97,"in_reply_to":"5afe65bd_d8beddfe","updated":"2015-06-05 11:07:25.000000000","message":"1) L107 IS needed because it is used in the api_map() method (L162)\n\n2) ?\n\n3) {\"data\"..., \"error\":...} gets composed in dispatcher (L114)\n\n4) @rpcable now makes it possible to use the same code both for local and remote API calls. This will be broken if we move it to SaaS.","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    api \u003d API()  # API object used by RaaS"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def dispatcher(url, path, headers, *get, **post):"},{"line_number":115,"context_line":"        \"\"\"Request handler. Calls the corresponding method based on the request."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        Should be called on the server side when a new request arrives."}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_b85201dc","line":114,"updated":"2015-06-02 12:53:46.000000000","message":"I propose to s/dispatcher/dispatch/\n\n`Dispatcher\u0027 is better for class name, not method","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":111,"context_line":""},{"line_number":112,"context_line":"    api \u003d API()  # API object used by RaaS"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def dispatcher(url, path, headers, *get, **post):"},{"line_number":115,"context_line":"        \"\"\"Request handler. Calls the corresponding method based on the request."},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        Should be called on the server side when a new request arrives."}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_2099456f","line":114,"in_reply_to":"5afe65bd_b85201dc","updated":"2015-06-05 11:07:25.000000000","message":"Done","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":"        result \u003d {\"data\": None, \"error\": None}"},{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            result[\"data\"] \u003d json.dumps(api.get_method_by_path(path)(*get, **post))"},{"line_number":130,"context_line":"        except Exception as e:"},{"line_number":131,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":132,"context_line":"        return result"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_98a185ac","line":129,"updated":"2015-06-02 12:53:46.000000000","message":"Why make dict {\"data\": ..., \"error\": ...} here, since we already must do thin in api.\n\nI propose to wrap serialization by try/except, so if we can not serialize result[\"data\"] (assuming `result\u0027 dict is come from API call), then we can use HTTP code 500, and error message from caught exception","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        \"\"\""},{"line_number":127,"context_line":"        result \u003d {\"data\": None, \"error\": None}"},{"line_number":128,"context_line":"        try:"},{"line_number":129,"context_line":"            result[\"data\"] \u003d json.dumps(api.get_method_by_path(path)(*get, **post))"},{"line_number":130,"context_line":"        except Exception as e:"},{"line_number":131,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":132,"context_line":"        return result"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_0049a98b","line":129,"in_reply_to":"5afe65bd_98a185ac","updated":"2015-06-05 11:07:25.000000000","message":"dispatcher() handles remote API calls on the server, while @rpcable is responsible for returning the value from local API calls. In both cases, the result should be wrapped in such a way that there are no exceptions and the error information is stored in the resulting dict. That\u0027s why we have try...except both here and in L100-104.\n\nBut seems like we can introduce another method that will do wrapping in both cases, I\u0027ll update the code then a bit later.","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\"Base class for API classes (Deployment, Task, Verification etc.).\"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        def __init__(self, url\u003dNone, user\u003dNone, password\u003dNone):"},{"line_number":156,"context_line":"            self.local \u003d url is not None"},{"line_number":157,"context_line":"            self.url \u003d url"},{"line_number":158,"context_line":"            self.user \u003d user"},{"line_number":159,"context_line":"            self.password \u003d password"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_38ecd1c6","line":156,"updated":"2015-06-02 12:53:46.000000000","message":"`self.is_local\u0027 looks better (says explicitly that is a boolean)","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":153,"context_line":"        \"\"\"Base class for API classes (Deployment, Task, Verification etc.).\"\"\""},{"line_number":154,"context_line":""},{"line_number":155,"context_line":"        def __init__(self, url\u003dNone, user\u003dNone, password\u003dNone):"},{"line_number":156,"context_line":"            self.local \u003d url is not None"},{"line_number":157,"context_line":"            self.url \u003d url"},{"line_number":158,"context_line":"            self.user \u003d user"},{"line_number":159,"context_line":"            self.password \u003d password"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_00b529cc","line":156,"in_reply_to":"5afe65bd_38ecd1c6","updated":"2015-06-05 11:07:25.000000000","message":"Done","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4251f685bbbc936c19bd11f7d33bdebd98760db0","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    CLI methods."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    Seems like it makes sense not only to introduce an API method to return"},{"line_number":235,"context_line":"    Task results but also to move all the aggregation/processing code to API"},{"line_number":236,"context_line":"    as well. As a result, there will be two methods:"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    .. code-block:: none"}],"source_content_type":"text/x-rst","patch_set":7,"id":"5afe65bd_fd74ebcf","line":235,"updated":"2015-06-02 12:53:46.000000000","message":"We have a spec on review, that proposes refactoring DB schema, so aggregated task data will be stored in the database as well.\n\nIf this spec will be merged, then there will be no reason to have two different methods `raw_results()\u0027 and `results()\u0027 - why not to use single method `results()\u0027 from the beginning?\n\nhttps://review.openstack.org/#/c/167060/","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"29b69acaaa31ac7a9cf2453d9a6b6d5e3f4261aa","unresolved":false,"context_lines":[{"line_number":232,"context_line":"    CLI methods."},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    Seems like it makes sense not only to introduce an API method to return"},{"line_number":235,"context_line":"    Task results but also to move all the aggregation/processing code to API"},{"line_number":236,"context_line":"    as well. As a result, there will be two methods:"},{"line_number":237,"context_line":""},{"line_number":238,"context_line":"    .. code-block:: none"}],"source_content_type":"text/x-rst","patch_set":7,"id":"3afb71cf_e0d1edfc","line":235,"in_reply_to":"5afe65bd_fd74ebcf","updated":"2015-06-05 11:07:25.000000000","message":"Ok we will have to discuss it since I don\u0027t get the details of how the DB schema will affect the API right now","commit_id":"8100daafe525517242063159a200700300e19c64"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"e2ee4338ee6110869511dd0740beb792424ddf74","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        \"\"\"Returns the HTTP code corresponding to the exception given.\"\"\""},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def wrap_exceptions(f, *args, *kwargs):"},{"line_number":79,"context_line":"        result \u003d {\"data\": None, \"error\": None}"},{"line_number":80,"context_line":"        try:"},{"line_number":81,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"},{"line_number":82,"context_line":"        except Exception as e:"}],"source_content_type":"text/x-rst","patch_set":9,"id":"3afb71cf_47bade24","line":79,"updated":"2015-06-08 10:17:13.000000000","message":"Added this exception wrapper that is used in L115 and L141","commit_id":"5b743ef813465992b8d8c20437105ce072d5582a"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"17f368d5f65d6a22b7f74d8242b866f961f5fe83","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"- Rally as a Service"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"  Having a Rally deamon that gives access to Rally functionality via RPC is"},{"line_number":34,"context_line":"  a highly desired feature. Its implementation is blocked by the current state"},{"line_number":35,"context_line":"  of the API."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_a85f1e40","line":33,"updated":"2015-06-08 13:21:28.000000000","message":"s/deamon/daemon/","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fbcd5327c3647219843f1119b3fffb28cc60377","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"- Rally as a Service"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"  Having a Rally deamon that gives access to Rally functionality via RPC is"},{"line_number":34,"context_line":"  a highly desired feature. Its implementation is blocked by the current state"},{"line_number":35,"context_line":"  of the API."},{"line_number":36,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_3fe1bb2d","line":33,"in_reply_to":"3afb71cf_a85f1e40","updated":"2015-06-10 09:54:34.000000000","message":"Done","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":8576,"name":"Yair Fried","email":"yfried@redhat.com","username":"yfried"},"change_message_id":"0fd983cc6df73c9082bd3a99bb8e60f2e9a685a7","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  exceptions are raised in the API method calls."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  Another change will be that API methods will become instance methods instead"},{"line_number":55,"context_line":"  of class methods they are now. These API class instances will be initialized"},{"line_number":56,"context_line":"  by a helper API class and will be provided with user information (username/"},{"line_number":57,"context_line":"  password)."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_d47bec26","line":55,"updated":"2015-06-09 07:13:46.000000000","message":"\"...of the class...\"","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"e862ed7acbe654d46dc3355b28dd76741ff777a5","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  exceptions are raised in the API method calls."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  Another change will be that API methods will become instance methods instead"},{"line_number":55,"context_line":"  of class methods they are now. These API class instances will be initialized"},{"line_number":56,"context_line":"  by a helper API class and will be provided with user information (username/"},{"line_number":57,"context_line":"  password)."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_dadaf5e7","line":55,"in_reply_to":"3afb71cf_d47bec26","updated":"2015-06-09 08:16:31.000000000","message":"@Yair, disagree, here we do not refer to concrete class, just generic explanation","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fbcd5327c3647219843f1119b3fffb28cc60377","unresolved":false,"context_lines":[{"line_number":52,"context_line":"  exceptions are raised in the API method calls."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"  Another change will be that API methods will become instance methods instead"},{"line_number":55,"context_line":"  of class methods they are now. These API class instances will be initialized"},{"line_number":56,"context_line":"  by a helper API class and will be provided with user information (username/"},{"line_number":57,"context_line":"  password)."},{"line_number":58,"context_line":""}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_7fc973ab","line":55,"in_reply_to":"3afb71cf_dadaf5e7","updated":"2015-06-10 09:54:34.000000000","message":"Yep, my language feeling says the article is not needed here.","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"17f368d5f65d6a22b7f74d8242b866f961f5fe83","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def error_code(exc):"},{"line_number":67,"context_line":"        \"\"\"Returns the HTTP code corresponding to the exception given.\"\"\""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def wrap_exceptions(f, *args, *kwargs):"},{"line_number":70,"context_line":"        result \u003d {\"data\": None, \"error\": None}"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_9bfa6abc","line":69,"updated":"2015-06-08 13:21:28.000000000","message":"This method does not only wrap exceptions, it also makes a result dict. Maybe rename this method into more accurate name, like `api_result()\u0027 ?","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fbcd5327c3647219843f1119b3fffb28cc60377","unresolved":false,"context_lines":[{"line_number":66,"context_line":"    def error_code(exc):"},{"line_number":67,"context_line":"        \"\"\"Returns the HTTP code corresponding to the exception given.\"\"\""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def wrap_exceptions(f, *args, *kwargs):"},{"line_number":70,"context_line":"        result \u003d {\"data\": None, \"error\": None}"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_9f3d4f91","line":69,"in_reply_to":"3afb71cf_9bfa6abc","updated":"2015-06-10 09:54:34.000000000","message":"Done","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"17f368d5f65d6a22b7f74d8242b866f961f5fe83","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"                if not self.is_local:"},{"line_number":103,"context_line":"                    return json.load("},{"line_number":104,"context_line":"                        request(self.url + path, *args, **kwargs))"},{"line_number":105,"context_line":"                else:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_882102b7","line":102,"updated":"2015-06-08 13:21:28.000000000","message":"More compact L102-106:\n\n if self.is_local:\n     return wrap_exceptions(f, *((self,) + args), **kwargs)\n return json.load(request(self.url + path, *args, **kwargs))","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fbcd5327c3647219843f1119b3fffb28cc60377","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"                if not self.is_local:"},{"line_number":103,"context_line":"                    return json.load("},{"line_number":104,"context_line":"                        request(self.url + path, *args, **kwargs))"},{"line_number":105,"context_line":"                else:"}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_7f5733ca","line":102,"in_reply_to":"3afb71cf_882102b7","updated":"2015-06-10 09:54:34.000000000","message":"Done","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"17f368d5f65d6a22b7f74d8242b866f961f5fe83","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    #   result \u003d api.Deployment.create(...)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def dispatch(url, path, *get, **post):"},{"line_number":120,"context_line":"        \"\"\"Request handler. Calls the corresponding method based on the request."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        Should be called on the server side when a new request arrives."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_487d4ab0","line":119,"updated":"2015-06-08 13:21:28.000000000","message":"1) What is `url\u0027? That is probably mistaken argument.\n\n2) It is not clear what is `*get, **post\u0027 - do arguments differ depending on HTTP method? How positional arguments are expected to be specified by HTTP request?\nI propose using **kwargs only\n\n3) another proposal is do not rely on HTTP method at all, since we use RPC, not REST (however role of HTTP method is a further topic to discuss, in RaaS spec/patch)\n\nSo my proposal is:\n\n def dispatch(path, **kwargs):\n     \"\"\"...\"\"\"\n     return wrap_exceptions(api.get_method_by_path(path), **kwargs)","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":8507,"name":"Mikhail Dubov","email":"mdubov@mirantis.com","username":"msdubov"},"change_message_id":"4fbcd5327c3647219843f1119b3fffb28cc60377","unresolved":false,"context_lines":[{"line_number":116,"context_line":"    #   result \u003d api.Deployment.create(...)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def dispatch(url, path, *get, **post):"},{"line_number":120,"context_line":"        \"\"\"Request handler. Calls the corresponding method based on the request."},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        Should be called on the server side when a new request arrives."}],"source_content_type":"text/x-rst","patch_set":10,"id":"3afb71cf_bf636b41","line":119,"in_reply_to":"3afb71cf_487d4ab0","updated":"2015-06-10 09:54:34.000000000","message":"1) When I was discussing this with Boris \u0027url\u0027 was meant to be the server address, but seems like it is indeed not needed here...\n\n2-3) Agree, let\u0027s make this a more abstract from concrete HTTP concepts","commit_id":"e341093f01605a557dba09779ecb454116a55760"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"19ff99051d843aaed7b12003896fead7f9db32f3","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    import request"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def error_code(exc):"},{"line_number":67,"context_line":"        \"\"\"Returns the HTTP code corresponding to the exception given.\"\"\""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def api_result(f, *args, *kwargs):"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3afb71cf_a47a0276","line":66,"updated":"2015-06-11 14:34:38.000000000","message":"I propose to remove this method - see my comment at L74","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"19ff99051d843aaed7b12003896fead7f9db32f3","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"},{"line_number":73,"context_line":"        except Exception as e:"},{"line_number":74,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":75,"context_line":"        return result"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def rpcable(path):"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3afb71cf_44ab4ed7","line":74,"updated":"2015-06-11 14:34:38.000000000","message":"If error_code() returns some integer HTTP code, so where we can store information about the Exception? If so, exception details will be lost completely. But we need this info, so I propose:\n\n1) Do not care about HTTP code at all (that is RaaS problem)\n\n2) Save complete data about the exception, exactly here, in api_result() method\n\n3) Get rid of error_code()\n\n4) Add optional parameter result[\"error\"][\"api_message\"], which can be set in api_result() do give generic explanation what has gone wrong\n\nSo that is expected to look something like that:\n\n    def api_result(f, *args, *kwargs):\n        result \u003d {\"data\": None, \"error\": None}\n        try:\n            result[\"data\"] \u003d f(*args, **kwargs)\n        except Exception as e:\n            result[\"error\"] \u003d {\"type\": e.__class__.__name__,\n                               \"message\": str(e)}\n            for prop in (\"errno\", \"filename\", \"filename2\", \"strerror\"):\n                value \u003d getattr(e, prop)\n                if value:\n                    result[\"error\"][prop] \u003d value\n\n            if not f: # None in case when method is not found - see my comment at L148\n                result[\"error\"][\"api_message\"] \u003d _(\"Method not found\")\n                \n        return result","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"53d775e80a2e58bac682b45a3dd10cb39b8cd52d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"},{"line_number":73,"context_line":"        except Exception as e:"},{"line_number":74,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":75,"context_line":"        return result"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def rpcable(path):"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_fa6c2c0a","line":74,"in_reply_to":"3a50d1a3_a33a0acc","updated":"2015-07-20 11:45:40.000000000","message":"Why not:\n   {\"data\":...,\n     \"code\":...,\n     \"message\":....}\n@Kun, I think you suggestion redundant level of abstraction. And it will\nincease number of code when we would use this structure. The structure that\nI wrote is used inside Facebook for internal aims. And it good working for\nthem(developers). As I think we need to make architecture as much as\npossible simple!","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"d0fc3624a6020996ba744299dfe9ee54fb76775e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"},{"line_number":73,"context_line":"        except Exception as e:"},{"line_number":74,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":75,"context_line":"        return result"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def rpcable(path):"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_512abb7f","line":74,"in_reply_to":"3a50d1a3_fa6c2c0a","updated":"2015-07-21 03:30:30.000000000","message":"thanks, error code design is endless; keep simple is the first rule :)","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"384506b05d88fe6f4a712df5b4f1a7b4cc8fb43b","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"},{"line_number":73,"context_line":"        except Exception as e:"},{"line_number":74,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":75,"context_line":"        return result"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def rpcable(path):"}],"source_content_type":"text/x-rst","patch_set":12,"id":"ba3cc151_0d5764cb","line":74,"in_reply_to":"3afb71cf_44ab4ed7","updated":"2015-07-06 08:22:58.000000000","message":"That\u0027s a error code design. I prefer the result should be:\n{\"data\":...,\n \"error\":{\"code\":\"100\",\n          \"message\":\"task config file is not vaild\"}}\n\nAPI result should be readable to end users which doesn\u0027t mean the more details the better. We should just provide proper info to hint users.","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"dc70d5344952aca5cc3e43c57e333e18150fe58e","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            result[\"data\"] \u003d f(*args, **kwargs)"},{"line_number":73,"context_line":"        except Exception as e:"},{"line_number":74,"context_line":"            result[\"error\"] \u003d error_code(e)"},{"line_number":75,"context_line":"        return result"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def rpcable(path):"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_a33a0acc","line":74,"in_reply_to":"ba3cc151_0d5764cb","updated":"2015-07-20 08:20:48.000000000","message":"@Kun, agreed","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"2b6ae4e20767a0122f5cb760915f5476fb3d9a78","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        return result"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def rpcable(path):"},{"line_number":78,"context_line":"        \"\"\"Decorator that maps a method to its RPC path."},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"        When called on the client side in RaaS mode, the wrapped method will be"},{"line_number":81,"context_line":"        transformed to an RPC call. When called locally on the client or on the"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_c6939af9","line":78,"updated":"2015-07-20 16:19:19.000000000","message":"I think need to specify somewhere in docs what is RPC method.","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"19ff99051d843aaed7b12003896fead7f9db32f3","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        def get_method_by_path(self, path):"},{"line_number":147,"context_line":"            \"\"\"Returns the corresponding method based on the RPC path.\"\"\""},{"line_number":148,"context_line":"            return self.api_map[path]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    class _BaseAPI(object)"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3afb71cf_a7ae847f","line":148,"updated":"2015-06-11 14:34:38.000000000","message":"return self.api_map.get(path)  # `None\u0027 means method is not found","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"c03ecc3654fca611d539ef9c9a73a38ffa8d0379","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        def get_method_by_path(self, path):"},{"line_number":147,"context_line":"            \"\"\"Returns the corresponding method based on the RPC path.\"\"\""},{"line_number":148,"context_line":"            return self.api_map[path]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    class _BaseAPI(object)"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_6ceb2014","line":148,"in_reply_to":"3a50d1a3_dadd8d43","updated":"2015-07-22 03:53:44.000000000","message":"Done","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ea834334405389675203d5198ff2ea92e12e900e","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        def get_method_by_path(self, path):"},{"line_number":147,"context_line":"            \"\"\"Returns the corresponding method based on the RPC path.\"\"\""},{"line_number":148,"context_line":"            return self.api_map[path]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    class _BaseAPI(object)"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_dadd8d43","line":148,"in_reply_to":"3afb71cf_a7ae847f","updated":"2015-07-21 11:15:01.000000000","message":"And raise some error in cause of None.","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"d0fc3624a6020996ba744299dfe9ee54fb76775e","unresolved":false,"context_lines":[{"line_number":145,"context_line":""},{"line_number":146,"context_line":"        def get_method_by_path(self, path):"},{"line_number":147,"context_line":"            \"\"\"Returns the corresponding method based on the RPC path.\"\"\""},{"line_number":148,"context_line":"            return self.api_map[path]"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    class _BaseAPI(object)"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_f120a79d","line":148,"in_reply_to":"3afb71cf_a7ae847f","updated":"2015-07-21 03:30:30.000000000","message":"got it","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ea834334405389675203d5198ff2ea92e12e900e","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        # The only option"},{"line_number":219,"context_line":"        task_cfg \u003d {...}"},{"line_number":220,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":221,"context_line":"        api.Task.start(task[\"uuid\"], task_cfg)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":224,"context_line":"    already used in CLI like in *Option 1*, because in the current"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_e1d447be","line":221,"updated":"2015-07-21 11:15:01.000000000","message":"Agreed, but why we would use this function except of create once a task object that might be used by default?","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"c03ecc3654fca611d539ef9c9a73a38ffa8d0379","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        # The only option"},{"line_number":219,"context_line":"        task_cfg \u003d {...}"},{"line_number":220,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":221,"context_line":"        api.Task.start(task[\"uuid\"], task_cfg)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"},{"line_number":224,"context_line":"    already used in CLI like in *Option 1*, because in the current"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_0cf93cc7","line":221,"in_reply_to":"3a50d1a3_e1d447be","updated":"2015-07-22 03:53:44.000000000","message":"oops, I didn\u0027t get its meaning","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ea834334405389675203d5198ff2ea92e12e900e","unresolved":false,"context_lines":[{"line_number":292,"context_line":"    reason as *Task.create*."},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"  - *Deployment.use* / *Deployment.config* / *Deployment.check* /"},{"line_number":295,"context_line":"    *Deployment.show* / *Deployment.list*"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    Same here: new useful methods that not only will enhance the API, but"},{"line_number":298,"context_line":"    also will make it possible to remove DB/object calls from the CLI"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_6154b720","line":295,"updated":"2015-07-21 11:15:01.000000000","message":"What about Deployment.destroy? I think its needed method.","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"c03ecc3654fca611d539ef9c9a73a38ffa8d0379","unresolved":false,"context_lines":[{"line_number":292,"context_line":"    reason as *Task.create*."},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"  - *Deployment.use* / *Deployment.config* / *Deployment.check* /"},{"line_number":295,"context_line":"    *Deployment.show* / *Deployment.list*"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    Same here: new useful methods that not only will enhance the API, but"},{"line_number":298,"context_line":"    also will make it possible to remove DB/object calls from the CLI"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_ecdf3067","line":295,"in_reply_to":"3a50d1a3_6154b720","updated":"2015-07-22 03:53:44.000000000","message":"Done","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ea834334405389675203d5198ff2ea92e12e900e","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    Same here: new useful methods that not only will enhance the API, but"},{"line_number":298,"context_line":"    also will make it possible to remove DB/object calls from the CLI"},{"line_number":299,"context_line":"    implementation."},{"line_number":300,"context_line":""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"3. Rewrite the CLI implementation."}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_5c8f20cc","line":299,"updated":"2015-07-21 11:15:01.000000000","message":"I think its also useful to have some api methods for plugins, runners, validators etc. For example Plugin.add, Plugin.delete, Plugin.list etc","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"c03ecc3654fca611d539ef9c9a73a38ffa8d0379","unresolved":false,"context_lines":[{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    Same here: new useful methods that not only will enhance the API, but"},{"line_number":298,"context_line":"    also will make it possible to remove DB/object calls from the CLI"},{"line_number":299,"context_line":"    implementation."},{"line_number":300,"context_line":""},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"3. Rewrite the CLI implementation."}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_4c5bc4f6","line":299,"in_reply_to":"3a50d1a3_5c8f20cc","updated":"2015-07-22 03:53:44.000000000","message":"really? I don\u0027t think those are basic API operations.","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ea834334405389675203d5198ff2ea92e12e900e","unresolved":false,"context_lines":[{"line_number":305,"context_line":"  allow these methods to get simpler after this change and have no DB calls /"},{"line_number":306,"context_line":"  objects usage at all."},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"  Also add a hacking rule to catch any DB calls / objects usage in CLI."},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_5c9ba072","line":308,"updated":"2015-07-21 11:15:01.000000000","message":"Also functional tests could use API. Only one problem should be solved. Every running of functional tests will write results to the DB. This need to be solved. It could be solved by using some fake deployment that not  written to the DB.","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"c03ecc3654fca611d539ef9c9a73a38ffa8d0379","unresolved":false,"context_lines":[{"line_number":305,"context_line":"  allow these methods to get simpler after this change and have no DB calls /"},{"line_number":306,"context_line":"  objects usage at all."},{"line_number":307,"context_line":""},{"line_number":308,"context_line":"  Also add a hacking rule to catch any DB calls / objects usage in CLI."},{"line_number":309,"context_line":""},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"Alternatives"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_8cc1cc56","line":308,"in_reply_to":"3a50d1a3_5c9ba072","updated":"2015-07-22 03:53:44.000000000","message":"Done","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"ea834334405389675203d5198ff2ea92e12e900e","unresolved":false,"context_lines":[{"line_number":320,"context_line":"Assignee(s)"},{"line_number":321,"context_line":"-----------"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"- msdubov aka Mikhail Dubov \u003cmdubov@mirantis.com\u003e"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"- boris-42 aka Boris Pavlovic \u003cboris@pavlovic.me\u003e"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_7c21bc4c","line":323,"updated":"2015-07-21 11:15:01.000000000","message":"Do we need to stay Mikhail here?","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"c03ecc3654fca611d539ef9c9a73a38ffa8d0379","unresolved":false,"context_lines":[{"line_number":320,"context_line":"Assignee(s)"},{"line_number":321,"context_line":"-----------"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"- msdubov aka Mikhail Dubov \u003cmdubov@mirantis.com\u003e"},{"line_number":324,"context_line":""},{"line_number":325,"context_line":"- boris-42 aka Boris Pavlovic \u003cboris@pavlovic.me\u003e"},{"line_number":326,"context_line":""}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_4c5ae42b","line":323,"in_reply_to":"3a50d1a3_7c21bc4c","updated":"2015-07-22 03:53:44.000000000","message":"nope, boris said he doesn\u0027t work on rally now","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"2b6ae4e20767a0122f5cb760915f5476fb3d9a78","unresolved":false,"context_lines":[{"line_number":324,"context_line":""},{"line_number":325,"context_line":"- boris-42 aka Boris Pavlovic \u003cboris@pavlovic.me\u003e"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"- amaretskiy aka Alexander Maretskiy \u003camaretskiy@mirantis.com\u003e"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"Work Items"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_b25c7a26","line":327,"updated":"2015-07-20 16:19:19.000000000","message":"I can help with realization of this","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"d0fc3624a6020996ba744299dfe9ee54fb76775e","unresolved":false,"context_lines":[{"line_number":324,"context_line":""},{"line_number":325,"context_line":"- boris-42 aka Boris Pavlovic \u003cboris@pavlovic.me\u003e"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"- amaretskiy aka Alexander Maretskiy \u003camaretskiy@mirantis.com\u003e"},{"line_number":328,"context_line":""},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"Work Items"}],"source_content_type":"text/x-rst","patch_set":12,"id":"3a50d1a3_112433ad","line":327,"in_reply_to":"3a50d1a3_b25c7a26","updated":"2015-07-21 03:30:30.000000000","message":"got it","commit_id":"0184c4215da60d129e8c5a176c9ccc1da330d84f"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"cb2fb64d30cda7304674a51bae5ee6134c847066","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"                if self.is_local:"},{"line_number":106,"context_line":"                    return api_result(f, *((self,) + args), **kwargs)"},{"line_number":107,"context_line":"                return json.load(request(self.url + path, *args, **kwargs))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            wrapper.path \u003d path"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_5b42cd3f","line":106,"updated":"2015-07-21 09:38:04.000000000","message":"Does this mean this is Rally-as-a-Lib call too? If so, why as-a-lib call result includes HTTP code?","commit_id":"4c0065e5282a7e17bfc6cbcdb98f500e25526fbd"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"7022a7178a6f01684c34253e56d2b3d5870f90df","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"                if self.is_local:"},{"line_number":106,"context_line":"                    return api_result(f, *((self,) + args), **kwargs)"},{"line_number":107,"context_line":"                return json.load(request(self.url + path, *args, **kwargs))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            wrapper.path \u003d path"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_2f2cce97","line":106,"in_reply_to":"3a50d1a3_4915f646","updated":"2015-07-23 13:05:13.000000000","message":"Wrapping as-a-lib call and converting its result into dict looks not reasonable for me \n\nMy thoughts:\n\n* decorator `rpcable\u0027 can do only one thing - bind path to wrapped method\n\n* dispatch() can get method by path, run it, catch exception, make result dict (with data, error message and http code)\n\n* so get rid of api_result() and error_code()\n\n* so api call as-a-lib will return result as-is\n\n* so api call as-a-service will return dict with code and optional error message","commit_id":"4c0065e5282a7e17bfc6cbcdb98f500e25526fbd"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"d038c01b584a8c8bd744ac9db1470daab67fdc5a","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"                if self.is_local:"},{"line_number":106,"context_line":"                    return api_result(f, *((self,) + args), **kwargs)"},{"line_number":107,"context_line":"                return json.load(request(self.url + path, *args, **kwargs))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            wrapper.path \u003d path"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_4915f646","line":106,"in_reply_to":"3a50d1a3_5b42cd3f","updated":"2015-07-22 03:39:02.000000000","message":"what about return correct result(give user what they want) or raise errors(tell users what\u0027s wrong) , so the code should be:\n\nret \u003d api_result(f, *((self,) + args), **kwargs)\nif ret[\"code\"] \u003d \"200\":\n    return ret[\"data\"]\nelse:\n    raise sth.","commit_id":"4c0065e5282a7e17bfc6cbcdb98f500e25526fbd"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"cb2fb64d30cda7304674a51bae5ee6134c847066","unresolved":false,"context_lines":[{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        # The only option"},{"line_number":223,"context_line":"        task_cfg \u003d {...}"},{"line_number":224,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":225,"context_line":"        api.Task.start(task[\"uuid\"], task_cfg)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_7b47891d","line":224,"updated":"2015-07-21 09:38:04.000000000","message":"Using deployment UUID (instead of name) looks more common and generic","commit_id":"4c0065e5282a7e17bfc6cbcdb98f500e25526fbd"},{"author":{"_account_id":6835,"name":"Kun Huang","email":"gareth@openstacker.org","username":"academicgareth"},"change_message_id":"d038c01b584a8c8bd744ac9db1470daab67fdc5a","unresolved":false,"context_lines":[{"line_number":221,"context_line":""},{"line_number":222,"context_line":"        # The only option"},{"line_number":223,"context_line":"        task_cfg \u003d {...}"},{"line_number":224,"context_line":"        task \u003d api.Task.create(deployment.name, tag\u003d\"my_task\")"},{"line_number":225,"context_line":"        api.Task.start(task[\"uuid\"], task_cfg)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    This change also makes sense since *Task.create* and *Task.start* are"}],"source_content_type":"text/x-rst","patch_set":13,"id":"3a50d1a3_6c01e004","line":224,"in_reply_to":"3a50d1a3_7b47891d","updated":"2015-07-22 03:39:02.000000000","message":"thx, got it","commit_id":"4c0065e5282a7e17bfc6cbcdb98f500e25526fbd"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"13da7507bfd843ba4782edb89c3434b9f7e0514c","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    import request"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def error_code(exc):"},{"line_number":67,"context_line":"        \"\"\"Returns the HTTP code corresponding to the exception given.\"\"\""},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def api_result(f, *args, *kwargs):"}],"source_content_type":"text/x-rst","patch_set":14,"id":"7a740942_319fe351","line":66,"updated":"2015-12-10 22:57:15.000000000","message":"How this method should work? \n\nImo, it is redundant. Each rally exception should have error code(defaults to 500, for example)","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"13da7507bfd843ba4782edb89c3434b9f7e0514c","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            result[\"error\"] \u003d e.message"},{"line_number":77,"context_line":"        return result"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def rpcable(path):"},{"line_number":80,"context_line":"        \"\"\"Decorator that maps a method to its RPC path."},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        When called on the client side in RaaS mode, the wrapped method will be"}],"source_content_type":"text/x-rst","patch_set":14,"id":"7a740942_715d6b78","line":79,"updated":"2015-12-10 22:57:15.000000000","message":"method(get, put, delete and etc) should be included here.","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"13da7507bfd843ba4782edb89c3434b9f7e0514c","unresolved":false,"context_lines":[{"line_number":102,"context_line":""},{"line_number":103,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"                if self.is_local:"},{"line_number":106,"context_line":"                    return api_result(f, *((self,) + args), **kwargs)"},{"line_number":107,"context_line":"                return json.load(request(self.url + path, *args, **kwargs))"},{"line_number":108,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"7a740942_519f0f03","line":105,"updated":"2015-12-10 22:57:15.000000000","message":"is_local - this var is redundant, since we already have some var with api url(let\u0027s reuse it)","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"997df7c6c2ec70b00dddc1878a51597591fc8a06","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            def wrapper(self, *args, **kwargs):"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"                if self.is_local:"},{"line_number":106,"context_line":"                    return api_result(f, *((self,) + args), **kwargs)"},{"line_number":107,"context_line":"                return json.load(request(self.url + path, *args, **kwargs))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"            wrapper.path \u003d path"}],"source_content_type":"text/x-rst","patch_set":14,"id":"3a50d1a3_2f884e70","line":106,"updated":"2015-07-23 13:06:12.000000000","message":"I have left a comment regarding call as-a-lib in previous patch set","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"13da7507bfd843ba4782edb89c3434b9f7e0514c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"    #   result \u003d api.Deployment.create(...)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"    def dispatch(path, **kwargs):"},{"line_number":121,"context_line":"        \"\"\"Request handler. Calls the corresponding method based on request."},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"        Should be called on the server side when a new request arrives."}],"source_content_type":"text/x-rst","patch_set":14,"id":"7a740942_54ddbd40","line":120,"updated":"2015-12-10 22:57:15.000000000","message":"why we need this method? Imo, such stuff should be in API class.","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"13da7507bfd843ba4782edb89c3434b9f7e0514c","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    class API(object):"},{"line_number":138,"context_line":"        \"\"\"Helper API class used by the dispatcher to handle requests.\"\"\""},{"line_number":139,"context_line":""},{"line_number":140,"context_line":"        def __init__(self, url\u003dNone, user\u003dNone, password\u003dNone):"},{"line_number":141,"context_line":"            \"\"\"Construct a map from RPC paths to API methods.\"\"\""},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"            self.api_map \u003d {}"}],"source_content_type":"text/x-rst","patch_set":14,"id":"7a740942_3436f1e7","line":140,"updated":"2015-12-10 22:57:15.000000000","message":"let\u0027s drop use and password vars for now","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"997df7c6c2ec70b00dddc1878a51597591fc8a06","unresolved":false,"context_lines":[{"line_number":151,"context_line":"            \"\"\"Returns the corresponding method based on the RPC path.\"\"\""},{"line_number":152,"context_line":"            method \u003d self.api_map.get(path)"},{"line_number":153,"context_line":"            if not method:"},{"line_number":154,"context_line":"                raise ValueError(\"Request patch is not valid\")"},{"line_number":155,"context_line":"            return method"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"3a50d1a3_7d9e0f64","line":154,"updated":"2015-07-23 13:06:12.000000000","message":"s/patch/path/","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"},{"author":{"_account_id":9545,"name":"Andriy Kurilin","email":"andr.kurilin@gmail.com","username":"akurilin"},"change_message_id":"13da7507bfd843ba4782edb89c3434b9f7e0514c","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            self.user \u003d user"},{"line_number":165,"context_line":"            self.password \u003d password"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":"        def api_map(self):"},{"line_number":168,"context_line":"            \"\"\"Constructs a map from rpc paths to methods.\"\"\""},{"line_number":169,"context_line":"            api_dict \u003d {}"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-rst","patch_set":14,"id":"7a740942_94a1e5ab","line":167,"updated":"2015-12-10 22:57:15.000000000","message":"what about moving this code to L145?","commit_id":"7b1effa19991d76670602625db1d18a4c2b8c889"}]}
