)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"4b19d7a11252d4b27947bd662ed07573d21c5b2f","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds support for the new Newton Neutron RBAC"},{"line_number":10,"context_line":"policy functionality. This allows networks to be"},{"line_number":11,"context_line":"shared across tenants."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ie433dbd2554648bad7ca9f6940069c85258b03c7"},{"line_number":14,"context_line":"Implements: blueprint neutron-tenant-rbac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7a8ec9b2_a080008d","line":11,"updated":"2016-09-19 17:18:50.000000000","message":"Would be helpful to put this into the commit message for reference:\n\nhttps://developer.rackspace.com/blog/A-First-Look-at-RBAC-in-the-Liberty-Release-of-Neutron/","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"73c4524815b2ad6cce6cfdae101a34f1934bd192","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Adds support for the new Newton Neutron RBAC"},{"line_number":10,"context_line":"policy functionality. This allows networks to be"},{"line_number":11,"context_line":"shared across tenants."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Change-Id: Ie433dbd2554648bad7ca9f6940069c85258b03c7"},{"line_number":14,"context_line":"Implements: blueprint neutron-tenant-rbac"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"7a8ec9b2_23effe1e","line":11,"in_reply_to":"7a8ec9b2_a080008d","updated":"2016-09-21 23:12:56.000000000","message":"Done","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"}],"searchlight/cmd/manage.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"992d69a5807b4c834802d2b9c290436007ffe2ab","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        # Create the internal state (mostly indices/mappings)."},{"line_number":298,"context_line":"        # TODO(ricka): Do not hardcode the internal index name. Maybe make it"},{"line_number":299,"context_line":"        #              configurable."},{"line_number":300,"context_line":"        es_utils.create_internal_state(\"searchlight-state\")"},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        # Start the re-indexing process."},{"line_number":303,"context_line":"        # Now we are starting to change Elasticsearch. Let\u0027s clean up"}],"source_content_type":"text/x-python","patch_set":1,"id":"bacf61ea_558a0b1c","line":300,"updated":"2016-07-29 18:57:27.000000000","message":"kibana uses .kibana.  maybe this should be .searchlight for the default. definitely make it a constant and reference from elsewhere if nothing else.","commit_id":"910d0a3b461131d2bff88348d27afc8547ba528c"}],"searchlight/elasticsearch/plugins/base.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                                         index\u003dindex_name)"},{"line_number":169,"context_line":"        self.index_initial_post(index_name)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def index_initial_post(self, index_name\u003dNone):"},{"line_number":172,"context_line":"        \"\"\"Some plugins will need to do post-processing after all of the"},{"line_number":173,"context_line":"           regular documents have been indexed."},{"line_number":174,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_5ca24faf","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":26},"updated":"2016-08-16 20:57:19.000000000","message":"If there\u0027s only one instance of this being necessary, why not overload index_initial_data in network.py and do this part afterwards?","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":168,"context_line":"                                         index\u003dindex_name)"},{"line_number":169,"context_line":"        self.index_initial_post(index_name)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def index_initial_post(self, index_name\u003dNone):"},{"line_number":172,"context_line":"        \"\"\"Some plugins will need to do post-processing after all of the"},{"line_number":173,"context_line":"           regular documents have been indexed."},{"line_number":174,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_30849a5c","line":171,"range":{"start_line":171,"start_character":8,"end_line":171,"end_character":26},"in_reply_to":"3ac371cc_5ca24faf","updated":"2016-08-17 22:32:43.000000000","message":"It makes the code more obscure. Especially when understanding the plugins for the new pipeline architecture, but I can switch it over. I\u0027ll add a comment about it.\n\nIt also requires a messy kludge in the functional tests. If you still like it, I\u0027ll keep it.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        service) into an index assumed to have been created with"},{"line_number":156,"context_line":"        prepare_index. If index_name is not set, the searchlight-listener alias"},{"line_number":157,"context_line":"        will be used instead."},{"line_number":158,"context_line":"        NB: Some plugins will need to perform additional steps after this"},{"line_number":159,"context_line":"            indexing. In this case the plugin will overload this method."},{"line_number":160,"context_line":"        \"\"\""},{"line_number":161,"context_line":"        object_list \u003d self.get_objects()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_a985d607","line":158,"range":{"start_line":158,"start_character":25,"end_line":158,"end_character":29},"updated":"2016-09-15 19:59:49.000000000","message":"I don\u0027t think this is a necessary comment; it\u0027s how inheritance works.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"882ad2a9879a5a67d4ad5994d7ef4caeae37755a","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        service) into an index assumed to have been created with"},{"line_number":156,"context_line":"        prepare_index. If index_name is not set, the searchlight-listener alias"},{"line_number":157,"context_line":"        will be used instead."},{"line_number":158,"context_line":"        NB: Some plugins will need to perform additional steps after this"},{"line_number":159,"context_line":"            indexing. In this case the plugin will overload this method."},{"line_number":160,"context_line":"        \"\"\""},{"line_number":161,"context_line":"        object_list \u003d self.get_objects()"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_c6fbba77","line":158,"range":{"start_line":158,"start_character":25,"end_line":158,"end_character":29},"in_reply_to":"7a8ec9b2_a985d607","updated":"2016-09-16 18:16:59.000000000","message":"I added the comment since this method is almost ever inherited. I just want to make future developers aware of this corner-case.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                                         index\u003dindex_name)"},{"line_number":171,"context_line":"        self.index_initial_post(index_name)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def index_initial_post(self, index_name\u003dNone):"},{"line_number":174,"context_line":"        \"\"\"Some plugins will need to do post-processing after all of the"},{"line_number":175,"context_line":"           regular documents have been indexed."},{"line_number":176,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_e9d0bef8","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":26},"updated":"2016-09-15 19:59:49.000000000","message":"I still don\u0027t really like this; it\u0027s not clear to me what this buys over networks.py overriding index_initial_data; networks.py would still have to call super(..).index_initial_post to be safe since it has no way of being assured that this method does nothing in the base class.\n\nOn further inspection networks.py DOES override index_initial_data so this can be remobved.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"882ad2a9879a5a67d4ad5994d7ef4caeae37755a","unresolved":false,"context_lines":[{"line_number":170,"context_line":"                                         index\u003dindex_name)"},{"line_number":171,"context_line":"        self.index_initial_post(index_name)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def index_initial_post(self, index_name\u003dNone):"},{"line_number":174,"context_line":"        \"\"\"Some plugins will need to do post-processing after all of the"},{"line_number":175,"context_line":"           regular documents have been indexed."},{"line_number":176,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_46e08acd","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":26},"in_reply_to":"7a8ec9b2_e9d0bef8","updated":"2016-09-16 18:16:59.000000000","message":"Oops. This is an artifact from the initial version of this patch. It has been remobved.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"}],"searchlight/elasticsearch/plugins/helper.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":437,"context_line":"            LOG.warning(_LW("},{"line_number":438,"context_line":"                \u0027Error querying %(p)s %(f)s. Error %(exc)s\u0027) %"},{"line_number":439,"context_line":"                {\u0027p\u0027: path, \u0027f\u0027: field, \u0027exc\u0027: exc})"},{"line_number":440,"context_line":"            return {}"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def get_documents_by_type(self, version\u003dTrue):"},{"line_number":443,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_294aa6ac","line":440,"range":{"start_line":440,"start_character":19,"end_line":440,"end_character":21},"updated":"2016-09-15 19:59:49.000000000","message":"Is this the right thing to do? An empty dict is neither a valid search request nor an error; it seems cleaner to let the exception bubble up","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"882ad2a9879a5a67d4ad5994d7ef4caeae37755a","unresolved":false,"context_lines":[{"line_number":437,"context_line":"            LOG.warning(_LW("},{"line_number":438,"context_line":"                \u0027Error querying %(p)s %(f)s. Error %(exc)s\u0027) %"},{"line_number":439,"context_line":"                {\u0027p\u0027: path, \u0027f\u0027: field, \u0027exc\u0027: exc})"},{"line_number":440,"context_line":"            return {}"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def get_documents_by_type(self, version\u003dTrue):"},{"line_number":443,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_661826d4","line":440,"range":{"start_line":440,"start_character":19,"end_line":440,"end_character":21},"in_reply_to":"7a8ec9b2_294aa6ac","updated":"2016-09-16 18:16:59.000000000","message":"It is now bubbling.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            LOG.warning(_LW("},{"line_number":457,"context_line":"                \u0027Error querying %(t)s. Error %(exc)s\u0027) %"},{"line_number":458,"context_line":"                {\u0027t\u0027: self.document_type, \u0027exc\u0027: exc})"},{"line_number":459,"context_line":"            return {}"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def update_document(self, document, doc_id, update_as_script,"},{"line_number":462,"context_line":"                        expected_version\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_49c9b225","line":459,"range":{"start_line":459,"start_character":12,"end_line":459,"end_character":18},"updated":"2016-09-15 19:59:49.000000000","message":"Same comment as above with {}","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"882ad2a9879a5a67d4ad5994d7ef4caeae37755a","unresolved":false,"context_lines":[{"line_number":456,"context_line":"            LOG.warning(_LW("},{"line_number":457,"context_line":"                \u0027Error querying %(t)s. Error %(exc)s\u0027) %"},{"line_number":458,"context_line":"                {\u0027t\u0027: self.document_type, \u0027exc\u0027: exc})"},{"line_number":459,"context_line":"            return {}"},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"    def update_document(self, document, doc_id, update_as_script,"},{"line_number":462,"context_line":"                        expected_version\u003dNone):"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_c629fae7","line":459,"range":{"start_line":459,"start_character":12,"end_line":459,"end_character":18},"in_reply_to":"7a8ec9b2_49c9b225","updated":"2016-09-16 18:16:59.000000000","message":"Same bubbling.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"998cc9661d631905f8d5a000b9b320d0e3f2f408","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            return self._index_alias_multiple_indexes_get("},{"line_number":418,"context_line":"                doc_id\u003ddoc_id, routing\u003drouting)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"    def get_docs_by_nested_field(self, path, field, value, version\u003dFalse):"},{"line_number":421,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"},{"line_number":422,"context_line":"           need to specify the path of the nested field as well as the"},{"line_number":423,"context_line":"           field itself. We will include the \u0027version\u0027 field if commanded"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_c5c79710","line":420,"updated":"2016-09-23 14:08:33.000000000","message":"there\u0027s a similar function in neutron security rule plugin, could remove duplicate code in another patch.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"76a60c62374e3f5b61e6a6c4c4f08fff8f00e51e","unresolved":false,"context_lines":[{"line_number":417,"context_line":"            return self._index_alias_multiple_indexes_get("},{"line_number":418,"context_line":"                doc_id\u003ddoc_id, routing\u003drouting)"},{"line_number":419,"context_line":""},{"line_number":420,"context_line":"    def get_docs_by_nested_field(self, path, field, value, version\u003dFalse):"},{"line_number":421,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"},{"line_number":422,"context_line":"           need to specify the path of the nested field as well as the"},{"line_number":423,"context_line":"           field itself. We will include the \u0027version\u0027 field if commanded"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_3b8f49cd","line":420,"in_reply_to":"5a8bc5a2_c5c79710","updated":"2016-09-26 06:28:21.000000000","message":"Good catch. That function should have been deleted. It now no longer exists.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"998cc9661d631905f8d5a000b9b320d0e3f2f408","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                {\u0027p\u0027: path, \u0027f\u0027: field, \u0027exc\u0027: exc})"},{"line_number":440,"context_line":"            raise"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def get_documents_by_type(self, version\u003dTrue):"},{"line_number":443,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"},{"line_number":444,"context_line":"           need to specify the path of the nested field as well as the"},{"line_number":445,"context_line":"           field itself. We will include the \u0027version\u0027 field if commanded"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_45e8e7e2","line":442,"updated":"2016-09-23 14:08:33.000000000","message":"I guess it\u0027s from previous patch set and not used anymore.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"76a60c62374e3f5b61e6a6c4c4f08fff8f00e51e","unresolved":false,"context_lines":[{"line_number":439,"context_line":"                {\u0027p\u0027: path, \u0027f\u0027: field, \u0027exc\u0027: exc})"},{"line_number":440,"context_line":"            raise"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"    def get_documents_by_type(self, version\u003dTrue):"},{"line_number":443,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"},{"line_number":444,"context_line":"           need to specify the path of the nested field as well as the"},{"line_number":445,"context_line":"           field itself. We will include the \u0027version\u0027 field if commanded"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_7bc391ed","line":442,"in_reply_to":"5a8bc5a2_45e8e7e2","updated":"2016-09-26 06:28:21.000000000","message":"Yep. It was from a previous version ofd this patch. It too is an ex-function.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"}],"searchlight/elasticsearch/plugins/neutron/__init__.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    members_list \u003d network[\u0027members\u0027]"},{"line_number":26,"context_line":"    if target_tenant not in members_list:"},{"line_number":27,"context_line":"        members_list.append(target_tenant)"},{"line_number":28,"context_line":"        network[\u0027members\u0027] \u003d members_list"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # Add RBAC policy."},{"line_number":31,"context_line":"    rbac_policy \u003d network[\u0027rbac_policy\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_21e6fd14","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":15},"updated":"2016-09-16 22:26:26.000000000","message":"This line isn\u0027t necessary; members_list is already a reference to network[\u0027members\u0027]","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":25,"context_line":"    members_list \u003d network[\u0027members\u0027]"},{"line_number":26,"context_line":"    if target_tenant not in members_list:"},{"line_number":27,"context_line":"        members_list.append(target_tenant)"},{"line_number":28,"context_line":"        network[\u0027members\u0027] \u003d members_list"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # Add RBAC policy."},{"line_number":31,"context_line":"    rbac_policy \u003d network[\u0027rbac_policy\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_4fc5165a","line":28,"range":{"start_line":28,"start_character":8,"end_line":28,"end_character":15},"in_reply_to":"7a8ec9b2_21e6fd14","updated":"2016-09-21 23:10:19.000000000","message":"Done.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":41,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":42,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":43,"context_line":"        serialized[\u0027members\u0027] \u003d [serialized[\u0027tenant_id\u0027]]"},{"line_number":44,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":45,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"},{"line_number":46,"context_line":"    return serialized"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_61fe45af","line":43,"range":{"start_line":43,"start_character":20,"end_line":43,"end_character":27},"updated":"2016-09-16 22:26:26.000000000","message":"Not sure about the reasoning behind this","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aba5d9600016931fda564b650550ed660fc55ffb","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":41,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":42,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":43,"context_line":"        serialized[\u0027members\u0027] \u003d [serialized[\u0027tenant_id\u0027]]"},{"line_number":44,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":45,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"},{"line_number":46,"context_line":"    return serialized"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_0882b452","line":43,"range":{"start_line":43,"start_character":20,"end_line":43,"end_character":27},"in_reply_to":"7a8ec9b2_0fa4eea3","updated":"2016-09-22 13:58:21.000000000","message":"I meant - why add tenant_id to members? It implies a policy rule exists which is not the case. It doesn\u0027t make much practical difference, especially as we\u0027re hiding the fields, but unless ALL access control is delegated ot the members field it\u0027s not necessary.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":41,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":42,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":43,"context_line":"        serialized[\u0027members\u0027] \u003d [serialized[\u0027tenant_id\u0027]]"},{"line_number":44,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":45,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"},{"line_number":46,"context_line":"    return serialized"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_0fa4eea3","line":43,"range":{"start_line":43,"start_character":20,"end_line":43,"end_character":27},"in_reply_to":"7a8ec9b2_61fe45af","updated":"2016-09-21 23:10:19.000000000","message":"We moved the code to merge the policy into get_object(). But we still need to handle the case where we get a notification  for a new network. This does not go through get_object().","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1d85892c600d667fa463897af26c143c3ede9f4b","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":40,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":41,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":42,"context_line":"        serialized[\u0027members\u0027] \u003d [serialized[\u0027tenant_id\u0027]]"},{"line_number":43,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":44,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"},{"line_number":45,"context_line":"    return serialized"}],"source_content_type":"text/x-python","patch_set":11,"id":"5a8bc5a2_283130a3","line":42,"range":{"start_line":42,"start_character":20,"end_line":42,"end_character":27},"updated":"2016-09-22 13:59:34.000000000","message":"I still don\u0027t think this is necessary, but I guess it doesn\u0027t really hurt.","commit_id":"79db1e7dd5d9e1d149fc3e21d86ca52a37c5aa57"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"998cc9661d631905f8d5a000b9b320d0e3f2f408","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Remove subnets because we index them separately"},{"line_number":39,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":40,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":41,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":42,"context_line":"        serialized[\u0027members\u0027] \u003d [serialized[\u0027tenant_id\u0027]]"},{"line_number":43,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":44,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_fb0fd4de","line":41,"updated":"2016-09-23 14:08:33.000000000","message":"There is a potential inconsistency issue. For networks created by initial indexing, network owners will not be added into members because \u0027members\u0027 is in network payload(no matter it\u0027s a empty list or list of member ids). But for networks created by notifications, network owner is added into \u0027members\u0027 list.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"76a60c62374e3f5b61e6a6c4c4f08fff8f00e51e","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Remove subnets because we index them separately"},{"line_number":39,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":40,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":41,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":42,"context_line":"        serialized[\u0027members\u0027] \u003d [serialized[\u0027tenant_id\u0027]]"},{"line_number":43,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":44,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_81a2acfb","line":41,"in_reply_to":"5a8bc5a2_fb0fd4de","updated":"2016-09-26 06:28:21.000000000","message":"You\u0027re right. This is also addressed in Steve\u0027s comment. We will now match index and notification.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"d33939b0f11e4914522d47d2d019b026e9448fb2","unresolved":false,"context_lines":[{"line_number":38,"context_line":"    # Remove subnets because we index them separately"},{"line_number":39,"context_line":"    serialized.pop(\u0027subnets\u0027)"},{"line_number":40,"context_line":"    serialized[\u0027project_id\u0027] \u003d serialized[\u0027tenant_id\u0027]"},{"line_number":41,"context_line":"    if \u0027members\u0027 not in serialized:"},{"line_number":42,"context_line":"        serialized[\u0027members\u0027] \u003d []"},{"line_number":43,"context_line":"    if \u0027rbac_policy\u0027 not in serialized:"},{"line_number":44,"context_line":"        serialized[\u0027rbac_policy\u0027] \u003d []"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a8bc5a2_a975b498","line":41,"updated":"2016-09-26 14:05:13.000000000","message":"is it necessary to explictly set default value for attributes?","commit_id":"aef7fed1409702cf057ee05273f7fe801e5ef4e7"}],"searchlight/elasticsearch/plugins/neutron/networks.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                \u0027shared\u0027: {\u0027type\u0027: \u0027boolean\u0027},"},{"line_number":64,"context_line":"                \u0027status\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":65,"context_line":"                \u0027tenant_id\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":66,"context_line":"                \u0027members\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":67,"context_line":"                \u0027rbac_policy\u0027: {"},{"line_number":68,"context_line":"                    \u0027type\u0027: \u0027nested\u0027,"},{"line_number":69,"context_line":"                    \u0027properties\u0027: {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_e2ba7109","line":66,"range":{"start_line":66,"start_character":17,"end_line":66,"end_character":24},"updated":"2016-08-16 20:57:19.000000000","message":"Is there a reason to store members separately? The \u0027term\u0027 query in the rbac filters could be replaced by a nested query on rbac_policy","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                \u0027shared\u0027: {\u0027type\u0027: \u0027boolean\u0027},"},{"line_number":64,"context_line":"                \u0027status\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":65,"context_line":"                \u0027tenant_id\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":66,"context_line":"                \u0027members\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":67,"context_line":"                \u0027rbac_policy\u0027: {"},{"line_number":68,"context_line":"                    \u0027type\u0027: \u0027nested\u0027,"},{"line_number":69,"context_line":"                    \u0027properties\u0027: {"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_27857b06","line":66,"range":{"start_line":66,"start_character":17,"end_line":66,"end_character":24},"in_reply_to":"3ac371cc_e2ba7109","updated":"2016-08-17 22:32:43.000000000","message":"I think it\u0027s cleaner and easier to maintain this way. An extra field isn\u0027t going to matter much. It keeps the RBAC filter less complicated and makes it less error-prone for future modifications.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    def get_rbac_objects(self):"},{"line_number":130,"context_line":"        \"\"\"Generator that lists all RBAC policies for all tenants.\"\"\""},{"line_number":131,"context_line":"        neutron_client \u003d openstack_clients.get_neutronclient()"},{"line_number":132,"context_line":"        for policy in neutron_client.list_rbac_policies()[\u0027rbac_policies\u0027]:"},{"line_number":133,"context_line":"            yield policy"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def index_initial_post(self, index_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_bc7383e6","line":132,"range":{"start_line":132,"start_character":22,"end_line":132,"end_character":36},"updated":"2016-08-16 20:57:19.000000000","message":"This doesn\u0027t exclude other target types, or actions we don\u0027t care about","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":129,"context_line":"    def get_rbac_objects(self):"},{"line_number":130,"context_line":"        \"\"\"Generator that lists all RBAC policies for all tenants.\"\"\""},{"line_number":131,"context_line":"        neutron_client \u003d openstack_clients.get_neutronclient()"},{"line_number":132,"context_line":"        for policy in neutron_client.list_rbac_policies()[\u0027rbac_policies\u0027]:"},{"line_number":133,"context_line":"            yield policy"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def index_initial_post(self, index_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_508676db","line":132,"range":{"start_line":132,"start_character":22,"end_line":132,"end_character":36},"in_reply_to":"3ac371cc_bc7383e6","updated":"2016-08-17 22:32:43.000000000","message":"Done","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"0e95bad57806f8f3c26846c56ee8bb77318c12eb","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            \u0027bool\u0027: {"},{"line_number":110,"context_line":"                \u0027should\u0027: ["},{"line_number":111,"context_line":"                    {\u0027term\u0027: {\u0027tenant_id\u0027: request_context.owner}},"},{"line_number":112,"context_line":"                    {\u0027term\u0027: {\u0027members\u0027: request_context.owner}},"},{"line_number":113,"context_line":"                    {\u0027term\u0027: {\u0027router:external\u0027: True}},"},{"line_number":114,"context_line":"                    {\u0027term\u0027: {\u0027shared\u0027: True}}"},{"line_number":115,"context_line":"                ]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_576ef42f","line":112,"range":{"start_line":112,"start_character":31,"end_line":112,"end_character":38},"updated":"2016-09-05 16:25:35.000000000","message":"This needs to include \u0027*\u0027. Look at the swift examples.","commit_id":"b399aaafe40c98c31a3d8dd37db48eb057e00df9"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"dfe1d62d9a8cd1f2f6e1b2427542b476811e1e6a","unresolved":false,"context_lines":[{"line_number":109,"context_line":"            \u0027bool\u0027: {"},{"line_number":110,"context_line":"                \u0027should\u0027: ["},{"line_number":111,"context_line":"                    {\u0027term\u0027: {\u0027tenant_id\u0027: request_context.owner}},"},{"line_number":112,"context_line":"                    {\u0027term\u0027: {\u0027members\u0027: request_context.owner}},"},{"line_number":113,"context_line":"                    {\u0027term\u0027: {\u0027router:external\u0027: True}},"},{"line_number":114,"context_line":"                    {\u0027term\u0027: {\u0027shared\u0027: True}}"},{"line_number":115,"context_line":"                ]"}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_1ae45b39","line":112,"range":{"start_line":112,"start_character":31,"end_line":112,"end_character":38},"in_reply_to":"9a89bdaa_576ef42f","updated":"2016-09-06 17:59:17.000000000","message":"Done. We will search for both a specific ID or \u0027*\u0027.","commit_id":"b399aaafe40c98c31a3d8dd37db48eb057e00df9"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aed9d20771b7f064e45a2153485fdf983cad7070","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        policies \u003d neutron_client.list_rbac_policies()[\u0027rbac_policies\u0027]"},{"line_number":133,"context_line":"        for policy in [p for p in policies if"},{"line_number":134,"context_line":"                       p[\u0027object_type\u0027] \u003d\u003d \u0027network\u0027 and"},{"line_number":135,"context_line":"                       p[\u0027action\u0027] \u003d\u003d \u0027access_as_external\u0027]:"},{"line_number":136,"context_line":"            yield policy"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def index_initial_data(self, index_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_68befcae","line":135,"range":{"start_line":135,"start_character":39,"end_line":135,"end_character":57},"updated":"2016-09-08 19:34:44.000000000","message":"This is \u0027access_as_shared\u0027 in notification_handlers. Not sure what the difference is as far as neutron\u0027s concerned","commit_id":"67f792b616033c60a78d434c3f84f7f554214b84"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d6b8ab56e329dd728f24a52ae96965c5cd2c3de9","unresolved":false,"context_lines":[{"line_number":132,"context_line":"        policies \u003d neutron_client.list_rbac_policies()[\u0027rbac_policies\u0027]"},{"line_number":133,"context_line":"        for policy in [p for p in policies if"},{"line_number":134,"context_line":"                       p[\u0027object_type\u0027] \u003d\u003d \u0027network\u0027 and"},{"line_number":135,"context_line":"                       p[\u0027action\u0027] \u003d\u003d \u0027access_as_external\u0027]:"},{"line_number":136,"context_line":"            yield policy"},{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def index_initial_data(self, index_name\u003dNone):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_283f8ad7","line":135,"range":{"start_line":135,"start_character":39,"end_line":135,"end_character":57},"in_reply_to":"9a89bdaa_68befcae","updated":"2016-09-09 01:00:28.000000000","message":"The original spec mentioned that the API will only support \"access_as_shared\". But this is no longer true. We can create a policy with \"access_as_external\". Changed to match that. Both here and in the notification_handler.","commit_id":"67f792b616033c60a78d434c3f84f7f554214b84"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                    \u0027type\u0027: \u0027nested\u0027,"},{"line_number":69,"context_line":"                    \u0027properties\u0027: {"},{"line_number":70,"context_line":"                        \u0027rbac_id\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":71,"context_line":"                        \u0027tenant\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027}"},{"line_number":72,"context_line":"                    }"},{"line_number":73,"context_line":"                },"},{"line_number":74,"context_line":"                \u0027updated_at\u0027: {\u0027type\u0027: \u0027date\u0027}"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_6f7326b5","line":71,"range":{"start_line":71,"start_character":25,"end_line":71,"end_character":31},"updated":"2016-09-09 17:44:46.000000000","message":"Think this should be target_tenant","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                              self.options)"},{"line_number":159,"context_line":"        for policy in policy_list:"},{"line_number":160,"context_line":"            payload \u003d {\u0027rbac_policy\u0027: policy}"},{"line_number":161,"context_line":"            handler.rbac_create(payload, \"\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_cf5b522d","line":161,"range":{"start_line":161,"start_character":20,"end_line":161,"end_character":31},"updated":"2016-09-09 17:44:46.000000000","message":"This turns out to be incredibly inefficient; for every policy that exists there\u0027ll be two queries to elasticsearch, one against the alias and one against the actual index because there\u0027ll be a multiple-indices-error. In the worst case a series of policies against the same network results in loads of calls to retrieve the same document. This is visible in a series of 400 errors appearing in the indexing log.\n\nIt seems like it\u0027d be more sensible to retrieve the rbac list from neutron first and merge it with the networks. The obvious disadvantage there is that it requires loading them all into memory but even if there were hundreds of thousands the memory footprint would be relatively low; each rbac_id/tenant record will be a few hundred byte so you\u0027d be looking at in the order of tens of MB versus 200,000 hits against ES.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"9afda63748120b64bc60e4a8a9ebc71b36e9be38","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                                              self.options)"},{"line_number":159,"context_line":"        for policy in policy_list:"},{"line_number":160,"context_line":"            payload \u003d {\u0027rbac_policy\u0027: policy}"},{"line_number":161,"context_line":"            handler.rbac_create(payload, \"\")"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a8ec9b2_c46292ad","line":161,"range":{"start_line":161,"start_character":20,"end_line":161,"end_character":31},"in_reply_to":"9a89bdaa_cf5b522d","updated":"2016-09-13 18:09:41.000000000","message":"Good catch. I\u0027ve switched it over to not make as many calls.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        super(NetworkIndex, self).index_initial_data(index_name)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"        # Step #2: Create the list of RBAC policies."},{"line_number":176,"context_line":"        policy_store \u003d defaultdict(list)"},{"line_number":177,"context_line":"        policy_list \u003d self.get_rbac_objects()"},{"line_number":178,"context_line":"        for policy in policy_list:"},{"line_number":179,"context_line":"            policy_store[policy[\u0027object_id\u0027]].append(policy)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_2902a60b","line":176,"range":{"start_line":176,"start_character":23,"end_line":176,"end_character":34},"updated":"2016-09-15 19:59:49.000000000","message":"Doing it this way wasn\u0027t really how I meant; instead, why not do this in get_objects?\n\ne.g.\ndef get_objects(..):\n  rbac_policies \u003d get_rbac_policy_dict() # map network_id -\u003e policy\n  networks \u003d neutronclient.networks.list()\n  for network in networks:\n     add_policy_info_to_network(network, rbac_policies[\u0027network_id\u0027])\n     yield network","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aba5d9600016931fda564b650550ed660fc55ffb","unresolved":false,"context_lines":[{"line_number":117,"context_line":"                    {\u0027term\u0027: {\u0027tenant_id\u0027: request_context.owner}},"},{"line_number":118,"context_line":"                    {\u0027terms\u0027: {\u0027members\u0027: [request_context.owner, \u0027*\u0027]}},"},{"line_number":119,"context_line":"                    {\u0027term\u0027: {\u0027router:external\u0027: True}},"},{"line_number":120,"context_line":"                    {\u0027term\u0027: {\u0027shared\u0027: True}}"},{"line_number":121,"context_line":"                ]"},{"line_number":122,"context_line":"            }"},{"line_number":123,"context_line":"        }]"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_480f5ce1","line":120,"range":{"start_line":120,"start_character":31,"end_line":120,"end_character":37},"updated":"2016-09-22 13:58:21.000000000","message":"I think \u0027shared\u0027 will be removed at some point but we can leave it for now. It\u0027s already implemented as a wildcard policy rule","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        policies \u003d self.get_rbac_policies()"},{"line_number":136,"context_line":"        neutron_client \u003d openstack_clients.get_neutronclient()"},{"line_number":137,"context_line":"        for network in neutron_client.list_networks()[\u0027networks\u0027]:"},{"line_number":138,"context_line":"            network[\u0027members\u0027] \u003d [network[\u0027tenant_id\u0027]]"},{"line_number":139,"context_line":"            network[\u0027rbac_policy\u0027] \u003d []"},{"line_number":140,"context_line":"            for policy in policies[network[\u0027id\u0027]]:"},{"line_number":141,"context_line":"                add_rbac(network, policy[\u0027target_tenant\u0027], policy[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_a6406308","line":138,"range":{"start_line":138,"start_character":32,"end_line":138,"end_character":33},"updated":"2016-09-16 22:26:26.000000000","message":"Not sure about the need to always set this to the owner. Neutron\u0027s rbac-list doesn\u0027t show defaults like this and the rbac queries don\u0027t require it","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":135,"context_line":"        policies \u003d self.get_rbac_policies()"},{"line_number":136,"context_line":"        neutron_client \u003d openstack_clients.get_neutronclient()"},{"line_number":137,"context_line":"        for network in neutron_client.list_networks()[\u0027networks\u0027]:"},{"line_number":138,"context_line":"            network[\u0027members\u0027] \u003d [network[\u0027tenant_id\u0027]]"},{"line_number":139,"context_line":"            network[\u0027rbac_policy\u0027] \u003d []"},{"line_number":140,"context_line":"            for policy in policies[network[\u0027id\u0027]]:"},{"line_number":141,"context_line":"                add_rbac(network, policy[\u0027target_tenant\u0027], policy[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_6f001203","line":138,"range":{"start_line":138,"start_character":32,"end_line":138,"end_character":33},"in_reply_to":"7a8ec9b2_a6406308","updated":"2016-09-21 23:10:19.000000000","message":"Done.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # The mapping contains internal fields related to RBAC policy."},{"line_number":149,"context_line":"        # Remove them if they are related to networks not in our tenant."},{"line_number":150,"context_line":"        source \u003d hit[\u0027_source\u0027]"},{"line_number":151,"context_line":"        if request_context.tenant !\u003d source[\u0027tenant_id\u0027]:"},{"line_number":152,"context_line":"            source.pop(\u0027rbac_policy\u0027, None)"},{"line_number":153,"context_line":"            source.pop(\u0027members\u0027, None)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_866447b9","line":151,"range":{"start_line":151,"start_character":27,"end_line":151,"end_character":33},"updated":"2016-09-16 22:26:26.000000000","message":"Should admins be able to see this? It\u0027s a bit tricky with the CLI but i don\u0027t think it\u0027s forbidden. If that is the case can use request_context.is_admin\n\nEven more fun: it\u0027s possible to create rbac policies on a network that are not visible to the network\u0027s owner. If you, as an admin user, create rbac policies on a network owned by userA in tenantA, userA will not be able to see that their network has been shared.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # The mapping contains internal fields related to RBAC policy."},{"line_number":149,"context_line":"        # Remove them if they are related to networks not in our tenant."},{"line_number":150,"context_line":"        source \u003d hit[\u0027_source\u0027]"},{"line_number":151,"context_line":"        if request_context.tenant !\u003d source[\u0027tenant_id\u0027]:"},{"line_number":152,"context_line":"            source.pop(\u0027rbac_policy\u0027, None)"},{"line_number":153,"context_line":"            source.pop(\u0027members\u0027, None)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_e6618b06","line":151,"range":{"start_line":151,"start_character":11,"end_line":151,"end_character":26},"updated":"2016-09-16 22:26:26.000000000","message":"There is an interesting case here that if you specify _source in the request and don\u0027t include tenant_id, this errors out. I don\u0027t think this is the only place it happens though so it\u0027s not a reason to disqualify the patch.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # The mapping contains internal fields related to RBAC policy."},{"line_number":149,"context_line":"        # Remove them if they are related to networks not in our tenant."},{"line_number":150,"context_line":"        source \u003d hit[\u0027_source\u0027]"},{"line_number":151,"context_line":"        if request_context.tenant !\u003d source[\u0027tenant_id\u0027]:"},{"line_number":152,"context_line":"            source.pop(\u0027rbac_policy\u0027, None)"},{"line_number":153,"context_line":"            source.pop(\u0027members\u0027, None)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_a35eb1e6","line":151,"range":{"start_line":151,"start_character":27,"end_line":151,"end_character":33},"in_reply_to":"7a8ec9b2_866447b9","updated":"2016-09-21 23:10:19.000000000","message":"Since these are internal fields, we will always filter them out.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aba5d9600016931fda564b650550ed660fc55ffb","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # The mapping contains internal fields related to RBAC policy."},{"line_number":149,"context_line":"        # Remove them if they are related to networks not in our tenant."},{"line_number":150,"context_line":"        source \u003d hit[\u0027_source\u0027]"},{"line_number":151,"context_line":"        if request_context.tenant !\u003d source[\u0027tenant_id\u0027]:"},{"line_number":152,"context_line":"            source.pop(\u0027rbac_policy\u0027, None)"},{"line_number":153,"context_line":"            source.pop(\u0027members\u0027, None)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_8813245c","line":151,"range":{"start_line":151,"start_character":27,"end_line":151,"end_character":33},"in_reply_to":"7a8ec9b2_a35eb1e6","updated":"2016-09-22 13:58:21.000000000","message":"I\u0027m ok with this for now and addressing it in a later patch","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        # The mapping contains internal fields related to RBAC policy."},{"line_number":149,"context_line":"        # Remove them if they are related to networks not in our tenant."},{"line_number":150,"context_line":"        source \u003d hit[\u0027_source\u0027]"},{"line_number":151,"context_line":"        if request_context.tenant !\u003d source[\u0027tenant_id\u0027]:"},{"line_number":152,"context_line":"            source.pop(\u0027rbac_policy\u0027, None)"},{"line_number":153,"context_line":"            source.pop(\u0027members\u0027, None)"},{"line_number":154,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_4fefd6b0","line":151,"range":{"start_line":151,"start_character":11,"end_line":151,"end_character":26},"in_reply_to":"7a8ec9b2_e6618b06","updated":"2016-09-21 23:10:19.000000000","message":"If it\u0027s a general issue, I think we should solve it globally outside of this patch.","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"998cc9661d631905f8d5a000b9b320d0e3f2f408","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self):"},{"line_number":31,"context_line":"        super(NetworkIndex, self).__init__()"},{"line_number":32,"context_line":"        self.rbac_policy \u003d None"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @classmethod"},{"line_number":35,"context_line":"    def get_document_type(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_5bcd285c","line":32,"updated":"2016-09-23 14:08:33.000000000","message":"Is this still in use?","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"76a60c62374e3f5b61e6a6c4c4f08fff8f00e51e","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self):"},{"line_number":31,"context_line":"        super(NetworkIndex, self).__init__()"},{"line_number":32,"context_line":"        self.rbac_policy \u003d None"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    @classmethod"},{"line_number":35,"context_line":"    def get_document_type(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_41b5042f","line":32,"in_reply_to":"5a8bc5a2_5bcd285c","updated":"2016-09-26 06:28:21.000000000","message":"Nope. Leftover code from a previous version of the patch that is past its expiration date. Cleaned out.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"d33939b0f11e4914522d47d2d019b026e9448fb2","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    ADMIN_ONLY_FIELDS \u003d [\u0027provider:*\u0027]"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def __init__(self):"},{"line_number":31,"context_line":"        super(NetworkIndex, self).__init__()"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @classmethod"},{"line_number":34,"context_line":"    def get_document_type(self):"}],"source_content_type":"text/x-python","patch_set":13,"id":"5a8bc5a2_2ed0ca1e","line":31,"updated":"2016-09-26 14:05:13.000000000","message":"could be removed either : )","commit_id":"aef7fed1409702cf057ee05273f7fe801e5ef4e7"}],"searchlight/elasticsearch/plugins/neutron/notification_handlers.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027tenant_id\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_5cbd2f67","line":95,"range":{"start_line":95,"start_character":29,"end_line":95,"end_character":40},"updated":"2016-08-16 20:57:19.000000000","message":"Looks like tenant_id can be \u0027*\u0027 which this won\u0027t handle well (and which sounds horrible)","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"12148827039f8ddfa32cca824564e5035c51fe31","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027tenant_id\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_8b85515b","line":95,"range":{"start_line":95,"start_character":29,"end_line":95,"end_character":40},"in_reply_to":"3ac371cc_074cbf9c","updated":"2016-08-17 22:55:01.000000000","message":"Ah, my mistake, sorry. Though I guess my question still applies for target_tenant","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027tenant_id\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_074cbf9c","line":95,"range":{"start_line":95,"start_character":29,"end_line":95,"end_character":40},"in_reply_to":"3ac371cc_5cbd2f67","updated":"2016-08-17 22:32:43.000000000","message":"Ok. I never saw a value of \u0027*\u0027 for tenant_id. I saw a value of \u0027*\u0027 for target_tenant. I\u0027m unsure of how to handle this. Does it mean that it is now viewable by everyone? I\u0027m not sure how to express that in ES with an appropriate query :(","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"78d34abc64b82c0f2d2b4d867331e264bafe2c2f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027tenant_id\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"1ac06dbe_3bc290e9","line":95,"range":{"start_line":95,"start_character":29,"end_line":95,"end_character":40},"in_reply_to":"3ac371cc_8b85515b","updated":"2016-08-23 23:07:14.000000000","message":"We don\u0027t do anything with target_tenant. We are using only tenant_id when applying the RBAC policy. Does a \u0027*\u0027 mean that we have to inquire all tenants from Nova and add them? Or should we just disable the tenant RBAC check?","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        # admin and user version of the document."},{"line_number":101,"context_line":"        # TODO(ricka): It looks like we are modifying the same document,"},{"line_number":102,"context_line":"        #   even though we are seeing a \"*_ADMIN\" and a \"*_USER\" doc????"},{"line_number":103,"context_line":"        #   Once understood, remove the duplicate choice below."},{"line_number":104,"context_line":"        for admin in [True, False]:"},{"line_number":105,"context_line":"            doc \u003d self.index_helper.get_document(network_id, for_admin\u003dadmin)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_312a1c7f","line":103,"range":{"start_line":103,"start_character":17,"end_line":103,"end_character":27},"updated":"2016-08-16 20:57:19.000000000","message":"This should only happen once with for_admin\u003dTrue. save_document will write the _admin and _user versions","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":100,"context_line":"        # admin and user version of the document."},{"line_number":101,"context_line":"        # TODO(ricka): It looks like we are modifying the same document,"},{"line_number":102,"context_line":"        #   even though we are seeing a \"*_ADMIN\" and a \"*_USER\" doc????"},{"line_number":103,"context_line":"        #   Once understood, remove the duplicate choice below."},{"line_number":104,"context_line":"        for admin in [True, False]:"},{"line_number":105,"context_line":"            doc \u003d self.index_helper.get_document(network_id, for_admin\u003dadmin)"},{"line_number":106,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_3ef62bf9","line":103,"range":{"start_line":103,"start_character":17,"end_line":103,"end_character":27},"in_reply_to":"3ac371cc_312a1c7f","updated":"2016-08-17 22:32:43.000000000","message":"Makes sense.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            # Add RBAC policy."},{"line_number":119,"context_line":"            rbac_policy \u003d body[\u0027rbac_policy\u0027]"},{"line_number":120,"context_line":"            if not [p for p in rbac_policy if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id]:"},{"line_number":121,"context_line":"                # Policy already exists, do not duplicate."},{"line_number":122,"context_line":"                policy \u003d {\u0027rbac_id\u0027: policy_id, \u0027tenant\u0027: tenant_id}"},{"line_number":123,"context_line":"                rbac_policy.append(policy)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_514eb86f","line":121,"range":{"start_line":121,"start_character":33,"end_line":121,"end_character":39},"updated":"2016-08-16 20:57:19.000000000","message":"This comment is misleading; this block executes when it DOESN\u0027T already exist","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            # Add RBAC policy."},{"line_number":119,"context_line":"            rbac_policy \u003d body[\u0027rbac_policy\u0027]"},{"line_number":120,"context_line":"            if not [p for p in rbac_policy if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id]:"},{"line_number":121,"context_line":"                # Policy already exists, do not duplicate."},{"line_number":122,"context_line":"                policy \u003d {\u0027rbac_id\u0027: policy_id, \u0027tenant\u0027: tenant_id}"},{"line_number":123,"context_line":"                rbac_policy.append(policy)"},{"line_number":124,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_992779c9","line":121,"range":{"start_line":121,"start_character":33,"end_line":121,"end_character":39},"in_reply_to":"3ac371cc_514eb86f","updated":"2016-08-17 22:32:43.000000000","message":"Since we are doing only the _ADMIN doc, there is no need for this check any longer. Hence there is no need for this comment any longer :)","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            return"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        version_delta \u003d 0"},{"line_number":149,"context_line":"        for doc in docs[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":150,"context_line":"            version_delta +\u003d 1"},{"line_number":151,"context_line":"            body \u003d doc[\u0027_source\u0027]"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_7172d4ae","line":149,"range":{"start_line":149,"start_character":16,"end_line":149,"end_character":18},"updated":"2016-08-16 20:57:19.000000000","message":"Wouldn\u0027t multiple hits indicate a problem? If it means _admin and _user, then you only want to do all this once and let save_document handle writing both versions back","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":146,"context_line":"            return"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        version_delta \u003d 0"},{"line_number":149,"context_line":"        for doc in docs[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":150,"context_line":"            version_delta +\u003d 1"},{"line_number":151,"context_line":"            body \u003d doc[\u0027_source\u0027]"},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_39a2c54b","line":149,"range":{"start_line":149,"start_character":16,"end_line":149,"end_character":18},"in_reply_to":"3ac371cc_7172d4ae","updated":"2016-08-17 22:32:43.000000000","message":"The latter case is what we were concerned with. I\u0027ll modify the code and if it is the _USER document, we will skip it. This way only the _ADMIN doc is worked on.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        version_delta \u003d 0"},{"line_number":149,"context_line":"        for doc in docs[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":150,"context_line":"            version_delta +\u003d 1"},{"line_number":151,"context_line":"            body \u003d doc[\u0027_source\u0027]"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            policies \u003d body[\u0027rbac_policy\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_3c9f93b5","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":30},"updated":"2016-08-16 20:57:19.000000000","message":"Why +\u003d1? Just add one to the existing _version if you\u0027re calling save_document, or use the current value for update_document (which makes more sense in this case)","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":147,"context_line":""},{"line_number":148,"context_line":"        version_delta \u003d 0"},{"line_number":149,"context_line":"        for doc in docs[\u0027hits\u0027][\u0027hits\u0027]:"},{"line_number":150,"context_line":"            version_delta +\u003d 1"},{"line_number":151,"context_line":"            body \u003d doc[\u0027_source\u0027]"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            policies \u003d body[\u0027rbac_policy\u0027]"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_d9e3b1a2","line":150,"range":{"start_line":150,"start_character":0,"end_line":150,"end_character":30},"in_reply_to":"3ac371cc_3c9f93b5","updated":"2016-08-17 22:32:43.000000000","message":"This was done when looping through multiple docs. The code will only be done for the ADMIN doc, so there is no need for a delta.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                body[\u0027members\u0027] \u003d members_list"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            # Remove RBAC policy."},{"line_number":165,"context_line":"            new_list \u003d [p for p in policies if p.get(\u0027rbac_id\u0027) !\u003d policy_id]"},{"line_number":166,"context_line":"            body[\u0027rbac_policy\u0027] \u003d new_list"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"            # Bump version for race condition prevention. Use doc and not"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_bc1c2314","line":165,"range":{"start_line":165,"start_character":12,"end_line":165,"end_character":20},"updated":"2016-08-16 20:57:19.000000000","message":"If no tenant_id was found, this is unnecessary. If nothing was found in rbac_policy or members, can skip the update entirely","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                body[\u0027members\u0027] \u003d members_list"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            # Remove RBAC policy."},{"line_number":165,"context_line":"            new_list \u003d [p for p in policies if p.get(\u0027rbac_id\u0027) !\u003d policy_id]"},{"line_number":166,"context_line":"            body[\u0027rbac_policy\u0027] \u003d new_list"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"            # Bump version for race condition prevention. Use doc and not"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_6725b307","line":165,"range":{"start_line":165,"start_character":12,"end_line":165,"end_character":20},"in_reply_to":"3ac371cc_bc1c2314","updated":"2016-08-17 22:32:43.000000000","message":"If we get this far, then there is an RBAC policy in the network. Otherwise the call to get_doc_by_nested_field() on line 142 would have returned nothing and we would have bailed out on line 146. Even if the tenant is not in the member list, this particular rule still needs to be removed from the network document.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            # Bump version for race condition prevention. Use doc and not"},{"line_number":169,"context_line":"            # body, since \u0027_version\u0027 is outside of \u0027_source\u0027."},{"line_number":170,"context_line":"            version \u003d doc[\u0027_version\u0027] + version_delta"},{"line_number":171,"context_line":"            self.index_helper.save_document(body, version\u003dversion)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def get_doc_by_nested_field(self, path, field, value, version\u003dFalse):"},{"line_number":174,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_9ccb27a5","line":171,"range":{"start_line":171,"start_character":30,"end_line":171,"end_character":43},"updated":"2016-08-16 20:57:19.000000000","message":"I\u0027m not sure whether we should be using update_document more for these kinds of partial updates. Maybe it doesn\u0027t matter since we\u0027ve already gone to the trouble of retrieving it and we don\u0027t have a new _version to set.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            # Bump version for race condition prevention. Use doc and not"},{"line_number":169,"context_line":"            # body, since \u0027_version\u0027 is outside of \u0027_source\u0027."},{"line_number":170,"context_line":"            version \u003d doc[\u0027_version\u0027] + version_delta"},{"line_number":171,"context_line":"            self.index_helper.save_document(body, version\u003dversion)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def get_doc_by_nested_field(self, path, field, value, version\u003dFalse):"},{"line_number":174,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_395da579","line":171,"range":{"start_line":171,"start_character":30,"end_line":171,"end_character":43},"in_reply_to":"3ac371cc_9ccb27a5","updated":"2016-08-17 22:32:43.000000000","message":"This is what I was thinking. We\u0027ve already retrieved the document, it\u0027s more efficient to just write it.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            version \u003d doc[\u0027_version\u0027] + version_delta"},{"line_number":171,"context_line":"            self.index_helper.save_document(body, version\u003dversion)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def get_doc_by_nested_field(self, path, field, value, version\u003dFalse):"},{"line_number":174,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"},{"line_number":175,"context_line":"           need to specify the path of the nested field as well as the"},{"line_number":176,"context_line":"           field itself. We will include the \u0027version\u0027 field if commanded"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_3c3b139e","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":31},"updated":"2016-08-16 20:57:19.000000000","message":"We already have this function in the security group handler; time for some reuse","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d11df4beb4e445de1b65304d9984c8408bcc7fd2","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            version \u003d doc[\u0027_version\u0027] + version_delta"},{"line_number":171,"context_line":"            self.index_helper.save_document(body, version\u003dversion)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def get_doc_by_nested_field(self, path, field, value, version\u003dFalse):"},{"line_number":174,"context_line":"        \"\"\"Query ElasticSearch based on a nested field. The caller will"},{"line_number":175,"context_line":"           need to specify the path of the nested field as well as the"},{"line_number":176,"context_line":"           field itself. We will include the \u0027version\u0027 field if commanded"}],"source_content_type":"text/x-python","patch_set":4,"id":"3ac371cc_2a154248","line":173,"range":{"start_line":173,"start_character":8,"end_line":173,"end_character":31},"in_reply_to":"3ac371cc_3c3b139e","updated":"2016-08-17 22:32:43.000000000","message":"I wish we\u0027d make up our mind :) Moved.","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"0e95bad57806f8f3c26846c56ee8bb77318c12eb","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        # Add tenant_id to members list."},{"line_number":112,"context_line":"        members_list \u003d body[\u0027members\u0027]"},{"line_number":113,"context_line":"        if tenant_id not in members_list:"},{"line_number":114,"context_line":"            members_list.append(tenant_id)"},{"line_number":115,"context_line":"            body[\u0027members\u0027] \u003d members_list"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Add RBAC policy."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_f77c68ed","line":114,"range":{"start_line":114,"start_character":32,"end_line":114,"end_character":41},"updated":"2016-09-05 16:25:35.000000000","message":"See note below - target_tenant is the right field","commit_id":"b399aaafe40c98c31a3d8dd37db48eb057e00df9"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"dfe1d62d9a8cd1f2f6e1b2427542b476811e1e6a","unresolved":false,"context_lines":[{"line_number":111,"context_line":"        # Add tenant_id to members list."},{"line_number":112,"context_line":"        members_list \u003d body[\u0027members\u0027]"},{"line_number":113,"context_line":"        if tenant_id not in members_list:"},{"line_number":114,"context_line":"            members_list.append(tenant_id)"},{"line_number":115,"context_line":"            body[\u0027members\u0027] \u003d members_list"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        # Add RBAC policy."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_ba4c4f43","line":114,"range":{"start_line":114,"start_character":32,"end_line":114,"end_character":41},"in_reply_to":"9a89bdaa_f77c68ed","updated":"2016-09-06 17:59:17.000000000","message":"Re-reviewing the documentation and the output from the notification. target_tenant is correct.","commit_id":"b399aaafe40c98c31a3d8dd37db48eb057e00df9"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"0e95bad57806f8f3c26846c56ee8bb77318c12eb","unresolved":false,"context_lines":[{"line_number":158,"context_line":"            # Remove tenant_id from members list."},{"line_number":159,"context_line":"            members_list \u003d (body[\u0027members\u0027])"},{"line_number":160,"context_line":"            if tenant_id in members_list:"},{"line_number":161,"context_line":"                members_list.remove(tenant_id)"},{"line_number":162,"context_line":"                body[\u0027members\u0027] \u003d members_list"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"            # Remove RBAC policy."}],"source_content_type":"text/x-python","patch_set":5,"id":"9a89bdaa_b71ca0c2","line":161,"range":{"start_line":161,"start_character":36,"end_line":161,"end_character":45},"updated":"2016-09-05 16:25:35.000000000","message":"I missed this before but tenant_id seems wrong; that\u0027s the owning tenant i think? target_tenant is the recipient","commit_id":"b399aaafe40c98c31a3d8dd37db48eb057e00df9"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aed9d20771b7f064e45a2153485fdf983cad7070","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027target_tenant\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_f77d8d6d","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":17},"updated":"2016-09-08 19:34:44.000000000","message":"Minor nit that this is potentially confused with the value of rbac_policy[\u0027tenant_id\u0027] - consider renaming the variable","commit_id":"67f792b616033c60a78d434c3f84f7f554214b84"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d6b8ab56e329dd728f24a52ae96965c5cd2c3de9","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            return"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027target_tenant\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_a8455ab4","line":95,"range":{"start_line":95,"start_character":8,"end_line":95,"end_character":17},"in_reply_to":"9a89bdaa_f77d8d6d","updated":"2016-09-09 01:00:28.000000000","message":"Considered and done.","commit_id":"67f792b616033c60a78d434c3f84f7f554214b84"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aed9d20771b7f064e45a2153485fdf983cad7070","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027target_tenant\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        # Read, modify, write an existing network document. Grab and modify"},{"line_number":100,"context_line":"        # the admin version of the document. When saving the document it will"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_778a5d65","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":76},"updated":"2016-09-08 19:34:44.000000000","message":"... like here, for instance. tenant_id is not the owner of network_id","commit_id":"67f792b616033c60a78d434c3f84f7f554214b84"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"d6b8ab56e329dd728f24a52ae96965c5cd2c3de9","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        tenant_id \u003d payload[\u0027rbac_policy\u0027][\u0027target_tenant\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\", network_id, tenant_id)"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"        # Read, modify, write an existing network document. Grab and modify"},{"line_number":100,"context_line":"        # the admin version of the document. When saving the document it will"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a89bdaa_c810deae","line":97,"range":{"start_line":97,"start_character":0,"end_line":97,"end_character":76},"in_reply_to":"9a89bdaa_778a5d65","updated":"2016-09-09 01:00:28.000000000","message":"...see above.","commit_id":"67f792b616033c60a78d434c3f84f7f554214b84"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if \u0027network\u0027 in payload:"},{"line_number":51,"context_line":"            return (\u0027id\u0027, payload[\u0027network\u0027].get(\u0027id\u0027)),"},{"line_number":52,"context_line":"        elif \u0027network_id\u0027 in payload:"},{"line_number":53,"context_line":"            return (\u0027id\u0027, payload[\u0027network_id\u0027]),"},{"line_number":54,"context_line":"        return ()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def create_or_update(self, payload, timestamp):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_afc9aeae","line":53,"range":{"start_line":53,"start_character":0,"end_line":53,"end_character":12},"updated":"2016-09-09 17:44:46.000000000","message":"Possible to add some fields here for rbac payloads?\n\nif \u0027rbac_policy\u0027 in payload:\n  return (...)  for network_id, target_tenant?","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"9afda63748120b64bc60e4a8a9ebc71b36e9be38","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        if \u0027network\u0027 in payload:"},{"line_number":51,"context_line":"            return (\u0027id\u0027, payload[\u0027network\u0027].get(\u0027id\u0027)),"},{"line_number":52,"context_line":"        elif \u0027network_id\u0027 in payload:"},{"line_number":53,"context_line":"            return (\u0027id\u0027, payload[\u0027network_id\u0027]),"},{"line_number":54,"context_line":"        return ()"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def create_or_update(self, payload, timestamp):"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_d9281c36","line":53,"range":{"start_line":53,"start_character":0,"end_line":53,"end_character":12},"in_reply_to":"9a89bdaa_afc9aeae","updated":"2016-09-13 18:09:41.000000000","message":"It is possible. Done.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        target_tenant \u003d payload[\u0027rbac_policy\u0027][\u0027target_tenant\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\","},{"line_number":98,"context_line":"                  network_id, target_tenant)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Read, modify, write an existing network document. Grab and modify"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_f66713e8","line":97,"range":{"start_line":97,"start_character":28,"end_line":97,"end_character":35},"updated":"2016-09-09 17:44:46.000000000","message":"Minor nit that the network isn\u0027t in \u0027target_tenant\u0027; if we can update the message to \u0027adding RBAC policy for network blah with target tenant blah\u0027 it\u0027d be clearer. Or output the actual network info. Also consider adding to the log field output","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"9afda63748120b64bc60e4a8a9ebc71b36e9be38","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        network_id \u003d payload[\u0027rbac_policy\u0027][\u0027object_id\u0027]"},{"line_number":95,"context_line":"        target_tenant \u003d payload[\u0027rbac_policy\u0027][\u0027target_tenant\u0027]"},{"line_number":96,"context_line":"        policy_id \u003d payload[\u0027rbac_policy\u0027][\u0027id\u0027]"},{"line_number":97,"context_line":"        LOG.debug(\"Updating network %s in tenant %s\","},{"line_number":98,"context_line":"                  network_id, target_tenant)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        # Read, modify, write an existing network document. Grab and modify"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_f921604e","line":97,"range":{"start_line":97,"start_character":28,"end_line":97,"end_character":35},"in_reply_to":"9a89bdaa_f66713e8","updated":"2016-09-13 18:09:41.000000000","message":"Minor fix.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # Add RBAC policy."},{"line_number":119,"context_line":"        rbac_policy \u003d body[\u0027rbac_policy\u0027]"},{"line_number":120,"context_line":"        policy \u003d {\u0027rbac_id\u0027: policy_id, \u0027tenant\u0027: target_tenant}"},{"line_number":121,"context_line":"        rbac_policy.append(policy)"},{"line_number":122,"context_line":"        body[\u0027rbac_policy\u0027] \u003d rbac_policy"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_efc3b688","line":120,"range":{"start_line":120,"start_character":41,"end_line":120,"end_character":47},"updated":"2016-09-09 17:44:46.000000000","message":"target_tenant makes more sense","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"9afda63748120b64bc60e4a8a9ebc71b36e9be38","unresolved":false,"context_lines":[{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        # Add RBAC policy."},{"line_number":119,"context_line":"        rbac_policy \u003d body[\u0027rbac_policy\u0027]"},{"line_number":120,"context_line":"        policy \u003d {\u0027rbac_id\u0027: policy_id, \u0027tenant\u0027: target_tenant}"},{"line_number":121,"context_line":"        rbac_policy.append(policy)"},{"line_number":122,"context_line":"        body[\u0027rbac_policy\u0027] \u003d rbac_policy"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_99d9345a","line":120,"range":{"start_line":120,"start_character":41,"end_line":120,"end_character":47},"in_reply_to":"9a89bdaa_efc3b688","updated":"2016-09-13 18:09:41.000000000","message":"Changed to be sensible.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                continue"},{"line_number":151,"context_line":"            body \u003d doc[\u0027_source\u0027]"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            tenant_id \u003d None"},{"line_number":154,"context_line":"            policies \u003d body[\u0027rbac_policy\u0027]"},{"line_number":155,"context_line":"            for p in policies:"},{"line_number":156,"context_line":"                if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_2f559ec5","line":153,"range":{"start_line":153,"start_character":12,"end_line":153,"end_character":21},"updated":"2016-09-09 17:44:46.000000000","message":"target_tenant","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"9afda63748120b64bc60e4a8a9ebc71b36e9be38","unresolved":false,"context_lines":[{"line_number":150,"context_line":"                continue"},{"line_number":151,"context_line":"            body \u003d doc[\u0027_source\u0027]"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            tenant_id \u003d None"},{"line_number":154,"context_line":"            policies \u003d body[\u0027rbac_policy\u0027]"},{"line_number":155,"context_line":"            for p in policies:"},{"line_number":156,"context_line":"                if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id:"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_b9da7849","line":153,"range":{"start_line":153,"start_character":12,"end_line":153,"end_character":21},"in_reply_to":"9a89bdaa_2f559ec5","updated":"2016-09-13 18:09:41.000000000","message":"Done.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"4ea8856fa22b93b563e961e43bb6c2f2b385be79","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            policies \u003d body[\u0027rbac_policy\u0027]"},{"line_number":155,"context_line":"            for p in policies:"},{"line_number":156,"context_line":"                if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id:"},{"line_number":157,"context_line":"                    tenant_id \u003d p[\u0027tenant\u0027]"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            # Remove tenant_id from members list."},{"line_number":160,"context_line":"            members_list \u003d (body[\u0027members\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_cf451218","line":157,"range":{"start_line":157,"start_character":20,"end_line":157,"end_character":29},"updated":"2016-09-09 17:44:46.000000000","message":"Stick with target_tenant","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"9afda63748120b64bc60e4a8a9ebc71b36e9be38","unresolved":false,"context_lines":[{"line_number":154,"context_line":"            policies \u003d body[\u0027rbac_policy\u0027]"},{"line_number":155,"context_line":"            for p in policies:"},{"line_number":156,"context_line":"                if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id:"},{"line_number":157,"context_line":"                    tenant_id \u003d p[\u0027tenant\u0027]"},{"line_number":158,"context_line":""},{"line_number":159,"context_line":"            # Remove tenant_id from members list."},{"line_number":160,"context_line":"            members_list \u003d (body[\u0027members\u0027])"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a89bdaa_d9df3c38","line":157,"range":{"start_line":157,"start_character":20,"end_line":157,"end_character":29},"in_reply_to":"9a89bdaa_cf451218","updated":"2016-09-13 18:09:41.000000000","message":"Stuck.","commit_id":"5f97fc9264382677f3fc2b99f6348c44a60229ac"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        body \u003d doc[\u0027_source\u0027]"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Add target_tenant to members list."},{"line_number":120,"context_line":"        members_list \u003d body[\u0027members\u0027]"},{"line_number":121,"context_line":"        if target_tenant not in members_list:"},{"line_number":122,"context_line":"            members_list.append(target_tenant)"},{"line_number":123,"context_line":"            body[\u0027members\u0027] \u003d members_list"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_c43cc7ca","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":20},"updated":"2016-09-15 19:59:49.000000000","message":"Maybe move this logic into a function with the serialization code since it\u0027s repeated","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"882ad2a9879a5a67d4ad5994d7ef4caeae37755a","unresolved":false,"context_lines":[{"line_number":117,"context_line":"        body \u003d doc[\u0027_source\u0027]"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        # Add target_tenant to members list."},{"line_number":120,"context_line":"        members_list \u003d body[\u0027members\u0027]"},{"line_number":121,"context_line":"        if target_tenant not in members_list:"},{"line_number":122,"context_line":"            members_list.append(target_tenant)"},{"line_number":123,"context_line":"            body[\u0027members\u0027] \u003d members_list"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_5a021d0b","line":120,"range":{"start_line":120,"start_character":8,"end_line":120,"end_character":20},"in_reply_to":"7a8ec9b2_c43cc7ca","updated":"2016-09-16 18:16:59.000000000","message":"Moved.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"f5daca61ecc8d2eb1d9a52a05cc11df7d7539dcd","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id:"},{"line_number":164,"context_line":"                    target_tenant \u003d p[\u0027target_tenant\u0027]"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"            # Remove target_tenant from members list."},{"line_number":167,"context_line":"            members_list \u003d (body[\u0027members\u0027])"},{"line_number":168,"context_line":"            if target_tenant in members_list:"},{"line_number":169,"context_line":"                members_list.remove(target_tenant)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_e439c3d8","line":166,"range":{"start_line":166,"start_character":21,"end_line":166,"end_character":34},"updated":"2016-09-15 19:59:49.000000000","message":"Move this into the serialization code too","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"882ad2a9879a5a67d4ad5994d7ef4caeae37755a","unresolved":false,"context_lines":[{"line_number":163,"context_line":"                if p.get(\u0027rbac_id\u0027) \u003d\u003d policy_id:"},{"line_number":164,"context_line":"                    target_tenant \u003d p[\u0027target_tenant\u0027]"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"            # Remove target_tenant from members list."},{"line_number":167,"context_line":"            members_list \u003d (body[\u0027members\u0027])"},{"line_number":168,"context_line":"            if target_tenant in members_list:"},{"line_number":169,"context_line":"                members_list.remove(target_tenant)"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a8ec9b2_0f06951f","line":166,"range":{"start_line":166,"start_character":21,"end_line":166,"end_character":34},"in_reply_to":"7a8ec9b2_e439c3d8","updated":"2016-09-16 18:16:59.000000000","message":"Moved.","commit_id":"3ba4f7c10a9a08d5f478f522a23534ab4a9cb07a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            return (\u0027id\u0027, payload[\u0027network_id\u0027]),"},{"line_number":55,"context_line":"        elif \u0027rbac_policy\u0027 in payload:"},{"line_number":56,"context_line":"            return ("},{"line_number":57,"context_line":"                (\u0027network_id\u0027, payload[\u0027rbac_policy\u0027].get(\u0027network\u0027)),"},{"line_number":58,"context_line":"                (\u0027target_tenant\u0027,"},{"line_number":59,"context_line":"                 payload[\u0027rbac_policy\u0027].get(\u0027target_tenant\u0027)))"},{"line_number":60,"context_line":"        elif \u0027rbac_policy_id\u0027 in payload:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_612f2588","line":57,"range":{"start_line":57,"start_character":59,"end_line":57,"end_character":66},"updated":"2016-09-16 22:26:26.000000000","message":"This is \u0027object_id\u0027, not \u0027network\u0027, maybe output object_type as well","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            return (\u0027id\u0027, payload[\u0027network_id\u0027]),"},{"line_number":55,"context_line":"        elif \u0027rbac_policy\u0027 in payload:"},{"line_number":56,"context_line":"            return ("},{"line_number":57,"context_line":"                (\u0027network_id\u0027, payload[\u0027rbac_policy\u0027].get(\u0027network\u0027)),"},{"line_number":58,"context_line":"                (\u0027target_tenant\u0027,"},{"line_number":59,"context_line":"                 payload[\u0027rbac_policy\u0027].get(\u0027target_tenant\u0027)))"},{"line_number":60,"context_line":"        elif \u0027rbac_policy_id\u0027 in payload:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_f2108902","line":57,"range":{"start_line":57,"start_character":59,"end_line":57,"end_character":66},"in_reply_to":"7a8ec9b2_612f2588","updated":"2016-09-21 23:10:19.000000000","message":"Yes, it should be object_id. How embarrassing.\n\nRight now the only object_type we process is \"network\". So it is redundant. Unless you would like this change for the future so when we expand to more than \"network\" object_types to works. In that case I can add it. That request seems unlike you :)","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aba5d9600016931fda564b650550ed660fc55ffb","unresolved":false,"context_lines":[{"line_number":54,"context_line":"            return (\u0027id\u0027, payload[\u0027network_id\u0027]),"},{"line_number":55,"context_line":"        elif \u0027rbac_policy\u0027 in payload:"},{"line_number":56,"context_line":"            return ("},{"line_number":57,"context_line":"                (\u0027network_id\u0027, payload[\u0027rbac_policy\u0027].get(\u0027network\u0027)),"},{"line_number":58,"context_line":"                (\u0027target_tenant\u0027,"},{"line_number":59,"context_line":"                 payload[\u0027rbac_policy\u0027].get(\u0027target_tenant\u0027)))"},{"line_number":60,"context_line":"        elif \u0027rbac_policy_id\u0027 in payload:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_2d36a203","line":57,"range":{"start_line":57,"start_character":59,"end_line":57,"end_character":66},"in_reply_to":"7a8ec9b2_f2108902","updated":"2016-09-22 13:58:21.000000000","message":"Ok. Probably better than outputting object_id and object_type in any case","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"d29d5f96e80381760e15480c075e4fc854b0b358","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                (\u0027network_id\u0027, payload[\u0027rbac_policy\u0027].get(\u0027network\u0027)),"},{"line_number":58,"context_line":"                (\u0027target_tenant\u0027,"},{"line_number":59,"context_line":"                 payload[\u0027rbac_policy\u0027].get(\u0027target_tenant\u0027)))"},{"line_number":60,"context_line":"        elif \u0027rbac_policy_id\u0027 in payload:"},{"line_number":61,"context_line":"            return (\u0027rbac_policy_id\u0027, payload[\u0027rbac_policy_id\u0027]),"},{"line_number":62,"context_line":"        return ()"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_a1ef6d1c","line":60,"range":{"start_line":60,"start_character":14,"end_line":60,"end_character":28},"updated":"2016-09-16 22:26:26.000000000","message":"The delete events look like create ones except the payload contains rbac_policy_id so can probably remove this final clause, and add rbac_policy_id to the one above","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"8f2ad05dad84e9fbc284fc522c5bea10586816f8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                (\u0027network_id\u0027, payload[\u0027rbac_policy\u0027].get(\u0027network\u0027)),"},{"line_number":58,"context_line":"                (\u0027target_tenant\u0027,"},{"line_number":59,"context_line":"                 payload[\u0027rbac_policy\u0027].get(\u0027target_tenant\u0027)))"},{"line_number":60,"context_line":"        elif \u0027rbac_policy_id\u0027 in payload:"},{"line_number":61,"context_line":"            return (\u0027rbac_policy_id\u0027, payload[\u0027rbac_policy_id\u0027]),"},{"line_number":62,"context_line":"        return ()"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"7a8ec9b2_b230c157","line":60,"range":{"start_line":60,"start_character":14,"end_line":60,"end_character":28},"in_reply_to":"7a8ec9b2_a1ef6d1c","updated":"2016-09-21 23:10:19.000000000","message":"Unfortunately they are different. The payload for rbac_policy.delete.end is a single dict with a single entry:\n    {\u0027rbac_policy_id\u0027: \u0027XXXX\u0027}.\n\nThe payload for rbac_policy.create.end is a dict embedded in a dict:\n    {\u0027rbac_policy\u0027: {\u0027tenant_id\u0027: \u0027XXX\u0027,\n                     \u0027object_id\u0027: \u0027YYY\u0027,\n                     \u0027id\u0027:        \u0027ZZZ\u0027}}\n\nThis is why they are separate cases, they need to be accessed differently. Also to be extra annoying, the field names are different. rbac_policy.create.end uses \"id\" for the RBAC policy ID. rbac_policy.delete.end uses \"rbac_policy_id\". :(","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"aba5d9600016931fda564b650550ed660fc55ffb","unresolved":false,"context_lines":[{"line_number":57,"context_line":"                (\u0027network_id\u0027, payload[\u0027rbac_policy\u0027].get(\u0027network\u0027)),"},{"line_number":58,"context_line":"                (\u0027target_tenant\u0027,"},{"line_number":59,"context_line":"                 payload[\u0027rbac_policy\u0027].get(\u0027target_tenant\u0027)))"},{"line_number":60,"context_line":"        elif \u0027rbac_policy_id\u0027 in payload:"},{"line_number":61,"context_line":"            return (\u0027rbac_policy_id\u0027, payload[\u0027rbac_policy_id\u0027]),"},{"line_number":62,"context_line":"        return ()"},{"line_number":63,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"5a8bc5a2_ede2fa9e","line":60,"range":{"start_line":60,"start_character":14,"end_line":60,"end_character":28},"in_reply_to":"7a8ec9b2_b230c157","updated":"2016-09-22 13:58:21.000000000","message":"OK. Maybe my neutron\u0027s out of date; it doesn\u0027t matter too much","commit_id":"b77501383d7043858bc3d56b174e2f858b93332e"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"998cc9661d631905f8d5a000b9b320d0e3f2f408","unresolved":false,"context_lines":[{"line_number":96,"context_line":"           tenant. We will want to add this tenant to the members list."},{"line_number":97,"context_line":"           Also add the RBAC policy."},{"line_number":98,"context_line":"        \"\"\""},{"line_number":99,"context_line":"        valid_actions \u003d [\"access_as_shared\", \"access_as_external\"]"},{"line_number":100,"context_line":"        valid_types \u003d [\"network\"]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        event_type \u003d payload[\u0027rbac_policy\u0027][\u0027object_type\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_d6ecaf2b","line":99,"updated":"2016-09-23 14:08:33.000000000","message":"could put valid_actions and valid_types somewhere, it\u0027s hard coded in both notification handler and plugin","commit_id":"e759bcc862d800d78e716389ece75712a060a908"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"76a60c62374e3f5b61e6a6c4c4f08fff8f00e51e","unresolved":false,"context_lines":[{"line_number":96,"context_line":"           tenant. We will want to add this tenant to the members list."},{"line_number":97,"context_line":"           Also add the RBAC policy."},{"line_number":98,"context_line":"        \"\"\""},{"line_number":99,"context_line":"        valid_actions \u003d [\"access_as_shared\", \"access_as_external\"]"},{"line_number":100,"context_line":"        valid_types \u003d [\"network\"]"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"        event_type \u003d payload[\u0027rbac_policy\u0027][\u0027object_type\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"5a8bc5a2_216b9886","line":99,"in_reply_to":"5a8bc5a2_d6ecaf2b","updated":"2016-09-26 06:28:21.000000000","message":"Deduplicated.","commit_id":"e759bcc862d800d78e716389ece75712a060a908"}],"searchlight/tests/functional/data/events/networks.json":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":165,"context_line":"      \"read_only\": false,"},{"line_number":166,"context_line":"      \"domain\": null,"},{"line_number":167,"context_line":"      \"project_name\": \"admin\","},{"line_number":168,"context_line":"      \"user_id\": \"b52c5f3792714829a69f7d8b976076be\","},{"line_number":169,"context_line":"      \"show_deleted\": false,"},{"line_number":170,"context_line":"      \"roles\": ["},{"line_number":171,"context_line":"        \"admin\""}],"source_content_type":"application/json","patch_set":4,"id":"3ac371cc_1cac5733","line":168,"range":{"start_line":168,"start_character":14,"end_line":168,"end_character":16},"updated":"2016-08-16 20:57:19.000000000","message":"Can strip out most of the context information, we don\u0027t use it","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"45f643535fb4483b5ccf7cdfb38e6a0c9ba6ed47","unresolved":false,"context_lines":[{"line_number":224,"context_line":"      \"timestamp\": \"2016-03-21 17:09:23.286750\","},{"line_number":225,"context_line":"      \"message_id\": \"159da540-d312-4c80-ba14-4a982bc82905\""},{"line_number":226,"context_line":"    }"},{"line_number":227,"context_line":"  }"},{"line_number":228,"context_line":"}"}],"source_content_type":"application/json","patch_set":4,"id":"3ac371cc_5c640f21","line":227,"range":{"start_line":227,"start_character":2,"end_line":227,"end_character":3},"updated":"2016-08-16 20:57:19.000000000","message":"Maybe add another example with different action, or with tenant_id\u003d*","commit_id":"f185344fe5d79259e3213b17d28b2d3f53b8764f"}]}
