)]}'
{"doc/source/contributor/api_attributes.rst":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"7888d2128866a9d4819d7a5e318744ac4623a0cf","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":".. code-block:: python"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":101,"context_line":"            \u0027parameters\u0027: {"},{"line_number":102,"context_line":"                \u0027existing_subresource_to_extend\u0027: {"},{"line_number":103,"context_line":"                    \u0027new_attr1\u0027: {"}],"source_content_type":"text/x-rst","patch_set":2,"id":"ff82abbf_96484a87","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":30},"updated":"2017-11-28 00:11:33.000000000","message":"Why is RESOURCE_ATTRIBUTE_MAP? Original fix[1] means SUB_RESOURCE_ATTRIBUTE_MAP, right?\n\n[1]: https://review.openstack.org/#/c/511280/","commit_id":"7b45b05da8ab2b24d3e00b7e517593f27b3ac5f5"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"04d3b32ab7733f44da0ac2529a14a550ae61e6ff","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":".. code-block:: python"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":101,"context_line":"            \u0027parameters\u0027: {"},{"line_number":102,"context_line":"                \u0027existing_subresource_to_extend\u0027: {"},{"line_number":103,"context_line":"                    \u0027new_attr1\u0027: {"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df87a7cf_b37e86ac","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":30},"in_reply_to":"df87a7cf_070eac31","updated":"2018-04-03 19:46:32.000000000","message":"I agree with boden\u0027s opinion.","commit_id":"7b45b05da8ab2b24d3e00b7e517593f27b3ac5f5"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"164b638754a25977aa36109d257c1afb9dbac220","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":".. code-block:: python"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":101,"context_line":"            \u0027parameters\u0027: {"},{"line_number":102,"context_line":"                \u0027existing_subresource_to_extend\u0027: {"},{"line_number":103,"context_line":"                    \u0027new_attr1\u0027: {"}],"source_content_type":"text/x-rst","patch_set":2,"id":"df87a7cf_070eac31","line":100,"range":{"start_line":100,"start_character":8,"end_line":100,"end_character":30},"in_reply_to":"ff82abbf_96484a87","updated":"2017-12-05 14:00:51.000000000","message":"So technically we can use either here in the API def. If you look at extend_resources() in neutron.api.extensions it calls get_extended_resources() which will return both the RESOURCE_ATTRIBUTE_MAP and SUB_RESOURCE_ATTRIBUTE_MAP together via neutron_lib.api.extensions.APIExtensionDescriptor.get_extended_resources().\n\n\nThat said, the way these maps have been used to date (as I can see) is:\n- RESOURCE_ATTRIBUTE_MAP is used to define new top-level resources and/or add attributes to existing resources.\n- SUB_RESOURCE_ATTRIBUTE_MAP is used to define new resources that live under existing resources. To me the key difference here is that they define a new resource (not just an attr on existing resource) under existing resource.\n\n\nSo to me the RESOURCE_ATTRIBUTE_MAP makes most sense to have parameters for adding attributes to existing sub-resources; it falls under the 1st bullet above.\n\n\nObliviously this is open for discussion, so lets just decide and move forward; I think RESOURCE_ATTRIBUTE_MAP is best, but won\u0027t loose sleep either way.","commit_id":"7b45b05da8ab2b24d3e00b7e517593f27b3ac5f5"}],"neutron_lib/api/definitions/_dummy.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"7888d2128866a9d4819d7a5e318744ac4623a0cf","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":67,"context_line":"# bulk of the API contract alongside ACTION_MAP (mandatory)."},{"line_number":68,"context_line":"# Note that if an existing sub-resource is being extended, the"},{"line_number":69,"context_line":"# existing resources to extend the the new extension attributes must be"},{"line_number":70,"context_line":"# defined under the \u0027parameters\u0027 key."},{"line_number":71,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":72,"context_line":"    COLLECTION_NAME: {"},{"line_number":73,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff82abbf_f656762a","line":70,"range":{"start_line":68,"start_character":0,"end_line":70,"end_character":37},"updated":"2017-11-28 00:11:33.000000000","message":"I think that the desription shoud be on SUB_RESOURCE_ATTRIBUTE_MAP.","commit_id":"7b45b05da8ab2b24d3e00b7e517593f27b3ac5f5"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"b8a4c58a2f5539a0d395b117f396640101aab0df","unresolved":false,"context_lines":[{"line_number":66,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":67,"context_line":"# bulk of the API contract alongside ACTION_MAP (mandatory)."},{"line_number":68,"context_line":"# Note that if an existing sub-resource is being extended, the"},{"line_number":69,"context_line":"# existing resources to extend the the new extension attributes must be"},{"line_number":70,"context_line":"# defined under the \u0027parameters\u0027 key."},{"line_number":71,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":72,"context_line":"    COLLECTION_NAME: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_9904acc8","line":69,"range":{"start_line":69,"start_character":35,"end_line":69,"end_character":39},"updated":"2018-01-12 01:01:33.000000000","message":"One to many","commit_id":"9b9fdc963b933df992d80ae4e2e53d12d9baa173"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"97c318c6f79c4f6f18a0340fb9be76b202c05750","unresolved":false,"context_lines":[{"line_number":66,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":67,"context_line":"# bulk of the API contract alongside ACTION_MAP (mandatory)."},{"line_number":68,"context_line":"# Note that if an existing sub-resource is being extended, the"},{"line_number":69,"context_line":"# existing resources to extend the the new extension attributes must be"},{"line_number":70,"context_line":"# defined under the \u0027parameters\u0027 key."},{"line_number":71,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":72,"context_line":"    COLLECTION_NAME: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_bce36405","line":69,"range":{"start_line":69,"start_character":35,"end_line":69,"end_character":39},"in_reply_to":"7f96bb07_9904acc8","updated":"2018-01-12 14:12:38.000000000","message":"whoops","commit_id":"9b9fdc963b933df992d80ae4e2e53d12d9baa173"}],"neutron_lib/tests/unit/api/definitions/base.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"67471dcbf089d5d2656da6f483422ed54ace9ae2","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                self._assert_subresource(subresource)"},{"line_number":159,"context_line":"            else:"},{"line_number":160,"context_line":"                self.assertEqual("},{"line_number":161,"context_line":"                    [\u0027parameters\u0027], [p for p in sub_attrmap.keys()],"},{"line_number":162,"context_line":"                    \u0027When extending sub-resources only use the parameters \u0027"},{"line_number":163,"context_line":"                    \u0027keyword\u0027)"},{"line_number":164,"context_line":"                self.assertParams(sub_attrmap[\u0027parameters\u0027])"}],"source_content_type":"text/x-python","patch_set":6,"id":"bf659307_19e5f50a","line":161,"updated":"2018-04-05 11:51:03.000000000","message":"sorry for question but why this change comparing to PS5?","commit_id":"36bb16b941438d2802c86cc6f3ae760b484e2165"}]}
