)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":42,"context_line":""},{"line_number":43,"context_line":"    Launch rally/aas/demo_server in another terminal"},{"line_number":44,"context_line":"    and try rally/aas/demo_cli with additional argument"},{"line_number":45,"context_line":"    --location http://127.0.0.1:8000"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":" 3. Local Service as a Lib"},{"line_number":48,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"1ac06dbe_9f6a4219","line":45,"updated":"2016-08-20 22:10:19.000000000","message":"http://paste.openstack.org/show/561474/","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    \u003e\u003e\u003e svc \u003d service.Service(\"http://127.0.0.1:8000\")"},{"line_number":58,"context_line":"    \u003e\u003e\u003e tasks \u003d svc.Task._list()"},{"line_number":59,"context_line":"    \u003e\u003e\u003e deployments \u003d svc.Deployment._list()"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":" 5. Using Rally API explicitly"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"   * Legacy classmethods and staticmethods"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"1ac06dbe_8e2b2deb","line":60,"updated":"2016-08-20 22:10:19.000000000","message":"http://paste.openstack.org/show/561642/","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"     \u003e\u003e\u003e from rally import api"},{"line_number":81,"context_line":"     \u003e\u003e\u003e location \u003d \"http://127.0.0.1:8000\""},{"line_number":82,"context_line":"     \u003e\u003e\u003e tasks \u003d api.Task(location)._list()"},{"line_number":83,"context_line":"     \u003e\u003e\u003e deployments \u003d api.Deployment(location)._list()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  6. Finally, lets make a fun and use Rally Service"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"1ac06dbe_8e120db3","line":82,"updated":"2016-08-20 22:10:19.000000000","message":"http://paste.openstack.org/show/561643/","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":83,"context_line":"     \u003e\u003e\u003e deployments \u003d api.Deployment(location)._list()"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"  6. Finally, lets make a fun and use Rally Service"},{"line_number":86,"context_line":"     as proxy to another Rally Service:"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"   run demo server (port 8000 by default):"},{"line_number":89,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"3ac371cc_c17113aa","line":86,"updated":"2016-08-20 22:10:19.000000000","message":"I don\u0027t understand this use case. When does we need it?","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"}],"rally/aas/service.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":19,"context_line":""},{"line_number":20,"context_line":"class Service(object):"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"    def dispatch(self, method, action, query_args, message_body):"},{"line_number":23,"context_line":"        status \u003d \"200 OK\""},{"line_number":24,"context_line":"        result \u003d {\"request\": {\"method\": method, \"action\": action,"},{"line_number":25,"context_line":"                              \"args\": query_args, \"body\": message_body}}"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_31cba374","line":22,"updated":"2016-08-20 22:10:19.000000000","message":"What should it return?","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        self.location \u003d location"},{"line_number":61,"context_line":"        self._api_help \u003d {}"},{"line_number":62,"context_line":"        self._api \u003d {}"},{"line_number":63,"context_line":"        for cls in api.API.__subclasses__():"},{"line_number":64,"context_line":"            cls_name \u003d cls.__name__"},{"line_number":65,"context_line":"            if hasattr(self, cls_name):"},{"line_number":66,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_9b29f19d","line":63,"updated":"2016-08-20 22:10:19.000000000","message":"oh, this variable name make review proccess harder","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"}],"rally/api.py":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":56,"context_line":"            cls._config_initialized \u003d True"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    @classmethod"},{"line_number":59,"context_line":"    def set_route(cls, action, method\u003d\"GET\"):"},{"line_number":60,"context_line":"        \"\"\"Make method routable for/from remote locations.\"\"\""},{"line_number":61,"context_line":"        def fun(f):"},{"line_number":62,"context_line":"            def x(self, **kwargs):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_7559ae8d","line":59,"updated":"2016-08-20 22:10:19.000000000","message":"What if req return an error. The format of return value should be JSON-RPC like","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                if self.location:"},{"line_number":64,"context_line":"                    req \u003d getattr(requests, method.lower())"},{"line_number":65,"context_line":"                    if method in (\"GET\", \"DELETE\"):"},{"line_number":66,"context_line":"                        data \u003d req(self.location + action, params\u003dkwargs).text"},{"line_number":67,"context_line":"                    else:  # POST, PUT"},{"line_number":68,"context_line":"                        data \u003d req(self.location + action, data\u003dkwargs).text"},{"line_number":69,"context_line":"                    return json.loads(data)[\"result\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_8bf8354b","line":66,"updated":"2016-08-20 22:10:19.000000000","message":"Is it normal that in method that as I expect акщь еру тфьу should set only route make request too?","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        return fun"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    @classmethod"},{"line_number":78,"context_line":"    def jsonify(cls, obj):"},{"line_number":79,"context_line":"        \"\"\"Make any object friendly for json.dumps().\"\"\""},{"line_number":80,"context_line":"        if type(obj) in (list, tuple):"},{"line_number":81,"context_line":"            return [cls.jsonify(i) for i in obj]"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_d2a9df91","line":78,"updated":"2016-08-20 22:10:19.000000000","message":"Where will this be used? We have https://github.com/openstack/rally/blob/master/rally/common/db/api.py#L63 to transform objects into serializable coming from db. I suggest to modify serializable to be able to reuse it","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":90,"context_line":"        return obj"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"class Base(API):"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    @API.set_route(\"/version\")"},{"line_number":96,"context_line":"    def version(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"3ac371cc_38ae55e6","line":93,"updated":"2016-08-20 22:10:19.000000000","message":"Why does we need this almost empty class? We could move version() into API class","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"},{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"0fc63e1f5fe229c4593e8c6e482739b183e911ad","unresolved":false,"context_lines":[{"line_number":181,"context_line":"    #  * instancemethod"},{"line_number":182,"context_line":"    #  * uses unified argument `uuid\u0027"},{"line_number":183,"context_line":"    @API.set_route(\"/deployment\")"},{"line_number":184,"context_line":"    def _get(self, uuid):"},{"line_number":185,"context_line":"        \"\"\"Get deployment by uuid.\"\"\""},{"line_number":186,"context_line":"        return self.get(deployment\u003duuid).deployment"},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"1ac06dbe_e772bf7b","line":184,"updated":"2016-08-20 22:10:19.000000000","message":"I suggest to call them the same as classmethod:\nget() instead of _get(). This will make each api function name one character shorter","commit_id":"d94c17731b08efd13fdc9cbe70024b103057aff2"}]}
