)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1eb8a96ecf97a0e1e2f24404c4a9acc2ba4eb5b0","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"QoS agent extension and driver refactoring"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add the following:"},{"line_number":10,"context_line":"1. Move code to be handle by the Qos Driver abstrct"},{"line_number":11,"context_line":"class to avoid code duplication."},{"line_number":12,"context_line":"2. chace the poclies to reduce pull RPC calls to server."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_bd176453","line":9,"updated":"2015-08-10 12:02:42.000000000","message":"adds","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7cdacc3698057da886c37a548025740a2a0a7f6d","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"QoS agent extension and driver refactoring"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add the following:"},{"line_number":10,"context_line":"1. Move code to be handle by the Qos Driver abstrct"},{"line_number":11,"context_line":"class to avoid code duplication."},{"line_number":12,"context_line":"2. chace the poclies to reduce pull RPC calls to server."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_9302943d","line":9,"in_reply_to":"1a4dcd0f_bd176453","updated":"2015-08-10 15:00:39.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":7,"context_line":"QoS agent extension and driver refactoring"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add the following:"},{"line_number":10,"context_line":"1. Move code to be handle by the Qos Driver abstrct"},{"line_number":11,"context_line":"class to avoid code duplication."},{"line_number":12,"context_line":"2. chace the poclies to reduce pull RPC calls to server."},{"line_number":13,"context_line":"3. support delete per rule_type or delete all rules."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_c6b946ee","line":10,"updated":"2015-08-10 10:57:52.000000000","message":"abstract","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":7,"context_line":"QoS agent extension and driver refactoring"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add the following:"},{"line_number":10,"context_line":"1. Move code to be handle by the Qos Driver abstrct"},{"line_number":11,"context_line":"class to avoid code duplication."},{"line_number":12,"context_line":"2. chace the poclies to reduce pull RPC calls to server."},{"line_number":13,"context_line":"3. support delete per rule_type or delete all rules."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_73826dca","line":10,"in_reply_to":"1a4dcd0f_c6b946ee","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch add the following:"},{"line_number":10,"context_line":"1. Move code to be handle by the Qos Driver abstrct"},{"line_number":11,"context_line":"class to avoid code duplication."},{"line_number":12,"context_line":"2. chace the poclies to reduce pull RPC calls to server."},{"line_number":13,"context_line":"3. support delete per rule_type or delete all rules."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially-Implements: quantum-qos-api"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_46ce9684","line":12,"updated":"2015-08-10 10:57:52.000000000","message":"cache :)\npolicies","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch add the following:"},{"line_number":10,"context_line":"1. Move code to be handle by the Qos Driver abstrct"},{"line_number":11,"context_line":"class to avoid code duplication."},{"line_number":12,"context_line":"2. chace the poclies to reduce pull RPC calls to server."},{"line_number":13,"context_line":"3. support delete per rule_type or delete all rules."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Partially-Implements: quantum-qos-api"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_336dc532","line":12,"in_reply_to":"1a4dcd0f_46ce9684","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"}],"neutron/agent/l2/extensions/qos.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1eb8a96ecf97a0e1e2f24404c4a9acc2ba4eb5b0","unresolved":false,"context_lines":[{"line_number":61,"context_line":"        \"\"\""},{"line_number":62,"context_line":"        self._handle_update_create_rules(\u0027update\u0027, port, qos_policy)"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    def delete(self, port, qos_policy\u003dNone):"},{"line_number":65,"context_line":"        \"\"\"Remove QoS rules from port."},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"        :param port: port object."}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_935e1975","line":64,"updated":"2015-08-10 12:02:42.000000000","message":"I don\u0027t follow that change. Why don\u0027t we just flush all supported rules for the policy? What if we miss an update that removed a rule from the list? You would leave it sitting on the port then.\n\nI know that should not happen, but it seems to me it\u0027s more safe to just flush everything instead of specific rules.\n\nI suspect that you try to optimize the case of rule flush when old policy is not known. Shouldn\u0027t we just flush everything QoS related for every new port?","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        :param port: port object."},{"line_number":68,"context_line":"        :param qos_policy: the QoS policy to be removed from port."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        # delete all rules"},{"line_number":71,"context_line":"        if qos_policy is None:"},{"line_number":72,"context_line":"            rules_type \u003d self._SUPPORTED_RULES"},{"line_number":73,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_463f7625","line":70,"updated":"2015-08-10 10:57:52.000000000","message":"I\u0027d move this comment inside the if, to make it clear","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":67,"context_line":"        :param port: port object."},{"line_number":68,"context_line":"        :param qos_policy: the QoS policy to be removed from port."},{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        # delete all rules"},{"line_number":71,"context_line":"        if qos_policy is None:"},{"line_number":72,"context_line":"            rules_type \u003d self._SUPPORTED_RULES"},{"line_number":73,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_b3c6b514","line":70,"in_reply_to":"1a4dcd0f_463f7625","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c39dd2f38cf93f96618f6753cb3d139311031890","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if qos_policy is None:"},{"line_number":72,"context_line":"            rules_type \u003d self._SUPPORTED_RULES"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            rules_type \u003d ("},{"line_number":75,"context_line":"                [rule.rule_type for rule in qos_policy.rules])"},{"line_number":76,"context_line":"        for rule_type in rules_type:"},{"line_number":77,"context_line":"            if rule_type in self._SUPPORTED_RULES:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_a680ba47","line":74,"updated":"2015-08-10 10:39:59.000000000","message":"Nit:\n rules_type \u003d [\n     rule.rule_type for rule in qos_policy.rules]","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        if qos_policy is None:"},{"line_number":72,"context_line":"            rules_type \u003d self._SUPPORTED_RULES"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            rules_type \u003d ("},{"line_number":75,"context_line":"                [rule.rule_type for rule in qos_policy.rules])"},{"line_number":76,"context_line":"        for rule_type in rules_type:"},{"line_number":77,"context_line":"            if rule_type in self._SUPPORTED_RULES:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_93d5b9ba","line":74,"in_reply_to":"1a4dcd0f_a680ba47","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1eb8a96ecf97a0e1e2f24404c4a9acc2ba4eb5b0","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            rules_type \u003d self._SUPPORTED_RULES"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            rules_type \u003d ("},{"line_number":75,"context_line":"                [rule.rule_type for rule in qos_policy.rules])"},{"line_number":76,"context_line":"        for rule_type in rules_type:"},{"line_number":77,"context_line":"            if rule_type in self._SUPPORTED_RULES:"},{"line_number":78,"context_line":"                self._handle_rule_delete(port, rule_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_93ba996d","line":75,"updated":"2015-08-10 12:02:42.000000000","message":"In create_update, we log on unknown rule type, but not here.","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7cdacc3698057da886c37a548025740a2a0a7f6d","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            rules_type \u003d self._SUPPORTED_RULES"},{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            rules_type \u003d ("},{"line_number":75,"context_line":"                [rule.rule_type for rule in qos_policy.rules])"},{"line_number":76,"context_line":"        for rule_type in rules_type:"},{"line_number":77,"context_line":"            if rule_type in self._SUPPORTED_RULES:"},{"line_number":78,"context_line":"                self._handle_rule_delete(port, rule_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_73f7c859","line":75,"in_reply_to":"1a4dcd0f_93ba996d","updated":"2015-08-10 15:00:39.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c39dd2f38cf93f96618f6753cb3d139311031890","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _handle_rule_delete(self, port, rule_type):"},{"line_number":81,"context_line":"        handler_name \u003d (\"\".join((\"_delete_\", rule_type)))"},{"line_number":82,"context_line":"        handler \u003d getattr(self, handler_name)"},{"line_number":83,"context_line":"        handler(port)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_0655eec4","line":81,"updated":"2015-08-10 10:39:59.000000000","message":"Nit: parenthesis are not needed","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1eb8a96ecf97a0e1e2f24404c4a9acc2ba4eb5b0","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _handle_rule_delete(self, port, rule_type):"},{"line_number":81,"context_line":"        handler_name \u003d (\"\".join((\"_delete_\", rule_type)))"},{"line_number":82,"context_line":"        handler \u003d getattr(self, handler_name)"},{"line_number":83,"context_line":"        handler(port)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_d3f2616f","line":81,"updated":"2015-08-10 12:02:42.000000000","message":"So shouldn\u0027t we have those handler names non-private? (Meaning, not starting from underscore). Can we document somehow which handlers are qos drivers expected to implement?","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":78,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    def _handle_rule_delete(self, port, rule_type):"},{"line_number":81,"context_line":"        handler_name \u003d (\"\".join((\"_delete_\", rule_type)))"},{"line_number":82,"context_line":"        handler \u003d getattr(self, handler_name)"},{"line_number":83,"context_line":"        handler(port)"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_53d891ef","line":81,"in_reply_to":"1a4dcd0f_0655eec4","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c39dd2f38cf93f96618f6753cb3d139311031890","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def _handle_update_create_rules(self, action, port, qos_policy):"},{"line_number":86,"context_line":"        for rule in qos_policy.rules:"},{"line_number":87,"context_line":"            if rule.rule_type in self._SUPPORTED_RULES:"},{"line_number":88,"context_line":"                handler_name \u003d (\"\".join((\"_\", action, \"_\", rule.rule_type)))"},{"line_number":89,"context_line":"                handler \u003d getattr(self, handler_name)"},{"line_number":90,"context_line":"                handler(port, rule)"},{"line_number":91,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_c604e6c7","line":88,"updated":"2015-08-10 10:39:59.000000000","message":"Ditto","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    def _handle_update_create_rules(self, action, port, qos_policy):"},{"line_number":86,"context_line":"        for rule in qos_policy.rules:"},{"line_number":87,"context_line":"            if rule.rule_type in self._SUPPORTED_RULES:"},{"line_number":88,"context_line":"                handler_name \u003d (\"\".join((\"_\", action, \"_\", rule.rule_type)))"},{"line_number":89,"context_line":"                handler \u003d getattr(self, handler_name)"},{"line_number":90,"context_line":"                handler(port, rule)"},{"line_number":91,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_3302a53f","line":88,"in_reply_to":"1a4dcd0f_c604e6c7","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c39dd2f38cf93f96618f6753cb3d139311031890","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                handler(port, rule)"},{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                LOG.warning(_LW(\u0027Unsupported QoS rule type for %(rule_id)s: \u0027"},{"line_number":93,"context_line":"                            \u0027%(rule_type)s; skipping\u0027),"},{"line_number":94,"context_line":"                            {\u0027rule_id\u0027: rule.id, \u0027rule_type\u0027: rule.rule_type})"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_86257e5d","line":93,"updated":"2015-08-10 10:39:59.000000000","message":"Nit: Wrong indentation","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":90,"context_line":"                handler(port, rule)"},{"line_number":91,"context_line":"            else:"},{"line_number":92,"context_line":"                LOG.warning(_LW(\u0027Unsupported QoS rule type for %(rule_id)s: \u0027"},{"line_number":93,"context_line":"                            \u0027%(rule_type)s; skipping\u0027),"},{"line_number":94,"context_line":"                            {\u0027rule_id\u0027: rule.id, \u0027rule_type\u0027: rule.rule_type})"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_d3c021e3","line":93,"in_reply_to":"1a4dcd0f_86257e5d","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        # TODO(QoS): handle race condition between push and pull APIs"},{"line_number":152,"context_line":"        self.qos_policy_ports[qos_policy_id][port_id] \u003d port"},{"line_number":153,"context_line":"        self.known_ports.add(port_id)"},{"line_number":154,"context_line":"        if qos_policy_id not in self.known_policies:"},{"line_number":155,"context_line":"            qos_policy \u003d self.resource_rpc.pull("},{"line_number":156,"context_line":"                context, resources.QOS_POLICY, qos_policy_id)"},{"line_number":157,"context_line":"            self.known_policies[qos_policy_id] \u003d qos_policy"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_bafe8a03","line":154,"updated":"2015-08-10 10:57:52.000000000","message":"you could refactor this block to a _cached_pull function :)","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":151,"context_line":"        # TODO(QoS): handle race condition between push and pull APIs"},{"line_number":152,"context_line":"        self.qos_policy_ports[qos_policy_id][port_id] \u003d port"},{"line_number":153,"context_line":"        self.known_ports.add(port_id)"},{"line_number":154,"context_line":"        if qos_policy_id not in self.known_policies:"},{"line_number":155,"context_line":"            qos_policy \u003d self.resource_rpc.pull("},{"line_number":156,"context_line":"                context, resources.QOS_POLICY, qos_policy_id)"},{"line_number":157,"context_line":"            self.known_policies[qos_policy_id] \u003d qos_policy"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_1355291c","line":154,"in_reply_to":"1a4dcd0f_bafe8a03","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1eb8a96ecf97a0e1e2f24404c4a9acc2ba4eb5b0","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.qos_driver.create(port, qos_policy)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _process_update_policy(self, qos_policy):"},{"line_number":163,"context_line":"        for port in six.itervalues(self.qos_policy_ports[qos_policy.id]):"},{"line_number":164,"context_line":"            # TODO(QoS): for now, just reflush the rules on the port. Later, we"},{"line_number":165,"context_line":"            # may want to apply the difference between the rules lists only."},{"line_number":166,"context_line":"            old_qos_policy \u003d self.known_policies.get(qos_policy.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_73434d6d","line":163,"updated":"2015-08-10 12:02:42.000000000","message":"Some people claim we should not use itervalues and instead just iterate with .values() (for port in self.qos_policy_ports[...]).","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7cdacc3698057da886c37a548025740a2a0a7f6d","unresolved":false,"context_lines":[{"line_number":160,"context_line":"        self.qos_driver.create(port, qos_policy)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _process_update_policy(self, qos_policy):"},{"line_number":163,"context_line":"        for port in six.itervalues(self.qos_policy_ports[qos_policy.id]):"},{"line_number":164,"context_line":"            # TODO(QoS): for now, just reflush the rules on the port. Later, we"},{"line_number":165,"context_line":"            # may want to apply the difference between the rules lists only."},{"line_number":166,"context_line":"            old_qos_policy \u003d self.known_policies.get(qos_policy.id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_9c95c141","line":163,"in_reply_to":"1a4dcd0f_73434d6d","updated":"2015-08-10 15:00:39.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _process_update_policy(self, qos_policy):"},{"line_number":163,"context_line":"        for port in six.itervalues(self.qos_policy_ports[qos_policy.id]):"},{"line_number":164,"context_line":"            # TODO(QoS): for now, just reflush the rules on the port. Later, we"},{"line_number":165,"context_line":"            # may want to apply the difference between the rules lists only."},{"line_number":166,"context_line":"            old_qos_policy \u003d self.known_policies.get(qos_policy.id)"},{"line_number":167,"context_line":"            # we can be optimize it by rules diff between old and new"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_3a411a3a","line":164,"updated":"2015-08-10 10:57:52.000000000","message":"I\u0027d change this to a NOTE, we should not plan to do this in this cycle IMHO.","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def _process_update_policy(self, qos_policy):"},{"line_number":163,"context_line":"        for port in six.itervalues(self.qos_policy_ports[qos_policy.id]):"},{"line_number":164,"context_line":"            # TODO(QoS): for now, just reflush the rules on the port. Later, we"},{"line_number":165,"context_line":"            # may want to apply the difference between the rules lists only."},{"line_number":166,"context_line":"            old_qos_policy \u003d self.known_policies.get(qos_policy.id)"},{"line_number":167,"context_line":"            # we can be optimize it by rules diff between old and new"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_09ee5aec","line":164,"in_reply_to":"1a4dcd0f_3a411a3a","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # TODO(QoS): for now, just reflush the rules on the port. Later, we"},{"line_number":165,"context_line":"            # may want to apply the difference between the rules lists only."},{"line_number":166,"context_line":"            old_qos_policy \u003d self.known_policies.get(qos_policy.id)"},{"line_number":167,"context_line":"            # we can be optimize it by rules diff between old and new"},{"line_number":168,"context_line":"            # policy"},{"line_number":169,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":170,"context_line":"            self.qos_driver.update(port, qos_policy)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_fab8922c","line":167,"updated":"2015-08-10 10:57:52.000000000","message":"This is redundant with the above TODO, please update to a NOTE, and move it to this point if you want.","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            # TODO(QoS): for now, just reflush the rules on the port. Later, we"},{"line_number":165,"context_line":"            # may want to apply the difference between the rules lists only."},{"line_number":166,"context_line":"            old_qos_policy \u003d self.known_policies.get(qos_policy.id)"},{"line_number":167,"context_line":"            # we can be optimize it by rules diff between old and new"},{"line_number":168,"context_line":"            # policy"},{"line_number":169,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":170,"context_line":"            self.qos_driver.update(port, qos_policy)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_2e68fcb9","line":167,"in_reply_to":"1a4dcd0f_fab8922c","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        port_id \u003d port[\u0027port_id\u0027]"},{"line_number":175,"context_line":"        if port_id in self.known_ports:"},{"line_number":176,"context_line":"            self.known_ports.remove(port_id)"},{"line_number":177,"context_line":"            for qos_policy_id, port_dict in self.qos_policy_ports.items():"},{"line_number":178,"context_line":"                if port_id in port_dict:"},{"line_number":179,"context_line":"                    del port_dict[port_id]"},{"line_number":180,"context_line":"                    self.qos_driver.delete(port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_1ad8de1c","line":177,"updated":"2015-08-10 10:57:52.000000000","message":"This function is growing as a cascade of blocks ;)\n\nCan we refactor from this block into a \n\n_cleanup_cached_port_info ? or some other function name that makes more sense? :)","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        port_id \u003d port[\u0027port_id\u0027]"},{"line_number":175,"context_line":"        if port_id in self.known_ports:"},{"line_number":176,"context_line":"            self.known_ports.remove(port_id)"},{"line_number":177,"context_line":"            for qos_policy_id, port_dict in self.qos_policy_ports.items():"},{"line_number":178,"context_line":"                if port_id in port_dict:"},{"line_number":179,"context_line":"                    del port_dict[port_id]"},{"line_number":180,"context_line":"                    self.qos_driver.delete(port)"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_e9f0cecb","line":177,"in_reply_to":"1a4dcd0f_1ad8de1c","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c39dd2f38cf93f96618f6753cb3d139311031890","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                if port_id in port_dict:"},{"line_number":179,"context_line":"                    del port_dict[port_id]"},{"line_number":180,"context_line":"                    self.qos_driver.delete(port)"},{"line_number":181,"context_line":"                    if len(self.qos_policy_ports[qos_policy_id]) \u003d\u003d 0:"},{"line_number":182,"context_line":"                        del self.qos_policy_ports[qos_policy_id]"},{"line_number":183,"context_line":"                        del self.known_policies[qos_policy_id]"},{"line_number":184,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_06b96e2e","line":181,"updated":"2015-08-10 10:39:59.000000000","message":"if not self.qos_policy_ports[qos_policy_id]","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"041fb528e404eae09b872763bb2ada96774beeb1","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                if port_id in port_dict:"},{"line_number":179,"context_line":"                    del port_dict[port_id]"},{"line_number":180,"context_line":"                    self.qos_driver.delete(port)"},{"line_number":181,"context_line":"                    if len(self.qos_policy_ports[qos_policy_id]) \u003d\u003d 0:"},{"line_number":182,"context_line":"                        del self.qos_policy_ports[qos_policy_id]"},{"line_number":183,"context_line":"                        del self.known_policies[qos_policy_id]"},{"line_number":184,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_49e4620c","line":181,"in_reply_to":"1a4dcd0f_06b96e2e","updated":"2015-08-10 13:20:43.000000000","message":"Done","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9837b85b8bccfce0bed3b8f7067648e3984fbb60","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            rules_type \u003d [rule.rule_type for rule in qos_policy.rules]"},{"line_number":75,"context_line":"        for rule_type in rules_type:"},{"line_number":76,"context_line":"            if rule_type in self._SUPPORTED_RULES:"},{"line_number":77,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":78,"context_line":"            else:"},{"line_number":79,"context_line":"                LOG.warning(_LW(\u0027Unsupported QoS rule type for delete: \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_67586257","line":76,"updated":"2015-08-10 14:24:19.000000000","message":"nit: you could eliminate a potential code path by moving this check into the \u0027else\u0027?","commit_id":"c6840a38285d6f0fbc3df24cfc69cae74641c2eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b7399f31092a730277c1c05ca7bdcb6ee9215625","unresolved":false,"context_lines":[{"line_number":73,"context_line":"        else:"},{"line_number":74,"context_line":"            rules_type \u003d [rule.rule_type for rule in qos_policy.rules]"},{"line_number":75,"context_line":"        for rule_type in rules_type:"},{"line_number":76,"context_line":"            if rule_type in self._SUPPORTED_RULES:"},{"line_number":77,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":78,"context_line":"            else:"},{"line_number":79,"context_line":"                LOG.warning(_LW(\u0027Unsupported QoS rule type for delete: \u0027"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_a854f753","line":76,"in_reply_to":"1a4dcd0f_67586257","updated":"2015-08-10 14:59:03.000000000","message":"Done","commit_id":"c6840a38285d6f0fbc3df24cfc69cae74641c2eb"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"9837b85b8bccfce0bed3b8f7067648e3984fbb60","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":78,"context_line":"            else:"},{"line_number":79,"context_line":"                LOG.warning(_LW(\u0027Unsupported QoS rule type for delete: \u0027"},{"line_number":80,"context_line":"                                \u0027skipping\u0027), {\u0027rule_type\u0027: rule_type})"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _handle_rule_delete(self, port, rule_type):"},{"line_number":83,"context_line":"        handler_name \u003d \"\".join((\"delete_\", rule_type))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_c77296e3","line":80,"updated":"2015-08-10 14:24:19.000000000","message":"Missing \u0027%(rule_type)s\u0027?","commit_id":"c6840a38285d6f0fbc3df24cfc69cae74641c2eb"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"b7399f31092a730277c1c05ca7bdcb6ee9215625","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                self._handle_rule_delete(port, rule_type)"},{"line_number":78,"context_line":"            else:"},{"line_number":79,"context_line":"                LOG.warning(_LW(\u0027Unsupported QoS rule type for delete: \u0027"},{"line_number":80,"context_line":"                                \u0027skipping\u0027), {\u0027rule_type\u0027: rule_type})"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _handle_rule_delete(self, port, rule_type):"},{"line_number":83,"context_line":"        handler_name \u003d \"\".join((\"delete_\", rule_type))"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_2860e734","line":80,"in_reply_to":"1a4dcd0f_c77296e3","updated":"2015-08-10 14:59:03.000000000","message":"Done","commit_id":"c6840a38285d6f0fbc3df24cfc69cae74641c2eb"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"393c459105f3ff9d191f15fa566da3e587ded150","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    # update_\u003ctype\u003e"},{"line_number":46,"context_line":"    # delete_\u003ctype\u003e"},{"line_number":47,"context_line":"    #"},{"line_number":48,"context_line":"    # where \u003ctype\u003e is one of VALID_RULE_TYPES"},{"line_number":49,"context_line":"    SUPPORTED_RULES \u003d set()"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    @abc.abstractmethod"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_bfe74a11","line":48,"updated":"2015-08-10 15:36:38.000000000","message":"one of SUPPORTED_RULES?","commit_id":"ef99ffcce200846a925da59c795a644efdda7012"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"393c459105f3ff9d191f15fa566da3e587ded150","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        \"\"\""},{"line_number":70,"context_line":"        self._handle_update_create_rules(\u0027update\u0027, port, qos_policy)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def delete(self, port, qos_policy\u003dNone):"},{"line_number":73,"context_line":"        \"\"\"Remove QoS rules from port."},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"        :param port: port object."}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_5c0894d9","line":72,"updated":"2015-08-10 15:36:38.000000000","message":"Given that SUPPORTED_RULES is \"read-only\" we can use it here and remove the L78 condition.","commit_id":"ef99ffcce200846a925da59c795a644efdda7012"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"393c459105f3ff9d191f15fa566da3e587ded150","unresolved":false,"context_lines":[{"line_number":79,"context_line":"            rule_types \u003d self.SUPPORTED_RULES"},{"line_number":80,"context_line":"        else:"},{"line_number":81,"context_line":"            rule_types \u003d [rule.rule_type"},{"line_number":82,"context_line":"                          for rule in self._iterate_rules(qos_policy.rules)]"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        for rule_type in rule_types:"},{"line_number":85,"context_line":"            self._handle_rule_delete(port, rule_type)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_1c29ac37","line":82,"updated":"2015-08-10 15:36:38.000000000","message":"There is an inconsistency that rule_types are set() or list()","commit_id":"ef99ffcce200846a925da59c795a644efdda7012"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"393c459105f3ff9d191f15fa566da3e587ded150","unresolved":false,"context_lines":[{"line_number":121,"context_line":"        # we cannot use a dict of sets here because port dicts are not hashable"},{"line_number":122,"context_line":"        self.qos_policy_ports \u003d collections.defaultdict(dict)"},{"line_number":123,"context_line":"        self.known_policies \u003d {}"},{"line_number":124,"context_line":"        self.known_ports \u003d set()"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        registry.subscribe(self._handle_notification, resources.QOS_POLICY)"},{"line_number":127,"context_line":"        self._register_rpc_consumers(connection)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_3fb6dadc","line":124,"updated":"2015-08-10 15:36:38.000000000","message":"I think we should think about better data structure here as we need to handle a lot of redundant info later in the code.","commit_id":"ef99ffcce200846a925da59c795a644efdda7012"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"393c459105f3ff9d191f15fa566da3e587ded150","unresolved":false,"context_lines":[{"line_number":202,"context_line":"    def _cleanup_cached_policy_info(self, qos_policy_id):"},{"line_number":203,"context_line":"        if not self.qos_policy_ports[qos_policy_id]:"},{"line_number":204,"context_line":"            del self.qos_policy_ports[qos_policy_id]"},{"line_number":205,"context_line":"            self.known_policies.remove(qos_policy_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1a4dcd0f_df4fb6bc","line":205,"updated":"2015-08-10 15:36:38.000000000","message":"del self.known_policies?","commit_id":"ef99ffcce200846a925da59c795a644efdda7012"}],"neutron/plugins/ml2/drivers/openvswitch/agent/extension_drivers/qos_driver.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"6e601b993472c9738826b3f58b1c9de33fdc8809","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def initialize(self):"},{"line_number":36,"context_line":"        self.br_int \u003d ovs_lib.OVSBridge(self.br_int_name)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _create_bandwidth_limit(self, port, rule):"},{"line_number":39,"context_line":"        self._update_bandwidth_limit(port, rule)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _update_bandwidth_limit(self, port, rule):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_bac68a14","line":38,"updated":"2015-08-10 10:57:52.000000000","message":"I\u0027d document somehow in the top driver class, the functions that we expect down the line.\n\n_{create,update,delete}_{rule_type} ...","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1eb8a96ecf97a0e1e2f24404c4a9acc2ba4eb5b0","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    def initialize(self):"},{"line_number":36,"context_line":"        self.br_int \u003d ovs_lib.OVSBridge(self.br_int_name)"},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    def _create_bandwidth_limit(self, port, rule):"},{"line_number":39,"context_line":"        self._update_bandwidth_limit(port, rule)"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    def _update_bandwidth_limit(self, port, rule):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_ee8f7473","line":38,"in_reply_to":"1a4dcd0f_bac68a14","updated":"2015-08-10 12:02:42.000000000","message":"Exactly! And those should not be private!","commit_id":"2997e399409447e5f986f26669a78189158c3f08"}],"neutron/tests/unit/agent/l2/extensions/test_qos.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"c39dd2f38cf93f96618f6753cb3d139311031890","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a4dcd0f_466d3631","updated":"2015-08-10 10:39:59.000000000","message":"Can you also add unittests for QosAgentDriver methods delete(), _handle_rule_delete() and _handle_update_create_rules()?\n\nAlso QosAgentExtension is not covered with UT at all.","commit_id":"2997e399409447e5f986f26669a78189158c3f08"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7cdacc3698057da886c37a548025740a2a0a7f6d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"1a4dcd0f_c70e1632","in_reply_to":"1a4dcd0f_466d3631","updated":"2015-08-10 15:00:39.000000000","message":"\"Also QosAgentExtension is not covered with UT at all\" What do you mean? It\u0027s covered by all tests that are present here.","commit_id":"2997e399409447e5f986f26669a78189158c3f08"}]}
