)]}'
{"nova/scheduler/client/report.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"0c6bdaf2015fe6a20d789455a3c8a9c02885d927","unresolved":false,"context_lines":[{"line_number":944,"context_line":"            return resp.json()[\u0027allocations\u0027]"},{"line_number":945,"context_line":""},{"line_number":946,"context_line":"    def get_allocations_for_consumer_by_provider(self, rp_uuid, consumer):"},{"line_number":947,"context_line":"            # NOTE(cdent): This trims to just the allocations being"},{"line_number":948,"context_line":"            # used on this resource provider. In the future when there"},{"line_number":949,"context_line":"            # are shared resources there might be other providers."},{"line_number":950,"context_line":"        allocations \u003d self.get_allocations_for_consumer(consumer)"},{"line_number":951,"context_line":"        if allocations is None:"},{"line_number":952,"context_line":"            # safe_connect can return None on 404"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f4e5783_1cff2935","line":949,"range":{"start_line":947,"start_character":12,"end_line":949,"end_character":66},"updated":"2017-10-11 18:24:39.000000000","message":"wonkified indenting","commit_id":"069526b82b177b246f284aa2b86150352710efa9"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"31b028b8ddc2c393e382598d798ac67be5d05de0","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        # are shared resources there might be other providers."},{"line_number":950,"context_line":"        allocations \u003d self.get_allocations_for_consumer(consumer)"},{"line_number":951,"context_line":"        if allocations is None:"},{"line_number":952,"context_line":"            # safe_connect can return None on 404"},{"line_number":953,"context_line":"            allocations \u003d {}"},{"line_number":954,"context_line":"        return allocations.get("},{"line_number":955,"context_line":"            rp_uuid, {}).get(\u0027resources\u0027, {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_94c63648","line":952,"range":{"start_line":952,"start_character":12,"end_line":952,"end_character":49},"updated":"2017-10-12 15:13:09.000000000","message":"This patch uses get_allocations_for_consumer() above. That returns {} which is handled properly in L954 so I think you never reach this branch and you don\u0027t need the extra if.","commit_id":"0328d3d845d22f5adc98f4b1485bde6f711041a3"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"5bc88c8507abb1110a8d5499f1fd2cb17eebf193","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        # are shared resources there might be other providers."},{"line_number":950,"context_line":"        allocations \u003d self.get_allocations_for_consumer(consumer)"},{"line_number":951,"context_line":"        if allocations is None:"},{"line_number":952,"context_line":"            # safe_connect can return None on 404"},{"line_number":953,"context_line":"            allocations \u003d {}"},{"line_number":954,"context_line":"        return allocations.get("},{"line_number":955,"context_line":"            rp_uuid, {}).get(\u0027resources\u0027, {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_d4281835","line":952,"range":{"start_line":952,"start_character":12,"end_line":952,"end_character":49},"in_reply_to":"5f4e5783_06b694da","updated":"2017-10-13 07:14:17.000000000","message":"You are right. Sorry.","commit_id":"0328d3d845d22f5adc98f4b1485bde6f711041a3"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d4ab08825e99214205f841ca8e08f1a97e563783","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        # are shared resources there might be other providers."},{"line_number":950,"context_line":"        allocations \u003d self.get_allocations_for_consumer(consumer)"},{"line_number":951,"context_line":"        if allocations is None:"},{"line_number":952,"context_line":"            # safe_connect can return None on 404"},{"line_number":953,"context_line":"            allocations \u003d {}"},{"line_number":954,"context_line":"        return allocations.get("},{"line_number":955,"context_line":"            rp_uuid, {}).get(\u0027resources\u0027, {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_a61c6012","line":952,"range":{"start_line":952,"start_character":12,"end_line":952,"end_character":49},"in_reply_to":"5f4e5783_94c63648","updated":"2017-10-12 18:34:30.000000000","message":"Per the comment, this is about the @safe_connect decorator on get_allocations_for_consumer failing and returning None.\n\nGiven the @safe_connect decorator was really for the newton-\u003eocata transition where placement went from optional to required, and we\u0027re now in Queens, we can probably just drop the safe_connect decorator since Placement is definitely required at this point.","commit_id":"0328d3d845d22f5adc98f4b1485bde6f711041a3"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2af89243dfac04ab7485dd53f435600849a097ce","unresolved":false,"context_lines":[{"line_number":949,"context_line":"        # are shared resources there might be other providers."},{"line_number":950,"context_line":"        allocations \u003d self.get_allocations_for_consumer(consumer)"},{"line_number":951,"context_line":"        if allocations is None:"},{"line_number":952,"context_line":"            # safe_connect can return None on 404"},{"line_number":953,"context_line":"            allocations \u003d {}"},{"line_number":954,"context_line":"        return allocations.get("},{"line_number":955,"context_line":"            rp_uuid, {}).get(\u0027resources\u0027, {})"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f4e5783_06b694da","line":952,"range":{"start_line":952,"start_character":12,"end_line":952,"end_character":49},"in_reply_to":"5f4e5783_a61c6012","updated":"2017-10-12 18:42:15.000000000","message":"Yep, and I hit this in testing when I had the wrong uuid being passed in here.","commit_id":"0328d3d845d22f5adc98f4b1485bde6f711041a3"}]}
