)]}'
{"neutron_lib/context.py":[{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":55,"context_line":"        self.roles \u003d roles or []"},{"line_number":56,"context_line":"        self.is_advsvc \u003d is_advsvc"},{"line_number":57,"context_line":"        self.is_admin \u003d is_admin"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @property"},{"line_number":60,"context_line":"    def project_id(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_7bebc9b0","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":32},"updated":"2016-03-22 22:24:19.000000000","message":"what about the policy check for admin?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"4dd90417f122aaf00bd2b50271edcb70fe53f1e3","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":55,"context_line":"        self.roles \u003d roles or []"},{"line_number":56,"context_line":"        self.is_advsvc \u003d is_advsvc"},{"line_number":57,"context_line":"        self.is_admin \u003d is_admin"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @property"},{"line_number":60,"context_line":"    def project_id(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_528e6dd0","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":32},"in_reply_to":"fa0719c6_6cb82ae6","updated":"2016-03-23 18:52:35.000000000","message":"oops .. missed that. thanks","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":55,"context_line":"        self.roles \u003d roles or []"},{"line_number":56,"context_line":"        self.is_advsvc \u003d is_advsvc"},{"line_number":57,"context_line":"        self.is_admin \u003d is_admin"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    @property"},{"line_number":60,"context_line":"    def project_id(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_6cb82ae6","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":32},"in_reply_to":"fa0719c6_7bebc9b0","updated":"2016-03-23 01:45:11.000000000","message":"See line 30. I will need to create a devref doc on switching to neutron-lib, and provide clear instructions about this kind of thing.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"}],"neutron_lib/db/_model_base.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4dae4bcd50c435b0220d8d45e40bfb250cbf7073","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"ba0121b8_3c672eb8","updated":"2016-04-06 17:30:19.000000000","message":"This module can be un-privated, I think it\u0027s safe to use.","commit_id":"e6650e0849ba7b4ff9a87c29227acb9307b592f9"}],"neutron_lib/db/_utils.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"4dae4bcd50c435b0220d8d45e40bfb250cbf7073","unresolved":false,"context_lines":[{"line_number":292,"context_line":"        return collection"},{"line_number":293,"context_line":""},{"line_number":294,"context_line":"    def get_collection(self, context, model, dict_func, filters\u003dNone,"},{"line_number":295,"context_line":"                       fields_\u003dNone, sorts\u003dNone, limit\u003dNone, marker_obj\u003dNone,"},{"line_number":296,"context_line":"                       page_reverse\u003dFalse):"},{"line_number":297,"context_line":"        query \u003d self.get_collection_query(context, model, filters\u003dfilters,"},{"line_number":298,"context_line":"                                          sorts\u003dsorts,"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba0121b8_fc3f76b1","line":295,"range":{"start_line":295,"start_character":23,"end_line":295,"end_character":30},"updated":"2016-04-06 17:30:19.000000000","message":"This should be \u0027fields\u0027, not \u0027fields_\u0027!","commit_id":"e6650e0849ba7b4ff9a87c29227acb9307b592f9"}],"neutron_lib/db/api.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"02f1875500188396be7268c4b2d340eb9da7e7f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a68dd71_43ec628f","updated":"2016-01-26 16:23:50.000000000","message":"coverage is pretty low in this module. Check others as well.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2bdb54a972fcafff021fbe61dbbe09fcf5a98f57","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a68dd71_c9bab10a","in_reply_to":"9a68dd71_43ec628f","updated":"2016-01-26 16:43:28.000000000","message":"Ack. This is still WIP.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_FACADE \u003d None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_MAX_RETRIES \u003d 10"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _is_deadlock(e):"},{"line_number":28,"context_line":"    return isinstance(e, db_exc.DBDeadlock)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Retry _MAX_RETRIES times with no delay between retries"},{"line_number":31,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_a6838403","line":28,"range":{"start_line":24,"start_character":0,"end_line":28,"end_character":43},"updated":"2016-03-22 22:24:19.000000000","message":"I noticed some of the code in ml2 plugin and its driver using MAX_ENTRIES and is_deadlock with their slightly modified versions of retries. Should we need to make  a change there?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5270065853d3141d768acd4191a1f094ba45bc57","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_FACADE \u003d None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_MAX_RETRIES \u003d 10"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _is_deadlock(e):"},{"line_number":28,"context_line":"    return isinstance(e, db_exc.DBDeadlock)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Retry _MAX_RETRIES times with no delay between retries"},{"line_number":31,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_eb4f9268","line":28,"range":{"start_line":24,"start_character":0,"end_line":28,"end_character":43},"in_reply_to":"fa0719c6_9498f2c1","updated":"2016-03-24 17:42:32.000000000","message":"You keep saying MAX_ENTRIES, I hope you mean MAX_RETRIES. :)\n\nYes, I can make MAX_RETRIES non-private so those usages can remain.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_FACADE \u003d None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_MAX_RETRIES \u003d 10"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _is_deadlock(e):"},{"line_number":28,"context_line":"    return isinstance(e, db_exc.DBDeadlock)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Retry _MAX_RETRIES times with no delay between retries"},{"line_number":31,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_ccf97682","line":28,"range":{"start_line":24,"start_character":0,"end_line":28,"end_character":43},"in_reply_to":"fa0719c6_a6838403","updated":"2016-03-23 01:45:11.000000000","message":"Which code? I can only find [1].\n\n [1] https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/type_tunnel.py#L138-L140","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"4dd90417f122aaf00bd2b50271edcb70fe53f1e3","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_FACADE \u003d None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_MAX_RETRIES \u003d 10"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _is_deadlock(e):"},{"line_number":28,"context_line":"    return isinstance(e, db_exc.DBDeadlock)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Retry _MAX_RETRIES times with no delay between retries"},{"line_number":31,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_9498f2c1","line":28,"range":{"start_line":24,"start_character":0,"end_line":28,"end_character":43},"in_reply_to":"fa0719c6_ccf97682","updated":"2016-03-23 18:52:35.000000000","message":"that and [2], [3] and one in quota driver. All these are mainly accessing MAX_ENTRIES.. so maybe we dont privatize it?\n\n[2]: https://github.com/openstack/neutron/blob/master/neutron/services/tag/tag_plugin.py#L72\n\n[3]: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L1528","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"edb45ba68894e9640406460f4196237463fc87e6","unresolved":false,"context_lines":[{"line_number":21,"context_line":""},{"line_number":22,"context_line":"_FACADE \u003d None"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"_MAX_RETRIES \u003d 10"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"def _is_deadlock(e):"},{"line_number":28,"context_line":"    return isinstance(e, db_exc.DBDeadlock)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"# Retry _MAX_RETRIES times with no delay between retries"},{"line_number":31,"context_line":"retry_db_errors \u003d oslo_db_api.wrap_db_retry("}],"source_content_type":"text/x-python","patch_set":6,"id":"da0c15f0_dfa3534e","line":28,"range":{"start_line":24,"start_character":0,"end_line":28,"end_character":43},"in_reply_to":"fa0719c6_eb4f9268","updated":"2016-03-24 17:48:37.000000000","message":"oops!","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ec801e75363f0b57b9858559235d2915e0928a20","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# Retry _MAX_RETRIES times with decaying delays between retries:"},{"line_number":38,"context_line":"# 0.1s, 0.2s, 0.4s, 0.8s, 1.6s, ..."},{"line_number":39,"context_line":"decaying_retry_db_errors \u003d oslo_db_api.wrap_db_retry("},{"line_number":40,"context_line":"    max_retries\u003d_MAX_RETRIES,"},{"line_number":41,"context_line":"    retry_interval\u003d0.1,"},{"line_number":42,"context_line":"    inc_retry_interval\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_26ae1881","line":39,"updated":"2016-03-09 18:06:53.000000000","message":"where did this come from?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"628b1deb42ac4d0c627f0b7a367006ea0da7f4b2","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# Retry _MAX_RETRIES times with decaying delays between retries:"},{"line_number":38,"context_line":"# 0.1s, 0.2s, 0.4s, 0.8s, 1.6s, ..."},{"line_number":39,"context_line":"decaying_retry_db_errors \u003d oslo_db_api.wrap_db_retry("},{"line_number":40,"context_line":"    max_retries\u003d_MAX_RETRIES,"},{"line_number":41,"context_line":"    retry_interval\u003d0.1,"},{"line_number":42,"context_line":"    inc_retry_interval\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_37239ebe","line":39,"in_reply_to":"5aef4532_26ae1881","updated":"2016-03-10 20:19:39.000000000","message":"I distilled it from here: https://github.com/openstack/neutron/blob/master/neutron/db/quota/driver.py#L139-L143","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"180adb8c67917d0209da12a68d7959456cc64540","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"# Retry _MAX_RETRIES times with decaying delays between retries:"},{"line_number":38,"context_line":"# 0.1s, 0.2s, 0.4s, 0.8s, 1.6s, ..."},{"line_number":39,"context_line":"decaying_retry_db_errors \u003d oslo_db_api.wrap_db_retry("},{"line_number":40,"context_line":"    max_retries\u003d_MAX_RETRIES,"},{"line_number":41,"context_line":"    retry_interval\u003d0.1,"},{"line_number":42,"context_line":"    inc_retry_interval\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_ab046314","line":39,"in_reply_to":"5aef4532_37239ebe","updated":"2016-03-10 21:15:56.000000000","message":"ack","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # Don\u0027t need to do anything if an enginefacade hasn\u0027t been created"},{"line_number":76,"context_line":"    if _FACADE is not None:"},{"line_number":77,"context_line":"        get_engine().pool.dispose()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_session(autocommit\u003dTrue, expire_on_commit\u003dFalse, use_slave\u003dFalse):"},{"line_number":81,"context_line":"    \"\"\"Helper method to grab session.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_2695b4dd","line":78,"updated":"2016-03-22 22:24:19.000000000","message":"any reason why def autonested_transaction() method was not included?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # Don\u0027t need to do anything if an enginefacade hasn\u0027t been created"},{"line_number":76,"context_line":"    if _FACADE is not None:"},{"line_number":77,"context_line":"        get_engine().pool.dispose()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_session(autocommit\u003dTrue, expire_on_commit\u003dFalse, use_slave\u003dFalse):"},{"line_number":81,"context_line":"    \"\"\"Helper method to grab session.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_6ca30a50","line":78,"in_reply_to":"fa0719c6_2695b4dd","updated":"2016-03-23 01:45:11.000000000","message":"As Kevin said to me, \"it\u0027s a bit of a crappy pattern to not know if you are in a nested transaction or not.\" That\u0027s probably why sqlalchemy doesn\u0027t provide such a helper itself. So it\u0027s not a pattern that I would like to encourage. I would rather see the neutron code fixed up so we don\u0027t need a helper like that.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"4dd90417f122aaf00bd2b50271edcb70fe53f1e3","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    # Don\u0027t need to do anything if an enginefacade hasn\u0027t been created"},{"line_number":76,"context_line":"    if _FACADE is not None:"},{"line_number":77,"context_line":"        get_engine().pool.dispose()"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def get_session(autocommit\u003dTrue, expire_on_commit\u003dFalse, use_slave\u003dFalse):"},{"line_number":81,"context_line":"    \"\"\"Helper method to grab session.\"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_f4320ea6","line":78,"in_reply_to":"fa0719c6_6ca30a50","updated":"2016-03-23 18:52:35.000000000","message":"I see","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"}],"neutron_lib/db/base.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"536090d339e4d33254410351936bbdd2b6ebd61e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"da6ed579_97239dbc","updated":"2016-01-15 18:00:08.000000000","message":"Won\u0027t it be harder keeping this file in sync with Neutron, with it containing a merge from several neutron modules?","commit_id":"9bdb23b94b6b2114edb0d058af86018075b3b890"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"397fd500c36648d3a33d729e7beeca4bcf157fce","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"9a68dd71_95ed9e8d","in_reply_to":"da6ed579_97239dbc","updated":"2016-01-21 04:21:12.000000000","message":"lib-ifying the db and api stuff is going to require some changes that are not copy-paste.","commit_id":"9bdb23b94b6b2114edb0d058af86018075b3b890"}],"neutron_lib/db/common_db_mixin.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"a087d35318a97e0e5e92dd64b54739e81d8e5acd","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import weakref"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class CommonDbMixin(object):"},{"line_number":17,"context_line":"    \"\"\"Add model query hooks and extend resource attributes."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    Used in core and service plugins."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_a99b0217","line":16,"updated":"2016-01-25 15:44:53.000000000","message":"While doing the job for quota enforcement I added some non-class versions of methods like model_query.\n\nThis was because I thought one does not have necessarily have to add this as a mixin to some other class. \nObviously duplicating is never good. Likewise I did not feel like changing the methods in this class to static as there are plenty of users.\n\nThis might be the right moment to do so.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"f0ddddc5cec217dcecbe150b8bd8978d7b29ed2a","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import weakref"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class CommonDbMixin(object):"},{"line_number":17,"context_line":"    \"\"\"Add model query hooks and extend resource attributes."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    Used in core and service plugins."}],"source_content_type":"text/x-python","patch_set":3,"id":"3a57f1b5_a81decbe","line":16,"in_reply_to":"9a68dd71_6e75fe2f","updated":"2016-02-10 12:19:10.000000000","message":"thanks I did not notice that","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b4f5e6919282a75ae758e6f3c7cdf7a9f05255cf","unresolved":false,"context_lines":[{"line_number":13,"context_line":"import weakref"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"class CommonDbMixin(object):"},{"line_number":17,"context_line":"    \"\"\"Add model query hooks and extend resource attributes."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"    Used in core and service plugins."}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_6e75fe2f","line":16,"in_reply_to":"9a68dd71_a99b0217","updated":"2016-01-25 23:49:47.000000000","message":"Thanks. I apologize for not alerting you that they model_query \u0026 co. methods are now in query_utils.py here. Take a look and let me know what you think.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"}],"neutron_lib/db/constants.py":[{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"02f1875500188396be7268c4b2d340eb9da7e7f0","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# Database field sizes"},{"line_number":15,"context_line":"NAME_MAX_LEN \u003d 255"},{"line_number":16,"context_line":"TENANT_ID_MAX_LEN \u003d 255"},{"line_number":17,"context_line":"PROJECT_ID_MAX_LEN \u003d TENANT_ID_MAX_LEN"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_07167755","line":14,"updated":"2016-01-26 16:23:50.000000000","message":"Is it worth it to define length of UUID based fields (set to 36), so we can start using it?\n\nCould also consider other common ones, like MAC, IP, and maybe status.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2bdb54a972fcafff021fbe61dbbe09fcf5a98f57","unresolved":false,"context_lines":[{"line_number":11,"context_line":"#    under the License."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"# Database field sizes"},{"line_number":15,"context_line":"NAME_MAX_LEN \u003d 255"},{"line_number":16,"context_line":"TENANT_ID_MAX_LEN \u003d 255"},{"line_number":17,"context_line":"PROJECT_ID_MAX_LEN \u003d TENANT_ID_MAX_LEN"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_a9541dca","line":14,"in_reply_to":"9a68dd71_07167755","updated":"2016-01-26 16:43:28.000000000","message":"Good idea, thanks.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"}],"neutron_lib/db/model_base.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b4f5e6919282a75ae758e6f3c7cdf7a9f05255cf","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron_lib.db import constants as db_const"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"def _model_query_scope(context, model):"},{"line_number":26,"context_line":"    # Unless a context has \u0027admin\u0027 or \u0027advanced-service\u0027 rights the"},{"line_number":27,"context_line":"    # query will be scoped to a single tenant_id"},{"line_number":28,"context_line":"    return ((not context.is_admin and hasattr(model, \u0027tenant_id\u0027)) and"},{"line_number":29,"context_line":"            (not context.is_advsvc and hasattr(model, \u0027tenant_id\u0027)))"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def _model_query(context, model):"},{"line_number":33,"context_line":"    query \u003d context.session.query(model)"},{"line_number":34,"context_line":"    # define basic filter condition for model query"},{"line_number":35,"context_line":"    query_filter \u003d None"},{"line_number":36,"context_line":"    if _model_query_scope(context, model):"},{"line_number":37,"context_line":"        query_filter \u003d (model.tenant_id \u003d\u003d context.tenant_id)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    if query_filter is not None:"},{"line_number":40,"context_line":"        query \u003d query.filter(query_filter)"},{"line_number":41,"context_line":"    return query"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class HasTenant(object):"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a68dd71_4ea7dabc","line":41,"range":{"start_line":25,"start_character":0,"end_line":41,"end_character":16},"updated":"2016-01-25 23:49:47.000000000","message":"Note to self: These two methods should be removed from here. They are in query_utils.py now.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    # NOTE: tenant_id is just a free form string."},{"line_number":26,"context_line":"    # NOTE: Do not assume it is a UUID."},{"line_number":27,"context_line":"    # NOTE: This field is indexed."},{"line_number":28,"context_line":"    tenant_id \u003d sa.Column(sa.String(db_const.TENANT_ID_MAX_LEN), index\u003dTrue)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class HasId(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_81f74af4","line":28,"range":{"start_line":28,"start_character":45,"end_line":28,"end_character":62},"updated":"2016-03-22 22:24:19.000000000","message":"why not directly use TENANT_ID_FIELD_SIZE instead?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    # NOTE: tenant_id is just a free form string."},{"line_number":26,"context_line":"    # NOTE: Do not assume it is a UUID."},{"line_number":27,"context_line":"    # NOTE: This field is indexed."},{"line_number":28,"context_line":"    tenant_id \u003d sa.Column(sa.String(db_const.TENANT_ID_MAX_LEN), index\u003dTrue)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class HasId(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_6c3f8ad6","line":28,"range":{"start_line":28,"start_character":45,"end_line":28,"end_character":62},"in_reply_to":"fa0719c6_81f74af4","updated":"2016-03-23 01:45:11.000000000","message":"I was kind of expecting someone to object to the shiny new _FIELD_SIZE constants.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class HasId(object):"},{"line_number":32,"context_line":"    \"\"\"id mixin, add to subclasses that have an id.\"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    id \u003d sa.Column(sa.String(36),"},{"line_number":35,"context_line":"                   primary_key\u003dTrue,"},{"line_number":36,"context_line":"                   default\u003duuidutils.generate_uuid)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_e1c5668e","line":34,"range":{"start_line":34,"start_character":29,"end_line":34,"end_character":31},"updated":"2016-03-22 22:24:19.000000000","message":"use the shiny new db constants?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":31,"context_line":"class HasId(object):"},{"line_number":32,"context_line":"    \"\"\"id mixin, add to subclasses that have an id.\"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    id \u003d sa.Column(sa.String(36),"},{"line_number":35,"context_line":"                   primary_key\u003dTrue,"},{"line_number":36,"context_line":"                   default\u003duuidutils.generate_uuid)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_cc2696cd","line":34,"range":{"start_line":34,"start_character":29,"end_line":34,"end_character":31},"in_reply_to":"fa0719c6_e1c5668e","updated":"2016-03-23 01:45:11.000000000","message":"Aye.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":78,"context_line":"BASEV2 \u003d declarative.declarative_base(cls\u003dNeutronBaseV2)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class StandardAttribute(BASEV2):"},{"line_number":82,"context_line":"    \"\"\"Common table to associate all Neutron API resources."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    By having Neutron objects related to this table, we can associate new"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_216e3e95","line":81,"range":{"start_line":81,"start_character":30,"end_line":81,"end_character":32},"updated":"2016-03-22 22:24:19.000000000","message":"timestampmixin missing","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":78,"context_line":"BASEV2 \u003d declarative.declarative_base(cls\u003dNeutronBaseV2)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"class StandardAttribute(BASEV2):"},{"line_number":82,"context_line":"    \"\"\"Common table to associate all Neutron API resources."},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    By having Neutron objects related to this table, we can associate new"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_6c166a56","line":81,"range":{"start_line":81,"start_character":30,"end_line":81,"end_character":32},"in_reply_to":"fa0719c6_216e3e95","updated":"2016-03-23 01:45:11.000000000","message":"Ack. Working on this.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # before a 2-byte prefix is required. We shouldn\u0027t get anywhere near this"},{"line_number":107,"context_line":"    # limit with our table names..."},{"line_number":108,"context_line":"    resource_type \u003d sa.Column(sa.String(255), nullable\u003dFalse)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class HasStandardAttributes(object):"},{"line_number":112,"context_line":"    @declarative.declared_attr"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_e1fa86bc","line":109,"updated":"2016-03-22 22:24:19.000000000","message":"description missing","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    # before a 2-byte prefix is required. We shouldn\u0027t get anywhere near this"},{"line_number":107,"context_line":"    # limit with our table names..."},{"line_number":108,"context_line":"    resource_type \u003d sa.Column(sa.String(255), nullable\u003dFalse)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"class HasStandardAttributes(object):"},{"line_number":112,"context_line":"    @declarative.declared_attr"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_cc0df63f","line":109,"in_reply_to":"fa0719c6_e1fa86bc","updated":"2016-03-23 01:45:11.000000000","message":"Ack.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ec801e75363f0b57b9858559235d2915e0928a20","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        super(HasStandardAttributes, self).__init__(*args, **kwargs)"},{"line_number":134,"context_line":"        # here we automatically create the related standard attribute object"},{"line_number":135,"context_line":"        self.standard_attr \u003d StandardAttribute("},{"line_number":136,"context_line":"            resource_type\u003dself.__tablename__)"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_2633b863","line":136,"range":{"start_line":136,"start_character":44,"end_line":136,"end_character":45},"updated":"2016-03-09 18:06:53.000000000","message":"This model now has a description attr upstream","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":133,"context_line":"        super(HasStandardAttributes, self).__init__(*args, **kwargs)"},{"line_number":134,"context_line":"        # here we automatically create the related standard attribute object"},{"line_number":135,"context_line":"        self.standard_attr \u003d StandardAttribute("},{"line_number":136,"context_line":"            resource_type\u003dself.__tablename__)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa0719c6_ec027a0a","line":136,"range":{"start_line":136,"start_character":44,"end_line":136,"end_character":45},"in_reply_to":"5aef4532_2633b863","updated":"2016-03-23 01:45:11.000000000","message":"Ack.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"}],"neutron_lib/policy.py":[{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"a087d35318a97e0e5e92dd64b54739e81d8e5acd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a68dd71_899e3eb7","updated":"2016-01-25 15:44:53.000000000","message":"I don\u0027t think any from this module should be moved to neutron_lib, because it is a module which is meant to be consumed from the WSGI layer only. It could easily live in neutron.\n\nAlso, the bits being moved here are simple wrappers around oslo_policy, moving them to neutron-lib has near-zero advantages imho.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":10980,"name":"Doug Wiegley","email":"dougwig@parkside.io","username":"dougw"},"change_message_id":"dbc8e74b03abb4d0ddb1c59cce48b71b319223e6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a68dd71_aefbf677","in_reply_to":"9a68dd71_899e3eb7","updated":"2016-01-25 19:44:56.000000000","message":"This is a good point, and as long as policy.d exists, would be nice to not include. On the flip side, all the various agents import policy for some reason; maybe we just need to factor that away somehow.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b4f5e6919282a75ae758e6f3c7cdf7a9f05255cf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"9a68dd71_16324fa7","in_reply_to":"9a68dd71_aefbf677","updated":"2016-01-25 23:49:47.000000000","message":"I think it makes sense to not include policy.py in this change. We can revisit it later in a separate patch if needed.","commit_id":"74573db05577e4f84fd7db7af9db9453d0a85758"}],"neutron_lib/tests/etc/policy.json":[{"author":{"_account_id":7018,"name":"Abhishek Raut","email":"rauta@vmware.com","username":"abhiraut"},"change_message_id":"76d49071f4debeca8a93220d87a55136e08f9621","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"context_is_advsvc\":  \"role:advsvc\","},{"line_number":4,"context_line":"    \"default\": \"rule:admin_or_owner\""}],"source_content_type":"application/json","patch_set":6,"id":"fa0719c6_214d9e6c","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":1},"updated":"2016-03-22 22:24:19.000000000","message":"this file needed?","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8feb62c2a90f4ef9f1bee9c408af4e1dd41a19cc","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"context_is_admin\":  \"role:admin\","},{"line_number":3,"context_line":"    \"context_is_advsvc\":  \"role:advsvc\","},{"line_number":4,"context_line":"    \"default\": \"rule:admin_or_owner\""}],"source_content_type":"application/json","patch_set":6,"id":"fa0719c6_677203af","line":1,"range":{"start_line":1,"start_character":0,"end_line":1,"end_character":1},"in_reply_to":"fa0719c6_214d9e6c","updated":"2016-03-23 01:45:11.000000000","message":"Nope. Thanks for spotting that.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"}],"neutron_lib/tests/unit/db/test_utils.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"ec801e75363f0b57b9858559235d2915e0928a20","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                          create_bindings)"},{"line_number":68,"context_line":"        delete_fn.assert_called_once_with(1234)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # def test_model_query_scope_is_tenant_id(self):"},{"line_number":71,"context_line":"    #     \"\"\"Exhaustive test to make sure it never breaks.\"\"\""},{"line_number":72,"context_line":"    #     matrix \u003d {"},{"line_number":73,"context_line":"    #         # (admin, advsvc, tenant): result"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_465d2446","line":70,"range":{"start_line":70,"start_character":6,"end_line":70,"end_character":9},"updated":"2016-03-09 18:06:53.000000000","message":"use skiptest for now if this is broken.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"628b1deb42ac4d0c627f0b7a367006ea0da7f4b2","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                          create_bindings)"},{"line_number":68,"context_line":"        delete_fn.assert_called_once_with(1234)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # def test_model_query_scope_is_tenant_id(self):"},{"line_number":71,"context_line":"    #     \"\"\"Exhaustive test to make sure it never breaks.\"\"\""},{"line_number":72,"context_line":"    #     matrix \u003d {"},{"line_number":73,"context_line":"    #         # (admin, advsvc, tenant): result"}],"source_content_type":"text/x-python","patch_set":6,"id":"5aef4532_faa63b0d","line":70,"range":{"start_line":70,"start_character":6,"end_line":70,"end_character":9},"in_reply_to":"5aef4532_465d2446","updated":"2016-03-10 20:19:39.000000000","message":"It works fine, but I am intending to delete it since db_utils.model_query_scope_is_tenant_id() is covered by test_model_query() below.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5270065853d3141d768acd4191a1f094ba45bc57","unresolved":false,"context_lines":[{"line_number":67,"context_line":"                          create_bindings)"},{"line_number":68,"context_line":"        delete_fn.assert_called_once_with(1234)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    # def test_model_query_scope_is_tenant_id(self):"},{"line_number":71,"context_line":"    #     \"\"\"Exhaustive test to make sure it never breaks.\"\"\""},{"line_number":72,"context_line":"    #     matrix \u003d {"},{"line_number":73,"context_line":"    #         # (admin, advsvc, tenant): result"}],"source_content_type":"text/x-python","patch_set":6,"id":"da0c15f0_7fc84775","line":70,"range":{"start_line":70,"start_character":6,"end_line":70,"end_character":9},"in_reply_to":"5aef4532_faa63b0d","updated":"2016-03-24 17:42:32.000000000","message":"I decided to keep it since it is very quick and if it fails it is a severe regression.","commit_id":"9a998822f71677a98c860fc35fc2499906e2a3a2"}]}
