)]}'
{"lib/ip.py":[{"author":{"_account_id":10881,"name":"Neill Cox","email":"neill@ingenious.com.au","username":"neillc"},"change_message_id":"8d2b8c9ab5344f79820ba842d2e758fd37a2f30f","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    \"\"\"Class to manage CIDRs and IPs from openstack-ansible inventory config\"\"\""},{"line_number":102,"context_line":"    def __init__(self, queues\u003dNone, used_ips\u003dNone):"},{"line_number":103,"context_line":"        if queues is None:"},{"line_number":104,"context_line":"            queues \u003d {}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if used_ips is None:"},{"line_number":107,"context_line":"            used_ips \u003d set()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_a7fca23f","line":104,"updated":"2016-11-15 03:09:30.000000000","message":"Perhaps some validation that  queues is a dict if that is what you expect to be dealing with?","commit_id":"d6d3631a6d41bc2e52e6b60707f671c0b1b3f17e"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"1db0f29b70e03db565b908a0b0d607f2472cd107","unresolved":false,"context_lines":[{"line_number":101,"context_line":"    \"\"\"Class to manage CIDRs and IPs from openstack-ansible inventory config\"\"\""},{"line_number":102,"context_line":"    def __init__(self, queues\u003dNone, used_ips\u003dNone):"},{"line_number":103,"context_line":"        if queues is None:"},{"line_number":104,"context_line":"            queues \u003d {}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if used_ips is None:"},{"line_number":107,"context_line":"            used_ips \u003d set()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_0bcf0380","line":104,"in_reply_to":"7a77a97e_a7fca23f","updated":"2016-11-15 16:19:33.000000000","message":"Yeah, probably. I personally don\u0027t think restricting it to just dicts is super important, as long as it duck types to one. Just so it doesn\u0027t blow up when used.","commit_id":"d6d3631a6d41bc2e52e6b60707f671c0b1b3f17e"},{"author":{"_account_id":10881,"name":"Neill Cox","email":"neill@ingenious.com.au","username":"neillc"},"change_message_id":"8d2b8c9ab5344f79820ba842d2e758fd37a2f30f","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if queues is None:"},{"line_number":104,"context_line":"            queues \u003d {}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if used_ips is None:"},{"line_number":107,"context_line":"            used_ips \u003d set()"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # If we receive a set already, this is esentially a no-op,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_e7621a16","line":106,"updated":"2016-11-15 03:09:30.000000000","message":"again, perhaps validate that used_ips is an appropriate type","commit_id":"d6d3631a6d41bc2e52e6b60707f671c0b1b3f17e"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"1db0f29b70e03db565b908a0b0d607f2472cd107","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        if queues is None:"},{"line_number":104,"context_line":"            queues \u003d {}"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        if used_ips is None:"},{"line_number":107,"context_line":"            used_ips \u003d set()"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"        # If we receive a set already, this is esentially a no-op,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a77a97e_4be81b11","line":106,"in_reply_to":"7a77a97e_e7621a16","updated":"2016-11-15 16:19:33.000000000","message":"Am I incorrect in thinking that line 112 handles this? The \"is None\" check is looking for the sentinel provided in the argument list, so we\u0027re not actually provided anything here.","commit_id":"d6d3631a6d41bc2e52e6b60707f671c0b1b3f17e"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"bdaac102927c2872105105e41159956e942c8e76","unresolved":false,"context_lines":[{"line_number":116,"context_line":""},{"line_number":117,"context_line":"        Should raise NoSuchQueue when the given queue name is not found,"},{"line_number":118,"context_line":"        and EmptyQueue if the queue is empty."},{"line_number":119,"context_line":"        \"\"\""},{"line_number":120,"context_line":"        raise NotImplementedError"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def release(self, ip):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_db72bd10","line":119,"updated":"2016-11-17 21:29:04.000000000","message":"Maybe \"Reserve an available IP address\"...\n\nadd note that a following call to ``save`` may be required for some stores?","commit_id":"87614a8606abfbc04c6eae46e627e632922642b9"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"bdaac102927c2872105105e41159956e942c8e76","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        raise NotImplementedError"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def release(self, ip):"},{"line_number":123,"context_line":"        \"\"\"Release an IP back into queues as assignable\"\"\""},{"line_number":124,"context_line":"        raise NotImplementedError"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def save(self):"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_1bcef52d","line":123,"updated":"2016-11-17 21:29:04.000000000","message":"add note that a following call to ``save`` may be required by some stores?","commit_id":"87614a8606abfbc04c6eae46e627e632922642b9"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"bdaac102927c2872105105e41159956e942c8e76","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \"\"\"Release an IP back into queues as assignable\"\"\""},{"line_number":124,"context_line":"        raise NotImplementedError"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def save(self):"},{"line_number":127,"context_line":"        \"\"\"Write actions to data store"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"        This method is optional to implement, and is presented as a hook for"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_1bc355ee","line":126,"updated":"2016-11-17 21:29:04.000000000","message":"could be ``apply`` perhaps?\n\nI imagined this would serve the need for a multi-processing-safe reservation-based IP source. \n\nThis could allow transactional behavior across multiple sources (IP source, actual network usage) so we don\u0027t end up with allocated IPs when there are errors in applying the IP.\n\nWe just explicitly release on error but that is the optimistic error handling model. I would like to know if anyone thinks we should just dump this as unneeded.","commit_id":"87614a8606abfbc04c6eae46e627e632922642b9"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"bdaac102927c2872105105e41159956e942c8e76","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    @property"},{"line_number":193,"context_line":"    def queues(self):"},{"line_number":194,"context_line":"        \"\"\"Dictionary of named queues, populated with IPs for a given CIDR\"\"\""},{"line_number":195,"context_line":"        return self._queues"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def __getitem__(self, key):"},{"line_number":198,"context_line":"        \"\"\"Short hand for accessing a named queue\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_9e4af324","line":195,"updated":"2016-11-17 21:29:04.000000000","message":"would it be absurd of me to prefer dict(self._queues) to protect that inner value from accidental mutation?","commit_id":"87614a8606abfbc04c6eae46e627e632922642b9"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"b0503507289e255bdcc297555168511f91833ff0","unresolved":false,"context_lines":[{"line_number":192,"context_line":"    @property"},{"line_number":193,"context_line":"    def queues(self):"},{"line_number":194,"context_line":"        \"\"\"Dictionary of named queues, populated with IPs for a given CIDR\"\"\""},{"line_number":195,"context_line":"        return self._queues"},{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def __getitem__(self, key):"},{"line_number":198,"context_line":"        \"\"\"Short hand for accessing a named queue\"\"\""}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_017730a0","line":195,"in_reply_to":"7a77a97e_9e4af324","updated":"2016-11-18 21:33:39.000000000","message":"I think that\u0027s a good idea. Though I think we may have to do a deepcopy so that the 2 dictionaries aren\u0027t pointing to the same lists of IPs.","commit_id":"87614a8606abfbc04c6eae46e627e632922642b9"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"bdaac102927c2872105105e41159956e942c8e76","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"    def __getitem__(self, key):"},{"line_number":198,"context_line":"        \"\"\"Short hand for accessing a named queue\"\"\""},{"line_number":199,"context_line":"        return self._queues[key]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    def load(self, queue_name, cidr):"},{"line_number":202,"context_line":"        \"\"\"Populates a named queue with all IPs in a CIDR"}],"source_content_type":"text/x-python","patch_set":7,"id":"7a77a97e_9e711379","line":199,"updated":"2016-11-17 21:29:04.000000000","message":"similarly, protecting inner value?\nmaybe omit this entirely as it could encourage violating the API contract.","commit_id":"87614a8606abfbc04c6eae46e627e632922642b9"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"413fcf87d83ab4c1b5a4c029eb20c22fb0a9b4a7","unresolved":false,"context_lines":[{"line_number":136,"context_line":"        Should raise NoSuchQueue when the given queue name is not found,"},{"line_number":137,"context_line":"        and EmptyQueue if the queue is empty."},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"        Some plugin implementations may be transaction, and require a call to"},{"line_number":140,"context_line":"        ``save`` after reserving an IP."},{"line_number":141,"context_line":"        \"\"\""},{"line_number":142,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a77a97e_6700f466","line":139,"range":{"start_line":139,"start_character":43,"end_line":139,"end_character":54},"updated":"2016-11-18 23:27:44.000000000","message":"nit: transactional","commit_id":"99e398125b9f49f8f5e26bcecd86ebd3c092bf3d"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"413fcf87d83ab4c1b5a4c029eb20c22fb0a9b4a7","unresolved":false,"context_lines":[{"line_number":144,"context_line":"    def release(self, ip):"},{"line_number":145,"context_line":"        \"\"\"Release an IP back into queues as assignable."},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"        Some plugin implementations may be transaction, and require a call to"},{"line_number":148,"context_line":"        ``save`` after releasing an IP."},{"line_number":149,"context_line":"        \"\"\""},{"line_number":150,"context_line":"        raise NotImplementedError"}],"source_content_type":"text/x-python","patch_set":8,"id":"7a77a97e_87fb5078","line":147,"range":{"start_line":147,"start_character":43,"end_line":147,"end_character":54},"updated":"2016-11-18 23:27:44.000000000","message":"nit: transactional","commit_id":"99e398125b9f49f8f5e26bcecd86ebd3c092bf3d"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"413fcf87d83ab4c1b5a4c029eb20c22fb0a9b4a7","unresolved":false,"context_lines":[{"line_number":221,"context_line":"        queue."},{"line_number":222,"context_line":"        \"\"\""},{"line_number":223,"context_line":"        used_ips \u003d set(self._used_ips)"},{"line_number":224,"context_line":"        for ip in used_ips:"},{"line_number":225,"context_line":"            self.release(ip)"},{"line_number":226,"context_line":"        self._used_ips \u003d set()"},{"line_number":227,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"7a77a97e_c719c823","line":224,"updated":"2016-11-18 23:27:44.000000000","message":"Nice, I missed the impact of this on first review. I see you added tests for this too.","commit_id":"99e398125b9f49f8f5e26bcecd86ebd3c092bf3d"}]}
