)]}'
{"tools/www-generator.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"703ba542ad10189c0546902ac981576bcd98931a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            else:"},{"line_number":100,"context_line":"                output \u003d template.render(REVERSE\u003dservice_types.reverse)"},{"line_number":101,"context_line":"        except Exception as e:"},{"line_number":102,"context_line":"            logger.error(\"rendering template %s failed: %s\" %"},{"line_number":103,"context_line":"                         (templateFile, e))"},{"line_number":104,"context_line":"            continue"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_9fe52bab","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":43},"updated":"2017-10-22 18:03:38.000000000","message":"Yeah, so this is weird - don\u0027t we want this to fail?","commit_id":"7d9497a373f1ddba0c78a77435f05ebcf47ee926"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"f7a17b220b66d6f392331a67defc8e831ede553a","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            else:"},{"line_number":100,"context_line":"                output \u003d template.render(REVERSE\u003dservice_types.reverse)"},{"line_number":101,"context_line":"        except Exception as e:"},{"line_number":102,"context_line":"            logger.error(\"rendering template %s failed: %s\" %"},{"line_number":103,"context_line":"                         (templateFile, e))"},{"line_number":104,"context_line":"            continue"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_ea745f6a","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":43},"in_reply_to":"3f4b6375_2aa6f711","updated":"2017-10-22 18:51:57.000000000","message":"Howzat:\n\nhttps://review.openstack.org/514085\nhttps://review.openstack.org/514086","commit_id":"7d9497a373f1ddba0c78a77435f05ebcf47ee926"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"93766d5bfe5bcc0f316cbf34d3714e3325343fdf","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            else:"},{"line_number":100,"context_line":"                output \u003d template.render(REVERSE\u003dservice_types.reverse)"},{"line_number":101,"context_line":"        except Exception as e:"},{"line_number":102,"context_line":"            logger.error(\"rendering template %s failed: %s\" %"},{"line_number":103,"context_line":"                         (templateFile, e))"},{"line_number":104,"context_line":"            continue"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3f4b6375_2aa6f711","line":103,"range":{"start_line":102,"start_character":0,"end_line":103,"end_character":43},"in_reply_to":"3f4b6375_9fe52bab","updated":"2017-10-22 18:09:53.000000000","message":"yeah, we should - care to send a patch for both openstack-manuals and api-site? We have the tool - with slightly different content in both","commit_id":"7d9497a373f1ddba0c78a77435f05ebcf47ee926"}],"www/.htaccess":[{"author":{"_account_id":964,"name":"Anne Gentle","email":"annegentle@justwriteclick.com","username":"annegentle"},"change_message_id":"4f362b177a31520fbf0fd89eb1d0f2c99df10e87","unresolved":false,"context_lines":[{"line_number":47,"context_line":"# Redirect Telemetry (ceilometer only) API"},{"line_number":48,"context_line":"redirect 301 /api-ref-telemetry-v2.html http://docs.openstack.org/developer/ceilometer/webapi/v2.html"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"7f287b81_7ded80b5","line":50,"updated":"2017-08-29 21:38:11.000000000","message":"alises \u003e aliases","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"58b09fc59f5ba7fdb2690aff3bcc8d523f42823b","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"9f436f4f_8a0cfa3b","line":52,"range":{"start_line":52,"start_character":53,"end_line":52,"end_character":71},"updated":"2017-08-18 14:55:53.000000000","message":"Either the api_reference links for several services in sta are wrong, or this doesn\u0027t always work.\n\nI would have thought we should be using the api_reference field for this purpose anyway.  Since it\u0027s a required field in the schema, we can count on it being there.  If it\u0027s wrong, that\u0027s a bug on STA.\n\nFor that matter, we should also be including a redirect from /api-ref/{{ service_type }} to that service\u0027s api_reference, if it\u0027s not already that.","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5febe3a44eeacb7f0c999c464fe796890b3e3614","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"7f287b81_918e4525","line":52,"range":{"start_line":52,"start_character":53,"end_line":52,"end_character":71},"in_reply_to":"7f287b81_2983ab06","updated":"2017-09-05 15:01:35.000000000","message":"Anne, yes, I\u0027m saying this patch should change; but I\u0027m not familiar with the syntax being used here, so I\u0027m probably not the person to propose it.\n\nAssuming L100 of www-generator.py is altered to render with SERVICES\u003dservice_types.services, the logic here needs to do something like:\n\n for service in SERVICES:\n     real_api_ref \u003d urlparse(service[\u0027api_reference\u0027]).path.rtrim(\u0027/\u0027)\n     # Redirect URLs based on service type and any aliases...\n     for key in [service[\u0027service_type\u0027]] + service.get(\u0027aliases\u0027, []):\n         api_ref_from_key \u003d \u0027/api-ref/\u0027 + key\n         # ...but only if that\u0027s not going to be x \u003d\u003e x\n         if api_ref_from_key !\u003d real_api_ref:\n             redirectmatch 301 {{ api_ref_from_key }}/(.*) {{ real_api_ref }}/$1","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"},{"author":{"_account_id":6547,"name":"Andreas Jaeger","email":"jaegerandi@gmail.com","username":"jaegerandi"},"change_message_id":"4757b64e484befa0572c9ab6cee287486db0325b","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"3f4b6375_a4e7be40","line":52,"range":{"start_line":52,"start_character":53,"end_line":52,"end_character":71},"in_reply_to":"7f287b81_918e4525","updated":"2017-10-22 14:24:19.000000000","message":"I looked at this discussion and the current generated redirects with this template. The change above is fine and does what it should: Redirect old aliases to new locations.\n\nYes, we could improve on this - but I\u0027m not sure how to do the above in a Jinja template.","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"},{"author":{"_account_id":964,"name":"Anne Gentle","email":"annegentle@justwriteclick.com","username":"annegentle"},"change_message_id":"d6af09ce0735fd246d46362a441300643eee1ff7","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"7f287b81_2983ab06","line":52,"range":{"start_line":52,"start_character":53,"end_line":52,"end_character":71},"in_reply_to":"7f287b81_a0e5fb39","updated":"2017-09-05 13:26:15.000000000","message":"I think you\u0027re saying Eric that this patch should change? I\u0027ve merged 495887. I\u0027m not sure how this patch should change, though, so I leave it to you to patch this as you see fit.","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"5f91df217a13511d10a4c4d9c7670874c6dadabf","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"7f287b81_a0e5fb39","line":52,"range":{"start_line":52,"start_character":53,"end_line":52,"end_character":71},"in_reply_to":"7f287b81_bd25280b","updated":"2017-08-29 21:57:08.000000000","message":"Hi Anne.  If you take a look at this change [1], all the remaining `api_reference` lines in service-types.yaml are examples of non-conforming URLs which would 404 with this redirect.  And the ones I\u0027ve deleted are the ones that *do* conform.  I think it\u0027s something like 12 of the former and 27 of the latter.\n\nOnce that change has merged, we should be able to do as I suggest above: that is, use the `api_reference` field in the service type object for a given alias/service_type as the target of all the redirects for that service.\n\n[1] https://review.openstack.org/#/c/495887/","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"},{"author":{"_account_id":964,"name":"Anne Gentle","email":"annegentle@justwriteclick.com","username":"annegentle"},"change_message_id":"4f362b177a31520fbf0fd89eb1d0f2c99df10e87","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":"# Redirect service-type alises to service-type api-ref locations"},{"line_number":51,"context_line":"{% for alias, service_type in REVERSE.items() -%}"},{"line_number":52,"context_line":"redirectmatch 301 /api-ref/{{ alias }}/(.*) /api-ref/{{ service_type }}/$1"},{"line_number":53,"context_line":"{% endfor %}"}],"source_content_type":"application/octet-stream","patch_set":1,"id":"7f287b81_bd25280b","line":52,"range":{"start_line":52,"start_character":53,"end_line":52,"end_character":71},"in_reply_to":"9f436f4f_8a0cfa3b","updated":"2017-08-29 21:38:11.000000000","message":"Do you have some examples Eric? I think it\u0027s possible only 8-10 services publish this way and there is a lot of catchup to do.","commit_id":"5f5a2885f6e8ffa953cf7308d5ba8f79260da904"}]}
