)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5bec6e20a22316c68004b357474ebf0249fdd37f","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch add a helper function _default_host_name to give an instance"},{"line_number":14,"context_line":"default name if sanitize_hostname returns empty hostname."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Change-Id: I443b51e0576cf657d96e498d6700bfc34d987301"},{"line_number":17,"context_line":"Closes-Bug: #1495388"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"ba15a1d1_6a7daee6","line":15,"updated":"2015-09-21 07:17:59.000000000","message":"I think that we need a DocImpact/UpgradeImpact flag here as the behavior is changing.","commit_id":"679367f118491072712e403a7ca2a021c531f4de"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"074ee35cad1b1089292d9cd22ccd4ffcef02bc30","unresolved":false,"context_lines":[{"line_number":25,"context_line":""},{"line_number":26,"context_line":"Besides, added more test cases to cover sanitize_hostname."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"DocImpact"},{"line_number":29,"context_line":"Change-Id: I443b51e0576cf657d96e498d6700bfc34d987301"},{"line_number":30,"context_line":"Closes-Bug: #1495388"},{"line_number":31,"context_line":"Co-authored-by: Alex Xu \u003chejie.xu@intel.com\u003e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"7a2fa921_6080e5f7","line":28,"updated":"2015-10-08 14:14:07.000000000","message":"What is the DocImpact?  This creates a bug against the docs team but I\u0027m not sure what they\u0027d document about this, unless it\u0027s just something in the API docs about how hostnames are handled?  That\u0027d really probably live in the nova devref now so if there are doc impacts they should have been done as part of this change.","commit_id":"bc6f30de953303604625e84ad2345cfb595170d2"}],"nova/compute/api.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7046f4dd223279da1392966990a6cb97aba46fa9","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            new_name \u003d instance.display_name"},{"line_number":639,"context_line":"        instance.display_name \u003d new_name"},{"line_number":640,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_b0df2139","line":641,"updated":"2015-09-17 08:26:39.000000000","message":"why is this not just: instance.display_name rather than params[\u0027name\u0027]?","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"219352a3aa5b7ae2748145a16fa84fa2127c0dcd","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            new_name \u003d instance.display_name"},{"line_number":639,"context_line":"        instance.display_name \u003d new_name"},{"line_number":640,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_b615da40","line":641,"in_reply_to":"ba15a1d1_b0df2139","updated":"2015-09-17 08:40:19.000000000","message":"Yea that will include the \u0027multi_instance_display_name_template also.","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"4a1a33cc8ac203bf09a0477ee4c96bc8e31d7a25","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            new_name \u003d instance.display_name"},{"line_number":639,"context_line":"        instance.display_name \u003d new_name"},{"line_number":640,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_b9b14d49","line":641,"in_reply_to":"ba15a1d1_b615da40","updated":"2015-09-17 08:59:38.000000000","message":"yeah, \nI can not use instance.display_name now, because that maybe changed in line 639.\n\nlet say the instance.display_name \u003d \"---\" or other Chinese characters.\n\nnew_name will be changed to \"----1\" (count\u003d1, see line 630).\n\nso if we call utils.sanitize_hostname() directly, we will get \"1\" as hostname which is incorrect.","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2c842fa87fe0b4e65139f5649dd9bb37e923c4fb","unresolved":false,"context_lines":[{"line_number":638,"context_line":"            new_name \u003d instance.display_name"},{"line_number":639,"context_line":"        instance.display_name \u003d new_name"},{"line_number":640,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_56b79339","line":641,"in_reply_to":"ba15a1d1_b9b14d49","updated":"2015-09-17 12:45:33.000000000","message":"ah, I see.\n\nMaybe we should add an original_name \u003d instance.display_name at the top of the file, so this is clear?","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7046f4dd223279da1392966990a6cb97aba46fa9","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"},{"line_number":645,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":646,"context_line":"            else:"},{"line_number":647,"context_line":"                instance.hostname \u003d utils.sanitize_hostname("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_d02df546","line":644,"updated":"2015-09-17 08:26:39.000000000","message":"Can we maybe push all this logic into sanitize_hostname? Pass in a default name into that utils call?","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6c9b2816be6e03038054a24fd7231202186dc365","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"},{"line_number":645,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":646,"context_line":"            else:"},{"line_number":647,"context_line":"                instance.hostname \u003d utils.sanitize_hostname("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_8d118e06","line":644,"in_reply_to":"ba15a1d1_998b2968","updated":"2015-09-17 15:59:26.000000000","message":"+1","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"4a1a33cc8ac203bf09a0477ee4c96bc8e31d7a25","unresolved":false,"context_lines":[{"line_number":641,"context_line":"            tmp_hostname \u003d utils.sanitize_hostname(params[\u0027name\u0027])"},{"line_number":642,"context_line":"            # NOTE(eliqiao) set host to default_display_name to avoid"},{"line_number":643,"context_line":"            # empty hostname"},{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"},{"line_number":645,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":646,"context_line":"            else:"},{"line_number":647,"context_line":"                instance.hostname \u003d utils.sanitize_hostname("}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_998b2968","line":644,"in_reply_to":"ba15a1d1_d02df546","updated":"2015-09-17 08:59:38.000000000","message":"+1, I will think more about this.","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7046f4dd223279da1392966990a6cb97aba46fa9","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"},{"line_number":645,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":646,"context_line":"            else:"},{"line_number":647,"context_line":"                instance.hostname \u003d utils.sanitize_hostname("},{"line_number":648,"context_line":"                                                    instance.display_name)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        instance.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_f0c03952","line":647,"updated":"2015-09-17 08:26:39.000000000","message":"can\u0027t you just have:\n\ninstance.hostname \u003d tmp_hostname here?","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2c842fa87fe0b4e65139f5649dd9bb37e923c4fb","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"},{"line_number":645,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":646,"context_line":"            else:"},{"line_number":647,"context_line":"                instance.hostname \u003d utils.sanitize_hostname("},{"line_number":648,"context_line":"                                                    instance.display_name)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        instance.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_76e2d730","line":647,"in_reply_to":"ba15a1d1_3939bda4","updated":"2015-09-17 12:45:33.000000000","message":"OK, I would rather use new_name here then, please, so its clear what the intent is.","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"4a1a33cc8ac203bf09a0477ee4c96bc8e31d7a25","unresolved":false,"context_lines":[{"line_number":644,"context_line":"            if tmp_hostname \u003d\u003d \"\":"},{"line_number":645,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":646,"context_line":"            else:"},{"line_number":647,"context_line":"                instance.hostname \u003d utils.sanitize_hostname("},{"line_number":648,"context_line":"                                                    instance.display_name)"},{"line_number":649,"context_line":""},{"line_number":650,"context_line":"        instance.save()"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_3939bda4","line":647,"in_reply_to":"ba15a1d1_f0c03952","updated":"2015-09-17 08:59:38.000000000","message":"no, tmp_hostname is just to test if instance.display_name returns empty string. but in line 639, we called multi_instance_display_name_template which will bring more strings","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"5bec6e20a22316c68004b357474ebf0249fdd37f","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            \u0027name\u0027: instance.display_name,"},{"line_number":637,"context_line":"            \u0027count\u0027: index + 1,"},{"line_number":638,"context_line":"        }"},{"line_number":639,"context_line":"        original_name \u003d instance.display_name"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            new_name \u003d (CONF.multi_instance_display_name_template %"},{"line_number":642,"context_line":"                        params)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_8a760205","line":639,"updated":"2015-09-21 07:17:59.000000000","message":"you can move this to ling 649","commit_id":"679367f118491072712e403a7ca2a021c531f4de"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e5902665e4542ac84ea38dc8321ac31f18a0dd3b","unresolved":false,"context_lines":[{"line_number":636,"context_line":"            \u0027name\u0027: instance.display_name,"},{"line_number":637,"context_line":"            \u0027count\u0027: index + 1,"},{"line_number":638,"context_line":"        }"},{"line_number":639,"context_line":"        original_name \u003d instance.display_name"},{"line_number":640,"context_line":"        try:"},{"line_number":641,"context_line":"            new_name \u003d (CONF.multi_instance_display_name_template %"},{"line_number":642,"context_line":"                        params)"}],"source_content_type":"text/x-python","patch_set":2,"id":"ba15a1d1_a0e3e532","line":639,"in_reply_to":"ba15a1d1_8a760205","updated":"2015-09-21 08:19:38.000000000","message":"I don\u0027t think so.\n\ninstance.display_name may be changed at line 647","commit_id":"679367f118491072712e403a7ca2a021c531f4de"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b011191fce3095fddf41cefe9970bf941b16fbf1","unresolved":false,"context_lines":[{"line_number":646,"context_line":"            new_name \u003d instance.display_name"},{"line_number":647,"context_line":"        instance.display_name \u003d new_name"},{"line_number":648,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":649,"context_line":"            if utils.sanitize_hostname(original_name) \u003d\u003d \"\":"},{"line_number":650,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":651,"context_line":"            else:"},{"line_number":652,"context_line":"                instance.hostname \u003d utils.sanitize_hostname(new_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_402a09e9","line":649,"updated":"2015-09-21 08:32:32.000000000","message":"why we not use default_hostname parameter like line 1407?","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1748161cfe043b0f38533eec957f645ff7c1595c","unresolved":false,"context_lines":[{"line_number":646,"context_line":"            new_name \u003d instance.display_name"},{"line_number":647,"context_line":"        instance.display_name \u003d new_name"},{"line_number":648,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":649,"context_line":"            if utils.sanitize_hostname(original_name) \u003d\u003d \"\":"},{"line_number":650,"context_line":"                instance.hostname \u003d self._default_host_name(instance.uuid)"},{"line_number":651,"context_line":"            else:"},{"line_number":652,"context_line":"                instance.hostname \u003d utils.sanitize_hostname(new_name)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_b6c32b8a","line":649,"in_reply_to":"ba15a1d1_402a09e9","updated":"2015-09-21 09:37:42.000000000","message":"the logic is different from line 1407\nhere we test original_name not new_name if empty","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"95480493c0a4b70b06be21834b953a281590203e","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"        return \"Server %s\" % instance_uuid"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def _default_host_name(self, instance_uuid):"},{"line_number":1414,"context_line":"        return \"Server-%s\" % instance_uuid"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"    def _populate_instance_for_create(self, context, instance, image,"},{"line_number":1417,"context_line":"                                      index, security_groups, instance_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_7d11efae","line":1414,"updated":"2015-09-21 11:34:31.000000000","message":"if 2 instance spawn on same host ,but we got different hostname for them?\nwill this lead to some potential problem e.g.?\nor should we add strict validation to hostname?","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1e40c267d82c78cfe479565be018eccbdf903dd7","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"        return \"Server %s\" % instance_uuid"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def _default_host_name(self, instance_uuid):"},{"line_number":1414,"context_line":"        return \"Server-%s\" % instance_uuid"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"    def _populate_instance_for_create(self, context, instance, image,"},{"line_number":1417,"context_line":"                                      index, security_groups, instance_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_7d6228da","line":1414,"in_reply_to":"ba15a1d1_7d11efae","updated":"2015-09-22 01:48:26.000000000","message":"yes, we have 2 different hostname, but what\u0027s the potential problem\ncan you show some e.g?","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"46e21cebb17700c788a3010522cd897e9ead6846","unresolved":false,"context_lines":[{"line_number":1411,"context_line":"        return \"Server %s\" % instance_uuid"},{"line_number":1412,"context_line":""},{"line_number":1413,"context_line":"    def _default_host_name(self, instance_uuid):"},{"line_number":1414,"context_line":"        return \"Server-%s\" % instance_uuid"},{"line_number":1415,"context_line":""},{"line_number":1416,"context_line":"    def _populate_instance_for_create(self, context, instance, image,"},{"line_number":1417,"context_line":"                                      index, security_groups, instance_type):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_6de02897","line":1414,"in_reply_to":"ba15a1d1_7d6228da","updated":"2015-09-22 11:51:05.000000000","message":"someone created 2 instances by using az at same host but it tells that they on differest host","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"074ee35cad1b1089292d9cd22ccd4ffcef02bc30","unresolved":false,"context_lines":[{"line_number":643,"context_line":"        except (KeyError, TypeError):"},{"line_number":644,"context_line":"            LOG.exception(_LE(\u0027Failed to set instance name using \u0027"},{"line_number":645,"context_line":"                              \u0027multi_instance_display_name_template.\u0027))"},{"line_number":646,"context_line":"            new_name \u003d instance.display_name"},{"line_number":647,"context_line":"        instance.display_name \u003d new_name"},{"line_number":648,"context_line":"        if not instance.get(\u0027hostname\u0027, None):"},{"line_number":649,"context_line":"            if utils.sanitize_hostname(original_name) \u003d\u003d \"\":"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_c033f9a9","line":646,"updated":"2015-10-08 14:14:07.000000000","message":"Guess we could have set new_name \u003d original_name here.","commit_id":"bc6f30de953303604625e84ad2345cfb595170d2"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"6c9b2816be6e03038054a24fd7231202186dc365","unresolved":false,"context_lines":[{"line_number":2965,"context_line":"        filters \u003d mock_get.call_args_list[0][0][1]"},{"line_number":2966,"context_line":"        self.assertEqual({\u0027project_id\u0027: \u0027foo\u0027}, filters)"},{"line_number":2967,"context_line":""},{"line_number":2968,"context_line":"    def test_populate_instance_names_host_name_is_empty(self):"},{"line_number":2969,"context_line":"        api \u003d compute_api.API()"},{"line_number":2970,"context_line":"        params \u003d dict(display_name\u003d\"------------\")"},{"line_number":2971,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_8ddf4e39","line":2968,"updated":"2015-09-17 15:59:26.000000000","message":"can we test the Chinese case?","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"7046f4dd223279da1392966990a6cb97aba46fa9","unresolved":false,"context_lines":[{"line_number":2972,"context_line":"        api._populate_instance_names(instance, 1)"},{"line_number":2973,"context_line":"        self.assertEqual(\u0027Server-%s\u0027 % instance.uuid, instance.hostname)"},{"line_number":2974,"context_line":""},{"line_number":2975,"context_line":"    def test_populate_instance_names_host_name_is_empty_multi(self):"},{"line_number":2976,"context_line":"        api \u003d compute_api.API()"},{"line_number":2977,"context_line":"        params \u003d dict(display_name\u003d\"------------\")"},{"line_number":2978,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_90a21dfb","line":2975,"updated":"2015-09-17 08:26:39.000000000","message":"Nit: this is really test_apply_instance_name_template right?","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"4a1a33cc8ac203bf09a0477ee4c96bc8e31d7a25","unresolved":false,"context_lines":[{"line_number":2972,"context_line":"        api._populate_instance_names(instance, 1)"},{"line_number":2973,"context_line":"        self.assertEqual(\u0027Server-%s\u0027 % instance.uuid, instance.hostname)"},{"line_number":2974,"context_line":""},{"line_number":2975,"context_line":"    def test_populate_instance_names_host_name_is_empty_multi(self):"},{"line_number":2976,"context_line":"        api \u003d compute_api.API()"},{"line_number":2977,"context_line":"        params \u003d dict(display_name\u003d\"------------\")"},{"line_number":2978,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_b94dcd3f","line":2975,"in_reply_to":"ba15a1d1_90a21dfb","updated":"2015-09-17 08:59:38.000000000","message":"yes.","commit_id":"50c9f02a909fe7bbcbee242238edbf13dccac07c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b011191fce3095fddf41cefe9970bf941b16fbf1","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":11,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":12,"context_line":"#    under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"Unit tests for compute API.\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import contextlib"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_a0c4455f","side":"PARENT","line":13,"updated":"2015-09-21 08:32:32.000000000","message":"the extra line we shouldn\u0027t touch","commit_id":"806dc025dbc9a102f7bace78be9c56f8e9af0929"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1748161cfe043b0f38533eec957f645ff7c1595c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the"},{"line_number":11,"context_line":"#    License for the specific language governing permissions and limitations"},{"line_number":12,"context_line":"#    under the License."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"\"\"\"Unit tests for compute API.\"\"\""},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"import contextlib"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_563baf9c","side":"PARENT","line":13,"in_reply_to":"ba15a1d1_a0c4455f","updated":"2015-09-21 09:37:42.000000000","message":"Done","commit_id":"806dc025dbc9a102f7bace78be9c56f8e9af0929"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b011191fce3095fddf41cefe9970bf941b16fbf1","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*-coding:utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_20afd595","line":1,"updated":"2015-09-21 08:32:32.000000000","message":"see my comment at line 2977","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1748161cfe043b0f38533eec957f645ff7c1595c","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# -*-coding:utf-8 -*-"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_36363bb5","line":1,"in_reply_to":"ba15a1d1_20afd595","updated":"2015-09-21 09:37:42.000000000","message":"Done","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b011191fce3095fddf41cefe9970bf941b16fbf1","unresolved":false,"context_lines":[{"line_number":2974,"context_line":""},{"line_number":2975,"context_line":"    def test_populate_instance_names_host_name_is_empty(self):"},{"line_number":2976,"context_line":"        api \u003d compute_api.API()"},{"line_number":2977,"context_line":"        params \u003d dict(display_name\u003du\"虚拟机是中文名\")"},{"line_number":2978,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"},{"line_number":2979,"context_line":"        api._populate_instance_names(instance, 1)"},{"line_number":2980,"context_line":"        self.assertEqual(\u0027Server-%s\u0027 % instance.uuid, instance.hostname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_608ced35","line":2977,"updated":"2015-09-21 08:32:32.000000000","message":"we can write like this u\u0027\\u865a\\u62df\\u673a\\u662f\\u4e2d\\u6587\u0027 Then needn\u0027t add mark at first line.","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1748161cfe043b0f38533eec957f645ff7c1595c","unresolved":false,"context_lines":[{"line_number":2974,"context_line":""},{"line_number":2975,"context_line":"    def test_populate_instance_names_host_name_is_empty(self):"},{"line_number":2976,"context_line":"        api \u003d compute_api.API()"},{"line_number":2977,"context_line":"        params \u003d dict(display_name\u003du\"虚拟机是中文名\")"},{"line_number":2978,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"},{"line_number":2979,"context_line":"        api._populate_instance_names(instance, 1)"},{"line_number":2980,"context_line":"        self.assertEqual(\u0027Server-%s\u0027 % instance.uuid, instance.hostname)"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_d66edf95","line":2977,"in_reply_to":"ba15a1d1_608ced35","updated":"2015-09-21 09:37:42.000000000","message":"Done","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"95480493c0a4b70b06be21834b953a281590203e","unresolved":false,"context_lines":[{"line_number":2966,"context_line":"        self.assertEqual({\u0027project_id\u0027: \u0027foo\u0027}, filters)"},{"line_number":2967,"context_line":""},{"line_number":2968,"context_line":"    def test_populate_instance_names_host_name(self):"},{"line_number":2969,"context_line":"        api \u003d compute_api.API()"},{"line_number":2970,"context_line":"        params \u003d dict(display_name\u003d\"vm1\")"},{"line_number":2971,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"},{"line_number":2972,"context_line":"        api._populate_instance_names(instance, 1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_3d59378f","line":2969,"updated":"2015-09-21 11:34:31.000000000","message":"this can be defined at setUp()","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1e40c267d82c78cfe479565be018eccbdf903dd7","unresolved":false,"context_lines":[{"line_number":2966,"context_line":"        self.assertEqual({\u0027project_id\u0027: \u0027foo\u0027}, filters)"},{"line_number":2967,"context_line":""},{"line_number":2968,"context_line":"    def test_populate_instance_names_host_name(self):"},{"line_number":2969,"context_line":"        api \u003d compute_api.API()"},{"line_number":2970,"context_line":"        params \u003d dict(display_name\u003d\"vm1\")"},{"line_number":2971,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"},{"line_number":2972,"context_line":"        api._populate_instance_names(instance, 1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_1dd44cbb","line":2969,"in_reply_to":"ba15a1d1_3d59378f","updated":"2015-09-22 01:48:26.000000000","message":"Done","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"95480493c0a4b70b06be21834b953a281590203e","unresolved":false,"context_lines":[{"line_number":2973,"context_line":"        self.assertEqual(\u0027vm1\u0027, instance.hostname)"},{"line_number":2974,"context_line":""},{"line_number":2975,"context_line":"    def test_populate_instance_names_host_name_is_empty(self):"},{"line_number":2976,"context_line":"        api \u003d compute_api.API()"},{"line_number":2977,"context_line":"        params \u003d dict(display_name\u003du\u0027\\u865a\\u62df\\u673a\\u662f\\u4e2d\\u6587\u0027)"},{"line_number":2978,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"},{"line_number":2979,"context_line":"        api._populate_instance_names(instance, 1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_fddadfe8","line":2976,"updated":"2015-09-21 11:34:31.000000000","message":"ditto","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1e40c267d82c78cfe479565be018eccbdf903dd7","unresolved":false,"context_lines":[{"line_number":2973,"context_line":"        self.assertEqual(\u0027vm1\u0027, instance.hostname)"},{"line_number":2974,"context_line":""},{"line_number":2975,"context_line":"    def test_populate_instance_names_host_name_is_empty(self):"},{"line_number":2976,"context_line":"        api \u003d compute_api.API()"},{"line_number":2977,"context_line":"        params \u003d dict(display_name\u003du\u0027\\u865a\\u62df\\u673a\\u662f\\u4e2d\\u6587\u0027)"},{"line_number":2978,"context_line":"        instance \u003d self._create_instance_obj(params\u003dparams)"},{"line_number":2979,"context_line":"        api._populate_instance_names(instance, 1)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba15a1d1_bddbe0ec","line":2976,"in_reply_to":"ba15a1d1_fddadfe8","updated":"2015-09-22 01:48:26.000000000","message":"Done","commit_id":"f3795eed9852deba2fd103f2f7b87a231332d14a"}],"nova/tests/unit/test_utils.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b011191fce3095fddf41cefe9970bf941b16fbf1","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        defaultname \u003d \"Server-1\""},{"line_number":106,"context_line":"        self.assertEqual(defaultname, utils.sanitize_hostname(hostname,"},{"line_number":107,"context_line":"                                                              defaultname))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_generate_password(self):"},{"line_number":110,"context_line":"        password \u003d utils.generate_password()"},{"line_number":111,"context_line":"        self.assertTrue([c for c in password if c in \u00270123456789\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_e0cd5d5e","line":108,"updated":"2015-09-21 08:32:32.000000000","message":"Can we add more testcases? like \u0027-----\u0027, \u0027   \u0027, \u0027\\u7684\\u7684\u0027,  \u0027a\u0027*256, and Chinese case.\n\nReally wish we have full coverage for the hostname against the RFC.","commit_id":"72454cffaad2c68288457696af0096935cfb9420"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"1748161cfe043b0f38533eec957f645ff7c1595c","unresolved":false,"context_lines":[{"line_number":105,"context_line":"        defaultname \u003d \"Server-1\""},{"line_number":106,"context_line":"        self.assertEqual(defaultname, utils.sanitize_hostname(hostname,"},{"line_number":107,"context_line":"                                                              defaultname))"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def test_generate_password(self):"},{"line_number":110,"context_line":"        password \u003d utils.generate_password()"},{"line_number":111,"context_line":"        self.assertTrue([c for c in password if c in \u00270123456789\u0027])"}],"source_content_type":"text/x-python","patch_set":3,"id":"ba15a1d1_961ce7c2","line":108,"in_reply_to":"ba15a1d1_e0cd5d5e","updated":"2015-09-21 09:37:42.000000000","message":"okay,\nfor length limit, I am not sure we truncate it of raise exception. let discuss it in another patch.","commit_id":"72454cffaad2c68288457696af0096935cfb9420"}],"nova/utils.py":[{"author":{"_account_id":2750,"name":"Sean Dague","email":"sean@dague.net","username":"sdague"},"change_message_id":"2cda297fd312c646780bd609268c6246c5233cd1","unresolved":false,"context_lines":[{"line_number":788,"context_line":"    if hostname \u003d\u003d \"\" and default_name is not None:"},{"line_number":789,"context_line":"        return default_name[:255]"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    return hostname[:255]"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_68d6d6f2","line":791,"updated":"2015-09-22 12:07:24.000000000","message":"I believe that 255 is way too long. dnsmasq breaks down at 64. Also, truncation shouldn\u0027t be silent, because it could produce things like foo.c which won\u0027t resolve.","commit_id":"1de7a1b02a5730f7517c1d210fed00b9f2602d84"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"022703348c913791b565bc02f6a1bd7cb65c76dd","unresolved":false,"context_lines":[{"line_number":788,"context_line":"    if hostname \u003d\u003d \"\" and default_name is not None:"},{"line_number":789,"context_line":"        return default_name[:255]"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    return hostname[:255]"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_0b57f15a","line":791,"in_reply_to":"ba15a1d1_4b4e4970","updated":"2015-09-23 01:43:57.000000000","message":"@Eli, let\u0027s test those case, and ensure what is right.","commit_id":"1de7a1b02a5730f7517c1d210fed00b9f2602d84"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e3275be1fc746eef22632c148543726e2b3f36b6","unresolved":false,"context_lines":[{"line_number":788,"context_line":"    if hostname \u003d\u003d \"\" and default_name is not None:"},{"line_number":789,"context_line":"        return default_name[:255]"},{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    return hostname[:255]"},{"line_number":792,"context_line":""},{"line_number":793,"context_line":""},{"line_number":794,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba15a1d1_4b4e4970","line":791,"in_reply_to":"ba15a1d1_68d6d6f2","updated":"2015-09-23 00:56:35.000000000","message":"hi Sean,\ncould you please tell how we go now?\ntruncate it to 64?\ncan you tell how to make the truncation not silent(I don\u0027t get you)\n\nthx.","commit_id":"1de7a1b02a5730f7517c1d210fed00b9f2602d84"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"14db86568fe6a43b519bdfc5795bd9cee3651fc5","unresolved":false,"context_lines":[{"line_number":775,"context_line":"    \"\"\"Return a hostname which conforms to RFC-952 and RFC-1123 specs.\"\"\""},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"    def truncate_hostname(name):"},{"line_number":778,"context_line":"        # NOTE(eliqiao) window, linux, and dnsmasq has different limitation"},{"line_number":779,"context_line":"        # windows: 255 (net_bios limit to 15, but window will truncate it)"},{"line_number":780,"context_line":"        # linux: 64"},{"line_number":781,"context_line":"        # dnsmasq: 63"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_3d59d335","line":778,"updated":"2015-09-23 08:04:39.000000000","message":"nit, \"NOTE(eliqiao):\", missing a \":\"","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e3d9f2f61605ac5388f75d39d184b3a731771500","unresolved":false,"context_lines":[{"line_number":775,"context_line":"    \"\"\"Return a hostname which conforms to RFC-952 and RFC-1123 specs.\"\"\""},{"line_number":776,"context_line":""},{"line_number":777,"context_line":"    def truncate_hostname(name):"},{"line_number":778,"context_line":"        # NOTE(eliqiao) window, linux, and dnsmasq has different limitation"},{"line_number":779,"context_line":"        # windows: 255 (net_bios limit to 15, but window will truncate it)"},{"line_number":780,"context_line":"        # linux: 64"},{"line_number":781,"context_line":"        # dnsmasq: 63"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_bd6643b9","line":778,"in_reply_to":"ba15a1d1_3d59d335","updated":"2015-09-23 08:18:05.000000000","message":"Done","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"14db86568fe6a43b519bdfc5795bd9cee3651fc5","unresolved":false,"context_lines":[{"line_number":779,"context_line":"        # windows: 255 (net_bios limit to 15, but window will truncate it)"},{"line_number":780,"context_line":"        # linux: 64"},{"line_number":781,"context_line":"        # dnsmasq: 63"},{"line_number":782,"context_line":"        # so we chose 63."},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        if len(name) \u003e 63:"},{"line_number":785,"context_line":"            LOG.warning(_LW(\"Hostname is logger than 63, truncate to 63\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_7d7aeb89","line":782,"updated":"2015-09-23 08:04:39.000000000","message":"Maybe we can say like this:\n\nBecause nova-network will use dnsmasq to assign hostname, so dnsmasq\u0027s limit is the choice.\n\nBut please don\u0027t trust my English","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e3d9f2f61605ac5388f75d39d184b3a731771500","unresolved":false,"context_lines":[{"line_number":779,"context_line":"        # windows: 255 (net_bios limit to 15, but window will truncate it)"},{"line_number":780,"context_line":"        # linux: 64"},{"line_number":781,"context_line":"        # dnsmasq: 63"},{"line_number":782,"context_line":"        # so we chose 63."},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        if len(name) \u003e 63:"},{"line_number":785,"context_line":"            LOG.warning(_LW(\"Hostname is logger than 63, truncate to 63\"))"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_9d69ff8e","line":782,"in_reply_to":"ba15a1d1_7d7aeb89","updated":"2015-09-23 08:18:05.000000000","message":"Done","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"14db86568fe6a43b519bdfc5795bd9cee3651fc5","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        # so we chose 63."},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        if len(name) \u003e 63:"},{"line_number":785,"context_line":"            LOG.warning(_LW(\"Hostname is logger than 63, truncate to 63\"))"},{"line_number":786,"context_line":"        return name[:63]"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    if isinstance(hostname, six.text_type):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_1d6bafba","line":785,"updated":"2015-09-23 08:04:39.000000000","message":"s/logger/longer/?\n\nMaybe try this:\n\nThe length of Hostname is longer than 63, truncate to the length 63. The truncate hostname is %(hostname)s","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e3d9f2f61605ac5388f75d39d184b3a731771500","unresolved":false,"context_lines":[{"line_number":782,"context_line":"        # so we chose 63."},{"line_number":783,"context_line":""},{"line_number":784,"context_line":"        if len(name) \u003e 63:"},{"line_number":785,"context_line":"            LOG.warning(_LW(\"Hostname is logger than 63, truncate to 63\"))"},{"line_number":786,"context_line":"        return name[:63]"},{"line_number":787,"context_line":""},{"line_number":788,"context_line":"    if isinstance(hostname, six.text_type):"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_fd703b74","line":785,"in_reply_to":"ba15a1d1_1d6bafba","updated":"2015-09-23 08:18:05.000000000","message":"Done","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"14db86568fe6a43b519bdfc5795bd9cee3651fc5","unresolved":false,"context_lines":[{"line_number":795,"context_line":"    hostname \u003d re.sub(\u0027[^\\w.-]+\u0027, \u0027\u0027, hostname)"},{"line_number":796,"context_line":"    hostname \u003d hostname.lower()"},{"line_number":797,"context_line":"    hostname \u003d hostname.strip(\u0027.-\u0027)"},{"line_number":798,"context_line":"    # NOTE(eliqiao) set hostname to default_display_name to avoid"},{"line_number":799,"context_line":"    # empty hostname"},{"line_number":800,"context_line":"    if hostname \u003d\u003d \"\" and default_name is not None:"},{"line_number":801,"context_line":"        return truncate_hostname(default_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_7da18bf7","line":798,"updated":"2015-09-23 08:04:39.000000000","message":"ditto, missing \u0027:\u0027","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"e3d9f2f61605ac5388f75d39d184b3a731771500","unresolved":false,"context_lines":[{"line_number":795,"context_line":"    hostname \u003d re.sub(\u0027[^\\w.-]+\u0027, \u0027\u0027, hostname)"},{"line_number":796,"context_line":"    hostname \u003d hostname.lower()"},{"line_number":797,"context_line":"    hostname \u003d hostname.strip(\u0027.-\u0027)"},{"line_number":798,"context_line":"    # NOTE(eliqiao) set hostname to default_display_name to avoid"},{"line_number":799,"context_line":"    # empty hostname"},{"line_number":800,"context_line":"    if hostname \u003d\u003d \"\" and default_name is not None:"},{"line_number":801,"context_line":"        return truncate_hostname(default_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba15a1d1_dd73f77e","line":798,"in_reply_to":"ba15a1d1_7da18bf7","updated":"2015-09-23 08:18:05.000000000","message":"Done","commit_id":"84b28b175ffb72f52be204a6ee04f0347b3cd3b4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"074ee35cad1b1089292d9cd22ccd4ffcef02bc30","unresolved":false,"context_lines":[{"line_number":771,"context_line":"    return path"},{"line_number":772,"context_line":""},{"line_number":773,"context_line":""},{"line_number":774,"context_line":"def sanitize_hostname(hostname, default_name\u003dNone):"},{"line_number":775,"context_line":"    \"\"\"Return a hostname which conforms to RFC-952 and RFC-1123 specs except"},{"line_number":776,"context_line":"       the length of hostname."},{"line_number":777,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_20e0ad28","line":774,"updated":"2015-10-08 14:14:07.000000000","message":"I would have doc\u0027ed the parameters in the docstring for clarity.","commit_id":"bc6f30de953303604625e84ad2345cfb595170d2"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"074ee35cad1b1089292d9cd22ccd4ffcef02bc30","unresolved":false,"context_lines":[{"line_number":803,"context_line":"    hostname \u003d re.sub(\u0027[^\\w.-]+\u0027, \u0027\u0027, hostname)"},{"line_number":804,"context_line":"    hostname \u003d hostname.lower()"},{"line_number":805,"context_line":"    hostname \u003d hostname.strip(\u0027.-\u0027)"},{"line_number":806,"context_line":"    # NOTE(eliqiao): set hostname to default_display_name to avoid"},{"line_number":807,"context_line":"    # empty hostname"},{"line_number":808,"context_line":"    if hostname \u003d\u003d \"\" and default_name is not None:"},{"line_number":809,"context_line":"        return truncate_hostname(default_name)"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a2fa921_a0eb5d12","line":806,"updated":"2015-10-08 14:14:07.000000000","message":"s/default_display_name/default_name/","commit_id":"bc6f30de953303604625e84ad2345cfb595170d2"}]}
