)]}'
{"designate/api/admin/controllers/extensions/target_sync.py":[{"author":{"_account_id":8099,"name":"Graham Hayes","email":"gr@ham.ie","username":"graham"},"change_message_id":"462fe2e5bc7a435ca6fe9d87beca8ad4651864fa","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return \u0027.target_sync\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @pecan.expose(template\u003d\u0027json:\u0027, content_type\u003d\u0027application/json\u0027)"},{"line_number":33,"context_line":"    def get_all(self):"},{"line_number":34,"context_line":"        context \u003d pecan.request.environ[\u0027context\u0027]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        self.pool_mgr_api.target_sync(context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_54da9e79","line":33,"updated":"2016-02-04 13:54:50.000000000","message":"Why do we have this?","commit_id":"1b3bd915994289b4424a6f04eccb8ab1c931a99e"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"ee427073649be45271ef69630e4b3518360ae427","unresolved":false,"context_lines":[{"line_number":30,"context_line":"        return \u0027.target_sync\u0027"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"    @pecan.expose(template\u003d\u0027json:\u0027, content_type\u003d\u0027application/json\u0027)"},{"line_number":33,"context_line":"    def get_all(self):"},{"line_number":34,"context_line":"        context \u003d pecan.request.environ[\u0027context\u0027]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"        self.pool_mgr_api.target_sync(context,"}],"source_content_type":"text/x-python","patch_set":3,"id":"5a5ae5dd_5d6f1ac5","line":33,"in_reply_to":"5a5ae5dd_54da9e79","updated":"2016-02-04 15:59:27.000000000","message":"Because I needed while I was debugging Pecan :P\n\nSo no reason, will delete.","commit_id":"1b3bd915994289b4424a6f04eccb8ab1c931a99e"}],"designate/pool_manager/service.py":[{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"bf34f2efb459cf26563098bd575fa37922ca700b","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                zone_ops.append((zone, \u0027UPDATE\u0027))"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        for tup in zone_ops:"},{"line_number":332,"context_line":"            zone, action \u003d tup"},{"line_number":333,"context_line":"            if action \u003d\u003d \u0027CREATE\u0027:"},{"line_number":334,"context_line":"                self._create_zone_on_target(context, target, zone)"},{"line_number":335,"context_line":"                for nameserver in self.pool.nameservers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_bf3d642c","line":332,"updated":"2016-02-01 21:35:02.000000000","message":"You could do for zone, action in zone_ops. Typically I\u0027m not a huge fan of doing that, but in this case, you create zone_ops directly above, so it is really easy to avoid that protocol coming from another source and changing.","commit_id":"b2dc4c07e43fada283a03448f7f6dcb4e46626ae"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"8b92c57f4ac001d2f0e914d428ab174b3681685c","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                zone_ops.append((zone, \u0027UPDATE\u0027))"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        for tup in zone_ops:"},{"line_number":332,"context_line":"            zone, action \u003d tup"},{"line_number":333,"context_line":"            if action \u003d\u003d \u0027CREATE\u0027:"},{"line_number":334,"context_line":"                self._create_zone_on_target(context, target, zone)"},{"line_number":335,"context_line":"                for nameserver in self.pool.nameservers:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_c23f23b2","line":332,"in_reply_to":"7a5de9d1_bf3d642c","updated":"2016-02-01 21:47:16.000000000","message":"I did that at first, but had problems and didn\u0027t revisit, I\u0027ll give it a look.","commit_id":"b2dc4c07e43fada283a03448f7f6dcb4e46626ae"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"995aa1270a4dec2a658a10ea8fa2d8f3180d7f4f","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    self.mdns_api.poll_for_serial_number("},{"line_number":350,"context_line":"                        context, zone, nameserver, self.timeout,"},{"line_number":351,"context_line":"                        self.retry_interval, self.max_retries, self.delay)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    # Standard Create/Update/Delete Methods"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def create_zone(self, context, zone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_ec56d8cc","line":352,"updated":"2016-02-01 21:09:49.000000000","message":"It looks like you could have a single loop after the self._$action_zone_on_target call.","commit_id":"b2dc4c07e43fada283a03448f7f6dcb4e46626ae"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"8b92c57f4ac001d2f0e914d428ab174b3681685c","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    self.mdns_api.poll_for_serial_number("},{"line_number":350,"context_line":"                        context, zone, nameserver, self.timeout,"},{"line_number":351,"context_line":"                        self.retry_interval, self.max_retries, self.delay)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    # Standard Create/Update/Delete Methods"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def create_zone(self, context, zone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_42533317","line":352,"in_reply_to":"7a5de9d1_1fe038cc","updated":"2016-02-01 21:47:16.000000000","message":"Yes, sorry I\u0027m an idiot :)","commit_id":"b2dc4c07e43fada283a03448f7f6dcb4e46626ae"},{"author":{"_account_id":15171,"name":"Eric Larson","email":"eric.larson@rackspace.com","username":"elarson"},"change_message_id":"6564cc5d928b7f3f00c66c388a405d9ad786b231","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    self.mdns_api.poll_for_serial_number("},{"line_number":350,"context_line":"                        context, zone, nameserver, self.timeout,"},{"line_number":351,"context_line":"                        self.retry_interval, self.max_retries, self.delay)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    # Standard Create/Update/Delete Methods"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def create_zone(self, context, zone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_1fe038cc","line":352,"in_reply_to":"7a5de9d1_ec333860","updated":"2016-02-01 21:33:08.000000000","message":"I could be missing something, but for each item in the zone_ops list, you are calling a self._*_zone_on_target method and then doing a loop over the pool.nameservers to call self.mdns_api.poll_for_serial_number. I\u0027m just suggesting looping over the pool.nameservers after the if/else blocks. \n\n  for zone, action in zone_ops:\n      if action \u003d\u003d \u0027CREATE\u0027: \n          ...\n      elif action \u003d\u003d \u0027DELETE\u0027: \n          ...\n      elif action \u003d\u003d \u0027UPDATE\u0027: \n          ...\n      for nameserverin self.pool.nameservers:\n          self.mdns_api.pool_for_serial_number(...)\n\nDoes that make more sense?","commit_id":"b2dc4c07e43fada283a03448f7f6dcb4e46626ae"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"45aa5f1f0cabec3d0cc089cc0caf2b2964107248","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                    self.mdns_api.poll_for_serial_number("},{"line_number":350,"context_line":"                        context, zone, nameserver, self.timeout,"},{"line_number":351,"context_line":"                        self.retry_interval, self.max_retries, self.delay)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"    # Standard Create/Update/Delete Methods"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"    def create_zone(self, context, zone):"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a5de9d1_ec333860","line":352,"in_reply_to":"7a5de9d1_ec56d8cc","updated":"2016-02-01 21:13:52.000000000","message":"Yeah, I know this is icky. But the reason for it is that those *_on_targets can take minutes each if retries are happening, so I didn\u0027t want one slow one somewhere to keep the other things from going ACTIVE, or getting state trued up.\n\nI could spawn a green thread for each change, but it\u0027d still have to have the polling in there, because you need to wait for the change to finish before polling.\n\nThere\u0027s also the remote possibility that something goes wrong during this process that\u0027s not caught by the individual functions, then nothing would be polled for.\n\nDoes that make sense?","commit_id":"b2dc4c07e43fada283a03448f7f6dcb4e46626ae"}]}
