)]}'
{"doc/source/plugins/designate.rst":[{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9739d27e36cefa8f0d012d5c321cd4e2d0f003e9","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Searchlight Configuration"},{"line_number":33,"context_line":"\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"Glance uses a property protections mechanism to ensure that certain"},{"line_number":36,"context_line":"properties are limited to only people with the appropriate permissions."},{"line_number":37,"context_line":"Searchlight includes the same functionality and must be deployed with"}],"source_content_type":"text/x-rst","patch_set":7,"id":"9a41bdd9_2f8c1ad9","line":34,"updated":"2015-07-15 00:39:41.000000000","message":"Glance info here.","commit_id":"47f3781a4709a001104345abe1372013bfc00baf"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9b0f1f9137da73ee9084784ff7e867db450b1d75","unresolved":false,"context_lines":[{"line_number":48,"context_line":""},{"line_number":49,"context_line":"Suggested changes::"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    property_protection_file \u003d ~/openstack/searchlight/etc/property-protections-roles.conf"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"9a41bdd9_6d95523d","line":51,"updated":"2015-07-14 21:48:36.000000000","message":"This isn\u0027t needed/used","commit_id":"47f3781a4709a001104345abe1372013bfc00baf"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"06d6c10b44b175d0e22762976d877e0b893c6c5b","unresolved":false,"context_lines":[{"line_number":25,"context_line":"Open designate.conf and make the following changes::"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"    notification_driver \u003d messaging"},{"line_number":28,"context_line":"    rpc_backend \u003d \u0027rabbit\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Restart designate-central, designate-pool-manager, designate-zone-manager and"},{"line_number":31,"context_line":"you should be good to go!."}],"source_content_type":"text/x-rst","patch_set":9,"id":"3a50d1a3_ff6bbeb7","line":28,"updated":"2015-07-30 13:01:36.000000000","message":"Add the following line. Searchlight uses a specific topic(searchlight_indexer) to avoid collisions in future with other listeners.\n\n\nnotification_topics \u003d notifications, searchlight_indexer","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"cee86f9c58fe8360646ac5829dcce29287008be6","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    rpc_backend \u003d \u0027rabbit\u0027"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Restart designate-central, designate-pool-manager, designate-zone-manager and"},{"line_number":31,"context_line":"you should be good to go!."}],"source_content_type":"text/x-rst","patch_set":13,"id":"da20952f_4c6b5685","line":31,"updated":"2015-09-01 06:10:57.000000000","message":"Maybe add a section in here or point to existing designate docs on enabling it in devstack.\n\nDevstack Configuration\n\n# Enable a Notification Driver\nDESIGNATE_NOTIFICATION_DRIVER\u003dmessaging\n\n# Set Notification topics\nDESIGNATE_NOTIFICATION_TOPICS\u003dnotifications,searchlight_indexer","commit_id":"4b06c57c9375a53a315b3015238bb7bc36f4cdcc"}],"searchlight/elasticsearch/plugins/designate/__init__.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":13,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":"from searchlight.elasticsearch.plugins import base"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_74b309ea","line":15,"updated":"2015-07-07 15:52:21.000000000","message":"nit: Should be a blank line between disclaimer and imports","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"    return zone"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"def serialize_recordset(zone):"},{"line_number":24,"context_line":"    return zone"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_d4f1b5ce","line":23,"updated":"2015-07-07 15:52:21.000000000","message":"Would prefer recordset as a variable name instead of zone.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class DesignateBase(base.IndexBase):"},{"line_number":28,"context_line":"    pass"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _walk_pages(self, list_func, *args, **kwargs):"},{"line_number":31,"context_line":"        while True:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_14fabdbd","line":28,"updated":"2015-07-07 15:52:21.000000000","message":"Remove this one.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":29,"context_line":""},{"line_number":30,"context_line":"    def _walk_pages(self, list_func, *args, **kwargs):"},{"line_number":31,"context_line":"        while True:"},{"line_number":32,"context_line":"            items \u003d list_func(*args, **kwargs)"},{"line_number":33,"context_line":"            if len(items) !\u003d 0:"},{"line_number":34,"context_line":"                kwargs[\"marker\"] \u003d items[-1][\"id\"]"},{"line_number":35,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_f4715945","line":32,"updated":"2015-07-07 15:52:21.000000000","message":"How about:\n\nif not items:\n    break\n\nfor item in items:\n    yield item\n\nkwargs[\"marker\"] \u003d item[\"id\"]","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"}],"searchlight/elasticsearch/plugins/designate/notification_handlers.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from searchlight.common import utils"},{"line_number":21,"context_line":"from searchlight.elasticsearch.plugins import base"},{"line_number":22,"context_line":"from searchlight.elasticsearch.plugins.designate import ("},{"line_number":23,"context_line":"    serialize_recordset, serialize_zone)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_d4f2159a","line":23,"updated":"2015-07-07 15:52:21.000000000","message":"According to http://docs.openstack.org/developer/hacking/ we should avoid importing objects. I know that glance plugin break this rule, but it should be fixed there and not be repeated in other plugins.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from searchlight.common import utils"},{"line_number":21,"context_line":"from searchlight.elasticsearch.plugins import base"},{"line_number":22,"context_line":"from searchlight.elasticsearch.plugins.designate import ("},{"line_number":23,"context_line":"    serialize_recordset, serialize_zone)"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_ed72e47b","line":23,"in_reply_to":"ba3cc151_d4f2159a","updated":"2015-07-07 20:30:09.000000000","message":"Agreed. I shall duly flagellate myself.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        except Exception as e:"},{"line_number":46,"context_line":"            LOG.error(utils.exception_to_str(e))"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def create(self, payload):"},{"line_number":49,"context_line":"        id \u003d payload[\u0027id\u0027]"},{"line_number":50,"context_line":"        payload \u003d serialize_zone(payload)"},{"line_number":51,"context_line":"        self.engine.create("}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_cdc36056","line":48,"updated":"2015-07-07 20:30:09.000000000","message":"As a suggestion, since we\u0027re always creating or updating the entire object, you can use {\"doc\": payload, \"doc_as_upsert\": True} and use engine.update for both operations - then you will just need a \u0027delete\u0027 and a \u0027create_or_update\u0027 handler function.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":74,"context_line":"            id\u003did"},{"line_number":75,"context_line":"        )"},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"    def exists(self, payload):"},{"line_number":78,"context_line":"        id \u003d payload[\u0027id\u0027]"},{"line_number":79,"context_line":"        payload \u003d serialize_zone(payload)"},{"line_number":80,"context_line":"        doc \u003d {\"doc\": payload}"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_2dabec8a","line":77,"updated":"2015-07-07 20:30:09.000000000","message":"This is identical to update. See my note above or at the very least i\u0027d remove this.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":95,"context_line":""},{"line_number":96,"context_line":"    def process(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":97,"context_line":"        try:"},{"line_number":98,"context_line":"            actions \u003d {"},{"line_number":99,"context_line":"                \"dns.domain.create\": self.create,"},{"line_number":100,"context_line":"                \"dns.domain.update\": self.update,"},{"line_number":101,"context_line":"                \"dns.domain.delete\": self.delete"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_d4e535a8","line":98,"updated":"2015-07-07 15:52:21.000000000","message":"Shouldn\u0027t it be dns.recordset.create instead of dns.domain.create? Same for other notification types.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9c53a4c992ed97577b6a2d7d831b2f9b92badfef","unresolved":false,"context_lines":[{"line_number":46,"context_line":"        id \u003d payload[\u0027id\u0027]"},{"line_number":47,"context_line":"        payload \u003d designate.serialize_zone(payload)"},{"line_number":48,"context_line":"        doc \u003d {\"doc\": payload, \"doc_as_upsert\": True}"},{"line_number":49,"context_line":"        self.engine.create("},{"line_number":50,"context_line":"            index\u003dself.index_name,"},{"line_number":51,"context_line":"            doc_type\u003dself.document_type,"},{"line_number":52,"context_line":"            body\u003ddoc,"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba3cc151_60a5f99f","line":49,"updated":"2015-07-09 20:37:29.000000000","message":"need update here to avoid duplicate errors and use doc_as_upsert","commit_id":"9f00940960dc4083340ec8f0588041e5d9e99fcc"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"84970b0242bb981f22f366b73c457a5dee98a04c","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    def process(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":73,"context_line":"        try:"},{"line_number":74,"context_line":"            actions \u003d {"},{"line_number":75,"context_line":"                \"dns.recordset.create\": self.create,"},{"line_number":76,"context_line":"                \"dns.recordset.update\": self.update,"},{"line_number":77,"context_line":"                \"dns.recordset.delete\": self.delete"},{"line_number":78,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_a04939d2","line":75,"updated":"2015-07-27 17:43:42.000000000","message":"create_or_update, same for next line","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"f1154ab46c0ad8e96805ecf9da8965d2ba779e77","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        id \u003d payload[\u0027id\u0027]"},{"line_number":86,"context_line":"        payload \u003d designate.serialize_zone(payload)"},{"line_number":87,"context_line":"        doc \u003d {\"doc\": payload, \"doc_as_upsert\": True}"},{"line_number":88,"context_line":"        self.engine.create("},{"line_number":89,"context_line":"            index\u003dself.index_name,"},{"line_number":90,"context_line":"            doc_type\u003dself.document_type,"},{"line_number":91,"context_line":"            body\u003ddoc,"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_3ecd885d","line":88,"updated":"2015-07-31 04:59:10.000000000","message":"We actually need to use self-engine.index.\n\nSee: https://review.openstack.org/#/c/207719/","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"cee86f9c58fe8360646ac5829dcce29287008be6","unresolved":false,"context_lines":[{"line_number":38,"context_line":"            }"},{"line_number":39,"context_line":"            actions[event_type](payload)"},{"line_number":40,"context_line":"            return oslo_messaging.NotificationResult.HANDLED"},{"line_number":41,"context_line":"        except Exception as e:"},{"line_number":42,"context_line":"            LOG.exception(e)"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def create_or_update(self, payload):"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_2cd94257","line":41,"updated":"2015-09-01 06:10:57.000000000","message":"We are using the following:\n\nFirst import from oslo_utils import encodeutils\n\nThen:\n\nLOG.error(encodeutils.exception_to_unicode(e))","commit_id":"4b06c57c9375a53a315b3015238bb7bc36f4cdcc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"cee86f9c58fe8360646ac5829dcce29287008be6","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def create_or_update(self, payload):"},{"line_number":45,"context_line":"        id \u003d payload[\u0027id\u0027]"},{"line_number":46,"context_line":"        payload \u003d designate.serialize_zone(payload)"},{"line_number":47,"context_line":"        doc \u003d {\"doc\": payload, \"doc_as_upsert\": True}"},{"line_number":48,"context_line":"        self.engine.index("},{"line_number":49,"context_line":"            index\u003dself.index_name,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_aca1d295","line":46,"updated":"2015-09-01 06:10:57.000000000","message":"In glance plugin and nova plugin, we aren\u0027t using doc_as_upsert.  However, I also have seen some issues without using it that Lakshmi hasn\u0027t seen.  I\u0027d be curious to know if you see similar issues in your env as what I report in this bug:\n\nhttps://bugs.launchpad.net/searchlight/+bug/1486781","commit_id":"4b06c57c9375a53a315b3015238bb7bc36f4cdcc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"cee86f9c58fe8360646ac5829dcce29287008be6","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            actions[event_type](payload)"},{"line_number":79,"context_line":"            return oslo_messaging.NotificationResult.HANDLED"},{"line_number":80,"context_line":"        except Exception as e:"},{"line_number":81,"context_line":"            LOG.exception(e)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":"    def create_or_update(self, payload):"},{"line_number":84,"context_line":"        id \u003d payload[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_accf9254","line":81,"updated":"2015-09-01 06:10:57.000000000","message":"same note here about exception logging.","commit_id":"4b06c57c9375a53a315b3015238bb7bc36f4cdcc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"74f5cfd19bc804dfe4ba3b565722deeb5bd4015f","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    def create_or_update(self, payload):"},{"line_number":84,"context_line":"        id \u003d payload[\u0027id\u0027]"},{"line_number":85,"context_line":"        payload \u003d designate.serialize_zone(payload)"},{"line_number":86,"context_line":"        doc \u003d {\"doc\": payload, \"doc_as_upsert\": True}"},{"line_number":87,"context_line":"        self.engine.index("},{"line_number":88,"context_line":"            index\u003dself.index_name,"},{"line_number":89,"context_line":"            doc_type\u003dself.document_type,"}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_5373dc15","line":86,"updated":"2015-09-01 15:36:17.000000000","message":"remove this line^","commit_id":"4b06c57c9375a53a315b3015238bb7bc36f4cdcc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"74f5cfd19bc804dfe4ba3b565722deeb5bd4015f","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        self.engine.index("},{"line_number":88,"context_line":"            index\u003dself.index_name,"},{"line_number":89,"context_line":"            doc_type\u003dself.document_type,"},{"line_number":90,"context_line":"            body\u003ddoc,"},{"line_number":91,"context_line":"            id\u003did"},{"line_number":92,"context_line":"        )"},{"line_number":93,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"da20952f_d35dac7a","line":90,"updated":"2015-09-01 15:36:17.000000000","message":"set this to payload","commit_id":"4b06c57c9375a53a315b3015238bb7bc36f4cdcc"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"21731cecfe0076c4e7a0695ce20016d624d3fc8c","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                \"dns.domain.create\": self.create_or_update,"},{"line_number":46,"context_line":"                \"dns.domain.update\": self.create_or_update,"},{"line_number":47,"context_line":"                \"dns.domain.delete\": self.delete,"},{"line_number":48,"context_line":"                \"dns.domain.exists\": self.create_or_update"},{"line_number":49,"context_line":"            }"},{"line_number":50,"context_line":"            actions[event_type](payload)"},{"line_number":51,"context_line":"            return oslo_messaging.NotificationResult.HANDLED"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_aaec172a","line":48,"updated":"2015-09-09 01:30:00.000000000","message":"Bit of a nit i guess but is it necessary to do anything for \u0027exists\u0027 notifications?","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b860eeed63d51a54c99b2734437c7a9d92c4569a","unresolved":false,"context_lines":[{"line_number":35,"context_line":"        if \u0027masters\u0027 in payload:"},{"line_number":36,"context_line":"            payload[\u0027masters\u0027] \u003d [\"%(host)s:%(port)s\" for i in"},{"line_number":37,"context_line":"                                  payload[\"masters\"]]"},{"line_number":38,"context_line":"        payload[\u0027project_id\u0027] \u003d payload.pop(\u0027tenant_id\u0027)"},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"        return payload"},{"line_number":41,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"da20952f_438adc65","line":38,"updated":"2015-09-09 22:13:12.000000000","message":"payload seems to be a list when this is run - I get an error and i\u0027m guessing the line above can never execute.\n\n  File \"/opt/stack/searchlight/searchlight/elasticsearch/plugins/designate/notification_handlers.py\", line 39, in _serialize\n    payload[\u0027project_id\u0027] \u003d payload.pop(\u0027tenant_id\u0027)\nTypeError: an integer is required\n\n\nExample payload:\n\n[[u\u0027status\u0027, u\u0027PENDING\u0027], [u\u0027description\u0027, None], [u\u0027deleted\u0027, u\u00270\u0027], [u\u0027updated_at\u0027, None], [u\u0027shard\u0027, 3822], [u\u0027minimum\u0027, 3600], [u\u0027parent_domain_id\u0027, None], [u\u0027ttl\u0027, 3600], [u\u0027serial\u0027, 1441836687], [u\u0027deleted_at\u0027, None], [u\u0027id\u0027, u\u0027eeea72fb-086b-41ee-97d9-849e7a6a3a2c\u0027], [u\u0027retry\u0027, 600], [u\u0027name\u0027, u\u0027demo3.com.\u0027], [u\u0027tenant_id\u0027, u\u00275080438d9fa7427e9f74e8d0367cff6c\u0027], [u\u0027created_at\u0027, u\u00272015-09-09T22:11:27.000000\u0027], [u\u0027pool_id\u0027, u\u0027794ccc2c-d751-44fe-b57f-8894c9f5c842\u0027], [u\u0027refresh\u0027, 3600], [u\u0027transferred_at\u0027, None], [u\u0027version\u0027, 1], [u\u0027expire\u0027, 86400], [u\u0027action\u0027, u\u0027CREATE\u0027], [u\u0027attributes\u0027, []], [u\u0027type\u0027, u\u0027PRIMARY\u0027], [u\u0027email\u0027, u\u0027steve.mclellan@hpe.com\u0027]]","commit_id":"569df8a1f1a1f2465d22a09bfa677e6e914964d9"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b860eeed63d51a54c99b2734437c7a9d92c4569a","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def process(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":96,"context_line":"        try:"},{"line_number":97,"context_line":"            actions \u003d {"},{"line_number":98,"context_line":"                \"dns.recordset.create\": self.create_or_update_recordset,"},{"line_number":99,"context_line":"                \"dns.recordset.update\": self.create_or_update_recordset,"},{"line_number":100,"context_line":"                \"dns.recordset.delete\": self.delete"},{"line_number":101,"context_line":"            }"}],"source_content_type":"text/x-python","patch_set":20,"id":"da20952f_6367e0ea","line":98,"updated":"2015-09-09 22:13:12.000000000","message":"This function doesn\u0027t exist; it\u0027s create_or_update. Same for the update notification","commit_id":"569df8a1f1a1f2465d22a09bfa677e6e914964d9"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c5305c3d24054861413b09325ed8677c9d940695","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                \"dns.domain.create\": self.create_or_update,"},{"line_number":46,"context_line":"                \"dns.domain.update\": self.create_or_update,"},{"line_number":47,"context_line":"                \"dns.domain.delete\": self.delete,"},{"line_number":48,"context_line":"                \"dns.domain.exists\": self.create_or_update"},{"line_number":49,"context_line":"            }"},{"line_number":50,"context_line":"            actions[event_type](payload)"},{"line_number":51,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"da20952f_6fbf95d0","line":48,"updated":"2015-09-10 22:58:51.000000000","message":"Are we missing a notification for status changes?  Or does it not exist?\n\nWhen I create a domain (using horizon), recordsets are being created, but they are created with the status:\n\n \"status\": \"PENDING\",\n\nAfter waiting a bit, no notification occurs.  So, I kick of manual index sync and the recordsets are \n\n \"status\": \"ACTIVE\",","commit_id":"54a68e7686d0d1bae4a12f5901cd1ba718bb52e1"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"52c990bbad29eb7070e9728858fbf95e50b80a7e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            id\u003dpayload[\"id\"]"},{"line_number":82,"context_line":"        )"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete(self, payload):"},{"line_number":85,"context_line":"        id_ \u003d payload[\u0027id\u0027]"},{"line_number":86,"context_line":"        self.engine.delete("},{"line_number":87,"context_line":"            index\u003dself.index_name,"}],"source_content_type":"text/x-python","patch_set":21,"id":"da20952f_7e4f4e6a","line":84,"updated":"2015-09-10 20:21:57.000000000","message":"Since query by delete appears to be deprecated and the recommend using the scan and delete methodology, I got the following to work on my env.  Please note, the import of helpers should be moved to top of file.  Just here for convenience.\n\n    def delete(self, payload):\n        id_ \u003d payload[\u0027id\u0027]\n\n        # Delete all recordsets in the Zone\n        from elasticsearch import helpers\n\n        query \u003d {\n            \u0027fields\u0027: \u0027_id\u0027,\n            \u0027query\u0027: {\n                \u0027term\u0027: {\n                    \u0027zone_id\u0027: id_\n                }\n            }\n        }\n\n        from recordsets import RecordSetIndex\n        documents \u003d helpers.scan(\n            client\u003dself.engine,\n            index\u003dself.index_name,\n            doc_type\u003d\"OS::Designate::RecordSet\",\n            query\u003dquery)\n\n        actions \u003d []\n        for document in documents:\n            action \u003d {\n                \u0027_id\u0027: document[\u0027_id\u0027],\n                \u0027_op_type\u0027: \u0027delete\u0027,\n                \u0027_index\u0027: self.index_name,\n                \u0027_type\u0027: \u0027OS::Designate::RecordSet\u0027\n            }\n            actions.append(action)\n\n        if actions:\n            helpers.bulk(\n                client\u003dself.engine,\n                actions\u003dactions)\n\n        # Delete the zone\n        self.engine.delete(\n            index\u003dself.index_name,\n            doc_type\u003dself.document_type,\n            id\u003did_\n        )","commit_id":"54a68e7686d0d1bae4a12f5901cd1ba718bb52e1"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"aeb557a34d28b225c65fd3018557b75128c085c8","unresolved":false,"context_lines":[{"line_number":81,"context_line":"            id\u003dpayload[\"id\"]"},{"line_number":82,"context_line":"        )"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    def delete(self, payload):"},{"line_number":85,"context_line":"        id_ \u003d payload[\u0027id\u0027]"},{"line_number":86,"context_line":"        self.engine.delete("},{"line_number":87,"context_line":"            index\u003dself.index_name,"}],"source_content_type":"text/x-python","patch_set":21,"id":"da20952f_7e9d0eba","line":84,"in_reply_to":"da20952f_7e4f4e6a","updated":"2015-09-10 20:23:43.000000000","message":"Also, remove the from recordsets import RecordSetIndex  statement.","commit_id":"54a68e7686d0d1bae4a12f5901cd1ba718bb52e1"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"2ef31e845b9ceda0acff6e4cd34db9a2d3a55228","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            actions \u003d {"},{"line_number":143,"context_line":"                \"dns.recordset.create\": self.create_or_update,"},{"line_number":144,"context_line":"                \"dns.recordset.update\": self.create_or_update,"},{"line_number":145,"context_line":"                \"dns.recordset.delete\": self.delete"},{"line_number":146,"context_line":"            }"},{"line_number":147,"context_line":"            actions[event_type](payload)"},{"line_number":148,"context_line":"            return oslo_messaging.NotificationResult.HANDLED"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_70b49ff1","line":145,"updated":"2015-09-14 23:19:38.000000000","message":"I only got notification for create on recordset, but not update or delete (using Horizon which uses API of course).  This seems like either a configuration problem on my end or a bug in designate.  Do I need to change something in my configuration for designate to get the update and delete notifications?","commit_id":"96fcb7995c4308f065c837491e19d618ed020795"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"2ef31e845b9ceda0acff6e4cd34db9a2d3a55228","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        obj[\u0027project_id\u0027] \u003d obj.pop(\u0027tenant_id\u0027)"},{"line_number":166,"context_line":"        obj[\u0027zone_id\u0027] \u003d obj.pop(\u0027domain_id\u0027)"},{"line_number":167,"context_line":"        obj[\u0027records\u0027] \u003d [{\"data\": i[\"data\"]} for i in obj[\"records\"]]"},{"line_number":168,"context_line":"        return obj"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def delete(self, payload):"},{"line_number":171,"context_line":"        id_ \u003d payload[\u0027id\u0027]"}],"source_content_type":"text/x-python","patch_set":23,"id":"ba15a1d1_50f71bd3","line":168,"updated":"2015-09-14 23:19:38.000000000","message":"The data doesn\u0027t seem to be in indexed data upon notification.  If I do searchlight-manage index sync --type OS::Designate::RecordSet it is there.\n\nThere\u0027s no list of data in the object records when I debug into this.\n\nhttp://pasteboard.co/E08Ho3d.png\n\nHere\u0027s whats in the obj:\n\nhttp://paste.openstack.org/show/461972/\n\nLooking at the notification payload doesn\u0027t show any either.  So, I\u0027m thinking this is a bug that needs to be addressed in designate... OR you\u0027re going to have to not rely on the payload and make a callback to the API to get it.  Let me know how you want to handle it. Or, perhaps my week old devstack needs a designate update?","commit_id":"96fcb7995c4308f065c837491e19d618ed020795"}],"searchlight/elasticsearch/plugins/designate/records.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":13,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":"from searchlight.api import policy"},{"line_number":17,"context_line":"from searchlight.common import property_utils"},{"line_number":18,"context_line":"from searchlight.elasticsearch.plugins import designate"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_54e8457c","line":15,"updated":"2015-07-07 15:52:21.000000000","message":"blank line","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":44,"context_line":"                \u0027id\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":45,"context_line":"                \u0027name\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":46,"context_line":"                \u0027description\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":47,"context_line":"                \u0027project_id\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":48,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":49,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":50,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027},"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_0d78682a","line":47,"updated":"2015-07-07 20:30:09.000000000","message":"You will want this not_analyzed too","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":47,"context_line":"                \u0027project_id\u0027: {\u0027type\u0027: \u0027string\u0027},"},{"line_number":48,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":49,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":50,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027},"},{"line_number":51,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027}"},{"line_number":52,"context_line":"            },"},{"line_number":53,"context_line":"        }"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_cd712046","line":50,"updated":"2015-07-07 20:30:09.000000000","message":"Also probably not_analyzed","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":49,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":50,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027},"},{"line_number":51,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027}"},{"line_number":52,"context_line":"            },"},{"line_number":53,"context_line":"        }"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_8d92384a","line":51,"updated":"2015-07-07 20:30:09.000000000","message":"Also probably not_analyzed","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            }"},{"line_number":80,"context_line":"        ]"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def filter_result(self, result, request_context):"},{"line_number":83,"context_line":"        if property_utils.is_property_protection_enabled():"},{"line_number":84,"context_line":"            hits \u003d result[\u0027hits\u0027][\u0027hits\u0027]"},{"line_number":85,"context_line":"            for hit in hits:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_6db6d4dd","line":82,"updated":"2015-07-07 20:30:09.000000000","message":"If you don\u0027t need to do this (i.e. there\u0027s no sensitive information) then i suggest not doing it. In addition, this looks like it was copied verbatim from glance :)","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b11c4f3a9216687cd60c464c71afc8988db41454","unresolved":false,"context_lines":[{"line_number":43,"context_line":"            {"},{"line_number":44,"context_line":"                \"and\": ["},{"line_number":45,"context_line":"                    {"},{"line_number":46,"context_line":"                        \u0027or\u0027: ["},{"line_number":47,"context_line":"                            {"},{"line_number":48,"context_line":"                                \u0027term\u0027: {"},{"line_number":49,"context_line":"                                    \u0027project_id\u0027: request_context.owner"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_6c3f84b4","line":46,"updated":"2015-07-08 16:50:17.000000000","message":"Minor nit - you don\u0027t need the \u0027or\u0027 here since you only have one term","commit_id":"6c87f691c7c69c3acccca9d2fa401448eedc7598"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"0688bec6658966517581e99110350a6549d6a728","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":35,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":36,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":37,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027}"},{"line_number":38,"context_line":"            },"},{"line_number":39,"context_line":"        }"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_0094a640","line":37,"updated":"2015-07-27 20:12:29.000000000","message":"We should also define the records field here.\n\nThey need to be an array of strings.\n\nSteve / Travis: I am not sure if elasticsearch can do multiple types? Ie one of string, ip, hostname, object etc?\n\nWe may want to expose the structured data in here one day, and this could cause us issues if we let it choose by itself.","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c9b7d40270eecc98839513f1aaa2f5592719a4b7","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":35,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":36,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":37,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027}"},{"line_number":38,"context_line":"            },"},{"line_number":39,"context_line":"        }"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_6228b586","line":37,"in_reply_to":"3a50d1a3_0094a640","updated":"2015-07-29 12:09:54.000000000","message":"Hi Graham,\n\nDo you have an example of all the response data? Unfortunately, my current devstack didn\u0027t seem to actually install designate (need to figure out why) and I need to learn more about designate.  The docs have the following: http://designate.readthedocs.org/en/latest/rest/v1/records.html\n\nI\u0027m not seeing a \"records\" field there. Do you mean the data field?","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"01aedd0d024fa00649ffffd080bff7abc9a1020f","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":35,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":36,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":37,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027}"},{"line_number":38,"context_line":"            },"},{"line_number":39,"context_line":"        }"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_9c4761a2","line":37,"in_reply_to":"3a50d1a3_6228b586","updated":"2015-07-29 13:48:32.000000000","message":"HI Travis.,\n\nThis is one of the reasons I we asking to rename this file...\n\nWe moved data model in our V2 API, and this is now searching recordsets, from our V2 API.\n\nhttp://docs.openstack.org/developer/designate/rest/v2/recordsets.html#list-record-sets \n\nis now the structure of the data that will be returned.","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"f1154ab46c0ad8e96805ecf9da8965d2ba779e77","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":35,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":36,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":37,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027}"},{"line_number":38,"context_line":"            },"},{"line_number":39,"context_line":"        }"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_be2e78f8","line":37,"in_reply_to":"3a50d1a3_9c4761a2","updated":"2015-07-31 04:59:10.000000000","message":"Graham,\n\nThanks for more info.  I\u0027m sorry I didn\u0027t get to dig into this a bit further.  Will try hard to look on Monday (long weekend).\n\nTravis","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":8959,"name":"Lakshmi N Sampath","email":"lakshmi.sampath@hp.com","username":"lakshmi"},"change_message_id":"06d6c10b44b175d0e22762976d877e0b893c6c5b","unresolved":false,"context_lines":[{"line_number":89,"context_line":"    def get_notification_topics_exchanges(self):"},{"line_number":90,"context_line":"        # TODO(sjmc7): More importantly, this should come from config"},{"line_number":91,"context_line":"        return ("},{"line_number":92,"context_line":"            (\u0027notifications\u0027, \u0027designate\u0027)"},{"line_number":93,"context_line":"        )"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    def get_notification_supported_events(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_1f7f8a67","line":92,"updated":"2015-07-30 13:01:36.000000000","message":"Use \u0027searchlight_indexer\u0027 instead of \u0027notifications\u0027 to avoid collisions in future with other listeners.","commit_id":"f1c6f6f46409939793c84a81db864d7bc8af59f8"},{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"4c5f80f39521d3abe5b641e33a19ec0bd9868d1e","unresolved":false,"context_lines":[{"line_number":34,"context_line":"                \"created_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":35,"context_line":"                \"updated_at\": {\u0027type\u0027: \u0027date\u0027},"},{"line_number":36,"context_line":"                \"status\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},"},{"line_number":37,"context_line":"                \"action\": {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027}"},{"line_number":38,"context_line":"            },"},{"line_number":39,"context_line":"        }"},{"line_number":40,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"1a4dcd0f_c79dfbbc","line":37,"updated":"2015-08-07 17:00:09.000000000","message":"We should also define the records field here.\nThey need to be an array of strings.\n\nSteve / Travis: I am not sure if elasticsearch can do multiple types? Ie one of string, ip, hostname, object etc?\n\nWe may want to expose the structured data in here one day, and this could cause us issues if we let it choose by itself.","commit_id":"cb42c6f9be4a175d68f5c61ffd55bedf9b32700e"}],"searchlight/elasticsearch/plugins/designate/recordsets.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"62b9736636f1b3ba81268755606d8f57bc9c9247","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            },"},{"line_number":45,"context_line":"        }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_rbac_filter(self, request_context):"},{"line_number":48,"context_line":"        return ["},{"line_number":49,"context_line":"            {"},{"line_number":50,"context_line":"                \"and\": ["}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_98e3cc05","line":47,"updated":"2015-09-01 16:36:39.000000000","message":"See https://github.com/openstack/searchlight/blob/master/searchlight/elasticsearch/plugins/glance/images.py#L68 - \"index\" isn\u0027t a valid field for filtering. Instead we\u0027re using an \u0027indices\u0027 filter that\u0027s a bit more complicated looking but does the same as the intent of what you\u0027re doing:\n\n        return [\n            {\n                \u0027indices\u0027: {\n                    \u0027index\u0027: self.get_index_name(),\n                    \u0027no_match_filter\u0027: \u0027none\u0027,\n                    \u0027filter\u0027: {\n                        \u0027and\u0027: [\n                            {\n                                \u0027term\u0027: {\n                                    \u0027members\u0027: request_context.tenant\n                                 }\n                            },\n                            {\n                                \u0027type\u0027: {\n                                    \u0027value\u0027: self.get_document_type()\n                                }\n                            },\n                        ]\n                    }\n                }\n            }\n        ]","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"6301c9ed986ea1196268ab3aba4d1853aa2dca47","unresolved":false,"context_lines":[{"line_number":44,"context_line":"            },"},{"line_number":45,"context_line":"        }"},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"    def get_rbac_filter(self, request_context):"},{"line_number":48,"context_line":"        return ["},{"line_number":49,"context_line":"            {"},{"line_number":50,"context_line":"                \"and\": ["}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_b72556af","line":47,"in_reply_to":"da20952f_98e3cc05","updated":"2015-09-02 10:51:16.000000000","message":"Done","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"62b9736636f1b3ba81268755606d8f57bc9c9247","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    # TODO(sjmc7): These functions really belong to the notification handler,"},{"line_number":94,"context_line":"    # not this class"},{"line_number":95,"context_line":"    def get_notification_topics_exchanges(self):"},{"line_number":96,"context_line":"        # TODO(sjmc7): More importantly, this should come from config"},{"line_number":97,"context_line":"        return ("},{"line_number":98,"context_line":"            (\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_9878ac2d","line":95,"updated":"2015-09-01 16:36:39.000000000","message":"def get_notification_topics_exchanges(self):\n        return set([(\u0027searchlight_indexer\u0027, \u0027designate\u0027)])","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"6301c9ed986ea1196268ab3aba4d1853aa2dca47","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    # TODO(sjmc7): These functions really belong to the notification handler,"},{"line_number":94,"context_line":"    # not this class"},{"line_number":95,"context_line":"    def get_notification_topics_exchanges(self):"},{"line_number":96,"context_line":"        # TODO(sjmc7): More importantly, this should come from config"},{"line_number":97,"context_line":"        return ("},{"line_number":98,"context_line":"            (\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_57371ae3","line":95,"in_reply_to":"da20952f_9878ac2d","updated":"2015-09-02 10:51:16.000000000","message":"Done","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9321905cb87852849f8edef2884d55d7f77975a0","unresolved":false,"context_lines":[{"line_number":24,"context_line":"        return \"OS::Designate::RecordSet\""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def get_mapping(self):"},{"line_number":27,"context_line":"        return {"},{"line_number":28,"context_line":"            \"dynamic\": True,"},{"line_number":29,"context_line":"            \"properties\": {"},{"line_number":30,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_1d7e4519","line":27,"range":{"start_line":27,"start_character":15,"end_line":27,"end_character":16},"updated":"2015-09-04 05:19:03.000000000","message":"The below all appear in the results but don\u0027t have a mapping.  See my notes on _id fields in the zone file.\n\n\n \u0027zone_id\u0027: {\u0027type\u0027: \u0027string\u0027, \u0027index\u0027: \u0027not_analyzed\u0027},\n \u0027version\u0027: {\u0027type\u0027: \u0027integer\u0027},\n \u0027ttl\u0027: {\u0027type\u0027: \u0027integer\u0027},","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9321905cb87852849f8edef2884d55d7f77975a0","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            \"dynamic\": True,"},{"line_number":29,"context_line":"            \"properties\": {"},{"line_number":30,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":31,"context_line":"                \"name\": {\"type\": \"string\"},"},{"line_number":32,"context_line":"                \"description\": {\"type\": \"string\"},"},{"line_number":33,"context_line":"                \"project_id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":34,"context_line":"                \"created_at\": {\"type\": \"date\"},"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_60a8f68c","line":31,"updated":"2015-09-04 05:19:03.000000000","message":"The way we are indexing the name fields is a problem.  And I just noticed that we are inconsistent between glance and nova.  So, I\u0027m not going to block on this in your patch, but we have to come up with a fix for all of them in a future patch.\n\nMore info:\n\nhttps://bugs.launchpad.net/searchlight/+bug/1488236","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9321905cb87852849f8edef2884d55d7f77975a0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":31,"context_line":"                \"name\": {\"type\": \"string\"},"},{"line_number":32,"context_line":"                \"description\": {\"type\": \"string\"},"},{"line_number":33,"context_line":"                \"project_id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":34,"context_line":"                \"created_at\": {\"type\": \"date\"},"},{"line_number":35,"context_line":"                \"updated_at\": {\"type\": \"date\"},"},{"line_number":36,"context_line":"                \"status\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_e05f260d","line":33,"updated":"2015-09-04 05:19:03.000000000","message":"The data in my results does not have a project_id field.","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"caf6600bead14ab5f146f6fe149ad71d595a802b","unresolved":false,"context_lines":[{"line_number":36,"context_line":"                \"status\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":37,"context_line":"                \"action\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":38,"context_line":"                \"records\": {"},{"line_number":39,"context_line":"                    \"type\": \"nested\","},{"line_number":40,"context_line":"                    \"properties\": {"},{"line_number":41,"context_line":"                        \"data\": {\"type\": \"string\"}"},{"line_number":42,"context_line":"                    }"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_e855d64f","line":39,"range":{"start_line":39,"start_character":35,"end_line":39,"end_character":37},"updated":"2015-09-03 22:37:14.000000000","message":"This caused an error for me (Bottom of comment).  Based on your API:\n\nhttp://docs.openstack.org/developer/designate/rest/v2/recordsets.html#list-record-sets\n\nThis appears to be a simple array of Strings.  So, I\u0027m not sure why this was listed as a nested type. Maybe because of these comments?\n\nhttps://review.openstack.org/#/c/199099/9/searchlight/elasticsearch/plugins/designate/records.py,cm\n\nIt seems that in the future there may be more than just strings in this array?  Or will they always be strings that might be analyzed differently, if the latter, I\u0027m not sure how to do that.\n\nSo, depending on that answer, it it is just an array of Strings, then in ES, arrays are just mapped normally and it detects that it is an array.\n\nThe correct mapping would be this:\n\n\"records\": {\"type\": \"string\"},\n\nAlso, we could add , \"index\": \"not_analyzed\" to that.\n\nWhether or not you want to analyze it depends on the kind of queries we want to be able to do.\n\nAs FYI, below is the error I received when indexing a specific document (further below).  If you aren\u0027t receiving this in your environment, you probably need to ensure that your index and mapping is deleted. Check you current mapping with the following direct query to Elasticsearch:\n\n GET searchlight/OS::Designate::RecordSet/_mapping\n\nTo delete, just do this:\n\n GET searchlight/OS::Designate::RecordSet/_mapping\n\nOr better yet, just clear everything with the following query:\n\n DELETE _all\n\n2015-09-03 12:49:04.304 ERROR searchlight.cmd.manage [-] Failed to setup index extension recordset: (\u00272 document(s) failed to index.\u0027, [{u\u0027index\u0027: {u\u0027status\u0027: 400, u\u0027_type\u0027: u\u0027OS::Designate::RecordSet\u0027, u\u0027_id\u0027: u\u0027b32c775d-9501-477e-8fff-1806130fe8c2\u0027, u\u0027_index\u0027: u\u0027searchlight\u0027, u\u0027error\u0027: u\u0027MapperParsingException[object mapping [records] trying to serialize a value with no field associated with it, current value [ns1.devstack.org.]]\u0027}}, {u\u0027index\u0027: {u\u0027status\u0027: 400, u\u0027_type\u0027: u\u0027OS::Designate::RecordSet\u0027, u\u0027_id\u0027: u\u0027f4e5c748-3b33-42c6-83c0-745c252246ca\u0027, u\u0027_index\u0027: u\u0027searchlight\u0027, u\u0027error\u0027: u\u0027MapperParsingException[object mapping [records] trying to serialize a value with no field associated with it, current value [ns1.devstack.org. travis.tripp.hp.com. 1441305715 3600 600 86400 3600]]\u0027}}])\n\nThe data it was trying to index is:\n\n {\n    \"status\": \"ACTIVE\",\n    \"description\": null,\n    \"links\": {\n        \"self\": \"http://127.0.0.1:9001/v2/zones/0aee815f-f351-47f9-8d2a-e43423e9d1d4/recordsets/b32c775d-9501-477e-8fff-1806130fe8c2\"\n    },\n    \"created_at\": \"2015-09-03T18:41:55.000000\",\n    \"updated_at\": null,\n    \"name\": \"test.com.\",\n    \"records\": [\n        \"ns1.devstack.org.\"\n    ],\n    \"version\": 1,\n    \"ttl\": null,\n    \"action\": \"NONE\",\n    \"type\": \"NS\",\n    \"id\": \"b32c775d-9501-477e-8fff-1806130fe8c2\",\n    \"zone_id\": \"0aee815f-f351-47f9-8d2a-e43423e9d1d4\"\n }","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"96b84c9cea8a337a1e45530ad202b92cfda5f00e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                        }"},{"line_number":38,"context_line":"                    }"},{"line_number":39,"context_line":"                }"},{"line_number":40,"context_line":"            ],"},{"line_number":41,"context_line":"            \"properties\": {"},{"line_number":42,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":43,"context_line":"                \"created_at\": {\"type\": \"date\"},"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_6438783e","line":40,"updated":"2015-09-09 00:22:56.000000000","message":"Based on our discussion in IRC answering my questions on cardinality between zones and recordsets, I\u0027m thinking you should put in a parent child relationship mapping between the two.\n\nhttps://www.elastic.co/guide/en/elasticsearch/guide/current/parent-child.html\n\nSo, here, you would add a mapping to OS::Designate::Zone\n\nhttps://www.elastic.co/guide/en/elasticsearch/guide/current/parent-child-mapping.html\n\nFor notification handling, since you are already adding in the zone_id, then in create_or_update Line 55 of notification_handlers.py, take the zone_id and pass it in as a kwarg to self.engine.index.  Something like:\n\n  parent\u003dpayload[\u0027zone_id\u0027],\n\nFor initial indexing, I am thinking that we could add _parent field to the objects returned from get_objects().\n\nsearchlight/elasticsearch/plugins/base.py\n\nUses the bulk API, which means we should be able to just add that field and it will work correctly.\n\nhttps://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html#bulk-parent","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"96b84c9cea8a337a1e45530ad202b92cfda5f00e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                {\"all_tenants\": str(True)}, limit\u003d50)"},{"line_number":95,"context_line":"            # Yield back all recordsets"},{"line_number":96,"context_line":"            for rs in recordsets:"},{"line_number":97,"context_line":"                # NOTE: This is a hack to make project_id from tenant_id"},{"line_number":98,"context_line":"                rs.pop(\"links\")"},{"line_number":99,"context_line":"                rs[\"records\"] \u003d [{\"data\": i} for i in rs[\"records\"]]"},{"line_number":100,"context_line":"                yield rs"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_e9722111","line":97,"updated":"2015-09-09 00:22:56.000000000","message":"project_id is still not being set on the indexed documents.  I am seeing neither tenant_id or project_id on documents indexed by calling:\n\n searchlight-manage index sync\n\nI am seeing tenant_id on documents indexed by the listener.\n\nIt is fine to have the rbac filter filter on tenant_id.  You could still add project_id.  But, if you change line 72 above in get_rbac_filter to:\n\n\"tenant_id\": request_context.owner\n\nThen filtering should work more appropriately.","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b860eeed63d51a54c99b2734437c7a9d92c4569a","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                        \"and\": ["},{"line_number":74,"context_line":"                            {"},{"line_number":75,"context_line":"                                \"term\": {"},{"line_number":76,"context_line":"                                    \"project_id\": request_context.owner"},{"line_number":77,"context_line":"                                }"},{"line_number":78,"context_line":"                            },"},{"line_number":79,"context_line":"                            {"}],"source_content_type":"text/x-python","patch_set":20,"id":"da20952f_03286484","line":76,"updated":"2015-09-09 22:13:12.000000000","message":"I don\u0027t see a project_id getting indexed when I\u0027m running this, and thus no results are returned when i\u0027m searching","commit_id":"569df8a1f1a1f2465d22a09bfa677e6e914964d9"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"c5305c3d24054861413b09325ed8677c9d940695","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        for zone in zones:"},{"line_number":98,"context_line":"            recordsets \u003d designate._get_recordsets(zone[\u0027id\u0027])"},{"line_number":99,"context_line":"            for rs in recordsets:"},{"line_number":100,"context_line":"                yield rs"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    def get_parent_id_field(self):"}],"source_content_type":"text/x-python","patch_set":21,"id":"da20952f_1278827d","line":99,"updated":"2015-09-10 22:58:51.000000000","message":"Add this here to make rbac work correctly (otherwise recordsets are not getting project_id when indexing, only during notifications).\n\nrs[\u0027project_id\u0027] \u003d zone[\u0027project_id\u0027]","commit_id":"54a68e7686d0d1bae4a12f5901cd1ba718bb52e1"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"233064480ab5825d8de0f648f4c5604ecd10f7d3","unresolved":false,"context_lines":[{"line_number":40,"context_line":"                }"},{"line_number":41,"context_line":"            ],"},{"line_number":42,"context_line":"            \"properties\": {"},{"line_number":43,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":44,"context_line":"                \"created_at\": {\"type\": \"date\"},"},{"line_number":45,"context_line":"                \"updated_at\": {\"type\": \"date\"},"},{"line_number":46,"context_line":"                \"name\": {\"type\": \"string\"},"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_ef7e97e3","line":43,"updated":"2015-09-14 20:07:31.000000000","message":"If we know project_id is going to be there, my leaning would be towards adding it explicitly to the mapping. The dynamic mapping will cover it, but it\u0027s less confusing if it\u0027s explicit","commit_id":"4f2760c914aa4e74a0d0975888d0193376e67f81"}],"searchlight/elasticsearch/plugins/designate/zones.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT"},{"line_number":13,"context_line":"# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":"from searchlight.api import policy"},{"line_number":17,"context_line":"from searchlight.common import property_utils"},{"line_number":18,"context_line":"from searchlight.elasticsearch.plugins import designate"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_0f306ae7","line":15,"updated":"2015-07-07 15:52:21.000000000","message":"ditto","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b11c4f3a9216687cd60c464c71afc8988db41454","unresolved":false,"context_lines":[{"line_number":41,"context_line":"            {"},{"line_number":42,"context_line":"                \"and\": ["},{"line_number":43,"context_line":"                    {"},{"line_number":44,"context_line":"                        \u0027or\u0027: ["},{"line_number":45,"context_line":"                            {"},{"line_number":46,"context_line":"                                \u0027term\u0027: {"},{"line_number":47,"context_line":"                                    \u0027project_id\u0027: request_context.owner"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_4c42c03f","line":44,"updated":"2015-07-08 16:50:17.000000000","message":"Minor nit - you don\u0027t need the \u0027or\u0027 here since you only have one term","commit_id":"6c87f691c7c69c3acccca9d2fa401448eedc7598"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"9b0f1f9137da73ee9084784ff7e867db450b1d75","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from searchlight.elasticsearch.plugins.designate import notification_handlers"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class ZoneIndex(designate.DesignateBase):"},{"line_number":20,"context_line":"    def get_index_name(self):"},{"line_number":21,"context_line":"        return \u0027designate\u0027"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_4da64eaf","line":19,"updated":"2015-07-14 21:48:36.000000000","message":"Make sure you want to call this Zone and not Domain, but either way\u0027s fine","commit_id":"47f3781a4709a001104345abe1372013bfc00baf"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"7b17816a8fd226b724bb3623a50410197ce39191","unresolved":false,"context_lines":[{"line_number":16,"context_line":"from searchlight.elasticsearch.plugins.designate import notification_handlers"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"class ZoneIndex(designate.DesignateBase):"},{"line_number":20,"context_line":"    def get_index_name(self):"},{"line_number":21,"context_line":"        return \u0027designate\u0027"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"9a41bdd9_20d41abb","line":19,"in_reply_to":"9a41bdd9_4da64eaf","updated":"2015-07-15 09:19:13.000000000","message":"Yes, \"Zone\" is what we call it in our V2 API, Keystone robbed the term \"domain\" and caused all sorts of confusion ;)","commit_id":"47f3781a4709a001104345abe1372013bfc00baf"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"62b9736636f1b3ba81268755606d8f57bc9c9247","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            },"},{"line_number":37,"context_line":"        }"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_rbac_filter(self, request_context):"},{"line_number":40,"context_line":"        return ["},{"line_number":41,"context_line":"            {"},{"line_number":42,"context_line":"                \"and\": ["}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_389e4064","line":39,"updated":"2015-09-01 16:36:39.000000000","message":"Same as comment regarding RBAC in recordsets.py","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"6301c9ed986ea1196268ab3aba4d1853aa2dca47","unresolved":false,"context_lines":[{"line_number":36,"context_line":"            },"},{"line_number":37,"context_line":"        }"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_rbac_filter(self, request_context):"},{"line_number":40,"context_line":"        return ["},{"line_number":41,"context_line":"            {"},{"line_number":42,"context_line":"                \"and\": ["}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_d751ea0f","line":39,"in_reply_to":"da20952f_389e4064","updated":"2015-09-02 10:51:16.000000000","message":"Done","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"62b9736636f1b3ba81268755606d8f57bc9c9247","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    # TODO(sjmc7): These functions really belong to the notification handler,"},{"line_number":79,"context_line":"    # not this class"},{"line_number":80,"context_line":"    def get_notification_topics_exchanges(self):"},{"line_number":81,"context_line":"        # TODO(sjmc7): More importantly, this should come from config"},{"line_number":82,"context_line":"        return ("},{"line_number":83,"context_line":"            (\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_787b582a","line":80,"updated":"2015-09-01 16:36:39.000000000","message":"See glance\u0027s - this should be:\n\ndef get_notification_topics_exchanges(self):\n        return set([(\u0027searchlight_indexer\u0027, \u0027designate\u0027)])","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":395,"name":"Endre Karlson","email":"endre.karlson@gmail.com","username":"endre-karlson"},"change_message_id":"6301c9ed986ea1196268ab3aba4d1853aa2dca47","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"    # TODO(sjmc7): These functions really belong to the notification handler,"},{"line_number":79,"context_line":"    # not this class"},{"line_number":80,"context_line":"    def get_notification_topics_exchanges(self):"},{"line_number":81,"context_line":"        # TODO(sjmc7): More importantly, this should come from config"},{"line_number":82,"context_line":"        return ("},{"line_number":83,"context_line":"            (\u0027designate\u0027)"}],"source_content_type":"text/x-python","patch_set":14,"id":"da20952f_b74c7677","line":80,"in_reply_to":"da20952f_787b582a","updated":"2015-09-02 10:51:16.000000000","message":"Done","commit_id":"7e11e8fc32b99ac3386c4956033470255bf3d98f"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9321905cb87852849f8edef2884d55d7f77975a0","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"    def get_mapping(self):"},{"line_number":27,"context_line":"        return {"},{"line_number":28,"context_line":"            \"dynamic\": True,"},{"line_number":29,"context_line":"            \"properties\": {"},{"line_number":30,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":31,"context_line":"                \"name\": {\"type\": \"string\"},"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_3d88e9c4","line":28,"updated":"2015-09-04 05:19:03.000000000","message":"You have project_id, but missed zone_id. You can create a catch-all for mapping fields that end with _id and remove the specific field by adding a dynamic template.\n\n        return {\n            \"dynamic\": True,\n            \"dynamic_templates\": [\n                {\n                    \"_id\": {\n                        \"match\": \"*_id\",\n                        \"match_mapping_type\": \"string\",\n                        \"mapping\": {\n                            \"type\": \"string\",\n                            \"index\": \"not_analyzed\",\n                        }\n                    }}\n            ],\n            \"properties\": {\n                \u003cproperties here\u003e.\n            },\n        }","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9321905cb87852849f8edef2884d55d7f77975a0","unresolved":false,"context_lines":[{"line_number":32,"context_line":"                \"description\": {\"type\": \"string\"},"},{"line_number":33,"context_line":"                \"project_id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":34,"context_line":"                \"created_at\": {\"type\": \"date\"},"},{"line_number":35,"context_line":"                \"updated_at\": {\"type\": \"date\"}"},{"line_number":36,"context_line":"            },"},{"line_number":37,"context_line":"        }"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_3d5d4947","line":35,"updated":"2015-09-04 05:19:03.000000000","message":"The zone_id is missing here, as I noted above, but this actually causes me to wonder about the relationship between the two.  Is it 1:1 from zone to recordset or is it a 1:* or *:* kind of relationship?  If it is a 1:1 relationship, then I think the recordset should be denormalized and mapped into the zone document.  Even if it isn\u0027t, we might want to discuss denormalizing it.","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"9321905cb87852849f8edef2884d55d7f77975a0","unresolved":false,"context_lines":[{"line_number":33,"context_line":"                \"project_id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":34,"context_line":"                \"created_at\": {\"type\": \"date\"},"},{"line_number":35,"context_line":"                \"updated_at\": {\"type\": \"date\"}"},{"line_number":36,"context_line":"            },"},{"line_number":37,"context_line":"        }"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def get_rbac_filter(self, request_context):"}],"source_content_type":"text/x-python","patch_set":16,"id":"da20952f_00181a74","line":36,"updated":"2015-09-04 05:19:03.000000000","message":"The list of fields at the bottom came into elastic search. Are you sure there aren\u0027t others that you want to explicitly map.  For example:\n\n status, email, type, action, could be considered for not analyzed.\n\n          \"shard\": 174,\n          \"minimum\": 3600,\n          \"parent_domain_id\": null,\n          \"ttl\": 300,\n          \"serial\": 1441305715,\n          \"deleted_at\": null,\n          \"id\": \"0aee815f-f351-47f9-8d2a-e43423e9d1d4\",\n          \"retry\": 600,\n          \"transferred_at\": null,\n          \"version\": 2,\n          \"type\": \"PRIMARY\",\n          \"email\": \"travis.tripp@hp.com\",\n          \"status\": \"ACTIVE\",\n          \"description\": \"my description\",\n          \"deleted\": \"0\",\n          \"updated_at\": \"2015-09-03T18:42:15.000000\",\n          \"action\": \"NONE\",\n          \"expire\": 86400,\n          \"audit_period_beginning\": \"2015-09-03 21:14:04.595589\",\n          \"masters\": [],\n          \"name\": \"test.com.\",\n          \"tenant_id\": \"3c7877d785174b0c809714330c663f81\",\n          \"created_at\": \"2015-09-03T18:41:55.000000\",\n          \"pool_id\": \"794ccc2c-d751-44fe-b57f-8894c9f5c842\",\n          \"refresh\": 3600,\n          \"audit_period_ending\": \"2015-09-03 22:14:04.595589\",\n          \"attributes\": []\n        },","commit_id":"e11332664eaf314fe6a3232fc8f4e00215f24352"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"21731cecfe0076c4e7a0695ce20016d624d3fc8c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            \"dynamic\": True,"},{"line_number":29,"context_line":"            \"dynamic_templates\": ["},{"line_number":30,"context_line":"                {"},{"line_number":31,"context_line":"                    \"_id\": {"},{"line_number":32,"context_line":"                        \"match\": \"*_id\","},{"line_number":33,"context_line":"                        \"match_mapping_type\": \"string\","},{"line_number":34,"context_line":"                        \"mapping\": {"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_6a291f37","line":31,"updated":"2015-09-09 01:30:00.000000000","message":"This is neat! _id threw me when i glanced over it because it\u0027s also one of the magic fields elasticsearch adds; this will work fine but maybe consider a more descriptive name for the template (like \u0027id_mappings\u0027)","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"201fb5a09f640cde2335e6cb1117d639fa2fb2ed","unresolved":false,"context_lines":[{"line_number":28,"context_line":"            \"dynamic\": True,"},{"line_number":29,"context_line":"            \"dynamic_templates\": ["},{"line_number":30,"context_line":"                {"},{"line_number":31,"context_line":"                    \"_id\": {"},{"line_number":32,"context_line":"                        \"match\": \"*_id\","},{"line_number":33,"context_line":"                        \"match_mapping_type\": \"string\","},{"line_number":34,"context_line":"                        \"mapping\": {"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_ea01af07","line":31,"in_reply_to":"da20952f_6a291f37","updated":"2015-09-09 02:01:06.000000000","message":"Thanks Steve. Endre added after my comment in patch set 16:\n\nhttps://review.openstack.org/#/c/199099/16..17/searchlight/elasticsearch/plugins/designate/zones.py\n\nI do agree we could add a more descriptive name.  Maybe openstack_id\n\nBut actually, I\u0027ve been thinking that we could do some general template mappings in searchlight so that this kind of boilerplate mapping can disappear from the plugins.\n\nI\u0027ve been thinking possibly doing one for *_at to catch the created_at and updated_at cases.","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":7665,"name":"Travis Tripp","email":"os.travis.tripp@gmail.com","username":"travis.tripp"},"change_message_id":"96b84c9cea8a337a1e45530ad202b92cfda5f00e","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                    \"no_match_filter\": \"none\","},{"line_number":70,"context_line":"                    \"filter\": {"},{"line_number":71,"context_line":"                        \"and\": ["},{"line_number":72,"context_line":"                            {"},{"line_number":73,"context_line":"                                \"term\": {"},{"line_number":74,"context_line":"                                    \"project_id\": request_context.owner"},{"line_number":75,"context_line":"                                }"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_09943542","line":72,"updated":"2015-09-09 00:22:56.000000000","message":"zones also are coming in with tenant_id rather than project_id.  This is making line this filter out zones even for zones that belong to the current scoped project.  You can either update line this to be tenant_id or also add project_id to the zones like you are doing for recordsets (which doesn\u0027t seem to be happening).","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"21731cecfe0076c4e7a0695ce20016d624d3fc8c","unresolved":false,"context_lines":[{"line_number":114,"context_line":"            \"dns.domain.create\","},{"line_number":115,"context_line":"            \"dns.domain.update\","},{"line_number":116,"context_line":"            \"dns.domain.delete\","},{"line_number":117,"context_line":"            \"dns.domain.exists\"]"}],"source_content_type":"text/x-python","patch_set":17,"id":"da20952f_8a2a732e","line":117,"updated":"2015-09-09 01:30:00.000000000","message":"Again, not sure if we need .exists","commit_id":"fa901d2afd10bc6f44ce9b5a3ba49b780d1824fc"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"233064480ab5825d8de0f648f4c5604ecd10f7d3","unresolved":false,"context_lines":[{"line_number":41,"context_line":"                }"},{"line_number":42,"context_line":"            ],"},{"line_number":43,"context_line":"            \"properties\": {"},{"line_number":44,"context_line":"                \"id\": {\"type\": \"string\", \"index\": \"not_analyzed\"},"},{"line_number":45,"context_line":"                \"created_at\": {\"type\": \"date\"},"},{"line_number":46,"context_line":"                \"updated_at\": {\"type\": \"date\"},"},{"line_number":47,"context_line":"                \"name\": {\"type\": \"string\"},"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_4f55434e","line":44,"updated":"2015-09-14 20:07:31.000000000","message":"Same here, i\u0027d like project_id here although it\u0027s not strictly necessary (then again, nearly all the fields here aren\u0027t necessary since e-s will Do The Right Thing)","commit_id":"4f2760c914aa4e74a0d0975888d0193376e67f81"}],"searchlight/elasticsearch/plugins/openstack_clients.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":12,"context_line":"# implied."},{"line_number":13,"context_line":"# See the License for the specific language governing permissions and"},{"line_number":14,"context_line":"# limitations under the License."},{"line_number":15,"context_line":"from designateclient.v2 import client as designateclient"},{"line_number":16,"context_line":"import glanceclient"},{"line_number":17,"context_line":"from keystoneclient.auth.identity import generic"},{"line_number":18,"context_line":"from keystoneclient.v2_0 import client as keystonev2client"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_2de76ce5","line":15,"updated":"2015-07-07 20:30:09.000000000","message":"Will need to add designateclient to requirements, although i\u0027m not sure how we want to handle libraries for clients. We run the risk of requiring everything even if you\u0027re not using a particular plugin.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"538e11c3239dd120a23af349b955bee0c0b35cd9","unresolved":false,"context_lines":[{"line_number":132,"context_line":"    )"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"@memoized"},{"line_number":136,"context_line":"def get_designateclient():"},{"line_number":137,"context_line":"    auth \u003d generic.Password("},{"line_number":138,"context_line":"        auth_url\u003dcfg.CONF.service_credentials.os_auth_url,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_0dcdc85c","line":135,"updated":"2015-07-07 20:30:09.000000000","message":"This is fine for now; as a separate ticket i want to make client instantiation more standard. Might want to add tenant_id, region_name, anything that makes sense from above.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"}],"searchlight/listener.py":[{"author":{"_account_id":13161,"name":"Kamil Rykowski","email":"kamil.rykowski@gmail.com","username":"krykowski"},"change_message_id":"392875990c3af1494ef8663589fe4dc433438c2a","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def info(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":67,"context_line":"        event_type_l \u003d event_type.lower()"},{"line_number":68,"context_line":"        print event_type_l"},{"line_number":69,"context_line":"        if event_type_l in self.notification_target_map:"},{"line_number":70,"context_line":"            plugin \u003d self.notification_target_map[event_type_l]"},{"line_number":71,"context_line":"            LOG.debug(\"Processing event \u0027%s\u0027 with plugin \u0027%s\u0027\","}],"source_content_type":"text/x-python","patch_set":2,"id":"ba3cc151_2f144e42","line":68,"updated":"2015-07-07 15:52:21.000000000","message":":)","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"b11c4f3a9216687cd60c464c71afc8988db41454","unresolved":false,"context_lines":[{"line_number":65,"context_line":""},{"line_number":66,"context_line":"    def info(self, ctxt, publisher_id, event_type, payload, metadata):"},{"line_number":67,"context_line":"        event_type_l \u003d event_type.lower()"},{"line_number":68,"context_line":"        print event_type_l"},{"line_number":69,"context_line":"        if event_type_l in self.notification_target_map:"},{"line_number":70,"context_line":"            plugin \u003d self.notification_target_map[event_type_l]"},{"line_number":71,"context_line":"            LOG.debug(\"Processing event \u0027%s\u0027 with plugin \u0027%s\u0027\","}],"source_content_type":"text/x-python","patch_set":3,"id":"ba3cc151_4c972090","line":68,"updated":"2015-07-08 16:50:17.000000000","message":"Nope :)","commit_id":"6c87f691c7c69c3acccca9d2fa401448eedc7598"}],"searchlight/tests/unit/v1/test_search.py":[{"author":{"_account_id":10063,"name":"Steve McLellan","email":"steven.j.mclellan@gmail.com","username":"sjmc7"},"change_message_id":"233064480ab5825d8de0f648f4c5604ecd10f7d3","unresolved":false,"context_lines":[{"line_number":304,"context_line":"        }"},{"line_number":305,"context_line":""},{"line_number":306,"context_line":"        actual \u003d self.search_controller.plugins_info(request)"},{"line_number":307,"context_line":"        self.assertEqual(sorted(expected), sorted(actual))"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"class TestSearchDeserializer(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":22,"id":"ba15a1d1_6f87e7b5","line":307,"updated":"2015-09-14 20:07:31.000000000","message":"It\u0027s ok to do this, although i think the order is deterministic - it\u0027ll be whatever order the stevedore plugins are listed in setup.cfg","commit_id":"4f2760c914aa4e74a0d0975888d0193376e67f81"}],"setup.cfg":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"91e3fc9f9830358319a485778c16ac6cbe7183c7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"searchlight.index_backend \u003d"},{"line_number":29,"context_line":"    image \u003d searchlight.elasticsearch.plugins.glance.images:ImageIndex"},{"line_number":30,"context_line":"    metadef \u003d searchlight.elasticsearch.plugins.glance.metadefs:MetadefIndex"},{"line_number":31,"context_line":"    domain \u003d searchlight.elasticsearch.plugins.designate.zones:ZoneIndex"},{"line_number":32,"context_line":"    recordset \u003d searchlight.elasticsearch.plugins.designate.records:RecordSetIndex"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"oslo.config.opts \u003d"}],"source_content_type":"text/x-ttcn-cfg","patch_set":2,"id":"ba3cc151_a33e40d8","line":31,"updated":"2015-07-07 14:18:17.000000000","message":"s/domain/zone/ - \"domain\" will be used for Keystone I imagine.","commit_id":"0627a1e31ec2619062a4cedd9c6a104f390c7d39"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"b9df908c43e85cdcb0805c9c10bf8d0ed2beb590","unresolved":false,"context_lines":[{"line_number":29,"context_line":"searchlight.index_backend \u003d"},{"line_number":30,"context_line":"    image \u003d searchlight.elasticsearch.plugins.glance.images:ImageIndex"},{"line_number":31,"context_line":"    metadef \u003d searchlight.elasticsearch.plugins.glance.metadefs:MetadefIndex"},{"line_number":32,"context_line":"    domain \u003d searchlight.elasticsearch.plugins.designate.zones:ZoneIndex"},{"line_number":33,"context_line":"    recordset \u003d searchlight.elasticsearch.plugins.designate.records:RecordSetIndex"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"[build_sphinx]"}],"source_content_type":"text/x-ttcn-cfg","patch_set":5,"id":"ba3cc151_417c5eeb","line":32,"updated":"2015-07-10 11:09:24.000000000","message":"Carry over from PS2:\n\ns/domain/zone/ - \"domain\" will be used for Keystone I imagine.","commit_id":"0de428382d7993ef173fdc453522e10359a316a1"}]}
