)]}'
{"tempest/common/compute.py":[{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"589a0088832296bba1c331265b783646f893757c","unresolved":false,"context_lines":[{"line_number":248,"context_line":"                                           \u0027SHELVED_OFFLOADED\u0027)"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"def get_host_for_server(admin_clients, server_id):"},{"line_number":252,"context_line":"    server_details \u003d admin_clients.servers_client.show_server(server_id)"},{"line_number":253,"context_line":"    return server_details[\u0027server\u0027][\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":254,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_38c75315","line":251,"range":{"start_line":251,"start_character":24,"end_line":251,"end_character":37},"updated":"2017-07-12 03:24:46.000000000","message":"As you can see above in ``shelve_server``, normally the client itself is passed to the function, not the client manager.\n\nSo calling this \"client\" is best IMO. And then you can pass self.os_admin.servers_client to this function as the first arg.","commit_id":"10baa046cd767501285c48553cde2f795674191e"},{"author":{"_account_id":23186,"name":"Felipe Monteiro","email":"felipe.carneiro.monteiro@gmail.com","username":"felipe.monteiro"},"change_message_id":"589a0088832296bba1c331265b783646f893757c","unresolved":false,"context_lines":[{"line_number":249,"context_line":""},{"line_number":250,"context_line":""},{"line_number":251,"context_line":"def get_host_for_server(admin_clients, server_id):"},{"line_number":252,"context_line":"    server_details \u003d admin_clients.servers_client.show_server(server_id)"},{"line_number":253,"context_line":"    return server_details[\u0027server\u0027][\u0027OS-EXT-SRV-ATTR:host\u0027]"},{"line_number":254,"context_line":""},{"line_number":255,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3f1d235d_384cf39c","line":252,"range":{"start_line":252,"start_character":21,"end_line":252,"end_character":49},"updated":"2017-07-12 03:24:46.000000000","message":"client","commit_id":"10baa046cd767501285c48553cde2f795674191e"}],"tempest/scenario/test_server_multinode.py":[{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"4a3b3461bcfcde3d8d361bfadd3c59d04a3eaef5","unresolved":false,"context_lines":[{"line_number":70,"context_line":"            inst \u003d self.create_server("},{"line_number":71,"context_line":"                clients\u003dself.os_admin,"},{"line_number":72,"context_line":"                availability_zone\u003d\u0027%(zone)s:%(host_name)s\u0027 % host)"},{"line_number":73,"context_line":"            host_id \u003d self.get_host_for_server(inst[\u0027id\u0027])"},{"line_number":74,"context_line":"            # ensure server is located on the requested host"},{"line_number":75,"context_line":"            self.assertEqual(host[\u0027host_name\u0027], host_id)"},{"line_number":76,"context_line":"            host_ids.add(host_id)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f1a1f67_11304056","line":73,"range":{"start_line":73,"start_character":12,"end_line":73,"end_character":19},"updated":"2017-07-13 05:21:05.000000000","message":"host id is not host name","commit_id":"121e2186a5b9b346d33882ca232b92ad694779d0"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"c9b78fafd263b797f0a06a19d78ac5e9379dde55","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # ensure that every server ended up on a different host"},{"line_number":85,"context_line":"        self.assertEqual("},{"line_number":86,"context_line":"            num_servers, len(host_names),"},{"line_number":87,"context_line":"            \"Incorrect number of distinct host_ids scheduled.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_afeb60ae","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":61},"updated":"2017-07-13 09:03:58.000000000","message":"The original code checks two points:\n1. host[\u0027host_name\u0027] \u003d\u003d server[\u0027OS-EXT-SRV-ATTR:host\u0027]\n2. each server with a unique server[\u0027hostId\u0027]","commit_id":"2f6b11dccde37fef7771adb1ae12df5094616f73"},{"author":{"_account_id":18600,"name":"Ferenc Horváth","email":"hferenc@inf.u-szeged.hu","username":"hferenc"},"change_message_id":"5583f98bb2119b113ee4284f8cb0c031b27d3e4d","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # ensure that every server ended up on a different host"},{"line_number":85,"context_line":"        self.assertEqual("},{"line_number":86,"context_line":"            num_servers, len(host_names),"},{"line_number":87,"context_line":"            \"Incorrect number of distinct host_ids scheduled.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_65c20988","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":61},"in_reply_to":"1f1a1f67_0a8a421a","updated":"2017-07-13 09:40:31.000000000","message":"Oh, I see. I didn\u0027t know. I thought that checking the \u0027hostId\u0027s is just the way to check whether every server ends up on different hosts.","commit_id":"2f6b11dccde37fef7771adb1ae12df5094616f73"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"4685405f526c793b8a306d3ce4b347b0e35ca352","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # ensure that every server ended up on a different host"},{"line_number":85,"context_line":"        self.assertEqual("},{"line_number":86,"context_line":"            num_servers, len(host_names),"},{"line_number":87,"context_line":"            \"Incorrect number of distinct host_ids scheduled.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_0a8a421a","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":61},"in_reply_to":"1f1a1f67_af180081","updated":"2017-07-13 09:23:54.000000000","message":"It seems the original code wants to check both host name and host id(to ensure host id won\u0027t duplicate).","commit_id":"2f6b11dccde37fef7771adb1ae12df5094616f73"},{"author":{"_account_id":18600,"name":"Ferenc Horváth","email":"hferenc@inf.u-szeged.hu","username":"hferenc"},"change_message_id":"a56d70169d0b3de03314e4d4e2be1aac4360986b","unresolved":false,"context_lines":[{"line_number":84,"context_line":"        # ensure that every server ended up on a different host"},{"line_number":85,"context_line":"        self.assertEqual("},{"line_number":86,"context_line":"            num_servers, len(host_names),"},{"line_number":87,"context_line":"            \"Incorrect number of distinct host_ids scheduled.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"1f1a1f67_af180081","line":87,"range":{"start_line":87,"start_character":12,"end_line":87,"end_character":61},"in_reply_to":"1f1a1f67_afeb60ae","updated":"2017-07-13 09:13:32.000000000","message":"2. Isn\u0027t checking the host names more strict than checking just the \u0027hostId\u0027s?","commit_id":"2f6b11dccde37fef7771adb1ae12df5094616f73"},{"author":{"_account_id":5689,"name":"Masayuki Igawa","email":"masayuki@igawa.io","username":"igawa"},"change_message_id":"991514b1446481590c5d6c69d0494826c03fdd08","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # create 1 compute for each node, up to the min_compute_nodes"},{"line_number":60,"context_line":"        # threshold (so that things don\u0027t get crazy if you have 1000"},{"line_number":61,"context_line":"        # compute nodes but set min to 3)."},{"line_number":62,"context_line":"        num_servers \u003d 0"},{"line_number":63,"context_line":"        host_ids \u003d set()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        for host in hosts[:CONF.compute.min_compute_nodes]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_13749a67","line":62,"updated":"2017-07-14 03:24:54.000000000","message":"I think we don\u0027t need this \u0027num_servers\u0027. How about like this?\n\n host_ids \u003d []\n    :\n host_ids.append(host_id)\n    :\n self.assertEqual(CONF.compute.min_compute_nodes, len(host_ids), \"Incorrect number...\")\n    :\n self.assertEqual(len(host_ids), len(set(host_ids)), \"Incorrect number of...\")","commit_id":"2c2cfe342a3dbe6bf68244bb86a220f1a15b6a90"},{"author":{"_account_id":18600,"name":"Ferenc Horváth","email":"hferenc@inf.u-szeged.hu","username":"hferenc"},"change_message_id":"9164258d5d0ea0a2d237858acca066ac1e44e5ef","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # create 1 compute for each node, up to the min_compute_nodes"},{"line_number":60,"context_line":"        # threshold (so that things don\u0027t get crazy if you have 1000"},{"line_number":61,"context_line":"        # compute nodes but set min to 3)."},{"line_number":62,"context_line":"        num_servers \u003d 0"},{"line_number":63,"context_line":"        host_ids \u003d set()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        for host in hosts[:CONF.compute.min_compute_nodes]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_56f67bfb","line":62,"in_reply_to":"1f1a1f67_13749a67","updated":"2017-07-14 07:17:17.000000000","message":"Done","commit_id":"2c2cfe342a3dbe6bf68244bb86a220f1a15b6a90"},{"author":{"_account_id":20190,"name":"zhufl","email":"zhu.fanglei@zte.com.cn","username":"zhufl"},"change_message_id":"964c019a2adccdf41be527c889d304f0cd3edf8a","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # create 1 compute for each node, up to the min_compute_nodes"},{"line_number":60,"context_line":"        # threshold (so that things don\u0027t get crazy if you have 1000"},{"line_number":61,"context_line":"        # compute nodes but set min to 3)."},{"line_number":62,"context_line":"        num_servers \u003d 0"},{"line_number":63,"context_line":"        host_ids \u003d set()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        for host in hosts[:CONF.compute.min_compute_nodes]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_c1764c07","line":62,"in_reply_to":"1f1a1f67_13749a67","updated":"2017-07-14 04:59:57.000000000","message":"here host_ids is defined as a set while not a list just in case host_id is identical","commit_id":"2c2cfe342a3dbe6bf68244bb86a220f1a15b6a90"},{"author":{"_account_id":18600,"name":"Ferenc Horváth","email":"hferenc@inf.u-szeged.hu","username":"hferenc"},"change_message_id":"9164258d5d0ea0a2d237858acca066ac1e44e5ef","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        # create 1 compute for each node, up to the min_compute_nodes"},{"line_number":60,"context_line":"        # threshold (so that things don\u0027t get crazy if you have 1000"},{"line_number":61,"context_line":"        # compute nodes but set min to 3)."},{"line_number":62,"context_line":"        num_servers \u003d 0"},{"line_number":63,"context_line":"        host_ids \u003d set()"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"        for host in hosts[:CONF.compute.min_compute_nodes]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1f1a1f67_36dd3f70","line":62,"in_reply_to":"1f1a1f67_c1764c07","updated":"2017-07-14 07:17:17.000000000","message":"Done","commit_id":"2c2cfe342a3dbe6bf68244bb86a220f1a15b6a90"}]}
