)]}'
{"doc/source/devref/api_attributes.rst":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da4ba4ce5b499b89df073346253a8f3f2e4f0be6","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":81,"context_line":"``default``             default value of the attribute (if missing, the attribute becomes mandatory."},{"line_number":82,"context_line":"``allow_post``          the attribute can be used on POST requests."},{"line_number":83,"context_line":"``allow_put``           the attribute can be used on PUT requests."},{"line_number":84,"context_line":"``validate``            specifies rules for validating data in the attribute."},{"line_number":85,"context_line":"``convert_to``          transformation to apply to the value before it is returned"}],"source_content_type":"text/x-rst","patch_set":17,"id":"5a74a57a_ed1d8910","line":82,"range":{"start_line":82,"start_character":53,"end_line":82,"end_character":57},"updated":"2016-11-23 15:40:36.000000000","message":"Nit: use ``VERB`` for these so they stand out as \u0027code\u0027.","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ee015e79691526c1f87af0fcf5e980ebb8e82c51","unresolved":false,"context_lines":[{"line_number":79,"context_line":""},{"line_number":80,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  \u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":81,"context_line":"``default``             default value of the attribute (if missing, the attribute becomes mandatory."},{"line_number":82,"context_line":"``allow_post``          the attribute can be used on POST requests."},{"line_number":83,"context_line":"``allow_put``           the attribute can be used on PUT requests."},{"line_number":84,"context_line":"``validate``            specifies rules for validating data in the attribute."},{"line_number":85,"context_line":"``convert_to``          transformation to apply to the value before it is returned"}],"source_content_type":"text/x-rst","patch_set":17,"id":"5a74a57a_8195b0e5","line":82,"range":{"start_line":82,"start_character":53,"end_line":82,"end_character":57},"in_reply_to":"5a74a57a_ed1d8910","updated":"2016-11-23 23:08:04.000000000","message":"Done","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"}],"doc/source/devref/api_validators.rst":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fdd0ac6417ee2ae68bda5136997cc00ba223d653","unresolved":false,"context_lines":[{"line_number":72,"context_line":"          \u0027name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":73,"context_line":"                   \u0027validate\u0027: {\u0027type:string\u0027: NAME_MAX_LEN},"},{"line_number":74,"context_line":"                   \u0027default\u0027: \u0027\u0027, \u0027is_visible\u0027: True},"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Here, the networks resource has an \u0027id\u0027 attribute with a UUID validator,"},{"line_number":77,"context_line":"as seen by the \u0027validate\u0027 key containing a dictionary with a key of"},{"line_number":78,"context_line":"\u0027type:uuid\u0027."}],"source_content_type":"text/x-rst","patch_set":26,"id":"fa31d9ce_031defbc","line":75,"updated":"2017-02-13 20:41:11.000000000","message":"Just one suggestion. Maybe it would be worth to close dict here?","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a6332fd46ab4ef0c8b7d4ca6375daca34aa50b15","unresolved":false,"context_lines":[{"line_number":72,"context_line":"          \u0027name\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":73,"context_line":"                   \u0027validate\u0027: {\u0027type:string\u0027: NAME_MAX_LEN},"},{"line_number":74,"context_line":"                   \u0027default\u0027: \u0027\u0027, \u0027is_visible\u0027: True},"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"Here, the networks resource has an \u0027id\u0027 attribute with a UUID validator,"},{"line_number":77,"context_line":"as seen by the \u0027validate\u0027 key containing a dictionary with a key of"},{"line_number":78,"context_line":"\u0027type:uuid\u0027."}],"source_content_type":"text/x-rst","patch_set":26,"id":"fa31d9ce_87d37203","line":75,"in_reply_to":"fa31d9ce_031defbc","updated":"2017-02-14 17:59:59.000000000","message":"Done","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"}],"neutron_lib/api/attributes.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"e2eed3505ab4bf31bd183ae555c0e7508c357265","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        raise webob.exc.HTTPBadRequest(msg)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"class _Plurals(object):"},{"line_number":185,"context_line":"    __slots__ \u003d {}"},{"line_number":186,"context_line":"    _msg \u003d \"PLURALS is deprecated, use neutron_lib.api.utils.%s()\""},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_8fc8a076","line":184,"range":{"start_line":184,"start_character":0,"end_line":184,"end_character":23},"updated":"2016-11-07 13:29:22.000000000","message":"Doesn\u0027t this conflict with the work in: https://review.openstack.org/#/c/387612/","commit_id":"5db6a95d5441aebfb9544ea0005685a8337920f2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"e1aa7c864276e97435653e3bca1bd551f556d815","unresolved":false,"context_lines":[{"line_number":181,"context_line":"        raise webob.exc.HTTPBadRequest(msg)"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"class _Plurals(object):"},{"line_number":185,"context_line":"    __slots__ \u003d {}"},{"line_number":186,"context_line":"    _msg \u003d \"PLURALS is deprecated, use neutron_lib.api.utils.%s()\""},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_cf7453ff","line":184,"range":{"start_line":184,"start_character":0,"end_line":184,"end_character":23},"in_reply_to":"9a629dbe_8fc8a076","updated":"2016-11-07 15:16:04.000000000","message":"Note that this patch depends on that patch.\n\nThis class is a temporary shim to prevent subprojects from breaking when PLURALS is removed from core neutron. I\u0027ll add a docstring to explain what this class does.","commit_id":"5db6a95d5441aebfb9544ea0005685a8337920f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fa37bd14e8e719059615fe1986079f169586cc58","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron_lib.api import validators"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":26,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(network.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":27,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(port.RESOURCE_ATTRIBUTE_MAP)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_e1eda3f0","line":24,"updated":"2016-11-14 13:34:42.000000000","message":"nit - only need one line here","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b077d7cb61ad567211a7310e35f976c7062ac036","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from neutron_lib.api import validators"},{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":26,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(network.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":27,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(port.RESOURCE_ATTRIBUTE_MAP)"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_3317ec55","line":24,"in_reply_to":"9a629dbe_e1eda3f0","updated":"2016-11-14 14:38:37.000000000","message":"IMO it looks better to have two lines after the imports.","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fa37bd14e8e719059615fe1986079f169586cc58","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    try:"},{"line_number":52,"context_line":"        plural_name \u003d plurals.get_plural(resource)"},{"line_number":53,"context_line":"    except KeyError:"},{"line_number":54,"context_line":"        return None"},{"line_number":55,"context_line":"    else:"},{"line_number":56,"context_line":"        return RESOURCE_ATTRIBUTE_MAP.get(plural_name)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_c1c7bf62","line":54,"updated":"2016-11-14 13:34:42.000000000","message":"i personally prefer return. None is returned by default","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b077d7cb61ad567211a7310e35f976c7062ac036","unresolved":false,"context_lines":[{"line_number":51,"context_line":"    try:"},{"line_number":52,"context_line":"        plural_name \u003d plurals.get_plural(resource)"},{"line_number":53,"context_line":"    except KeyError:"},{"line_number":54,"context_line":"        return None"},{"line_number":55,"context_line":"    else:"},{"line_number":56,"context_line":"        return RESOURCE_ATTRIBUTE_MAP.get(plural_name)"},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_1303c810","line":54,"in_reply_to":"9a629dbe_c1c7bf62","updated":"2016-11-14 14:38:37.000000000","message":"Done","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fa37bd14e8e719059615fe1986079f169586cc58","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def fill_default_value(attr_info, res_dict,"},{"line_number":60,"context_line":"                       exc_cls\u003dValueError,"},{"line_number":61,"context_line":"                       check_allow_post\u003dTrue):"},{"line_number":62,"context_line":"    for attr, attr_vals in attr_info.items():"},{"line_number":63,"context_line":"        if attr_vals[\u0027allow_post\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_a191eb54","line":60,"updated":"2016-11-14 13:34:42.000000000","message":"can we use a neutron-lib exception here?","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b077d7cb61ad567211a7310e35f976c7062ac036","unresolved":false,"context_lines":[{"line_number":57,"context_line":""},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"def fill_default_value(attr_info, res_dict,"},{"line_number":60,"context_line":"                       exc_cls\u003dValueError,"},{"line_number":61,"context_line":"                       check_allow_post\u003dTrue):"},{"line_number":62,"context_line":"    for attr, attr_vals in attr_info.items():"},{"line_number":63,"context_line":"        if attr_vals[\u0027allow_post\u0027]:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_36fefa05","line":60,"in_reply_to":"9a629dbe_a191eb54","updated":"2016-11-14 14:38:37.000000000","message":"This is copied from the core code.","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fa37bd14e8e719059615fe1986079f169586cc58","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            if \u0027default\u0027 not in attr_vals and attr not in res_dict:"},{"line_number":65,"context_line":"                msg \u003d _(\"Failed to parse request. Required \""},{"line_number":66,"context_line":"                        \"attribute \u0027%s\u0027 not specified\") % attr"},{"line_number":67,"context_line":"                raise exc_cls(msg)"},{"line_number":68,"context_line":"            res_dict[attr] \u003d res_dict.get(attr,"},{"line_number":69,"context_line":"                                          attr_vals.get(\u0027default\u0027))"},{"line_number":70,"context_line":"        elif check_allow_post:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_6186f314","line":67,"updated":"2016-11-14 13:34:42.000000000","message":"this is a bit tricky - what if the exception has another format other than receiving a string as input?","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b077d7cb61ad567211a7310e35f976c7062ac036","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            if \u0027default\u0027 not in attr_vals and attr not in res_dict:"},{"line_number":65,"context_line":"                msg \u003d _(\"Failed to parse request. Required \""},{"line_number":66,"context_line":"                        \"attribute \u0027%s\u0027 not specified\") % attr"},{"line_number":67,"context_line":"                raise exc_cls(msg)"},{"line_number":68,"context_line":"            res_dict[attr] \u003d res_dict.get(attr,"},{"line_number":69,"context_line":"                                          attr_vals.get(\u0027default\u0027))"},{"line_number":70,"context_line":"        elif check_allow_post:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_960d063a","line":67,"in_reply_to":"9a629dbe_6186f314","updated":"2016-11-14 14:38:37.000000000","message":"ditto","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"fa37bd14e8e719059615fe1986079f169586cc58","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                raise exc_cls(msg)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def convert_value(attr_info, res_dict, exc_cls\u003dValueError):"},{"line_number":77,"context_line":"    for attr, attr_vals in attr_info.items():"},{"line_number":78,"context_line":"        if (attr not in res_dict or"},{"line_number":79,"context_line":"                res_dict[attr] is constants.ATTR_NOT_SPECIFIED):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_a1780b2d","line":76,"updated":"2016-11-14 13:34:42.000000000","message":"same points here","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b077d7cb61ad567211a7310e35f976c7062ac036","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                raise exc_cls(msg)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"def convert_value(attr_info, res_dict, exc_cls\u003dValueError):"},{"line_number":77,"context_line":"    for attr, attr_vals in attr_info.items():"},{"line_number":78,"context_line":"        if (attr not in res_dict or"},{"line_number":79,"context_line":"                res_dict[attr] is constants.ATTR_NOT_SPECIFIED):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a629dbe_d60f7e2c","line":76,"in_reply_to":"9a629dbe_a1780b2d","updated":"2016-11-14 14:38:37.000000000","message":"ditto","commit_id":"ad576e41626cee395f7d8e36e171d45a6586c00e"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"00235f7e385e6a2f5623a2c379d5b7f1364b1e43","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":26,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(network.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":27,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(port.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":28,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(subnet.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":29,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(subnetpool.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Identify the attribute used by a resource to reference another resource"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_9f2a9fe6","line":29,"range":{"start_line":25,"start_character":0,"end_line":29,"end_character":64},"updated":"2016-11-14 19:33:15.000000000","message":"Do we really think a public datastructure is the way to go here? IMHO it seems like a similar situation as with api validators which we switched to use accessor methods rather than public datastructure [1]. I guess I\u0027m wondering if this is a case were we want to rethink a \"nicer\" API?\n\n\n\n[1] https://bugs.launchpad.net/neutron/+bug/1584237","commit_id":"9b3141980a58796cb090a3443f5627b3fab0327c"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"f9a383b5016005408f309d303e89f57f356dd3ca","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron_lib import constants"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":26,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(network.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":27,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(port.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":28,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(subnet.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":29,"context_line":"RESOURCE_ATTRIBUTE_MAP.update(subnetpool.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"# Identify the attribute used by a resource to reference another resource"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_53ce3084","line":29,"range":{"start_line":25,"start_character":0,"end_line":29,"end_character":64},"in_reply_to":"7a77a97e_9f2a9fe6","updated":"2016-11-15 05:01:35.000000000","message":"Let me try something simple.","commit_id":"9b3141980a58796cb090a3443f5627b3fab0327c"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"056150c4ddd8ac00faa31a52e1e66e551e8cf4ab","unresolved":false,"context_lines":[{"line_number":36,"context_line":"def get_collection_info(collection):"},{"line_number":37,"context_line":"    \"\"\"Retrieve attribute info for a resource collection."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param collection: Plural name of the resource"},{"line_number":40,"context_line":"    \"\"\""},{"line_number":41,"context_line":"    return _RESOURCE_ATTRIBUTE_MAP.get(collection)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_ff4825b5","line":39,"updated":"2016-11-18 13:33:59.000000000","message":"Nit: period after sentence. Also it would be nice to doc what is returned if the collection doesn\u0027t exist.","commit_id":"78db9820d1d9d01095a47fae7d16753965e6ae12"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"14af52ee4f483a40ea04ab32609667c1eb4a7329","unresolved":false,"context_lines":[{"line_number":36,"context_line":"def get_collection_info(collection):"},{"line_number":37,"context_line":"    \"\"\"Retrieve attribute info for a resource collection."},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    :param collection: Plural name of the resource"},{"line_number":40,"context_line":"    \"\"\""},{"line_number":41,"context_line":"    return _RESOURCE_ATTRIBUTE_MAP.get(collection)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_8648a8cd","line":39,"in_reply_to":"7a77a97e_ff4825b5","updated":"2016-11-20 05:47:44.000000000","message":"Done","commit_id":"78db9820d1d9d01095a47fae7d16753965e6ae12"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"056150c4ddd8ac00faa31a52e1e66e551e8cf4ab","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def get_resource_foreign_key(resource):"},{"line_number":51,"context_line":"    \"\"\"Return the attribute used to reference another resource.\"\"\""},{"line_number":52,"context_line":"    return _RESOURCE_FOREIGN_KEYS.get(resource)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_7fd335d5","line":51,"updated":"2016-11-18 13:33:59.000000000","message":"Nit: param and return doc.. Also it would be nice to doc whats returned if resource doesn\u0027t exist.","commit_id":"78db9820d1d9d01095a47fae7d16753965e6ae12"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"14af52ee4f483a40ea04ab32609667c1eb4a7329","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"def get_resource_foreign_key(resource):"},{"line_number":51,"context_line":"    \"\"\"Return the attribute used to reference another resource.\"\"\""},{"line_number":52,"context_line":"    return _RESOURCE_FOREIGN_KEYS.get(resource)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_a643e4ad","line":51,"in_reply_to":"7a77a97e_7fd335d5","updated":"2016-11-20 05:47:44.000000000","message":"Done","commit_id":"78db9820d1d9d01095a47fae7d16753965e6ae12"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"056150c4ddd8ac00faa31a52e1e66e551e8cf4ab","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    return _RESOURCE_FOREIGN_KEYS.get(resource)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def fill_default_value(attr_info, res_dict,"},{"line_number":56,"context_line":"                       exc_cls\u003dValueError,"},{"line_number":57,"context_line":"                       check_allow_post\u003dTrue):"},{"line_number":58,"context_line":"    for attr, attr_vals in attr_info.items():"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_7f3df5db","line":55,"range":{"start_line":55,"start_character":4,"end_line":55,"end_character":22},"updated":"2016-11-18 13:33:59.000000000","message":"Nit: extra credit for docstrings on these public functions :)","commit_id":"78db9820d1d9d01095a47fae7d16753965e6ae12"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"14af52ee4f483a40ea04ab32609667c1eb4a7329","unresolved":false,"context_lines":[{"line_number":52,"context_line":"    return _RESOURCE_FOREIGN_KEYS.get(resource)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"def fill_default_value(attr_info, res_dict,"},{"line_number":56,"context_line":"                       exc_cls\u003dValueError,"},{"line_number":57,"context_line":"                       check_allow_post\u003dTrue):"},{"line_number":58,"context_line":"    for attr, attr_vals in attr_info.items():"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a77a97e_c61460a1","line":55,"range":{"start_line":55,"start_character":4,"end_line":55,"end_character":22},"in_reply_to":"7a77a97e_7f3df5db","updated":"2016-11-20 05:47:44.000000000","message":"Done","commit_id":"78db9820d1d9d01095a47fae7d16753965e6ae12"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"feb727a563d9180e0e40a3beb5bd373e6402ea04","unresolved":false,"context_lines":[{"line_number":71,"context_line":"    return _RESOURCE_ATTRIBUTE_MAP.get(collection_name)"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":""},{"line_number":74,"context_line":"# Identify the attribute used by a resource to reference another resource"},{"line_number":75,"context_line":"_RESOURCE_FOREIGN_KEYS \u003d {"},{"line_number":76,"context_line":"    network.COLLECTION_NAME: \u0027network_id\u0027"},{"line_number":77,"context_line":"}"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_resource_foreign_key(collection_name):"},{"line_number":81,"context_line":"    \"\"\"Retrieve the attribute used to reference another resource."},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    :param collection_name: The collection being referenced."},{"line_number":84,"context_line":"    :type collection_name: str"},{"line_number":85,"context_line":""},{"line_number":86,"context_line":"    :returns: The attribute used to reference the collection."},{"line_number":87,"context_line":"              None if there is no referring attribute for collection."},{"line_number":88,"context_line":"    :rtype: str or None"},{"line_number":89,"context_line":"    \"\"\""},{"line_number":90,"context_line":"    return _RESOURCE_FOREIGN_KEYS.get(collection_name)"},{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"def fill_post_defaults(attr_info, res_dict,"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a77a97e_5e0b972b","line":90,"range":{"start_line":74,"start_character":0,"end_line":90,"end_character":54},"updated":"2016-11-21 23:36:17.000000000","message":"This is not used outside of neutron.policy so I think I am going to leave it out.","commit_id":"dbd4334a1751dfc55fcb4bedb854fface8237e55"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8e706ff6993e5c512c8ce5a26af5ae42848381d6","unresolved":false,"context_lines":[{"line_number":74,"context_line":"def fill_post_defaults(attr_info, res_dict,"},{"line_number":75,"context_line":"                       exc_cls\u003dValueError,"},{"line_number":76,"context_line":"                       check_allow_post\u003dTrue):"},{"line_number":77,"context_line":"    \"\"\"Fill in default values for atttributes in a POST request."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    When a POST request is made, the attributes with default values do not"},{"line_number":80,"context_line":"    need to be specified by the user. This function fills in the values of"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_6e30939f","line":77,"range":{"start_line":77,"start_character":37,"end_line":77,"end_character":38},"updated":"2016-11-21 23:32:52.000000000","message":"One too many","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ab95ace108249a16deae99218dce835ffc0c00bc","unresolved":false,"context_lines":[{"line_number":74,"context_line":"def fill_post_defaults(attr_info, res_dict,"},{"line_number":75,"context_line":"                       exc_cls\u003dValueError,"},{"line_number":76,"context_line":"                       check_allow_post\u003dTrue):"},{"line_number":77,"context_line":"    \"\"\"Fill in default values for atttributes in a POST request."},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    When a POST request is made, the attributes with default values do not"},{"line_number":80,"context_line":"    need to be specified by the user. This function fills in the values of"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_9767bfe9","line":77,"range":{"start_line":77,"start_character":37,"end_line":77,"end_character":38},"in_reply_to":"7a77a97e_6e30939f","updated":"2016-11-21 23:53:46.000000000","message":"Done","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8e706ff6993e5c512c8ce5a26af5ae42848381d6","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    :return: The updated attributes dictionary."},{"line_number":167,"context_line":"    :rtype: dict"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    :return: attributes (updated with project_id if applicable)."},{"line_number":170,"context_line":"    :rtype: dict"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_c9944146","line":169,"range":{"start_line":169,"start_character":13,"end_line":169,"end_character":14},"updated":"2016-11-21 23:32:52.000000000","message":"\u0027A\u0027 to be consistent to changes in L163 and L169","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ab95ace108249a16deae99218dce835ffc0c00bc","unresolved":false,"context_lines":[{"line_number":166,"context_line":"    :return: The updated attributes dictionary."},{"line_number":167,"context_line":"    :rtype: dict"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    :return: attributes (updated with project_id if applicable)."},{"line_number":170,"context_line":"    :rtype: dict"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_3778ab8f","line":169,"range":{"start_line":169,"start_character":13,"end_line":169,"end_character":14},"in_reply_to":"7a77a97e_c9944146","updated":"2016-11-21 23:53:46.000000000","message":"Well, here I actually mean the argument \u0027attributes\u0027 that was passed in to this function.","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da4ba4ce5b499b89df073346253a8f3f2e4f0be6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    \"\"\"Add or update a resource collection."},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    :param collection: A resource attribute map."},{"line_number":45,"context_line":"    :type collection: dict"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":"    _RESOURCE_ATTRIBUTE_MAP.update(collection)"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a74a57a_6d941937","line":45,"updated":"2016-11-23 15:40:36.000000000","message":"We haven\u0027t been using :type in docstrings, but I guess it doesn\u0027t hurt.","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da4ba4ce5b499b89df073346253a8f3f2e4f0be6","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :return: Attribute map for the resource."},{"line_number":65,"context_line":"             None if the specified resource is not installed."},{"line_number":66,"context_line":"    :rtype: dict or None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":"    if collection_name is None:"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a74a57a_cdca8d4f","line":66,"updated":"2016-11-23 15:40:36.000000000","message":"We haven\u0027t been using :rtype in docstrings, but I guess it doesn\u0027t hurt.","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5cd8c4b76cfacd15240fe1c8585927d7913a2fee","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"SHARED \u003d base.SHARED"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def add_collection(collection):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_b83f9fb2","line":38,"updated":"2016-12-06 15:56:01.000000000","message":"Should I make this public also?","commit_id":"5aaf5fedda9f5d93396ae4d3328e2676e5a2007c"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a257d7562e0cd6ba8520027cbbcb6d4420687b55","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"SHARED \u003d base.SHARED"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def add_collection(collection):"}],"source_content_type":"text/x-python","patch_set":19,"id":"3a71b18c_e5bec0ac","line":38,"in_reply_to":"3a71b18c_b83f9fb2","updated":"2016-12-06 22:59:06.000000000","message":"Is there any reason we\u0027d need to; other than possibly consumers wanting to iterate all the collections? I just quickly skimmed [1], but didn\u0027t see an obvious need to have access to the map given the functions below.\n\n\n[1] http://codesearch.openstack.org/?q\u003dattributes.RESOURCE_ATTRIBUTE_MAP\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"5aaf5fedda9f5d93396ae4d3328e2676e5a2007c"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"fad98b098d7d0f0928f36c2b136f9b6b36be4b18","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    :param attributes: A dictionary of resource/API attributes."},{"line_number":164,"context_line":"    :type attributes: dict"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    :return: The updated attributes dictionary."},{"line_number":167,"context_line":"    :rtype: dict"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    :return: attributes (updated with project_id if applicable)."},{"line_number":170,"context_line":"    :rtype: dict"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    \"\"\""},{"line_number":173,"context_line":"    if \u0027tenant_id\u0027 in attributes and \u0027project_id\u0027 not in attributes:"}],"source_content_type":"text/x-python","patch_set":21,"id":"7a3c09a3_5306d61d","line":170,"range":{"start_line":166,"start_character":1,"end_line":170,"end_character":16},"updated":"2017-01-16 23:16:54.000000000","message":"Are these lines duplicated?","commit_id":"321028fb61f96fba16a71c8f483fd41196faba17"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"412dc2eb44d34820d59047bd16a0e52f4a6f324b","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    :param attributes: A dictionary of resource/API attributes."},{"line_number":164,"context_line":"    :type attributes: dict"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    :return: The updated attributes dictionary."},{"line_number":167,"context_line":"    :rtype: dict"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    :return: attributes (updated with project_id if applicable)."},{"line_number":170,"context_line":"    :rtype: dict"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    \"\"\""},{"line_number":173,"context_line":"    if \u0027tenant_id\u0027 in attributes and \u0027project_id\u0027 not in attributes:"}],"source_content_type":"text/x-python","patch_set":21,"id":"7a3c09a3_be27bec8","line":170,"range":{"start_line":166,"start_character":1,"end_line":170,"end_character":16},"in_reply_to":"7a3c09a3_5306d61d","updated":"2017-01-17 03:23:03.000000000","message":"Good catch!","commit_id":"321028fb61f96fba16a71c8f483fd41196faba17"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"SHARED \u003d base.SHARED"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def add_collection(collection):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_032c0baa","line":38,"updated":"2017-01-20 22:26:58.000000000","message":"Another option would be to allow the consumer to control the scope of the map and make the public accessors operate on a given attr map. Don\u0027t see a use for it today, so probably just a noisy comment.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1bb55a7e1ee034958a10d9735cc229ca154ff806","unresolved":false,"context_lines":[{"line_number":35,"context_line":""},{"line_number":36,"context_line":"SHARED \u003d base.SHARED"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"_RESOURCE_ATTRIBUTE_MAP \u003d {}"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"def add_collection(collection):"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_7db9e778","line":38,"in_reply_to":"5a3905b3_032c0baa","updated":"2017-01-21 19:52:02.000000000","message":"Sounds like something that could be done later if needed.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    :type collection: dict"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":"    _RESOURCE_ATTRIBUTE_MAP.update(collection)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Build the core resources attribute map"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_96de7b6b","line":48,"updated":"2017-01-20 22:26:58.000000000","message":"Do you foresee a need to add a fixture for these, like those in: https://github.com/openstack/neutron-lib/blob/master/neutron_lib/fixture.py","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1bb55a7e1ee034958a10d9735cc229ca154ff806","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    :type collection: dict"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    \"\"\""},{"line_number":48,"context_line":"    _RESOURCE_ATTRIBUTE_MAP.update(collection)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Build the core resources attribute map"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_1dbe2365","line":48,"in_reply_to":"5a3905b3_96de7b6b","updated":"2017-01-21 19:52:02.000000000","message":"Done","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Build the core resources attribute map"},{"line_number":52,"context_line":"for core_resource in [network, port, subnet, subnetpool]:"},{"line_number":53,"context_line":"    add_collection(core_resource.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_e359bf5b","line":52,"updated":"2017-01-20 22:26:58.000000000","message":"In the case of neutron, how do the extension resources get added to the map? I assume as the plugin/extension is discovered it\u0027s added/updated to this global map (something like neutron.api.v2.router.py)?","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1bb55a7e1ee034958a10d9735cc229ca154ff806","unresolved":false,"context_lines":[{"line_number":49,"context_line":""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"# Build the core resources attribute map"},{"line_number":52,"context_line":"for core_resource in [network, port, subnet, subnetpool]:"},{"line_number":53,"context_line":"    add_collection(core_resource.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_3d383fef","line":52,"in_reply_to":"5a3905b3_e359bf5b","updated":"2017-01-21 19:52:02.000000000","message":"Via neutron_lib.api.extensions.ExtensionDescriptor.update_attributes_map\n\nFor example, see neutron.extensions.agent.Agent.update_attributes_map\n\nThe neutron api processes extensions here:\nhttps://github.com/openstack/neutron/blob/2eaadd4050092489732e66d1969fcffef36ee2e5/neutron/api/extensions.py#L395-L397","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    :return: Attribute map for the resource."},{"line_number":65,"context_line":"             None if the specified resource is not installed."},{"line_number":66,"context_line":"    :rtype: dict or None"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    \"\"\""},{"line_number":69,"context_line":"    if collection_name is None:"}],"source_content_type":"text/x-python","patch_set":22,"id":"5a3905b3_03032b10","line":66,"range":{"start_line":66,"start_character":5,"end_line":66,"end_character":10},"updated":"2017-01-20 22:26:58.000000000","message":"We haven\u0027t really been using these rtypes, but OK I suppose.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"65aef4391b18e19d8365bc3c30f12ae477a7a210","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    :param exc_cls: Exception to be raised on error."},{"line_number":94,"context_line":"    :type exc_cls: exceptions.BaseException()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    :param check_allow_post: Raise if a non-POST-able attribute is specified."},{"line_number":97,"context_line":"    :type check_allow_post: bool"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    :raises: exc_cls"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_bf13560c","line":96,"range":{"start_line":96,"start_character":29,"end_line":96,"end_character":35},"updated":"2017-02-06 22:31:27.000000000","message":"Nit: Raise exception","commit_id":"175841f54efd16b1e99b3ea4720aaa9828864035"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"07b8bbaf0dce02a15439eba49f6ab79846f2f019","unresolved":false,"context_lines":[{"line_number":93,"context_line":"    :param exc_cls: Exception to be raised on error."},{"line_number":94,"context_line":"    :type exc_cls: exceptions.BaseException()"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    :param check_allow_post: Raise if a non-POST-able attribute is specified."},{"line_number":97,"context_line":"    :type check_allow_post: bool"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    :raises: exc_cls"}],"source_content_type":"text/x-python","patch_set":25,"id":"1a430d35_41e5d9a5","line":96,"range":{"start_line":96,"start_character":29,"end_line":96,"end_character":35},"in_reply_to":"1a430d35_bf13560c","updated":"2017-02-08 15:21:51.000000000","message":"Done","commit_id":"175841f54efd16b1e99b3ea4720aaa9828864035"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fdd0ac6417ee2ae68bda5136997cc00ba223d653","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        Verify that owner is specified if required."},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    :param context: The request context."},{"line_number":200,"context_line":"    :type context: neutron_lib._context.Context"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    :param res_dict: The resource attributes from the request."},{"line_number":203,"context_line":"    :type res_dict: dict"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_66279964","line":200,"range":{"start_line":200,"start_character":31,"end_line":200,"end_character":32},"updated":"2017-02-13 20:41:11.000000000","message":"`_context` got rehomed as `context`","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a6332fd46ab4ef0c8b7d4ca6375daca34aa50b15","unresolved":false,"context_lines":[{"line_number":197,"context_line":"        Verify that owner is specified if required."},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    :param context: The request context."},{"line_number":200,"context_line":"    :type context: neutron_lib._context.Context"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    :param res_dict: The resource attributes from the request."},{"line_number":203,"context_line":"    :type res_dict: dict"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_470a5a7a","line":200,"range":{"start_line":200,"start_character":31,"end_line":200,"end_character":32},"in_reply_to":"fa31d9ce_66279964","updated":"2017-02-14 17:59:59.000000000","message":"Good eye.","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":7776,"name":"Paul Carver","email":"pcarver@att.com","username":"pcarver"},"change_message_id":"7c0cb2a0898d09c3d717e1cb79c5dc778812ea04","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# Proxy the core resource and collection names here to avoid needing to"},{"line_number":25,"context_line":"# import the definitions just for these names."},{"line_number":26,"context_line":"NETWORK \u003d network.RESOURCE_NAME"},{"line_number":27,"context_line":"NETWORKS \u003d network.COLLECTION_NAME"},{"line_number":28,"context_line":"PORT \u003d port.RESOURCE_NAME"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa31d9ce_ab53dce0","line":25,"updated":"2017-02-14 20:58:20.000000000","message":"Question: Is this comment accurate? Specifically what does \"avoid needing to import the definitions\" mean? Aren\u0027t the definitions imported on lines 16-19? What exactly is being avoided?\n\nI\u0027d say the comment is entirely unnecessary since it seems clear that lines 26-33 are simply shortening the names for convenience.","commit_id":"f68ad39301aa2d5fe0283e8c414769577bd69547"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d75b03440323e0b1e2b9aca983678c6eb09bd774","unresolved":false,"context_lines":[{"line_number":22,"context_line":""},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"# Proxy the core resource and collection names here to avoid needing to"},{"line_number":25,"context_line":"# import the definitions just for these names."},{"line_number":26,"context_line":"NETWORK \u003d network.RESOURCE_NAME"},{"line_number":27,"context_line":"NETWORKS \u003d network.COLLECTION_NAME"},{"line_number":28,"context_line":"PORT \u003d port.RESOURCE_NAME"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa31d9ce_ae476aba","line":25,"in_reply_to":"fa31d9ce_ab53dce0","updated":"2017-02-14 21:27:30.000000000","message":"Done","commit_id":"f68ad39301aa2d5fe0283e8c414769577bd69547"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"76a7c1520a43698ab43f49d742765f29347b9aac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"1a1ced50_d3112eae","updated":"2017-03-17 22:06:32.000000000","message":"What if we just create a ResourceAttributes class that manages an internal map of resources and provides methods (instead of the functions + global map)? \n\nIf we went that route we could just make the _RESOURCE_ATTRIBUTE_MAP herein a singleton instance of the ResourceAttributes. Seems like a more flexable approach to me.\n\n\nThoughts?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":73,"context_line":""},{"line_number":74,"context_line":"    When a POST request is made, the attributes with default values do not"},{"line_number":75,"context_line":"    need to be specified by the user. This function fills in the values of"},{"line_number":76,"context_line":"    any unspecfied attributes if they have a default value."},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    If an attribute is not specified and it does not have a default value,"},{"line_number":79,"context_line":"    an exception is raised."}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_45dd440d","line":76,"range":{"start_line":76,"start_character":8,"end_line":76,"end_character":18},"updated":"2017-03-16 15:39:05.000000000","message":"unspecified","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    exception is raised. The caller can override this behavior by setting"},{"line_number":83,"context_line":"    check_allow_post\u003dFalse (used by some internal admin operations)."},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    :param attr_info: The attribute map for the resource."},{"line_number":86,"context_line":"    :type attr_info: dict"},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    :param res_dict: The resource attributes from the request."},{"line_number":89,"context_line":"    :type res_dict: dict"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_8561fc3b","line":86,"range":{"start_line":85,"start_character":4,"end_line":86,"end_character":25},"updated":"2017-03-16 15:39:05.000000000","message":"Wouldn\u0027t it make more sense UX wise to pass collection name and allow the library to extract the correct map from _RESOURCE_ATTRIBUTE_MAP? Otherwise consumers will need to fetch the map only to pass it back into the library, and in theory they may pass a map that is not identical to what we registered, which slightly breaks isolation.","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    :type res_dict: dict"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    :param exc_cls: Exception to be raised on error."},{"line_number":92,"context_line":"    :type exc_cls: exceptions.BaseException()"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    :param check_allow_post: Raises an exception if a non-POST-able attribute"},{"line_number":95,"context_line":"    is specified."}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_a5f2786d","line":92,"range":{"start_line":92,"start_character":43,"end_line":92,"end_character":45},"updated":"2017-03-16 15:39:05.000000000","message":"remove?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":115,"context_line":"def convert_values(attr_info, res_dict, exc_cls\u003dValueError):"},{"line_number":116,"context_line":"    \"\"\"Convert and validate attribute values for a request."},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"    :param attr_info: The attribute map for the resource."},{"line_number":119,"context_line":"    :type attr_info: dict"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    :param res_dict: The resource attributes from the request."},{"line_number":122,"context_line":"    :type res_dict: dict"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_970a0f20","line":119,"range":{"start_line":118,"start_character":4,"end_line":119,"end_character":25},"updated":"2017-03-16 15:39:05.000000000","message":"same question","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":122,"context_line":"    :type res_dict: dict"},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"    :param exc_cls: Exception to be raised on error."},{"line_number":125,"context_line":"    :type exc_cls: exceptions.BaseException()"},{"line_number":126,"context_line":""},{"line_number":127,"context_line":"    :raises: exc_cls"},{"line_number":128,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_171fff5f","line":125,"range":{"start_line":125,"start_character":43,"end_line":125,"end_character":45},"updated":"2017-03-16 15:39:05.000000000","message":"remove?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            res_dict[\u0027project_id\u0027] !\u003d context.project_id and"},{"line_number":182,"context_line":"            not context.is_admin):"},{"line_number":183,"context_line":"        msg \u003d _(\"Specifying \u0027project_id\u0027 or \u0027tenant_id\u0027 other than \""},{"line_number":184,"context_line":"                \"authenticated project in request requires admin privileges\")"},{"line_number":185,"context_line":"        raise exc.HTTPBadRequest(msg)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_37eebbec","line":184,"range":{"start_line":184,"start_character":42,"end_line":184,"end_character":49},"updated":"2017-03-16 15:39:05.000000000","message":"a request?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":181,"context_line":"            res_dict[\u0027project_id\u0027] !\u003d context.project_id and"},{"line_number":182,"context_line":"            not context.is_admin):"},{"line_number":183,"context_line":"        msg \u003d _(\"Specifying \u0027project_id\u0027 or \u0027tenant_id\u0027 other than \""},{"line_number":184,"context_line":"                \"authenticated project in request requires admin privileges\")"},{"line_number":185,"context_line":"        raise exc.HTTPBadRequest(msg)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_17f37fd7","line":184,"range":{"start_line":184,"start_character":17,"end_line":184,"end_character":30},"updated":"2017-03-16 15:39:05.000000000","message":"the authenticated?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":185,"context_line":"        raise exc.HTTPBadRequest(msg)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"def populate_tenant_id(context, res_dict, attr_info, is_create):"},{"line_number":189,"context_line":"    \"\"\"Populate the owner information in a request body."},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    Ensure both project_id and tenant_id attributes are present."}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_973ccfe3","line":188,"range":{"start_line":188,"start_character":13,"end_line":188,"end_character":22},"updated":"2017-03-16 15:39:05.000000000","message":"should it be project_id in the brave new world of keystone v3?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":200,"context_line":"    :param res_dict: The resource attributes from the request."},{"line_number":201,"context_line":"    :type res_dict: dict"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"    :param attr_info: The attribute map for the resource."},{"line_number":204,"context_line":"    :type attr_info: dict"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    :param is_create: Is this a create request?"},{"line_number":207,"context_line":"    :type is_create: bool"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_17053fbb","line":204,"range":{"start_line":203,"start_character":4,"end_line":204,"end_character":25},"updated":"2017-03-16 15:39:05.000000000","message":"same","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":206,"context_line":"    :param is_create: Is this a create request?"},{"line_number":207,"context_line":"    :type is_create: bool"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    :raises: exc.HTTPBadRequest()"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    \"\"\""},{"line_number":212,"context_line":"    populate_project_info(res_dict)"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_572df744","line":209,"range":{"start_line":209,"start_character":31,"end_line":209,"end_character":33},"updated":"2017-03-16 15:39:05.000000000","message":"remove?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":231,"context_line":"    :param res_dict: The resource attributes from the request."},{"line_number":232,"context_line":"    :type res_dict: dict"},{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    :param attr_info: The attribute map for the resource."},{"line_number":235,"context_line":"    :type attr_info: dict"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    :raises: exc.HTTPBadRequest()"},{"line_number":238,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_77a593b3","line":235,"range":{"start_line":234,"start_character":4,"end_line":235,"end_character":25},"updated":"2017-03-16 15:39:05.000000000","message":"same","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":234,"context_line":"    :param attr_info: The attribute map for the resource."},{"line_number":235,"context_line":"    :type attr_info: dict"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    :raises: exc.HTTPBadRequest()"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    \"\"\""},{"line_number":240,"context_line":"    populate_project_info(attr_info)"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_b7af0b93","line":237,"range":{"start_line":237,"start_character":31,"end_line":237,"end_character":33},"updated":"2017-03-16 15:39:05.000000000","message":"remove?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":237,"context_line":"    :raises: exc.HTTPBadRequest()"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"    \"\"\""},{"line_number":240,"context_line":"    populate_project_info(attr_info)"},{"line_number":241,"context_line":""},{"line_number":242,"context_line":"    extra_keys \u003d set(res_dict.keys()) - set(attr_info.keys())"},{"line_number":243,"context_line":"    if extra_keys:"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_379cfb68","line":240,"range":{"start_line":240,"start_character":4,"end_line":240,"end_character":36},"updated":"2017-03-16 15:39:05.000000000","message":"some may argue that verify* method should not *modify* the payload. should we leave it up to the consumer to populate?","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d3416c77a726ca56e37d78b5279a5e6206f44c92","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":33,"id":"ffe62b97_61631e1c","updated":"2017-03-24 21:26:01.000000000","message":"After munking with this approach; I think it needs a re-work. I\u0027ll have that out early next week (hopefully).","commit_id":"a7c765678aa04c4a2943b377302c1fd7d1ac7244"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3af5d3acb1060e4491ffb87f92c5058683ab2da6","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        self.attributes \u003d resource_attrs"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def fill_post_defaults(self, res_dict,"},{"line_number":86,"context_line":"                           exc_cls\u003dValueError,"},{"line_number":87,"context_line":"                           check_allow_post\u003dTrue):"},{"line_number":88,"context_line":"        \"\"\"Fill in default values for attributes in a POST request."},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"bff0334d_2982d550","line":86,"updated":"2017-04-05 13:59:02.000000000","message":"nit: wouldn\u0027t InvalidInput be a more appropriate default? Also, the exception change may reveal that construction of exceptions might not be as simple as passing the msg as a plain old arg (IIRC InvalidInput needs a kwarg).","commit_id":"012fd221f4e4f6f7290576daf163df6bd95f7951"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"c54c91960c7776ed29f859fcb67d649ea11ed849","unresolved":false,"context_lines":[{"line_number":83,"context_line":"        self.attributes \u003d resource_attrs"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def fill_post_defaults(self, res_dict,"},{"line_number":86,"context_line":"                           exc_cls\u003dValueError,"},{"line_number":87,"context_line":"                           check_allow_post\u003dTrue):"},{"line_number":88,"context_line":"        \"\"\"Fill in default values for attributes in a POST request."},{"line_number":89,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"bff0334d_e74be2ad","line":86,"in_reply_to":"bff0334d_2982d550","updated":"2017-04-05 21:45:22.000000000","message":"Sounds reasonable; and you are right about the kwarg... Let me know what you think about how this is addressed in the next patch.","commit_id":"012fd221f4e4f6f7290576daf163df6bd95f7951"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"3af5d3acb1060e4491ffb87f92c5058683ab2da6","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                    msg \u003d _(\"Attribute \u0027%s\u0027 not allowed in POST\") % attr"},{"line_number":119,"context_line":"                    raise exc_cls(msg)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def convert_values(self, res_dict, exc_cls\u003dValueError):"},{"line_number":122,"context_line":"        \"\"\"Convert and validate attribute values for a request."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param res_dict: The resource attributes from the request."}],"source_content_type":"text/x-python","patch_set":34,"id":"bff0334d_09971193","line":121,"updated":"2017-04-05 13:59:02.000000000","message":"ditto on exception default","commit_id":"012fd221f4e4f6f7290576daf163df6bd95f7951"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"c54c91960c7776ed29f859fcb67d649ea11ed849","unresolved":false,"context_lines":[{"line_number":118,"context_line":"                    msg \u003d _(\"Attribute \u0027%s\u0027 not allowed in POST\") % attr"},{"line_number":119,"context_line":"                    raise exc_cls(msg)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    def convert_values(self, res_dict, exc_cls\u003dValueError):"},{"line_number":122,"context_line":"        \"\"\"Convert and validate attribute values for a request."},{"line_number":123,"context_line":""},{"line_number":124,"context_line":"        :param res_dict: The resource attributes from the request."}],"source_content_type":"text/x-python","patch_set":34,"id":"bff0334d_a7cb9a1c","line":121,"in_reply_to":"bff0334d_09971193","updated":"2017-04-05 21:45:22.000000000","message":"Ditto.","commit_id":"012fd221f4e4f6f7290576daf163df6bd95f7951"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"6a29c91b22caf9a19e0f61eb6e2c3afc875e517f","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        attributes for the resource."},{"line_number":76,"context_line":"        \"\"\""},{"line_number":77,"context_line":"        if isinstance(resource_attrs, AttributeInfo):"},{"line_number":78,"context_line":"            resource_attrs \u003d resource_attrs._attrs"},{"line_number":79,"context_line":"        elif getattr(resource_attrs,"},{"line_number":80,"context_line":"                     \u0027RESOURCE_ATTRIBUTE_MAP\u0027, None) is not None:"},{"line_number":81,"context_line":"            # handle neutron_lib API definitions"}],"source_content_type":"text/x-python","patch_set":36,"id":"7ffa3b31_60f5d1ec","line":78,"range":{"start_line":78,"start_character":44,"end_line":78,"end_character":50},"updated":"2017-04-21 03:28:09.000000000","message":"Where is this defined? Is it \"attributes\" what you want?","commit_id":"2676d19d5be378f209097f609021a789ea6514df"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"b6d51402b7e6d1aeb9223fb9d0ba8b3d3b815340","unresolved":false,"context_lines":[{"line_number":75,"context_line":"        attributes for the resource."},{"line_number":76,"context_line":"        \"\"\""},{"line_number":77,"context_line":"        if isinstance(resource_attrs, AttributeInfo):"},{"line_number":78,"context_line":"            resource_attrs \u003d resource_attrs._attrs"},{"line_number":79,"context_line":"        elif getattr(resource_attrs,"},{"line_number":80,"context_line":"                     \u0027RESOURCE_ATTRIBUTE_MAP\u0027, None) is not None:"},{"line_number":81,"context_line":"            # handle neutron_lib API definitions"}],"source_content_type":"text/x-python","patch_set":36,"id":"5ff73747_7e872811","line":78,"range":{"start_line":78,"start_character":44,"end_line":78,"end_character":50},"in_reply_to":"7ffa3b31_60f5d1ec","updated":"2017-04-25 14:35:21.000000000","message":"Thanks for pointing this out; it\u0027s a bug.\nI\u0027ve fixed it as well as added some UTs for both creation cases in the new PS.","commit_id":"2676d19d5be378f209097f609021a789ea6514df"}],"neutron_lib/api/definitions/network.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da4ba4ce5b499b89df073346253a8f3f2e4f0be6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"5a74a57a_0877133b","updated":"2016-11-23 15:40:36.000000000","message":"So we have network/subnet/port/subnetpools that are \u0027core\u0027 resources (i.e. not extensions), but everything else in neutron_lib/api/definitions/* is an extension and will define other attrs like NAME, DESCRIPTION, UPDATED_TIMESTAMP, etc. right?\n\nAssuming thats the case, should we organize these core definitions differently? For example put them all into neutron_lib.api.definitions.base.py or perhaps a new modules like neutron_lib.api.definitions.core.py?","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ee015e79691526c1f87af0fcf5e980ebb8e82c51","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":17,"id":"5a74a57a_e172e4e4","in_reply_to":"5a74a57a_0877133b","updated":"2016-11-23 23:08:04.000000000","message":"I am open to that. What do others think?","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da4ba4ce5b499b89df073346253a8f3f2e4f0be6","unresolved":false,"context_lines":[{"line_number":20,"context_line":"RESOURCE_NAME \u003d \u0027network\u0027"},{"line_number":21,"context_line":"COLLECTION_NAME \u003d \u0027networks\u0027"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"_NETWORKS_ATTRIBUTE_MAP \u003d {"},{"line_number":24,"context_line":"    COLLECTION_NAME: {"},{"line_number":25,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":26,"context_line":"               \u0027validate\u0027: {\u0027type:uuid\u0027: None},"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a74a57a_48374bb0","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":23},"updated":"2016-11-23 15:40:36.000000000","message":"Should we leave this as RESOURCE_ATTRIBUTE_MAP for backwards compat since that\u0027s what existing api definitions use.","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ee015e79691526c1f87af0fcf5e980ebb8e82c51","unresolved":false,"context_lines":[{"line_number":20,"context_line":"RESOURCE_NAME \u003d \u0027network\u0027"},{"line_number":21,"context_line":"COLLECTION_NAME \u003d \u0027networks\u0027"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"_NETWORKS_ATTRIBUTE_MAP \u003d {"},{"line_number":24,"context_line":"    COLLECTION_NAME: {"},{"line_number":25,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":26,"context_line":"               \u0027validate\u0027: {\u0027type:uuid\u0027: None},"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a74a57a_7c8f5b23","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":23},"in_reply_to":"5a74a57a_48374bb0","updated":"2016-11-23 23:08:04.000000000","message":"I am adding this module so there is no backwards compat needed. The only existing api definition is trunk, and I think it should not have made RESOURCE_ATTRIBUTE_MAP public.\n\nI would rather see every API definition providing get_attribute_map(). Leave trunk being the only one that has RESOURCE_ATTRIBUTE_MAP public and discourage its use.","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5a3905b3_20ef3d88","updated":"2017-01-20 22:26:58.000000000","message":"Each one of these api-defs should have a UT; or doesn\u0027t that work for some reason? For example see: https://github.com/openstack/neutron-lib/tree/master/neutron_lib/tests/unit/api/definitions","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"361c045df3b2b1e46e3cbddb0fb0e384d43fbbff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"3a461143_ba4aa6c3","in_reply_to":"5a3905b3_160be22c","updated":"2017-01-26 19:49:54.000000000","message":"Thanks Boden. I have no bandwidth so please go ahead and drive this patch to completion.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1bb55a7e1ee034958a10d9735cc229ca154ff806","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5a3905b3_601e9c60","in_reply_to":"5a3905b3_20ef3d88","updated":"2017-01-21 19:52:02.000000000","message":"I took a look. One problem is that DefinitionBaseTestCase is designed for testing extension definitions. The core definitions in this patch don\u0027t need all that.\n\nThe definitions test classes could perhaps be refactored to accommodate core resources but unfortunately I don\u0027t have time to work on that.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"c85e83b5334c40ef3d9595cc701f70486ceace41","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5a3905b3_160be22c","in_reply_to":"5a3905b3_601e9c60","updated":"2017-01-24 18:28:09.000000000","message":"I just pushed [1] up for review that should permit you to include UTs.\n\n\nI cherry-picked this patch atop [1] and did minor hacking::\n\n  from neutron_lib.api.definitions import network\n  from neutron_lib.tests.unit.api.definitions import base\n\n\n  class NetworkDefinitionTestCase(base.DefinitionBaseTestCase):\n    extension_module \u003d network\n    extension_resources \u003d (network.COLLECTION_NAME,)\n    extension_attributes \u003d (network.SUBNETS,)\n\n\nThe above ran clean for me (with [1]).\n\n\nNot sure what Armando will think of [1], but if you rebase atop it you could add UTs. If you\u0027re low on bandwidth I can drive this patch for you too; just let me know.  \n\n\n\n[1] https://review.openstack.org/424788/","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":15,"context_line":""},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"NAME \u003d \u0027Neutron L2 Network\u0027"},{"line_number":18,"context_line":"ALIAS \u003d \u0027network\u0027"},{"line_number":19,"context_line":"DESCRIPTION \u003d \"Layer 2 network abstraction\""},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"UPDATED_TIMESTAMP \u003d \"2012-01-01T10:00:00-00:00\""}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_d7f9e781","line":18,"range":{"start_line":18,"start_character":0,"end_line":18,"end_character":5},"updated":"2017-03-16 15:39:05.000000000","message":"Isn\u0027t it an extension name? In which case for core resources wouldn\u0027t it make sense to have it as None? Or some other special case value (smth const.CORE_ALIAS)","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"}],"neutron_lib/api/definitions/trunk.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8f80e100ce1f314d3cfbe54bf49eb52072007f5b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"UPDATED_TIMESTAMP \u003d \"2016-01-01T10:00:00-00:00\""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"# The specific resources and/or attributes for the extension (optional)."},{"line_number":43,"context_line":"RESOURCE_NAME \u003d \u0027trunk\u0027"},{"line_number":44,"context_line":"COLLECTION_NAME \u003d \u0027trunks\u0027"},{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_e1e131d2","line":44,"range":{"start_line":43,"start_character":0,"end_line":44,"end_character":26},"updated":"2016-11-23 04:26:17.000000000","message":"Do you think I should not change these also?","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"ed876838d856cc639ef0b6054998848c959627c0","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a77a97e_d10bfc7b","line":48,"updated":"2016-11-22 05:54:11.000000000","message":"this has now become a non-backward compatible change, same for the trunk_details one [1].\n\nIn reality if we didn\u0027t deep copy the map, we\u0027re handing over a reference to the dict so the consumer, though he/she is being warned by the use of the get method, can fiddle with the map nonetheless. For the usage I have ever seen, the attribute map is not explicitly modified, So I wonder, do we need to be this explicit? After all this is a variable defined in a module of a library the consumer doesn\u0027t even own, how clueless do we need to be to modify it? If we do, don\u0027t deserve to be punished in a medieval way? \n\n\nhttps://github.com/openstack/neutron/blob/master/neutron/extensions/trunk.py#L46","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b825586efee7a3a84ddca049a4d7dbd9f014744c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_86094198","line":48,"in_reply_to":"5a74a57a_61c7e145","updated":"2016-11-23 23:21:56.000000000","message":"but you\u0027d leave neutron broken as soon as you release.","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"15450beb2ed16a17cb91de038cd424ece595a5f3","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_6dd5f941","line":48,"in_reply_to":"5a74a57a_e164d14a","updated":"2016-11-23 15:12:06.000000000","message":"Hmmm, I actually used deprecate() in [1] to deprecate a global, but maybe I did it wrong. I\u0027m personally not crazy about providing access to the underlying globals, but IMO its not a showstopper and something we could look at the in future.\n\n\n\n[1] https://github.com/openstack/neutron-lib/commit/3fcd9398db8664392ca7928f69a48d225b5478c8#diff-86694a50dd2c4e10d4b314587d718c20R578","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8971522bf36138eee6e499923f18f67a41f349ef","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a77a97e_116d7432","line":48,"in_reply_to":"7a77a97e_d10bfc7b","updated":"2016-11-22 05:54:58.000000000","message":"*we :P","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8f80e100ce1f314d3cfbe54bf49eb52072007f5b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_61c7e145","line":48,"in_reply_to":"7a77a97e_d10bfc7b","updated":"2016-11-23 04:26:17.000000000","message":"Done.\n\nMy intention is we should do as follows:\nhttps://review.openstack.org/#/c/399908/1/neutron/extensions/trunk.py@45\n\nBut I guess we have to follow the API rules in lib and keep this dict public.","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5206fa3a243d63dce36406924a24cfc2718c47c7","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a77a97e_e611f85e","line":48,"in_reply_to":"7a77a97e_d10bfc7b","updated":"2016-11-22 16:56:15.000000000","message":"I was thinking we hadn\u0027t released version of neutron-lib with api/definitions, but alas we did; 1.0.0.\n\n\nSo I guess Armando is right, we can\u0027t just go changing public API w/o the deprecation fun.\n\n\nMy bad for not catching this.","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8f80e100ce1f314d3cfbe54bf49eb52072007f5b","unresolved":false,"context_lines":[{"line_number":45,"context_line":"SUB_PORTS \u003d \u0027sub_ports\u0027"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"# The resource attribute map for the extension."},{"line_number":48,"context_line":"_TRUNKS_ATTRIBUTE_MAP \u003d {"},{"line_number":49,"context_line":"    COLLECTION_NAME: {"},{"line_number":50,"context_line":"        \u0027admin_state_up\u0027: {\u0027allow_post\u0027: True, \u0027allow_put\u0027: True,"},{"line_number":51,"context_line":"                           \u0027default\u0027: True,"}],"source_content_type":"text/x-python","patch_set":15,"id":"5a74a57a_e164d14a","line":48,"in_reply_to":"7a77a97e_e611f85e","updated":"2016-11-23 04:26:17.000000000","message":"We don\u0027t have the right tool (neutron.common_deprecate._MovedGlobals) in lib to deprecate globals like this one.","commit_id":"a295b6e55aa08e192d8468f496449817a1637f8a"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fdd0ac6417ee2ae68bda5136997cc00ba223d653","unresolved":false,"context_lines":[{"line_number":82,"context_line":""},{"line_number":83,"context_line":"# The action map."},{"line_number":84,"context_line":"ACTION_MAP \u003d {"},{"line_number":85,"context_line":"    RESOURCE_NAME: {"},{"line_number":86,"context_line":"        \u0027add_subports\u0027: \u0027PUT\u0027,"},{"line_number":87,"context_line":"        \u0027remove_subports\u0027: \u0027PUT\u0027,"},{"line_number":88,"context_line":"        \u0027get_subports\u0027: \u0027GET\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_86af2d93","line":85,"range":{"start_line":85,"start_character":4,"end_line":85,"end_character":17},"updated":"2017-02-13 20:41:11.000000000","message":"+1","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    \"provider\",  # needed to learn about network segmentation details."},{"line_number":100,"context_line":"]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"# TODO(armax): add support for modeling custom queries"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_b75e2b74","side":"PARENT","line":102,"updated":"2017-03-16 15:39:05.000000000","message":"huh, why do you remove it? I think it\u0027s to track work to document (and later enforce) queries allowed for GET.","commit_id":"22957133832c87e4e811666c6084023b260f20aa"}],"neutron_lib/fixture.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"72eafa7b7ac2d30240a333a7824a497adfda20d2","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        self.addCleanup(clear_tables)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"class ResourceAttributeMapFixture(fixtures.Fixture):"},{"line_number":89,"context_line":"    \"\"\"Resource attribute map fixture."},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    Tests that update the contents of attributes._RESOURCE_ATTRIBUTE_MAP"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_faab2ad4","line":88,"updated":"2017-03-16 15:41:04.000000000","message":"This also seems rather identical to https://review.openstack.org/#/c/445624/3/neutron_lib/fixture.py","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"}],"neutron_lib/tests/unit/api/test_attributes.py":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8e706ff6993e5c512c8ce5a26af5ae42848381d6","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                          attributes.populate_tenant_id,"},{"line_number":167,"context_line":"                          ctx, res_dict, None, None)"},{"line_number":168,"context_line":"        ctx.is_admin \u003d True"},{"line_number":169,"context_line":"        self.assertIsNone(attributes.populate_tenant_id(ctx, res_dict, {},"},{"line_number":170,"context_line":"                                                        is_create\u003dFalse))"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_populate_tenant_id_from_context(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_04e29b9f","line":169,"updated":"2016-11-21 23:32:52.000000000","message":"In lines 227, 230 and 235 you just called the method that you expect to succeed, without the assertIsNone. I think it\u0027s simpler. Why not do the same thing here?","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c4a610d94a8778e8f1d5c92581942fcc1c8bc8ce","unresolved":false,"context_lines":[{"line_number":166,"context_line":"                          attributes.populate_tenant_id,"},{"line_number":167,"context_line":"                          ctx, res_dict, None, None)"},{"line_number":168,"context_line":"        ctx.is_admin \u003d True"},{"line_number":169,"context_line":"        self.assertIsNone(attributes.populate_tenant_id(ctx, res_dict, {},"},{"line_number":170,"context_line":"                                                        is_create\u003dFalse))"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def test_populate_tenant_id_from_context(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_1703af77","line":169,"in_reply_to":"7a77a97e_04e29b9f","updated":"2016-11-21 23:58:45.000000000","message":"Done","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8e706ff6993e5c512c8ce5a26af5ae42848381d6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        res_dict \u003d {\u0027name\u0027: \u0027test_port\u0027}"},{"line_number":202,"context_line":"        attr_info \u003d {}"},{"line_number":203,"context_line":"        ctx.tenant_id \u003d None"},{"line_number":204,"context_line":"        attributes.populate_tenant_id(ctx, res_dict, attr_info, True)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"class TestHelpers(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_64aa6f87","line":204,"updated":"2016-11-21 23:32:52.000000000","message":"Maybe use self.assertIsNone like in L169?","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"85b4c7803cbe565c5fe7b817bdffc270d2bb17b0","unresolved":false,"context_lines":[{"line_number":201,"context_line":"        res_dict \u003d {\u0027name\u0027: \u0027test_port\u0027}"},{"line_number":202,"context_line":"        attr_info \u003d {}"},{"line_number":203,"context_line":"        ctx.tenant_id \u003d None"},{"line_number":204,"context_line":"        attributes.populate_tenant_id(ctx, res_dict, attr_info, True)"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"class TestHelpers(base.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_042c5baa","line":204,"in_reply_to":"7a77a97e_64aa6f87","updated":"2016-11-21 23:34:54.000000000","message":"Please disregard this one","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8e706ff6993e5c512c8ce5a26af5ae42848381d6","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        self._verify_port_attributes(attrs)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def test_get_attribute_map_not_installed(self):"},{"line_number":224,"context_line":"        self.assertFalse(attributes.get_attribute_map(\u0027mehs\u0027))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test_verify_attributes_null(self):"},{"line_number":227,"context_line":"        attributes.verify_attributes({}, {})"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_44f2d370","line":224,"range":{"start_line":224,"start_character":13,"end_line":224,"end_character":24},"updated":"2016-11-21 23:32:52.000000000","message":"Would assertIsNone be more appropriate here?","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"c4a610d94a8778e8f1d5c92581942fcc1c8bc8ce","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        self._verify_port_attributes(attrs)"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def test_get_attribute_map_not_installed(self):"},{"line_number":224,"context_line":"        self.assertFalse(attributes.get_attribute_map(\u0027mehs\u0027))"},{"line_number":225,"context_line":""},{"line_number":226,"context_line":"    def test_verify_attributes_null(self):"},{"line_number":227,"context_line":"        attributes.verify_attributes({}, {})"}],"source_content_type":"text/x-python","patch_set":11,"id":"7a77a97e_57fd276d","line":224,"range":{"start_line":224,"start_character":13,"end_line":224,"end_character":24},"in_reply_to":"7a77a97e_44f2d370","updated":"2016-11-21 23:58:45.000000000","message":"Done","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":7776,"name":"Paul Carver","email":"pcarver@att.com","username":"pcarver"},"change_message_id":"dcf5f0f52753cf4ba4e4600f35359603135fd89e","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    def test_populate_tenant_id_admin_req(self):"},{"line_number":159,"context_line":"        tenant_id_1 \u003d uuidutils.generate_uuid()"},{"line_number":160,"context_line":"        tenant_id_2 \u003d uuidutils.generate_uuid()"},{"line_number":161,"context_line":"        # non-admin users can create a res on behalf of another project"},{"line_number":162,"context_line":"        ctx \u003d context.Context(user_id\u003dNone, tenant_id\u003dtenant_id_1)"},{"line_number":163,"context_line":"        res_dict \u003d {\u0027tenant_id\u0027: tenant_id_2}"},{"line_number":164,"context_line":"        self.assertRaises(exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":18,"id":"5a74a57a_bc9a0e12","line":161,"range":{"start_line":161,"start_character":26,"end_line":161,"end_character":29},"updated":"2016-11-29 15:03:37.000000000","message":"can -\u003e can\u0027t","commit_id":"2227cc618f61181276246fa2997df7f8032b46f8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"231cafb556ff103e3afb9c3f39bc512e9789446c","unresolved":false,"context_lines":[{"line_number":158,"context_line":"    def test_populate_tenant_id_admin_req(self):"},{"line_number":159,"context_line":"        tenant_id_1 \u003d uuidutils.generate_uuid()"},{"line_number":160,"context_line":"        tenant_id_2 \u003d uuidutils.generate_uuid()"},{"line_number":161,"context_line":"        # non-admin users can create a res on behalf of another project"},{"line_number":162,"context_line":"        ctx \u003d context.Context(user_id\u003dNone, tenant_id\u003dtenant_id_1)"},{"line_number":163,"context_line":"        res_dict \u003d {\u0027tenant_id\u0027: tenant_id_2}"},{"line_number":164,"context_line":"        self.assertRaises(exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":18,"id":"3a71b18c_cdf01fcc","line":161,"range":{"start_line":161,"start_character":26,"end_line":161,"end_character":29},"in_reply_to":"5a74a57a_bc9a0e12","updated":"2016-12-06 15:42:19.000000000","message":"Done","commit_id":"2227cc618f61181276246fa2997df7f8032b46f8"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fdd0ac6417ee2ae68bda5136997cc00ba223d653","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertRaises(self._EXC_CLS, attributes.fill_post_defaults,"},{"line_number":101,"context_line":"                          attr_info, {\u0027key\u0027: \u0027X\u0027}, self._EXC_CLS)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def test_override_no_allow_post(self):"},{"line_number":104,"context_line":"        attr_info \u003d {"},{"line_number":105,"context_line":"            \u0027key\u0027: {"},{"line_number":106,"context_line":"                \u0027allow_post\u0027: False,"},{"line_number":107,"context_line":"                \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":108,"context_line":"            },"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":"        self._test_fill_default_value(attr_info, {\u0027key\u0027: \u0027X\u0027}, {\u0027key\u0027: \u0027X\u0027},"},{"line_number":111,"context_line":"                                      check_allow_post\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _test_convert_value(self, attr_info, expected, res_dict):"},{"line_number":114,"context_line":"        attributes.convert_values(attr_info, res_dict)"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_601e9660","line":111,"range":{"start_line":103,"start_character":0,"end_line":111,"end_character":61},"updated":"2017-02-13 20:41:11.000000000","message":"I think, we\u0027re missing one more test: allow_post: False and check_allow_post\u003dTrue","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"23a5c96e83d128d305ab1239c87f7274bbaf0571","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertRaises(self._EXC_CLS, attributes.fill_post_defaults,"},{"line_number":101,"context_line":"                          attr_info, {\u0027key\u0027: \u0027X\u0027}, self._EXC_CLS)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def test_override_no_allow_post(self):"},{"line_number":104,"context_line":"        attr_info \u003d {"},{"line_number":105,"context_line":"            \u0027key\u0027: {"},{"line_number":106,"context_line":"                \u0027allow_post\u0027: False,"},{"line_number":107,"context_line":"                \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":108,"context_line":"            },"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":"        self._test_fill_default_value(attr_info, {\u0027key\u0027: \u0027X\u0027}, {\u0027key\u0027: \u0027X\u0027},"},{"line_number":111,"context_line":"                                      check_allow_post\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _test_convert_value(self, attr_info, expected, res_dict):"},{"line_number":114,"context_line":"        attributes.convert_values(attr_info, res_dict)"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_2b336c63","line":111,"range":{"start_line":103,"start_character":0,"end_line":111,"end_character":61},"in_reply_to":"fa31d9ce_0765c21c","updated":"2017-02-14 20:53:14.000000000","message":"No, I won\u0027t argue with coverage :) Just wanted to have all use-cases.","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a6332fd46ab4ef0c8b7d4ca6375daca34aa50b15","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        self.assertRaises(self._EXC_CLS, attributes.fill_post_defaults,"},{"line_number":101,"context_line":"                          attr_info, {\u0027key\u0027: \u0027X\u0027}, self._EXC_CLS)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def test_override_no_allow_post(self):"},{"line_number":104,"context_line":"        attr_info \u003d {"},{"line_number":105,"context_line":"            \u0027key\u0027: {"},{"line_number":106,"context_line":"                \u0027allow_post\u0027: False,"},{"line_number":107,"context_line":"                \u0027default\u0027: constants.ATTR_NOT_SPECIFIED,"},{"line_number":108,"context_line":"            },"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":"        self._test_fill_default_value(attr_info, {\u0027key\u0027: \u0027X\u0027}, {\u0027key\u0027: \u0027X\u0027},"},{"line_number":111,"context_line":"                                      check_allow_post\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _test_convert_value(self, attr_info, expected, res_dict):"},{"line_number":114,"context_line":"        attributes.convert_values(attr_info, res_dict)"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_0765c21c","line":111,"range":{"start_line":103,"start_character":0,"end_line":111,"end_character":61},"in_reply_to":"fa31d9ce_601e9660","updated":"2017-02-14 17:59:59.000000000","message":"Well the coverage report shows 100% [1]; in light of that do you still think it\u0027s needed?\n\n\n[1] http://logs.openstack.org/44/394244/26/check/neutron-lib-coverage-ubuntu-xenial/95a9190/cover/neutron_lib_api_attributes_py.html","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"fdd0ac6417ee2ae68bda5136997cc00ba223d653","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class TestHelpers(base.BaseTestCase):"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _verify_port_attributes(self, attrs):"},{"line_number":207,"context_line":"        for test_attribute in (\u0027id\u0027, \u0027name\u0027, \u0027mac_address\u0027, \u0027network_id\u0027,"},{"line_number":208,"context_line":"                               \u0027tenant_id\u0027, \u0027fixed_ips\u0027, \u0027status\u0027):"},{"line_number":209,"context_line":"            self.assertIn(test_attribute, attrs)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_get_collection_info_core(self):"},{"line_number":212,"context_line":"        attrs \u003d attributes.get_collection_info()"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_605696cf","line":209,"range":{"start_line":206,"start_character":0,"end_line":209,"end_character":48},"updated":"2017-02-13 20:41:11.000000000","message":"This can be probably added directly to @218. Similar to what\u0027s done in @211-214.\nOr, maybe it can be generalized and reused for 211-214?","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a6332fd46ab4ef0c8b7d4ca6375daca34aa50b15","unresolved":false,"context_lines":[{"line_number":203,"context_line":""},{"line_number":204,"context_line":"class TestHelpers(base.BaseTestCase):"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    def _verify_port_attributes(self, attrs):"},{"line_number":207,"context_line":"        for test_attribute in (\u0027id\u0027, \u0027name\u0027, \u0027mac_address\u0027, \u0027network_id\u0027,"},{"line_number":208,"context_line":"                               \u0027tenant_id\u0027, \u0027fixed_ips\u0027, \u0027status\u0027):"},{"line_number":209,"context_line":"            self.assertIn(test_attribute, attrs)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def test_get_collection_info_core(self):"},{"line_number":212,"context_line":"        attrs \u003d attributes.get_collection_info()"}],"source_content_type":"text/x-python","patch_set":26,"id":"fa31d9ce_870e1239","line":209,"range":{"start_line":206,"start_character":0,"end_line":209,"end_character":48},"in_reply_to":"fa31d9ce_605696cf","updated":"2017-02-14 17:59:59.000000000","message":"Done; just moved it into test_get_collection_info_collection as I prefer to keep the UTs simple.","commit_id":"9f0195ed4576e3893feadfed4c904487fb557dda"},{"author":{"_account_id":7776,"name":"Paul Carver","email":"pcarver@att.com","username":"pcarver"},"change_message_id":"7c0cb2a0898d09c3d717e1cb79c5dc778812ea04","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            },"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":"        self._test_fill_default_value(attr_info, {\u0027key\u0027: \u0027X\u0027}, {\u0027key\u0027: \u0027X\u0027},"},{"line_number":111,"context_line":"                                      check_allow_post\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _test_convert_value(self, attr_info, expected, res_dict):"},{"line_number":114,"context_line":"        attributes.convert_values(attr_info, res_dict)"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa31d9ce_0b8068bf","line":111,"updated":"2017-02-14 20:58:20.000000000","message":"Question: How does a test without an assert work? Does this just check whether the function call throws an exception?","commit_id":"f68ad39301aa2d5fe0283e8c414769577bd69547"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"d75b03440323e0b1e2b9aca983678c6eb09bd774","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            },"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":"        self._test_fill_default_value(attr_info, {\u0027key\u0027: \u0027X\u0027}, {\u0027key\u0027: \u0027X\u0027},"},{"line_number":111,"context_line":"                                      check_allow_post\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _test_convert_value(self, attr_info, expected, res_dict):"},{"line_number":114,"context_line":"        attributes.convert_values(attr_info, res_dict)"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa31d9ce_8e6c6636","line":111,"in_reply_to":"fa31d9ce_0b8068bf","updated":"2017-02-14 21:27:30.000000000","message":"Not sure I follow. This calls self._test_fill_default_value(...) which does the assertion.\n\n\nCan you please clarify.","commit_id":"f68ad39301aa2d5fe0283e8c414769577bd69547"},{"author":{"_account_id":7776,"name":"Paul Carver","email":"pcarver@att.com","username":"pcarver"},"change_message_id":"d22402155ac95eb332669a6519e09f55449cd6de","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            },"},{"line_number":109,"context_line":"        }"},{"line_number":110,"context_line":"        self._test_fill_default_value(attr_info, {\u0027key\u0027: \u0027X\u0027}, {\u0027key\u0027: \u0027X\u0027},"},{"line_number":111,"context_line":"                                      check_allow_post\u003dFalse)"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"    def _test_convert_value(self, attr_info, expected, res_dict):"},{"line_number":114,"context_line":"        attributes.convert_values(attr_info, res_dict)"}],"source_content_type":"text/x-python","patch_set":27,"id":"fa31d9ce_ae912af3","line":111,"in_reply_to":"fa31d9ce_8e6c6636","updated":"2017-02-14 21:31:42.000000000","message":"Oh, I see. I was looking at the asserts in each of the other tests and didn\u0027t see one here so it stuck out.","commit_id":"f68ad39301aa2d5fe0283e8c414769577bd69547"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"9ccc71b84c1e840f20d55f6546174d39017b0170","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    _ATTRS_INSTANCE \u003d attributes.AttributeInfo(_RESOURCE_MAP)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_create_from_attribute_info_instance(self):"},{"line_number":73,"context_line":"        self.assertEqual("},{"line_number":74,"context_line":"            attributes.AttributeInfo("},{"line_number":75,"context_line":"                TestAttributeInfo._ATTRS_INSTANCE).attributes,"},{"line_number":76,"context_line":"            TestAttributeInfo._ATTRS_INSTANCE.attributes)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_create_from_api_def(self):"},{"line_number":79,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":37,"id":"5ff73747_77a86bda","line":76,"range":{"start_line":73,"start_character":8,"end_line":76,"end_character":57},"updated":"2017-04-25 15:31:37.000000000","message":"It\u0027s better to use assertEqual(expected, observed). Actually I was confused when I saw this line(it\u0027s also a little long line for me...).","commit_id":"72e3b3d29d787e886c6c09a367daa89315cd4ea5"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"76a780cb6771643fc32d5f62b431efabac013d9e","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    _ATTRS_INSTANCE \u003d attributes.AttributeInfo(_RESOURCE_MAP)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def test_create_from_attribute_info_instance(self):"},{"line_number":73,"context_line":"        self.assertEqual("},{"line_number":74,"context_line":"            attributes.AttributeInfo("},{"line_number":75,"context_line":"                TestAttributeInfo._ATTRS_INSTANCE).attributes,"},{"line_number":76,"context_line":"            TestAttributeInfo._ATTRS_INSTANCE.attributes)"},{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    def test_create_from_api_def(self):"},{"line_number":79,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":37,"id":"5ff73747_03a324a0","line":76,"range":{"start_line":73,"start_character":8,"end_line":76,"end_character":57},"in_reply_to":"5ff73747_77a86bda","updated":"2017-04-25 17:24:54.000000000","message":"Yes you\u0027re right on the assertEqual(), that was my bad.","commit_id":"72e3b3d29d787e886c6c09a367daa89315cd4ea5"}],"neutron_lib/tests/unit/test_fixture.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a17a8ae6fc008e023801baf6b31980d767a79e17","unresolved":false,"context_lines":[{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def test_fixture(self):"},{"line_number":74,"context_line":"        attributes.add_collection_info({\u0027foo\u0027: \u0027foo\u0027})"},{"line_number":75,"context_line":"        self.assertTrue(self.attribute_map.update.called)"}],"source_content_type":"text/x-python","patch_set":30,"id":"3a1ff146_5a27deb5","line":75,"updated":"2017-03-16 15:39:05.000000000","message":"I think we miss the crucial check here for the fixture - whether it restores the map.","commit_id":"f5a7a299d5e0bbf37efeb57b62978f5b9b52e362"}],"releasenotes/notes/core-attributes-43e6969f1b187e5c.yaml":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"8e706ff6993e5c512c8ce5a26af5ae42848381d6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - The API definitions for the core resources (networks, ports, subnets, subnetpools)"},{"line_number":5,"context_line":"    are now available."},{"line_number":6,"context_line":"  - The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, with the following differences:"},{"line_number":8,"context_line":"      - The ``_RESOURCE_ATTRIBUTE_MAP`` is private. Use ``add_collection()`` to add"},{"line_number":9,"context_line":"        a collection\u0027s attribute map. Use ``get_attribute_map()`` to get the entire"},{"line_number":10,"context_line":"        attribute map, or ``get_attribute_map(collection_name)`` to get a collection\u0027s"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7a77a97e_41e1e5cf","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":66},"updated":"2016-11-21 23:32:52.000000000","message":"I played a little bit with this release note using two different online yaml parsers: http://yaml-online-parser.appspot.com/ and http://www.yamllint.com/.\n\nIt seems the problem is really the combination of the new line with the : at the end. So I think you have two options:\n\n1) Collapse lines 6 and 7 into one. Problem here is that you are probably going to get another error for line larger that 80\n\n2) Drop from line 7 everything after the comma (including the comma) and then add a line 8 at the same level of indentation as 7:\n  - The differences are:\n\nI tested both solutions and they work","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"40b3ac4f3742ab9a15bbb41754c3c5575ddbfbbd","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - The API definitions for the core resources (networks, ports, subnets, subnetpools)"},{"line_number":5,"context_line":"    are now available."},{"line_number":6,"context_line":"  - The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, with the following differences:"},{"line_number":8,"context_line":"      - The ``_RESOURCE_ATTRIBUTE_MAP`` is private. Use ``add_collection()`` to add"},{"line_number":9,"context_line":"        a collection\u0027s attribute map. Use ``get_attribute_map()`` to get the entire"},{"line_number":10,"context_line":"        attribute map, or ``get_attribute_map(collection_name)`` to get a collection\u0027s"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7a77a97e_4f7831f9","line":7,"range":{"start_line":7,"start_character":66,"end_line":7,"end_character":67},"updated":"2016-11-21 22:11:50.000000000","message":"reno doesn\u0027t accept \":\" in this place","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ab95ace108249a16deae99218dce835ffc0c00bc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - The API definitions for the core resources (networks, ports, subnets, subnetpools)"},{"line_number":5,"context_line":"    are now available."},{"line_number":6,"context_line":"  - The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, with the following differences:"},{"line_number":8,"context_line":"      - The ``_RESOURCE_ATTRIBUTE_MAP`` is private. Use ``add_collection()`` to add"},{"line_number":9,"context_line":"        a collection\u0027s attribute map. Use ``get_attribute_map()`` to get the entire"},{"line_number":10,"context_line":"        attribute map, or ``get_attribute_map(collection_name)`` to get a collection\u0027s"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7a77a97e_97f89fc6","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":66},"in_reply_to":"7a77a97e_41e1e5cf","updated":"2016-11-21 23:53:46.000000000","message":"If I try either of these methods I get (with reno 1.8.0):\n\n  File \".tox/releasenotes/local/lib/python2.7/site-packages/reno/formatter.py\", line 33, in _indent_for_list\n    lines \u003d text.splitlines()\nAttributeError: \u0027dict\u0027 object has no attribute \u0027splitlines\u0027","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"673d11cad244e3f971da943b23e8651b73e28043","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - The API definitions for the core resources (networks, ports, subnets, subnetpools)"},{"line_number":5,"context_line":"    are now available."},{"line_number":6,"context_line":"  - The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, with the following differences:"},{"line_number":8,"context_line":"      - The ``_RESOURCE_ATTRIBUTE_MAP`` is private. Use ``add_collection()`` to add"},{"line_number":9,"context_line":"        a collection\u0027s attribute map. Use ``get_attribute_map()`` to get the entire"},{"line_number":10,"context_line":"        attribute map, or ``get_attribute_map(collection_name)`` to get a collection\u0027s"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7a77a97e_8486ab11","line":7,"range":{"start_line":7,"start_character":66,"end_line":7,"end_character":67},"in_reply_to":"7a77a97e_4f7831f9","updated":"2016-11-21 23:14:02.000000000","message":"Ah, this is yaml, so I cannot do this second-level indenting. :(","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"3331d880b46afc02bf37f2691925f817e4f95644","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - The API definitions for the core resources (networks, ports, subnets, subnetpools)"},{"line_number":5,"context_line":"    are now available."},{"line_number":6,"context_line":"  - The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, with the following differences:"},{"line_number":8,"context_line":"      - The ``_RESOURCE_ATTRIBUTE_MAP`` is private. Use ``add_collection()`` to add"},{"line_number":9,"context_line":"        a collection\u0027s attribute map. Use ``get_attribute_map()`` to get the entire"},{"line_number":10,"context_line":"        attribute map, or ``get_attribute_map(collection_name)`` to get a collection\u0027s"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7a77a97e_ab945244","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":66},"in_reply_to":"7a77a97e_97f89fc6","updated":"2016-11-22 02:41:02.000000000","message":"Well, this means reno doesn\u0027t behave the same way as the on-line parsers I played with. Digging a little bit in the doc, though, it seems it allows more complex formatting: http://docs.openstack.org/developer/reno/usage.html#formatting. \n\nSomenthin to play with in a future patchset :-)","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"00f8fb8756c95d5335154281f743a0d8eb52db6f","unresolved":false,"context_lines":[{"line_number":4,"context_line":"  - The API definitions for the core resources (networks, ports, subnets, subnetpools)"},{"line_number":5,"context_line":"    are now available."},{"line_number":6,"context_line":"  - The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, with the following differences:"},{"line_number":8,"context_line":"      - The ``_RESOURCE_ATTRIBUTE_MAP`` is private. Use ``add_collection()`` to add"},{"line_number":9,"context_line":"        a collection\u0027s attribute map. Use ``get_attribute_map()`` to get the entire"},{"line_number":10,"context_line":"        attribute map, or ``get_attribute_map(collection_name)`` to get a collection\u0027s"}],"source_content_type":"text/x-yaml","patch_set":11,"id":"7a77a97e_86a30b4f","line":7,"range":{"start_line":7,"start_character":4,"end_line":7,"end_character":66},"in_reply_to":"7a77a97e_ab945244","updated":"2016-11-22 03:21:30.000000000","message":"Thanks for helping me through this! I think I have what I intended in patch set 15.","commit_id":"b50fc30dff10dc5bd7a4a97d8b1299d5831bb4ce"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"da4ba4ce5b499b89df073346253a8f3f2e4f0be6","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, but note these differences:"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    * The ``RESOURCE_ATTRIBUTE_MAP`` dictionary is no longer publicly"},{"line_number":10,"context_line":"      accessible. Use ``add_collection()`` to add a collection\u0027s attribute"},{"line_number":11,"context_line":"      map. Use ``get_attribute_map()`` to get the entire attribute map, or"},{"line_number":12,"context_line":"      ``get_attribute_map(collection_name)`` to get a collection\u0027s attribute"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"5a74a57a_68308757","line":9,"range":{"start_line":9,"start_character":12,"end_line":9,"end_character":34},"updated":"2016-11-23 15:40:36.000000000","message":"So herein; RESOURCE_ATTRIBUTE_MAP is public on extension defs, but not on core.. As I commented in network.py we should probably be consistent and in which case this release note needs update b/c we will have RESOURCE_ATTRIBUTE_MAP as a public module attr.","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"ee015e79691526c1f87af0fcf5e980ebb8e82c51","unresolved":false,"context_lines":[{"line_number":6,"context_line":"    The utilities from ``neutron.api.v2.attributes`` are now available in"},{"line_number":7,"context_line":"    ``neutron_lib.api.attributes``, but note these differences:"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"    * The ``RESOURCE_ATTRIBUTE_MAP`` dictionary is no longer publicly"},{"line_number":10,"context_line":"      accessible. Use ``add_collection()`` to add a collection\u0027s attribute"},{"line_number":11,"context_line":"      map. Use ``get_attribute_map()`` to get the entire attribute map, or"},{"line_number":12,"context_line":"      ``get_attribute_map(collection_name)`` to get a collection\u0027s attribute"}],"source_content_type":"text/x-yaml","patch_set":17,"id":"5a74a57a_5cfa9f43","line":9,"range":{"start_line":9,"start_character":12,"end_line":9,"end_character":34},"in_reply_to":"5a74a57a_68308757","updated":"2016-11-23 23:08:04.000000000","message":"See my comment in attributes.py","commit_id":"dc9163f13e6c9164f16305c20d5397ae222bacdf"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"a257d7562e0cd6ba8520027cbbcb6d4420687b55","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - The API definitions for the core resources (networks, ports, subnets,"},{"line_number":4,"context_line":"    subnetpools) are now available in ``neutron_lib.api.definitions``."},{"line_number":5,"context_line":"  - |"}],"source_content_type":"text/x-yaml","patch_set":19,"id":"3a71b18c_05665c29","line":2,"updated":"2016-12-06 22:59:06.000000000","message":"Does it make sense to also note that attributes.RESOURCE_ATTRIBUTE_MAP should not be mutated directly, but instead the collection/attribute functions show now be used? Seems like a number of our consumers update it directly today, so perhaps an explicit note is helpful.\n\n\n[1] http://codesearch.openstack.org/?q\u003dattributes.RESOURCE_ATTRIBUTE_MAP\u0026i\u003dnope\u0026files\u003d\u0026repos\u003d","commit_id":"5aaf5fedda9f5d93396ae4d3328e2676e5a2007c"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - The API definitions for the core resources (networks, ports, subnets,"},{"line_number":4,"context_line":"    subnetpools) are now available in ``neutron_lib.api.definitions``."},{"line_number":5,"context_line":"  - |"},{"line_number":6,"context_line":"    The utilities from ``neutron.api.v2.attributes`` are now available in"}],"source_content_type":"text/x-yaml","patch_set":22,"id":"5a3905b3_9642fb3c","line":3,"range":{"start_line":3,"start_character":48,"end_line":3,"end_character":56},"updated":"2017-01-20 22:26:58.000000000","message":"Nit: use ``code formatting`` when refing code-words.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1bb55a7e1ee034958a10d9735cc229ca154ff806","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - The API definitions for the core resources (networks, ports, subnets,"},{"line_number":4,"context_line":"    subnetpools) are now available in ``neutron_lib.api.definitions``."},{"line_number":5,"context_line":"  - |"},{"line_number":6,"context_line":"    The utilities from ``neutron.api.v2.attributes`` are now available in"}],"source_content_type":"text/x-yaml","patch_set":22,"id":"5a3905b3_207654a4","line":3,"range":{"start_line":3,"start_character":48,"end_line":3,"end_character":56},"in_reply_to":"5a3905b3_9642fb3c","updated":"2017-01-21 19:52:02.000000000","message":"Done","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"5c766da1a944b02fc362a89af1a15d9d47eb1e61","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5a3905b3_76a90fdf","line":13,"updated":"2017-01-20 22:26:58.000000000","message":"Perhaps we should also add something about the accessors for the map.. These seem to supplement get_collection_info() from neutron.api.v2.attributes.","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1bb55a7e1ee034958a10d9735cc229ca154ff806","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5a3905b3_c0c3d087","line":13,"in_reply_to":"5a3905b3_76a90fdf","updated":"2017-01-21 19:52:02.000000000","message":"Done","commit_id":"17032aca003f317301a007c174971dadcf16bc2d"}]}
