)]}'
{"nova/api/openstack/compute/routes.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6eae75e079119396f760b45c83503c406938d447","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        super(APIRouterV21, self).__init__()"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        for path, methods in ROUTE_LIST:"},{"line_number":883,"context_line":"            # NOTE(alex_xu): The methods for the path are stored in a dict. But"},{"line_number":884,"context_line":"            # if the methods is a string, it means a direction."},{"line_number":885,"context_line":"            if isinstance(methods, str):"},{"line_number":886,"context_line":"                self.map.redirect(path, methods)"},{"line_number":887,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_b75aee7f","line":884,"range":{"start_line":883,"start_character":12,"end_line":884,"end_character":63},"updated":"2017-07-19 03:01:14.000000000","message":"Could you give an example here for context?","commit_id":"e169bd388bbc1c7942931704ebc54a44ecc1f3af"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3da32a7ea12d7fa00cdddb98ca6061ce0682a0ac","unresolved":false,"context_lines":[{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        for path, methods in ROUTE_LIST:"},{"line_number":883,"context_line":"            # NOTE(alex_xu): The methods for the path are stored in a dict. But"},{"line_number":884,"context_line":"            # if the methods is a string, it means a direction."},{"line_number":885,"context_line":"            if isinstance(methods, str):"},{"line_number":886,"context_line":"                self.map.redirect(path, methods)"},{"line_number":887,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_eb7bda88","line":884,"range":{"start_line":884,"start_character":53,"end_line":884,"end_character":62},"updated":"2017-07-19 08:55:23.000000000","message":"redirection","commit_id":"e169bd388bbc1c7942931704ebc54a44ecc1f3af"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"3da32a7ea12d7fa00cdddb98ca6061ce0682a0ac","unresolved":false,"context_lines":[{"line_number":880,"context_line":"        super(APIRouterV21, self).__init__()"},{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        for path, methods in ROUTE_LIST:"},{"line_number":883,"context_line":"            # NOTE(alex_xu): The methods for the path are stored in a dict. But"},{"line_number":884,"context_line":"            # if the methods is a string, it means a direction."},{"line_number":885,"context_line":"            if isinstance(methods, str):"},{"line_number":886,"context_line":"                self.map.redirect(path, methods)"},{"line_number":887,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_6b67caea","line":884,"range":{"start_line":883,"start_character":12,"end_line":884,"end_character":63},"in_reply_to":"1f1a1f67_b75aee7f","updated":"2017-07-19 08:55:23.000000000","message":"I assume he\u0027s referring to the above:\n\n  # NOTE: This is a redirection from \u0027\u0027 to \u0027/\u0027.\n  (\u0027\u0027, \u0027/\u0027),","commit_id":"e169bd388bbc1c7942931704ebc54a44ecc1f3af"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"887cbc8510de3035e807fef65f777353148e3989","unresolved":false,"context_lines":[{"line_number":881,"context_line":""},{"line_number":882,"context_line":"        for path, methods in ROUTE_LIST:"},{"line_number":883,"context_line":"            # NOTE(alex_xu): The methods for the path are stored in a dict. But"},{"line_number":884,"context_line":"            # if the methods is a string, it means a direction."},{"line_number":885,"context_line":"            if isinstance(methods, str):"},{"line_number":886,"context_line":"                self.map.redirect(path, methods)"},{"line_number":887,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":1,"id":"1f1a1f67_8ba586a4","line":884,"range":{"start_line":884,"start_character":53,"end_line":884,"end_character":62},"in_reply_to":"1f1a1f67_eb7bda88","updated":"2017-07-19 09:05:38.000000000","message":"Yea, it is reference to \"(\u0027\u0027, \u0027/\u0027)\" at line 409.\n\nSince the versions extension added a direction.\nhttps://github.com/openstack/nova/blob/master/nova/api/openstack/compute/versionsV21.py#L59\n\nWhen the user requests to \u0027/v2.1/\u0027, the user will get the v2.1 API versio info. But when the user requests to \u0027/v2.1\u0027 without the ending \u0027/\u0027, the user will got a 302.\n\nThis is for that.\n\nI will add more words.","commit_id":"e169bd388bbc1c7942931704ebc54a44ecc1f3af"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d04e158de25ea1099ac2d6878ab1c688a3308d85","unresolved":false,"context_lines":[{"line_number":882,"context_line":"        super(APIRouterV21, self).__init__()"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        for path, methods in ROUTE_LIST:"},{"line_number":885,"context_line":"            # NOTE(alex_xu): The variable \u0027methods\u0027 is a dict in normal, since"},{"line_number":886,"context_line":"            # the dict includes all the methods supported in the path. But"},{"line_number":887,"context_line":"            # if the variable \u0027method\u0027 is a string, it means a redirection."},{"line_number":888,"context_line":"            # For example, the request to the \u0027\u0027 will be redirect to the \u0027/\u0027 in"},{"line_number":889,"context_line":"            # the Nova API. To indicate that, using the target path instead of"},{"line_number":890,"context_line":"            # a dict. The route entry just writes as \"(\u0027\u0027, \u0027/)\"."},{"line_number":891,"context_line":"            if isinstance(methods, str):"},{"line_number":892,"context_line":"                self.map.redirect(path, methods)"},{"line_number":893,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_879d6d0b","line":890,"range":{"start_line":885,"start_character":12,"end_line":890,"end_character":64},"updated":"2017-07-19 15:38:25.000000000","message":"\u003e When the user requests to \u0027/v2.1/\u0027, the user will get the v2.1 API versio info. But when the user requests to \u0027/v2.1\u0027 without the ending \u0027/\u0027, the user will got a 302.\n\nDo we have tests for these scenarios already?","commit_id":"d2050303439e439932d067a676e0ea117255bbdb"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"136cb7aab039988770c9a92413f9229f8ef1fb84","unresolved":false,"context_lines":[{"line_number":882,"context_line":"        super(APIRouterV21, self).__init__()"},{"line_number":883,"context_line":""},{"line_number":884,"context_line":"        for path, methods in ROUTE_LIST:"},{"line_number":885,"context_line":"            # NOTE(alex_xu): The variable \u0027methods\u0027 is a dict in normal, since"},{"line_number":886,"context_line":"            # the dict includes all the methods supported in the path. But"},{"line_number":887,"context_line":"            # if the variable \u0027method\u0027 is a string, it means a redirection."},{"line_number":888,"context_line":"            # For example, the request to the \u0027\u0027 will be redirect to the \u0027/\u0027 in"},{"line_number":889,"context_line":"            # the Nova API. To indicate that, using the target path instead of"},{"line_number":890,"context_line":"            # a dict. The route entry just writes as \"(\u0027\u0027, \u0027/)\"."},{"line_number":891,"context_line":"            if isinstance(methods, str):"},{"line_number":892,"context_line":"                self.map.redirect(path, methods)"},{"line_number":893,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_190f7088","line":890,"range":{"start_line":885,"start_character":12,"end_line":890,"end_character":64},"in_reply_to":"1f1a1f67_879d6d0b","updated":"2017-07-20 01:27:58.000000000","message":"we have unittest for this https://github.com/openstack/nova/blob/master/nova/tests/unit/api/openstack/compute/test_versions.py#L144","commit_id":"d2050303439e439932d067a676e0ea117255bbdb"}]}
