)]}'
{"neutron_lib/api/definitions/_dummy.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"625d5f8578965b02a2a99cdfa910d38d24025f0f","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_409e2c55","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"updated":"2017-01-10 18:08:03.000000000","message":"What is the api-def extends multiple resources, like [1]? Is the expectation that they need to break it down into 1 resource per definition and if so couldn\u0027t that change consumers that query extensions?\n\n\n[1] https://review.openstack.org/#/c/389388/23/neutron_lib/api/definitions/firewall.py","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"98b62841937ceaafd7e3961b88a0b52354c4cab6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a57fde8_e1cf68b1","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"9a57fde8_f5b810e8","updated":"2017-01-12 13:28:00.000000000","message":"Thanks all.\nSo IIUC; extensions defining multiple [sub]resources can do so by omitting the COLLECTION_NAME/RESOURCE_NAME and using vars; like [1].\n\nI\u0027m fine with that; thanks for a decision.\n\n\n[1] https://review.openstack.org/#/c/389388/25/neutron_lib/api/definitions/firewall.py","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"8bd7d20a99eaa5f08da59493fe9d045c752e9914","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_c93a47e7","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"ba5201f7_409e2c55","updated":"2017-01-10 19:32:36.000000000","message":"There will be multiple keys in SUB_RESOURCE_ATTRIBUTE_MAP, each with its own parent-\u003ecollection_name.","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"de8f893a96628c31896df60cdb711d37f1e9157b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a57fde8_f5b810e8","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"ba5201f7_75a81a8d","updated":"2017-01-12 08:45:58.000000000","message":"@bode: thanks for the insight, I hadn\u0027t in mind such questions  as the one related to consumers querying about support for extensions.","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b9e857d19c9ee8c244e80525b365fa893e959d0b","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_0fd32c05","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"ba5201f7_75a81a8d","updated":"2017-01-11 22:42:04.000000000","message":"You guys raise good points: COLLECTION_NAME is fit for simple extension cases, but it\u0027s not quite adequate when the extension is complex (ie. the map involves multiple resources and extension attributes).\n\nThat said, the validation code is quite flexible and string literals can be used to address corner cases to define what resources are exposed by the extension. To me this dummy template is for simple cases: I\u0027ll add more comments to this template to describe the intent more clearly.\n\n[1] https://github.com/openstack/neutron-lib/blob/master/neutron_lib/tests/unit/api/definitions/base.py#L59","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"495fd5c6460de808698810b8c8ecb7f4ba352058","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_d4573ac8","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"ba5201f7_c93a47e7","updated":"2017-01-10 19:42:04.000000000","message":"Ihar: IIUC RESOURCE_NAME and COLLECTION_NAME are used to define the top level resource in RESOURCE_ATTRIBUTE_MAP. But in the case of [1] (above in my comment) we have multiple top-level resources defined in the RESOURCE_ATTRIBUTE_MAP (firewall_rules, firewall_policies, firewalls).\n\n\nSo with that in mind how does [1] define RESOURCE_NAME and COLLECTION_NAME since in this case there\u0027s more than 1 resource/collection name? You can see I took an approach of breaking them apart in [2] (below), but I\u0027m not sure what the best route is here.\n\n\nMaybe I\u0027m missing something and making unnecessary noise.\n\n\n[2] https://review.openstack.org/#/c/411974/","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d904df8ad5b8aae938da3cb08ba40d4a1a9ef900","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_f606ea1e","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"ba5201f7_d4573ac8","updated":"2017-01-11 10:21:31.000000000","message":"If I understand correctly what boden you are suggesting: replacing COLLECTION_NAME as a string by COLLECTION_NAMES as a  tuple (or list), to support the definition in one module of an  API having multiple collections.\n\nTwo things (still assuming I understood correctly):\n- I don\u0027t think it has to be done in this patch since its unrelated to sub-resources\n- making collection names a tuple/list would not be sufficient, as resource name would also need to be a list, and the mapping between a collection name and a resource name be defined  / it seems like breaking the API definition in multiple files is simpler","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"96ce0f348b91e6552604a0e4066eb13106259f4c","unresolved":false,"context_lines":[{"line_number":52,"context_line":"# The plural for the resource introduced or being extended"},{"line_number":53,"context_line":"# (in case it is defined by another extension, or it is a"},{"line_number":54,"context_line":"# core resource)."},{"line_number":55,"context_line":"COLLECTION_NAME \u003d \u0027fooes\u0027"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"# The resource attribute map for the extension. It is effectively the"},{"line_number":58,"context_line":"# bulk of the API contract alongside ACTION_MAP"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_75a81a8d","line":55,"range":{"start_line":55,"start_character":0,"end_line":55,"end_character":15},"in_reply_to":"ba5201f7_f606ea1e","updated":"2017-01-11 16:21:37.000000000","message":"Thomas:\n\nI\u0027m fine with breaking these api-defs apart (ex [1]), my main concern is that if we have consumers querying and relying on ([non]existence of) certain extensions; that behavior may change (i.e. used to query for extension X, but X was broken into X and Y so consumer now needs to query for X and Y rather than just X).\n\n\nAnd while I agree this can be handled in a separate change I\u0027d personally like to understand the approach before going much further with this \"base plumbing\". My main motivations are:\n- We have a number of api-def patches in review that are waiting on such a decision.\n- Hypothetically a subresource attr map could define multiple subresources that depend on different parent resources in the RESOURCE_ATTRIBUTE_MAP, so IMHO its worth understanding how we plan to handle before landing this subresource patch.\n\n\n\n[1] https://review.openstack.org/#/c/411974/","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"efa6f124842fbe02cd2e9fc787a1ca2d2b098a87","unresolved":false,"context_lines":[{"line_number":39,"context_line":"NAME \u003d \u0027Foo Extension\u0027"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"# A prefix for API resources. An empty prefix means that the API is going"},{"line_number":42,"context_line":"# to be exposed at the v2/ level as any other core resource (mandatory)."},{"line_number":43,"context_line":"API_PREFIX \u003d \u0027\u0027"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# The description of the extension (mandatory)."}],"source_content_type":"text/x-python","patch_set":4,"id":"9a57fde8_cf0b7d7c","line":42,"range":{"start_line":42,"start_character":61,"end_line":42,"end_character":70},"updated":"2017-01-12 07:40:18.000000000","message":"what\u0027s the suggested value for extensions which doesn\u0027t introduce any new resources?","commit_id":"90809fd29979a85e4de302e693d1efdcf05bb6e8"}],"neutron_lib/tests/unit/api/definitions/base.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"7568324576556c6b4cde08a3623bfecbb40ceff1","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                              \u0027Keyword is unknown, check for typos.\u0027)"},{"line_number":118,"context_line":"                value \u003d resource[attribute][keyword]"},{"line_number":119,"context_line":"                assert_f \u003d ASSERT_FUNCTIONS[keyword]"},{"line_number":120,"context_line":"                assert_f(self, attribute,"},{"line_number":121,"context_line":"                         resource[attribute],"},{"line_number":122,"context_line":"                         keyword, value)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_016ee3c8","line":120,"updated":"2017-01-10 20:30:37.000000000","message":"Some extensions define the default as neutron_lib.constants.ATTR_NOT_SPECIFIED in which case I don\u0027t think it\u0027s valid to run them through the converter. I ran into issues and proposed a change in: https://review.openstack.org/#/c/418560/1/neutron_lib/tests/unit/api/definitions/base.py","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"6cf2bb8bcc5d77bba0a120148c5f419652873586","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                              \u0027Keyword is unknown, check for typos.\u0027)"},{"line_number":118,"context_line":"                value \u003d resource[attribute][keyword]"},{"line_number":119,"context_line":"                assert_f \u003d ASSERT_FUNCTIONS[keyword]"},{"line_number":120,"context_line":"                assert_f(self, attribute,"},{"line_number":121,"context_line":"                         resource[attribute],"},{"line_number":122,"context_line":"                         keyword, value)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_4f9d3465","line":120,"in_reply_to":"ba5201f7_016ee3c8","updated":"2017-01-11 22:33:26.000000000","message":"Ok, I\u0027ll comment on that one.","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":12021,"name":"Thomas Morin","email":"tmmorin.orange@gmail.com","username":"tmorin"},"change_message_id":"d904df8ad5b8aae938da3cb08ba40d4a1a9ef900","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                              \u0027Keyword is unknown, check for typos.\u0027)"},{"line_number":118,"context_line":"                value \u003d resource[attribute][keyword]"},{"line_number":119,"context_line":"                assert_f \u003d ASSERT_FUNCTIONS[keyword]"},{"line_number":120,"context_line":"                assert_f(self, attribute,"},{"line_number":121,"context_line":"                         resource[attribute],"},{"line_number":122,"context_line":"                         keyword, value)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_b9f9b5ca","line":120,"in_reply_to":"ba5201f7_016ee3c8","updated":"2017-01-11 10:21:31.000000000","message":"This patch does not seem to extend what is ran through the converter (does it?), so it seems that this issue should be covered separately.","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"96ce0f348b91e6552604a0e4066eb13106259f4c","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                              \u0027Keyword is unknown, check for typos.\u0027)"},{"line_number":118,"context_line":"                value \u003d resource[attribute][keyword]"},{"line_number":119,"context_line":"                assert_f \u003d ASSERT_FUNCTIONS[keyword]"},{"line_number":120,"context_line":"                assert_f(self, attribute,"},{"line_number":121,"context_line":"                         resource[attribute],"},{"line_number":122,"context_line":"                         keyword, value)"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ba5201f7_da94958c","line":120,"in_reply_to":"ba5201f7_b9f9b5ca","updated":"2017-01-11 16:21:37.000000000","message":"That\u0027s fine, was just an FYI.","commit_id":"d2b68a3ee3c7c5be5be747c4dba036dd9d5cb7c0"}]}
