)]}'
{"ironic/conductor/hash_ring.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"65a3bf51921120128c2703446f3aaeb646fda007","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                if partition \u003e\u003d len(self.part2host):"},{"line_number":82,"context_line":"                    partition \u003d 0"},{"line_number":83,"context_line":"            host_ids.append(self.part2host[partition])"},{"line_number":84,"context_line":"            # prevent infinite loop"},{"line_number":85,"context_line":"        return [self.hosts[h] for h in host_ids]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BSf0%3D","line":84,"updated":"2013-11-27 20:14:45.000000000","message":"This comment doesn\u0027t make sense to me.","commit_id":"136efa347db2f2583e7ad59f919f55e2994d423c"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"fa51de3a164e2fc44257fa9520d4ab0b7897a056","unresolved":false,"context_lines":[{"line_number":81,"context_line":"                if partition \u003e\u003d len(self.part2host):"},{"line_number":82,"context_line":"                    partition \u003d 0"},{"line_number":83,"context_line":"            host_ids.append(self.part2host[partition])"},{"line_number":84,"context_line":"            # prevent infinite loop"},{"line_number":85,"context_line":"        return [self.hosts[h] for h in host_ids]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BSdg%3D","line":84,"in_reply_to":"AAAATn%2F%2BSf0%3D","updated":"2013-11-27 20:19:16.000000000","message":"woops. comment should have been on line 78. Somehow i didn\u0027t notice that it didn\u0027t get moved...","commit_id":"136efa347db2f2583e7ad59f919f55e2994d423c"}],"ironic/tests/conductor/test_hash_ring.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"65a3bf51921120128c2703446f3aaeb646fda007","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.assertEqual([\u0027baz\u0027], ring.get_hosts(\u0027fake\u0027,"},{"line_number":81,"context_line":"                                                 ignore_hosts\u003d[\u0027foo\u0027, \u0027bar\u0027]))"},{"line_number":82,"context_line":"        self.assertEqual([], ring.get_hosts(\u0027fake\u0027,"},{"line_number":83,"context_line":"                                            ignore_hosts\u003dhosts))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_more_replicas_than_hosts(self):"},{"line_number":86,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BSfA%3D","line":83,"updated":"2013-11-27 20:14:45.000000000","message":"I\u0027d also like to see \n[\u0027foo\u0027, \u0027bar\u0027] \u003d\u003d ring.get_hosts(\u0027something that maps to baz\u0027, ignore_hosts\u003d[\u0027baz\u0027])\n\nas thats the actual \u0027primary host went down\u0027 scenario.","commit_id":"136efa347db2f2583e7ad59f919f55e2994d423c"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"fa51de3a164e2fc44257fa9520d4ab0b7897a056","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        self.assertEqual([\u0027baz\u0027], ring.get_hosts(\u0027fake\u0027,"},{"line_number":81,"context_line":"                                                 ignore_hosts\u003d[\u0027foo\u0027, \u0027bar\u0027]))"},{"line_number":82,"context_line":"        self.assertEqual([], ring.get_hosts(\u0027fake\u0027,"},{"line_number":83,"context_line":"                                            ignore_hosts\u003dhosts))"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    def test_more_replicas_than_hosts(self):"},{"line_number":86,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027]"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAATn%2F%2BSdE%3D","line":83,"in_reply_to":"AAAATn%2F%2BSfA%3D","updated":"2013-11-27 20:19:16.000000000","message":"Done","commit_id":"136efa347db2f2583e7ad59f919f55e2994d423c"}],"ironic/tests/test_hash_ring.py":[{"author":{"_account_id":7774,"name":"Kui Shi","email":"skuicloud@gmail.com","username":"Kui"},"change_message_id":"baeb4f309b1d6eea496834158193d9abd777c7a7","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"    def test_distribution_one_replica(self):"},{"line_number":57,"context_line":"        hosts \u003d [\u0027foo\u0027, \u0027bar\u0027, \u0027baz\u0027]"},{"line_number":58,"context_line":"        ring \u003d hash.HashRing(hosts, replicas\u003d1)"},{"line_number":59,"context_line":"        self.assertEqual([\u0027foo\u0027], ring.get_hosts(\u0027fake\u0027))"},{"line_number":60,"context_line":"        self.assertEqual([\u0027bar\u0027], ring.get_hosts(\u0027fake-again\u0027))"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAATn%2F%2BSMA%3D","line":58,"updated":"2013-11-27 21:30:45.000000000","message":"ring.get_hosts() return random host name, if user pass different \"data\" value to get_hosts(), it may return same host, I think that is expected.  So we should use neat test cases to indicate this:\n\n        self.assertEqual([\u0027foo\u0027], ring.get_hosts(\u0027fake\u0027))\n        self.assertEqual([\u0027foo\u0027], ring.get_hosts(\u0027same\u0027))\n        self.assertEqual([\u0027baz\u0027], ring.get_hosts(\u0027another\u0027))","commit_id":"dba1f4367db45a86397b5228372c158cba6c3094"}]}
