)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":30,"context_line":"id in elasticsearch is no longer directly possible; a role suffix is"},{"line_number":31,"context_line":"*sometimes* required (but not always). Searchlight should be used to"},{"line_number":32,"context_line":"retrieve documents."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Change-Id: I36b46ff3b1d0cdb031866f54e9ae54326349c441"},{"line_number":35,"context_line":"Implements: blueprint index-level-role-separation"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9a68dd71_62d50ae3","line":33,"updated":"2016-01-26 00:08:04.000000000","message":"It would be nice to link to the published spec.\n\nhttp://specs.openstack.org/openstack/searchlight-specs/specs/mitaka/search-admin-only-fields.html","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1e4f7ec355c3daed4e7c089e25a04be33deaeb6f","unresolved":false,"context_lines":[{"line_number":30,"context_line":"id in elasticsearch is no longer directly possible; a role suffix is"},{"line_number":31,"context_line":"*sometimes* required (but not always). Searchlight should be used to"},{"line_number":32,"context_line":"retrieve documents."},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"Change-Id: I36b46ff3b1d0cdb031866f54e9ae54326349c441"},{"line_number":35,"context_line":"Implements: blueprint index-level-role-separation"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9a68dd71_097e77ae","line":33,"in_reply_to":"9a68dd71_62d50ae3","updated":"2016-01-28 15:57:32.000000000","message":"Done","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"}],"doc/source/plugins.rst":[{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"7020d865ef944b5c47e98ba91f35adeb8543d0bf","unresolved":false,"context_lines":[{"line_number":75,"context_line":"    [resource_plugin:os_server_nova]"},{"line_number":76,"context_line":"    index_name \u003d nova"},{"line_number":77,"context_line":"    enabled \u003d True"},{"line_number":78,"context_line":"    admin_only_fields \u003d OS-EXT-SRV*,OS-EXT-STS:vm_state"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    [resource_plugin:os_glance_image]"},{"line_number":81,"context_line":"    enabled \u003d True"}],"source_content_type":"text/x-rst","patch_set":18,"id":"5a5ae5dd_75a706a7","line":78,"range":{"start_line":78,"start_character":47,"end_line":78,"end_character":55},"updated":"2016-02-08 17:52:07.000000000","message":"To make this work with swift privileged headers(kind of admin fields), fields need to be dynamic since swift users can add new privileged headers which need not follow a pattern that can be expressed with wild card characters.","commit_id":"faba34ddb88f05ed12478a07d04b074a76452195"}],"searchlight/api/v1/search.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"f4f62f56ea822ccafe3ca28d6650d1aaeff47c28","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        # filters? Doing it here fits with the idea of doing it in alias"},{"line_number":289,"context_line":"        # filters, and unlike RBAC filtering it will always apply (probably)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        role_value \u003d \"admin\" if is_admin else \"user\""},{"line_number":292,"context_line":"        role_filter \u003d {"},{"line_number":293,"context_line":"            \u0027term\u0027: {searchlight.elasticsearch.ROLE_USER_FIELD: role_value}"},{"line_number":294,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_274a7084","line":291,"updated":"2016-01-11 07:34:48.000000000","message":"i\u0027d prefer put this to RequestContext as a property something like context.role.","commit_id":"dc9e888b58583c9643e8e0ddc4ca9fcdf2ffaa1d"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"76c7ac86bf5bc27ec67d6e2323286d4a4b17dc96","unresolved":false,"context_lines":[{"line_number":288,"context_line":"        # filters? Doing it here fits with the idea of doing it in alias"},{"line_number":289,"context_line":"        # filters, and unlike RBAC filtering it will always apply (probably)"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"        role_value \u003d \"admin\" if is_admin else \"user\""},{"line_number":292,"context_line":"        role_filter \u003d {"},{"line_number":293,"context_line":"            \u0027term\u0027: {searchlight.elasticsearch.ROLE_USER_FIELD: role_value}"},{"line_number":294,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_6448f15c","line":291,"in_reply_to":"fa69d971_274a7084","updated":"2016-01-11 17:56:43.000000000","message":"Yeah, that\u0027s as good a place as any. I\u0027ll make the change.","commit_id":"dc9e888b58583c9643e8e0ddc4ca9fcdf2ffaa1d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"085d6e74aa4a87fc4430df684031c9f4956d37a4","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # Filter out the role-separation field"},{"line_number":408,"context_line":"        query_params.setdefault(\u0027_source_exclude\u0027, []).append("},{"line_number":409,"context_line":"            searchlight.elasticsearch.ROLE_USER_FIELD)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        if offset is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_8ec93faf","line":408,"updated":"2016-02-03 00:50:08.000000000","message":"If exclude is passed in the query, this fails with the below error, which also means there must not be a test sending exclude through.\n\n  File \"/Users/ttripp/dev/openstack/searchlight/searchlight/api/v1/search.py\", line 408, in search\n    query_params.setdefault(\u0027_source_exclude\u0027, []).append(\nAttributeError: \u0027unicode\u0027 object has no attribute \u0027append\u0027^[[00m\nRun this query on searchlight:\n\nExample: query I tried to run:\n\n {\n    \"index\": \"searchlight\",\n    \"type\": \"OS::Nova::Server\",\n      \"query\": {\n        \"match_all\": {}\n      }\n    \"_source\": {\"include\" : \"__searchlight-user-role\", \"exclude\": \"name\"}\n    \n}","commit_id":"558f2314436d7fb8f1b8113bde08f11cbf65f2c1"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"2a07cbc5993900e9c3d1a75ef6319a5b7bd1faaf","unresolved":false,"context_lines":[{"line_number":405,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # Filter out the role-separation field"},{"line_number":408,"context_line":"        query_params.setdefault(\u0027_source_exclude\u0027, []).append("},{"line_number":409,"context_line":"            searchlight.elasticsearch.ROLE_USER_FIELD)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        if offset is not None:"}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_cd0ce196","line":408,"in_reply_to":"5a5ae5dd_8ec93faf","updated":"2016-02-04 00:37:48.000000000","message":"I noticed this earlier, thanks. I\u0027ll include a fix in the next revision.","commit_id":"558f2314436d7fb8f1b8113bde08f11cbf65f2c1"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"085d6e74aa4a87fc4430df684031c9f4956d37a4","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        # Filter out the role-separation field"},{"line_number":408,"context_line":"        query_params.setdefault(\u0027_source_exclude\u0027, []).append("},{"line_number":409,"context_line":"            searchlight.elasticsearch.ROLE_USER_FIELD)"},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"        if offset is not None:"},{"line_number":412,"context_line":"            query_params[\u0027offset\u0027] \u003d self._validate_offset(offset)"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"5a5ae5dd_ee6233ad","line":410,"updated":"2016-02-03 00:50:08.000000000","message":"Please note that all of the below worked:\n\n   \"_source\": {\"include\": \"name\"}\n   \"source\": {\"include\": \"*\"}\n    \"_source\": \"*\"","commit_id":"558f2314436d7fb8f1b8113bde08f11cbf65f2c1"}],"searchlight/elasticsearch/plugins/base.py":[{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":118,"context_line":"            documents.append(document)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        self.index_helper.save_documents(documents)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def get_facets(self, request_context, all_projects\u003dFalse, limit_terms\u003d0):"},{"line_number":123,"context_line":"        \"\"\"Get facets available for searching, in the form of a list of"},{"line_number":124,"context_line":"        dicts with keys \"name\", \"type\" and optionally \"options\" if a field"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_5d7cc3b4","line":121,"updated":"2016-01-30 00:21:18.000000000","message":"This code should be placed in a try/except. We will call ES.helpers.bulk which calls ES.helpers.streaming_bulk. The default values for both raise_on_errors and raise_on_exceptions in ES.helpers.streaming_bulk is True. Which means that streaming_bulk will propagate exceptions. If we do not want a try/except we should set both of these parameters to False when calling helpers.bulk in index_help.save_documents().","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"18d97c0d1519e7ec06b70065645c12d3e789fd57","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    def serialize(self, obj):"},{"line_number":247,"context_line":"        \"\"\"Serialize database object into valid search engine document.\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @property"},{"line_number":250,"context_line":"    def document_id_field(self):"},{"line_number":251,"context_line":"        \"\"\"Whatever document field should be treated as the id. This field"},{"line_number":252,"context_line":"        should also be mapped to _id in the elasticsearch mapping, though"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_3892ea4c","line":249,"updated":"2016-02-01 23:25:26.000000000","message":"This change really should have been isolated as its own parent patch. I\u0027m not going to nail you on it this time, but this change  could be better isolated in the future.","commit_id":"ea901b09b17c2f235ac241a11be0aa94655dc5d9"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"3678139e11dda350be4bea98182d85a339842924","unresolved":false,"context_lines":[{"line_number":246,"context_line":"    def serialize(self, obj):"},{"line_number":247,"context_line":"        \"\"\"Serialize database object into valid search engine document.\"\"\""},{"line_number":248,"context_line":""},{"line_number":249,"context_line":"    @property"},{"line_number":250,"context_line":"    def document_id_field(self):"},{"line_number":251,"context_line":"        \"\"\"Whatever document field should be treated as the id. This field"},{"line_number":252,"context_line":"        should also be mapped to _id in the elasticsearch mapping, though"}],"source_content_type":"text/x-python","patch_set":15,"id":"7a5de9d1_2e1b8082","line":249,"in_reply_to":"7a5de9d1_3892ea4c","updated":"2016-02-01 23:57:26.000000000","message":"I\u0027ll change them back.","commit_id":"ea901b09b17c2f235ac241a11be0aa94655dc5d9"}],"searchlight/elasticsearch/plugins/designate/notification_handlers.py":[{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":94,"context_line":"    def create_or_update(self, payload):"},{"line_number":95,"context_line":"        payload \u003d self._serialize(payload)"},{"line_number":96,"context_line":"        self.index_helper.save_document(payload)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def delete(self, payload):"},{"line_number":99,"context_line":"        zone_id \u003d payload[\u0027id\u0027]"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_1d516b36","line":97,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"        try:"},{"line_number":136,"context_line":"            self.index_helper.delete_document_by_id(zone_id)"},{"line_number":137,"context_line":"        except exceptions.NotFoundError:"},{"line_number":138,"context_line":"            msg \u003d \"Zone %s not found when deleting\""},{"line_number":139,"context_line":"            LOG.error(msg, zone_id)"},{"line_number":140,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_9d5d5b49","line":137,"updated":"2016-01-30 00:21:18.000000000","message":"Is this the only exception possible when calling ES.helpers.bulk()?","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":162,"context_line":"    def create_or_update(self, payload):"},{"line_number":163,"context_line":"        payload \u003d self._serialize(payload)"},{"line_number":164,"context_line":"        self.index_helper.save_document(payload)"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def _serialize(self, obj):"},{"line_number":167,"context_line":"        obj[\u0027project_id\u0027] \u003d obj.pop(\u0027tenant_id\u0027)"},{"line_number":168,"context_line":"        obj[\u0027zone_id\u0027] \u003d obj.pop(\u0027domain_id\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_bd413765","line":165,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"7a5de9d1_7d609f01","line":176,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"}],"searchlight/elasticsearch/plugins/glance/images_notification_handler.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            payload \u003d self.serialize_notification(payload)"},{"line_number":62,"context_line":"            self.index_helper.save_document(payload)"},{"line_number":63,"context_line":"        except glanceclient.exceptions.NotFound:"},{"line_number":64,"context_line":"            LOG.warning(_LW(\"Image %s not found; deleting\") % image_id)"},{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                self.index_helper.delete_document_by_id(image_id)"},{"line_number":67,"context_line":"            except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_c26b96ef","line":64,"updated":"2016-01-26 00:08:04.000000000","message":"The try below is identical to the try in delete function.  Please create a common helper function so this remains DRY.","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1e4f7ec355c3daed4e7c089e25a04be33deaeb6f","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            payload \u003d self.serialize_notification(payload)"},{"line_number":62,"context_line":"            self.index_helper.save_document(payload)"},{"line_number":63,"context_line":"        except glanceclient.exceptions.NotFound:"},{"line_number":64,"context_line":"            LOG.warning(_LW(\"Image %s not found; deleting\") % image_id)"},{"line_number":65,"context_line":"            try:"},{"line_number":66,"context_line":"                self.index_helper.delete_document_by_id(image_id)"},{"line_number":67,"context_line":"            except Exception as exc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_092c37aa","line":64,"in_reply_to":"9a68dd71_c26b96ef","updated":"2016-01-28 15:57:32.000000000","message":"It\u0027s not identical. This section\u0027s catching a specific glance error and deleting on a 404; the delete function is ignoring ANY error (which admittedly might not be a good idea)","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"1e4f7ec355c3daed4e7c089e25a04be33deaeb6f","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    def sync_members(self, payload):"},{"line_number":82,"context_line":"        # TODO(sjmc7): This needs to deal with admin/non admin, although"},{"line_number":83,"context_line":"        # right now there\u0027s no separation"},{"line_number":84,"context_line":"        image_id \u003d payload[\u0027image_id\u0027]"},{"line_number":85,"context_line":"        image_es \u003d self.index_helper.engine.get("},{"line_number":86,"context_line":"            index\u003dself.index_helper.index_name,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_6911335d","line":83,"range":{"start_line":83,"start_character":20,"end_line":83,"end_character":25},"updated":"2016-01-28 15:57:32.000000000","message":"This function was omitted in the original patch; will correct that","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_LW \u003d i18n._LW"},{"line_number":31,"context_line":"_LE \u003d i18n._LE"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_5d536339","line":29,"updated":"2016-01-30 00:21:18.000000000","message":"Duplicate setting of LOG.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"095cd548c1fb7121ad62549d24c7a558552ead65","unresolved":false,"context_lines":[{"line_number":26,"context_line":""},{"line_number":27,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":30,"context_line":"_LW \u003d i18n._LW"},{"line_number":31,"context_line":"_LE \u003d i18n._LE"},{"line_number":32,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_b3c291e7","line":29,"in_reply_to":"7a5de9d1_5d536339","updated":"2016-02-01 15:41:11.000000000","message":"Done","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"7a5de9d1_1d388bee","line":89,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"095cd548c1fb7121ad62549d24c7a558552ead65","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"7a5de9d1_933435fc","line":89,"in_reply_to":"7a5de9d1_1d388bee","updated":"2016-02-01 15:41:11.000000000","message":"Not seeing the regression; the error handling did and does need improving, but I would prefer not to add it to this (already large) patch.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"}],"searchlight/elasticsearch/plugins/glance/metadefs_notification_handler.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    # TODO(sjmc7) Move this into the helper class"},{"line_number":62,"context_line":"    def run_update(self, id, payload, script\u003dFalse):"},{"line_number":63,"context_line":"        # Metadefs have no role separation, so we can cheat a bit"},{"line_number":64,"context_line":"        payload[ROLE_USER_FIELD] \u003d [\u0027user\u0027, \u0027admin\u0027]"},{"line_number":65,"context_line":"        if script:"},{"line_number":66,"context_line":"            self.index_helper.engine.update("}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_e2133a63","line":63,"updated":"2016-01-26 00:08:04.000000000","message":"Maybe a bit more of a comment here for people in the future.  E.g.\n\nAll metadefs fields are visibile to any user that can see the metadefs namespace. So, we can cheat a bit.","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":59,"context_line":""},{"line_number":60,"context_line":"    def run_update(self, id, payload, script\u003dFalse):"},{"line_number":61,"context_line":"        if script:"},{"line_number":62,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":65,"context_line":""}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_bd3857ef","line":62,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if script:"},{"line_number":62,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def create_ns(self, payload):"},{"line_number":67,"context_line":"        self.index_helper.save_document(self.format_namespace(payload))"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_5d2a8391","line":64,"updated":"2016-01-30 00:21:18.000000000","message":"The two cases (lines 62 \u0026 64) are the same. Is this left over from earlier code where we did something different if \"script\" was set or not?","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def create_ns(self, payload):"},{"line_number":67,"context_line":"        self.index_helper.save_document(self.format_namespace(payload))"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def update_ns(self, payload):"},{"line_number":70,"context_line":"        id \u003d payload[\u0027namespace_old\u0027]"},{"line_number":71,"context_line":"        self.run_update(id, self.format_namespace(payload))"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_7d273fca","line":68,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":73,"context_line":"    def delete_ns(self, payload):"},{"line_number":74,"context_line":"        id \u003d payload[\u0027namespace\u0027]"},{"line_number":75,"context_line":"        self.index_helper.delete_document_by_id(id)"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def create_obj(self, payload):"},{"line_number":78,"context_line":"        id \u003d payload[\u0027namespace\u0027]"},{"line_number":79,"context_line":"        object \u003d self.format_object(payload)"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_9d247bc5","line":76,"updated":"2016-01-30 00:21:18.000000000","message":"Same comment as searchlight/plugins/base.py: Line 120.","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"fba766b67ba09536eb6fa03164ef4b484441bad6","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if script:"},{"line_number":62,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def create_ns(self, payload):"},{"line_number":67,"context_line":"        self.index_helper.save_document(self.format_namespace(payload))"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_5b6850b9","line":64,"updated":"2016-02-05 14:54:26.000000000","message":"no need for if else I guess","commit_id":"7a0407e1f02c0da4bfea2e76464c35b5be85851a"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"0436c1ee3d02b64b766d14550fdd59635efe630d","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if script:"},{"line_number":62,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def create_ns(self, payload):"},{"line_number":67,"context_line":"        self.index_helper.save_document(self.format_namespace(payload))"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_7b10ac59","line":64,"in_reply_to":"5a5ae5dd_5b6850b9","updated":"2016-02-05 15:05:51.000000000","message":"Hmm, yeah, something is odd here. Good catch Lei.","commit_id":"7a0407e1f02c0da4bfea2e76464c35b5be85851a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"7dbe5cbbfb9bb8bb5a54835d31099ee9f59e450c","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        if script:"},{"line_number":62,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":63,"context_line":"        else:"},{"line_number":64,"context_line":"            self.index_helper.update_document(payload, id, script)"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def create_ns(self, payload):"},{"line_number":67,"context_line":"        self.index_helper.save_document(self.format_namespace(payload))"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_0eeb6b14","line":64,"in_reply_to":"5a5ae5dd_5b6850b9","updated":"2016-02-05 18:07:11.000000000","message":"That is odd, you\u0027re right. I\u0027ll correct it. I think this was the result of many iterations of changes.","commit_id":"7a0407e1f02c0da4bfea2e76464c35b5be85851a"},{"author":{"_account_id":16150,"name":"Lei Zhang","email":"lei.a.zhang@intel.com","username":"leizhang"},"change_message_id":"fba766b67ba09536eb6fa03164ef4b484441bad6","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def update_ns(self, payload):"},{"line_number":70,"context_line":"        id \u003d payload[\u0027namespace_old\u0027]"},{"line_number":71,"context_line":"        self.run_update(id, self.format_namespace(payload))"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def delete_ns(self, payload):"},{"line_number":74,"context_line":"        id \u003d payload[\u0027namespace\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_5bddb06d","line":71,"updated":"2016-02-05 14:54:26.000000000","message":"just want to know if we can use helper\u0027s save_document method instead of update method.","commit_id":"7a0407e1f02c0da4bfea2e76464c35b5be85851a"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"7dbe5cbbfb9bb8bb5a54835d31099ee9f59e450c","unresolved":false,"context_lines":[{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def update_ns(self, payload):"},{"line_number":70,"context_line":"        id \u003d payload[\u0027namespace_old\u0027]"},{"line_number":71,"context_line":"        self.run_update(id, self.format_namespace(payload))"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    def delete_ns(self, payload):"},{"line_number":74,"context_line":"        id \u003d payload[\u0027namespace\u0027]"}],"source_content_type":"text/x-python","patch_set":17,"id":"5a5ae5dd_eef5afec","line":71,"in_reply_to":"5a5ae5dd_5bddb06d","updated":"2016-02-05 18:07:11.000000000","message":"Update is a partial document update; save_document replaces entirely.","commit_id":"7a0407e1f02c0da4bfea2e76464c35b5be85851a"}],"searchlight/elasticsearch/plugins/nova/servers.py":[{"author":{"_account_id":4428,"name":"Liyingjun","email":"yinjalee@163.com","username":"liyingjun"},"change_message_id":"f4f62f56ea822ccafe3ca28d6650d1aaeff47c28","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return \u0027OS::Nova::Server\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @property"},{"line_number":38,"context_line":"    def requires_role_separation(self):"},{"line_number":39,"context_line":"        # This can/should be programmatic based on unsearchable_fields"},{"line_number":40,"context_line":"        return True"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_6f53106c","line":38,"updated":"2016-01-11 07:34:48.000000000","message":"so could this method be removed since it is based on admin_only_fields?","commit_id":"dc9e888b58583c9643e8e0ddc4ca9fcdf2ffaa1d"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"76c7ac86bf5bc27ec67d6e2323286d4a4b17dc96","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        return \u0027OS::Nova::Server\u0027"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"    @property"},{"line_number":38,"context_line":"    def requires_role_separation(self):"},{"line_number":39,"context_line":"        # This can/should be programmatic based on unsearchable_fields"},{"line_number":40,"context_line":"        return True"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa69d971_44a12df7","line":38,"in_reply_to":"fa69d971_6f53106c","updated":"2016-01-11 17:56:43.000000000","message":"Yeah, i think the default can do that; i\u0027ll leave it as overridable by base classes if such a need will exist in future.","commit_id":"dc9e888b58583c9643e8e0ddc4ca9fcdf2ffaa1d"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    NotificationHandlerCls \u003d servers_notification_handler.InstanceHandler"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # Will be combined with \u0027unsearchable_fields\u0027 from config"},{"line_number":31,"context_line":"    ADMIN_ONLY_FIELDS \u003d [\u0027OS-EXT-SRV-ATTR:*\u0027]"},{"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":10,"id":"9a68dd71_f628db87","line":31,"updated":"2016-01-26 00:08:04.000000000","message":"I\u0027m thinking that this needs to be written in sample generated config file.  Taking this note as I go through each file, so disregard if handled.","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"},{"author":{"_account_id":14680,"name":"Rick Aulino","email":"rick.aulino@hpe.com","username":"ricka"},"change_message_id":"7f02cf316b819c191a4e5bacc464dc7901e22cc5","unresolved":false,"context_lines":[{"line_number":27,"context_line":"class ServerIndex(base.IndexBase):"},{"line_number":28,"context_line":"    NotificationHandlerCls \u003d servers_notification_handler.InstanceHandler"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # Will be combined with \u0027unsearchable_fields\u0027 from config"},{"line_number":31,"context_line":"    ADMIN_ONLY_FIELDS \u003d [\u0027OS-EXT-SRV-ATTR:*\u0027]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":14,"id":"7a5de9d1_3d046716","line":30,"updated":"2016-01-30 00:21:18.000000000","message":"Based on line 104, the comment should refer to \"admin_only_fields\" instead of \"unsearchable_fields\".","commit_id":"bcf78da6771fff414386e5ed1e6c18cc762c7ae1"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"7020d865ef944b5c47e98ba91f35adeb8543d0bf","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    NotificationHandlerCls \u003d servers_notification_handler.InstanceHandler"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    # Will be combined with \u0027admin_only_fields\u0027 from config"},{"line_number":31,"context_line":"    ADMIN_ONLY_FIELDS \u003d [\u0027OS-EXT-SRV-ATTR:*\u0027]"},{"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":18,"id":"5a5ae5dd_751aa6c7","line":31,"range":{"start_line":31,"start_character":41,"end_line":31,"end_character":45},"updated":"2016-02-08 17:52:07.000000000","message":"To make this work with swift privileged headers(kind of admin fields), fields need to be dynamic since swift users can add new privileged headers which need not follow a pattern that can be expressed with wild card characters.","commit_id":"faba34ddb88f05ed12478a07d04b074a76452195"}],"searchlight/elasticsearch/plugins/nova/servers_notification_handler.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":73,"context_line":"            self.index_helper.save_document(payload)"},{"line_number":74,"context_line":"        except novaclient.exceptions.NotFound:"},{"line_number":75,"context_line":"            LOG.warning(_LW(\"Instance %s not found; deleting\") % instance_id)"},{"line_number":76,"context_line":"            try:"},{"line_number":77,"context_line":"                self.index_helper.delete_document_by_id(instance_id)"},{"line_number":78,"context_line":"            except Exception as exc:"},{"line_number":79,"context_line":"                LOG.error(_LE("}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_3633d3f7","line":76,"updated":"2016-01-26 00:08:04.000000000","message":"This try and the try in delete function are identical. Common helper function for DRY? I think it still makes sense for delete_document_by_id to let the exception propagate up (unless you want to pass in another param to it telling it to log and handle exceptions.","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"}],"searchlight/elasticsearch/plugins/utils.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"54cdbaa9e29654d98ded6b56f67e2aaf5fc6299e","unresolved":false,"context_lines":[{"line_number":102,"context_line":"            }"},{"line_number":103,"context_line":"            parent_field \u003d self.plugin.parent_id_field"},{"line_number":104,"context_line":"            if parent_field:"},{"line_number":105,"context_line":"                action[\u0027_parent\u0027] \u003d doc[parent_field]"},{"line_number":106,"context_line":"            return action"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        for document in documents:"}],"source_content_type":"text/x-python","patch_set":7,"id":"da6ed579_32f9964e","line":105,"range":{"start_line":105,"start_character":36,"end_line":105,"end_character":39},"updated":"2016-01-11 23:42:47.000000000","message":"I think this might need to add the id suffix here, though since designate doesn\u0027t require separate indexing, it won\u0027t actually be a problem and this code needs tweaking for https://bugs.launchpad.net/searchlight/+bug/1532972 anyway.","commit_id":"918dac74b09dc8ce26c9f3c1489a4bdeda65869e"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":113,"context_line":"                           document[self.plugin.document_id_field]))"},{"line_number":114,"context_line":"                document[ROLE_USER_FIELD] \u003d \u0027admin\u0027"},{"line_number":115,"context_line":"                yield _get_index_action(document, ADMIN_ID_SUFFIX)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"                user_doc \u003d self._remove_admin_fields(document)"},{"line_number":118,"context_line":"                user_doc[ROLE_USER_FIELD] \u003d \u0027user\u0027"},{"line_number":119,"context_line":"                yield _get_index_action(user_doc, USER_ID_SUFFIX)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_564f6733","line":116,"updated":"2016-01-26 00:08:04.000000000","message":"I suppose in the future this perhaps could be expanded to more roles... where in config file, you have a dictionary or roles to fields. That level of complexity hurts my brain at the moment.","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"}],"searchlight/tests/functional/__init__.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":371,"context_line":"            plugin.options \u003d mock.Mock()"},{"line_number":372,"context_line":"            plugin.options.index_name \u003d \"searchlight\""},{"line_number":373,"context_line":"            plugin.options.enabled \u003d True"},{"line_number":374,"context_line":"            plugin.options.unsearchable_fields \u003d None"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":"            plugin.engine \u003d self.elastic_connection"},{"line_number":377,"context_line":"            plugin.index_name \u003d plugin.get_index_name()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_f6bc5bdd","side":"PARENT","line":374,"updated":"2016-01-26 00:08:04.000000000","message":"In the spec we didn\u0027t agree to completely kill of unsearchable fields as a concept. My arm could be twisted, but I do wonder if we should remove this functionality.  I reason that there is potential for random data in some fields skewing search results, but not wanting that to be omitted from results.","commit_id":"89712182d4ab95b9ed37d6bd2969c49371d987ee"}],"searchlight/tests/functional/test_api.py":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"45685aa3050d750f0447dda6676dd6640af12489","unresolved":false,"context_lines":[{"line_number":225,"context_line":"        \u0027admin only\u0027 fields can\u0027t be searched by ordinary users"},{"line_number":226,"context_line":"        \"\"\""},{"line_number":227,"context_line":"        admin_field, admin_value \u003d (u\u0027OS-EXT-SRV-ATTR:host\u0027, u\u0027devstack\u0027)"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":"        doc_id \u003d u\u0027abc\u0027"},{"line_number":230,"context_line":"        doc \u003d {"},{"line_number":231,"context_line":"            u\u0027id\u0027: doc_id,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9a68dd71_36f19395","line":228,"updated":"2016-01-26 00:08:04.000000000","message":"Are we able to test this with config file admin fields (not just the hard coded one)?","commit_id":"fffbc5d96418a97751e3eef6bea73570bc05dbaf"}]}
