)]}'
{"shade/_normalize.py":[{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac20553668e00843e2d2a13c1ef746618d24d2bf","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    reasons."},{"line_number":107,"context_line":"    \u0027\u0027\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _normalize_limits(self, limits):"},{"line_number":110,"context_line":"        \"\"\" Normalize a limits object. \"\"\""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        new_limits \u003d munch.Munch()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_489ff6b3","line":109,"range":{"start_line":109,"start_character":8,"end_line":109,"end_character":25},"updated":"2016-12-04 13:20:21.000000000","message":"I couldn\u0027t find a test for this specific function.","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":16615,"name":"abregman","email":"abregman@redhat.com","username":"abregman"},"change_message_id":"5694acf235ea4e9f9d4de0b739a783b42a4c56b7","unresolved":false,"context_lines":[{"line_number":106,"context_line":"    reasons."},{"line_number":107,"context_line":"    \u0027\u0027\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _normalize_limits(self, limits):"},{"line_number":110,"context_line":"        \"\"\" Normalize a limits object. \"\"\""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        new_limits \u003d munch.Munch()"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_95475376","line":109,"range":{"start_line":109,"start_character":8,"end_line":109,"end_character":25},"in_reply_to":"3a71b18c_489ff6b3","updated":"2016-12-05 09:53:47.000000000","message":"I\u0027ll update test_get_limits to test it.","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac20553668e00843e2d2a13c1ef746618d24d2bf","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    \u0027\u0027\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _normalize_limits(self, limits):"},{"line_number":110,"context_line":"        \"\"\" Normalize a limits object. \"\"\""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        new_limits \u003d munch.Munch()"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_c83dc6bc","line":110,"updated":"2016-12-04 13:20:21.000000000","message":"Documentation should specify that \u0027limits\u0027 will be modified in this function and should not be used afterwards.","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":16615,"name":"abregman","email":"abregman@redhat.com","username":"abregman"},"change_message_id":"5694acf235ea4e9f9d4de0b739a783b42a4c56b7","unresolved":false,"context_lines":[{"line_number":107,"context_line":"    \u0027\u0027\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    def _normalize_limits(self, limits):"},{"line_number":110,"context_line":"        \"\"\" Normalize a limits object. \"\"\""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"        new_limits \u003d munch.Munch()"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_b560cf02","line":110,"in_reply_to":"3a71b18c_c83dc6bc","updated":"2016-12-05 09:53:47.000000000","message":"ack.","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac20553668e00843e2d2a13c1ef746618d24d2bf","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        new_limits \u003d munch.Munch()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        # Discard noise"},{"line_number":115,"context_line":"        limits.pop(\u0027NAME_ATTR\u0027, None)"},{"line_number":116,"context_line":"        limits.pop(\u0027HUMAN_ID\u0027, None)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        new_limits[\u0027rate\u0027] \u003d limits.pop(\u0027rate\u0027)"},{"line_number":119,"context_line":"        for k, v in limits[\u0027absolute\u0027].iteritems():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_c836a6e6","line":116,"range":{"start_line":115,"start_character":8,"end_line":116,"end_character":36},"updated":"2016-12-04 13:20:21.000000000","message":"In case where more noise key need to be discarded, you\u0027ll need to add even more statement. I\u0027d prefer if you do something like:\n\n for key in [\"NAME_ATTR\", \"HUMAN_ID\"]:\n     limits.pop(key, None)\n\nAlso, \"del limits[key]\" will do the same, without then added \"None\" argument.\n\nFinally, why do you need to modify limits? the initialization of new_limits only depend on the \u0027rate\u0027 and \u0027absolute\u0027 key, so apparently once can just take what he needs and leave \u0027limits\u0027 be.","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":16615,"name":"abregman","email":"abregman@redhat.com","username":"abregman"},"change_message_id":"5694acf235ea4e9f9d4de0b739a783b42a4c56b7","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        new_limits \u003d munch.Munch()"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"        # Discard noise"},{"line_number":115,"context_line":"        limits.pop(\u0027NAME_ATTR\u0027, None)"},{"line_number":116,"context_line":"        limits.pop(\u0027HUMAN_ID\u0027, None)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        new_limits[\u0027rate\u0027] \u003d limits.pop(\u0027rate\u0027)"},{"line_number":119,"context_line":"        for k, v in limits[\u0027absolute\u0027].iteritems():"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_551f7b6b","line":116,"range":{"start_line":115,"start_character":8,"end_line":116,"end_character":36},"in_reply_to":"3a71b18c_c836a6e6","updated":"2016-12-05 09:53:47.000000000","message":"Because I don\u0027t want to have unnecessary attributes there. This is what normalize is all about.","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"ac20553668e00843e2d2a13c1ef746618d24d2bf","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        limits.pop(\u0027HUMAN_ID\u0027, None)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        new_limits[\u0027rate\u0027] \u003d limits.pop(\u0027rate\u0027)"},{"line_number":119,"context_line":"        for k, v in limits[\u0027absolute\u0027].iteritems():"},{"line_number":120,"context_line":"            new_limits[k] \u003d v"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return new_limits"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_4851b60d","line":120,"range":{"start_line":119,"start_character":8,"end_line":120,"end_character":29},"updated":"2016-12-04 13:20:21.000000000","message":"This can be initialized in a much easier fashion:\n\n new_limits \u003d munch.Munch(**limits[\u0027absolute\u0027].iteritems())\n new_limits[\u0027rate\u0027] \u003d limits.pop(\u0027rate\u0027)\n\nAnd even:\n\n new_limits \u003d munch.Munch(limits[\u0027absolute\u0027])\n\n(The constructor receives either a key-value kwargs, or a dictionary, as examplified respectively in this comment.)","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"},{"author":{"_account_id":16615,"name":"abregman","email":"abregman@redhat.com","username":"abregman"},"change_message_id":"5694acf235ea4e9f9d4de0b739a783b42a4c56b7","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        limits.pop(\u0027HUMAN_ID\u0027, None)"},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"        new_limits[\u0027rate\u0027] \u003d limits.pop(\u0027rate\u0027)"},{"line_number":119,"context_line":"        for k, v in limits[\u0027absolute\u0027].iteritems():"},{"line_number":120,"context_line":"            new_limits[k] \u003d v"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        return new_limits"},{"line_number":123,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"3a71b18c_900cc13c","line":120,"range":{"start_line":119,"start_character":8,"end_line":120,"end_character":29},"in_reply_to":"3a71b18c_4851b60d","updated":"2016-12-05 09:53:47.000000000","message":"ack","commit_id":"832f773ec96160719cf8a205af5f63a69e27ef3b"}],"shade/operatorcloud.py":[{"author":{"_account_id":7350,"name":"Jordan Pittier","email":"jordan.pittier@gmail.com","username":"JordanP"},"change_message_id":"10fa7e90d3edbe8bef93d099bba28ab531c9cd95","unresolved":false,"context_lines":[{"line_number":2150,"context_line":"        if not proj:"},{"line_number":2151,"context_line":"            raise OpenStackCloudException(\"project does not exist\")"},{"line_number":2152,"context_line":""},{"line_number":2153,"context_line":"        with _utils.neutron_exceptions("},{"line_number":2154,"context_line":"            \"Failed to get limits for the project: {} \".format(proj)):"},{"line_number":2155,"context_line":"            return self.manager.submit_task("},{"line_number":2156,"context_line":"                _tasks.NovaLimitsGet(tenant_id\u003dproj.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_a9ef8d85","line":2153,"updated":"2016-11-10 09:30:07.000000000","message":"NovaLimitsGet shouldn\"t ever raise a neutron exception.","commit_id":"1bef9f56676080e25fd823b6bfb6b454ec91af75"},{"author":{"_account_id":16615,"name":"abregman","email":"abregman@redhat.com","username":"abregman"},"change_message_id":"284c9291c6ff39e3bc246a7cbd9ee4276b53116b","unresolved":false,"context_lines":[{"line_number":2150,"context_line":"        if not proj:"},{"line_number":2151,"context_line":"            raise OpenStackCloudException(\"project does not exist\")"},{"line_number":2152,"context_line":""},{"line_number":2153,"context_line":"        with _utils.neutron_exceptions("},{"line_number":2154,"context_line":"            \"Failed to get limits for the project: {} \".format(proj)):"},{"line_number":2155,"context_line":"            return self.manager.submit_task("},{"line_number":2156,"context_line":"                _tasks.NovaLimitsGet(tenant_id\u003dproj.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_a9194d8a","line":2153,"in_reply_to":"9a629dbe_29b29d94","updated":"2016-11-10 09:33:02.000000000","message":"nvm, didn\u0027t see the \u0027neutron\u0027 :)","commit_id":"1bef9f56676080e25fd823b6bfb6b454ec91af75"},{"author":{"_account_id":16615,"name":"abregman","email":"abregman@redhat.com","username":"abregman"},"change_message_id":"8b5d153a98f99074b89799d94d207a83b073f89d","unresolved":false,"context_lines":[{"line_number":2150,"context_line":"        if not proj:"},{"line_number":2151,"context_line":"            raise OpenStackCloudException(\"project does not exist\")"},{"line_number":2152,"context_line":""},{"line_number":2153,"context_line":"        with _utils.neutron_exceptions("},{"line_number":2154,"context_line":"            \"Failed to get limits for the project: {} \".format(proj)):"},{"line_number":2155,"context_line":"            return self.manager.submit_task("},{"line_number":2156,"context_line":"                _tasks.NovaLimitsGet(tenant_id\u003dproj.id))"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a629dbe_29b29d94","line":2153,"in_reply_to":"9a629dbe_a9ef8d85","updated":"2016-11-10 09:30:56.000000000","message":"Why not?","commit_id":"1bef9f56676080e25fd823b6bfb6b454ec91af75"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"780e4c2cd39666d9837d91a66ae99bd5c4761c6e","unresolved":false,"context_lines":[{"line_number":2151,"context_line":"            raise OpenStackCloudException(\"project does not exist\")"},{"line_number":2152,"context_line":""},{"line_number":2153,"context_line":"        with _utils.shade_exceptions("},{"line_number":2154,"context_line":"            \"Failed to get limits for the project: {} \".format(proj)):"},{"line_number":2155,"context_line":"            return self.manager.submit_task("},{"line_number":2156,"context_line":"                _tasks.NovaLimitsGet(tenant_id\u003dproj.id))"}],"source_content_type":"text/x-python","patch_set":4,"id":"9a629dbe_81128b55","line":2154,"updated":"2016-11-10 15:42:29.000000000","message":"Do not attempt the entire \u0027proj\u0027 object here. Just grab the name from it.","commit_id":"fb75b415bf75be5634fa1cc69fef75846994d4c7"}]}
