)]}'
{"keystonemiddleware/auth_token/__init__.py":[{"author":{"_account_id":9276,"name":"David Charles Kennedy","email":"david.c.kennedy@hpe.com","username":"darfed"},"change_message_id":"7305976200e3734866306021d08e25155d5e4486","unresolved":false,"context_lines":[{"line_number":817,"context_line":""},{"line_number":818,"context_line":"        if self._include_service_catalog and auth_ref.has_service_catalog():"},{"line_number":819,"context_line":"            catalog \u003d auth_ref.service_catalog.get_data()"},{"line_number":820,"context_line":"            if auth_ref.version \u003d\u003d \u0027v3\u0027:"},{"line_number":821,"context_line":"                catalog \u003d _v3_to_v2_catalog(catalog)"},{"line_number":822,"context_line":"            rval[\u0027X-Service-Catalog\u0027] \u003d jsonutils.dumps(catalog)"},{"line_number":823,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dac4157f_4991bb98","line":820,"updated":"2015-04-21 15:47:59.000000000","message":"Just an enquiry really into preferred style.  The aim here is to include a v2 style catalogue in the headers.  A literal has been introduced here to establish whether the auth_ref we have is v3 or v2.  It\u0027s something that I\u0027ve noticed about the code - that \u0027v2.0\u0027 and \u0027v3\u0027 literals grow like daffodils.  Could the method _v3_to_v2_catalog have been implemented to do this check inline - as it already knows what structure v2 requires and what structure v3 presents without introducing a literal - the test could have been done there - the method effectively becoming idempotent.    The method could have been named _prepare_v2_catalog or something and return either the v2 catalog unchanged or create a v2 catalog from a v3 catalog passed in.","commit_id":"e8edf12a3e74c0aabe39e93c91240387fb1d5512"}]}
