)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76ddf92bc5eaba4dcdffe9f4d6b29af0d9415df6","unresolved":false,"context_lines":[{"line_number":3069,"context_line":"            phase\u003dfields.NotificationPhase.ERROR, exception\u003derror, bdms\u003dbdms,"},{"line_number":3070,"context_line":"            tb\u003dtb)"},{"line_number":3071,"context_line":""},{"line_number":3072,"context_line":"    def _get_hypervisor_hostname(self, context):"},{"line_number":3073,"context_line":"        try:"},{"line_number":3074,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3075,"context_line":"            return compute_node.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_f0e677b0","line":3072,"updated":"2019-07-31 17:46:08.000000000","message":"Alternatively it seems like you could just use _get_nodename since it\u0027s effectively the same thing.","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"f726156d50f162affc528656aef5361e00567548","unresolved":false,"context_lines":[{"line_number":3069,"context_line":"            phase\u003dfields.NotificationPhase.ERROR, exception\u003derror, bdms\u003dbdms,"},{"line_number":3070,"context_line":"            tb\u003dtb)"},{"line_number":3071,"context_line":""},{"line_number":3072,"context_line":"    def _get_hypervisor_hostname(self, context):"},{"line_number":3073,"context_line":"        try:"},{"line_number":3074,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3075,"context_line":"            return compute_node.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_0fe76914","line":3072,"in_reply_to":"7faddb67_f0e677b0","updated":"2019-08-01 04:23:40.000000000","message":"OK. There are different \u0027names\u0027 for the compute node, such as these two. Are there any tips/guidelines on when to use each name? If it is all the same, why are there 2 different names and different methods for getting them?\n\nUpdate: Using _get_nodename results in UT errors related to orphaned instances because it takes an instance object as parameter.","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76ddf92bc5eaba4dcdffe9f4d6b29af0d9415df6","unresolved":false,"context_lines":[{"line_number":3074,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3075,"context_line":"            return compute_node.hypervisor_hostname"},{"line_number":3076,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3077,"context_line":"            LOG.exception(\u0027Failed to get compute_info for %s\u0027,"},{"line_number":3078,"context_line":"                          self.host)"},{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"    @messaging.expected_exceptions(exception.PreserveEphemeralNotSupported)"},{"line_number":3081,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_f0cd1730","line":3078,"range":{"start_line":3077,"start_character":26,"end_line":3078,"end_character":35},"updated":"2019-07-31 17:46:08.000000000","message":"While we\u0027re doing this, can you re-word this to make more sense, like \"Failed to get ComputeNode for host %s\".","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"f726156d50f162affc528656aef5361e00567548","unresolved":false,"context_lines":[{"line_number":3074,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3075,"context_line":"            return compute_node.hypervisor_hostname"},{"line_number":3076,"context_line":"        except exception.ComputeHostNotFound:"},{"line_number":3077,"context_line":"            LOG.exception(\u0027Failed to get compute_info for %s\u0027,"},{"line_number":3078,"context_line":"                          self.host)"},{"line_number":3079,"context_line":""},{"line_number":3080,"context_line":"    @messaging.expected_exceptions(exception.PreserveEphemeralNotSupported)"},{"line_number":3081,"context_line":"    @wrap_exception()"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_c12e058b","line":3078,"range":{"start_line":3077,"start_character":26,"end_line":3078,"end_character":35},"in_reply_to":"7faddb67_f0cd1730","updated":"2019-08-01 04:23:40.000000000","message":"Done","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4e8abbe558f2672db411cc660907c4330cf3b05","unresolved":false,"context_lines":[{"line_number":3069,"context_line":"            phase\u003dfields.NotificationPhase.ERROR, exception\u003derror, bdms\u003dbdms,"},{"line_number":3070,"context_line":"            tb\u003dtb)"},{"line_number":3071,"context_line":""},{"line_number":3072,"context_line":"    def _get_hypervisor_hostname(self, context):"},{"line_number":3073,"context_line":"        try:"},{"line_number":3074,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3075,"context_line":"            return compute_node.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_ea194dd0","line":3072,"updated":"2019-08-06 18:07:07.000000000","message":"Is this going to be used outside this class? It sounds like so from the commit message. If so, this shouldn\u0027t be prefixed with underscore, and should have its own test.","commit_id":"ac8ada85da11c8c01024d72bdd15d9c693f03542"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"e55d158cc2b537a754c9707c926e095cef7bc616","unresolved":false,"context_lines":[{"line_number":3069,"context_line":"            phase\u003dfields.NotificationPhase.ERROR, exception\u003derror, bdms\u003dbdms,"},{"line_number":3070,"context_line":"            tb\u003dtb)"},{"line_number":3071,"context_line":""},{"line_number":3072,"context_line":"    def _get_hypervisor_hostname(self, context):"},{"line_number":3073,"context_line":"        try:"},{"line_number":3074,"context_line":"            compute_node \u003d self._get_compute_info(context, self.host)"},{"line_number":3075,"context_line":"            return compute_node.hypervisor_hostname"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_c9b6638b","line":3072,"in_reply_to":"7faddb67_ea194dd0","updated":"2019-08-14 02:11:41.000000000","message":"No, both are part of ComputeManager.","commit_id":"ac8ada85da11c8c01024d72bdd15d9c693f03542"}],"nova/scheduler/utils.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76ddf92bc5eaba4dcdffe9f4d6b29af0d9415df6","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        is an integer. So this function can ensure unique ids by using bigger"},{"line_number":88,"context_line":"        ids than the maximum of existing ids."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        :param request_group: the RequestGroup to be added"},{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        # NOTE(gibi) [0] just here to always have a defined maximum"},{"line_number":93,"context_line":"        group_idents \u003d [0] + [int(ident) for ident in self._rg_by_id if ident]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_70fa8743","line":90,"updated":"2019-07-31 17:46:08.000000000","message":"Add a :returns: description to the docstring for the return value.","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"f726156d50f162affc528656aef5361e00567548","unresolved":false,"context_lines":[{"line_number":87,"context_line":"        is an integer. So this function can ensure unique ids by using bigger"},{"line_number":88,"context_line":"        ids than the maximum of existing ids."},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"        :param request_group: the RequestGroup to be added"},{"line_number":91,"context_line":"        \"\"\""},{"line_number":92,"context_line":"        # NOTE(gibi) [0] just here to always have a defined maximum"},{"line_number":93,"context_line":"        group_idents \u003d [0] + [int(ident) for ident in self._rg_by_id if ident]"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_4158d52f","line":90,"in_reply_to":"7faddb67_70fa8743","updated":"2019-08-01 04:23:40.000000000","message":"Done","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"76ddf92bc5eaba4dcdffe9f4d6b29af0d9415df6","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self._group_policy \u003d policy"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":145,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":146,"context_line":"        if not match:"},{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_10a1d346","line":145,"range":{"start_line":145,"start_character":21,"end_line":145,"end_character":30},"updated":"2019-07-31 17:46:08.000000000","message":"This is pretty gross, why not just make the method a @classmethod?","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"0048ed99b697a9194b1933d6a731e7d48e90c1ca","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self._group_policy \u003d policy"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":145,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":146,"context_line":"        if not match:"},{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_ea406da4","line":145,"range":{"start_line":145,"start_character":21,"end_line":145,"end_character":30},"in_reply_to":"7faddb67_013e5db7","updated":"2019-08-06 18:04:23.000000000","message":"Yeah, and I didn\u0027t mean \"make it not a classmethod and then hack my way around getting the class again\" :)\n\nWhy are you even doing this? Just use self.XS_KEYPAT....","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"f726156d50f162affc528656aef5361e00567548","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self._group_policy \u003d policy"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":145,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":146,"context_line":"        if not match:"},{"line_number":147,"context_line":"            return"},{"line_number":148,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_013e5db7","line":145,"range":{"start_line":145,"start_character":21,"end_line":145,"end_character":30},"in_reply_to":"7faddb67_10a1d346","updated":"2019-08-01 04:23:40.000000000","message":"It was a classmethod. Dan Smith asked it to be changed:\nhttps://review.opendev.org/#/c/631243/22/nova/scheduler/utils.py@138","commit_id":"966db02a88e3cc9df87252d824c4aa5690cdb1c7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4e8abbe558f2672db411cc660907c4330cf3b05","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            return"},{"line_number":143,"context_line":"        self._group_policy \u003d policy"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":146,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":147,"context_line":"        if not match:"},{"line_number":148,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_ca733115","line":145,"updated":"2019-08-06 18:07:07.000000000","message":"Same comment about the prefix, depending on how you\u0027re going to use this.","commit_id":"ac8ada85da11c8c01024d72bdd15d9c693f03542"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"e55d158cc2b537a754c9707c926e095cef7bc616","unresolved":false,"context_lines":[{"line_number":142,"context_line":"            return"},{"line_number":143,"context_line":"        self._group_policy \u003d policy"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":146,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":147,"context_line":"        if not match:"},{"line_number":148,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_697acfba","line":145,"in_reply_to":"7faddb67_ca733115","updated":"2019-08-14 02:11:41.000000000","message":"Both are part of the same class: ResourceRequest.","commit_id":"ac8ada85da11c8c01024d72bdd15d9c693f03542"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a4e8abbe558f2672db411cc660907c4330cf3b05","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self._group_policy \u003d policy"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":146,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":147,"context_line":"        if not match:"},{"line_number":148,"context_line":"            return"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_4a59818b","line":146,"range":{"start_line":146,"start_character":16,"end_line":146,"end_character":30},"updated":"2019-08-06 18:07:07.000000000","message":"Replicating my comment from an earlier patchset.. Why are you doing this instead of just self.XS_KEYPAT?","commit_id":"ac8ada85da11c8c01024d72bdd15d9c693f03542"},{"author":{"_account_id":21672,"name":"Sundar Nadathur","email":"sundar.nadathur@intel.com","username":"nsundar"},"change_message_id":"e55d158cc2b537a754c9707c926e095cef7bc616","unresolved":false,"context_lines":[{"line_number":143,"context_line":"        self._group_policy \u003d policy"},{"line_number":144,"context_line":""},{"line_number":145,"context_line":"    def _match_and_add_from_extra_specs(self, key, val, rg_ident\u003dNone):"},{"line_number":146,"context_line":"        match \u003d self.__class__.XS_KEYPAT.match(key)"},{"line_number":147,"context_line":"        if not match:"},{"line_number":148,"context_line":"            return"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"7faddb67_d4235aa6","line":146,"range":{"start_line":146,"start_character":16,"end_line":146,"end_character":30},"in_reply_to":"7faddb67_4a59818b","updated":"2019-08-14 02:11:41.000000000","message":"Done","commit_id":"ac8ada85da11c8c01024d72bdd15d9c693f03542"}]}
