)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5319,"name":"Sam Stoelinga","email":"sammiestoel@gmail.com","username":"sammiestoel"},"change_message_id":"8059af396291ba5ab4a28590c84d4e70218aaa02","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Moved some code common to all drivers into base qos driver abstract"},{"line_number":14,"context_line":"class."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partially-Implements: quantum-qos-api"},{"line_number":17,"context_line":"Change-Id: Ia9d8638b9268b5aa8512cbb9d001413751f82649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_a8dccc12","line":16,"updated":"2015-08-28 15:39:46.000000000","message":"this doesn\u0027t link to any blueprint, maybe the bp got renamed?","commit_id":"2bc0ad9eac2e32787dcfc5ed8cd16185eef917d7"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"efd40edf1eb6c5f1b04ad41a1396a576a915eec1","unresolved":false,"context_lines":[{"line_number":13,"context_line":"Moved some code common to all drivers into base qos driver abstract"},{"line_number":14,"context_line":"class."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Partially-Implements: quantum-qos-api"},{"line_number":17,"context_line":"Change-Id: Ia9d8638b9268b5aa8512cbb9d001413751f82649"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"da20952f_b9a2bbfa","line":16,"in_reply_to":"da20952f_a8dccc12","updated":"2015-08-30 06:13:58.000000000","message":"Done","commit_id":"2bc0ad9eac2e32787dcfc5ed8cd16185eef917d7"}],"neutron/agent/l2/extensions/qos.py":[{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"ddc36441aac9aaf27ee67900cd53315914670e6e","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        qos_policy \u003d self._cached_pull(context, qos_policy_id)"},{"line_number":169,"context_line":"        self.qos_driver.create(port, qos_policy)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _cached_pull(self, context, qos_policy_id):"},{"line_number":172,"context_line":"        qos_policy \u003d self.known_policies.get(qos_policy_id)"},{"line_number":173,"context_line":"        if qos_policy is None:"},{"line_number":174,"context_line":"            qos_policy \u003d self.resource_rpc.pull("}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_3e447619","line":171,"updated":"2015-09-03 17:43:58.000000000","message":"How do you know that this cache is valid? it could be that the qos_policy have changed and we received update_port before?","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"9f95dd3fda0f7c3ab9ae0b3aea97172e1b2289cb","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        qos_policy \u003d self._cached_pull(context, qos_policy_id)"},{"line_number":169,"context_line":"        self.qos_driver.create(port, qos_policy)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _cached_pull(self, context, qos_policy_id):"},{"line_number":172,"context_line":"        qos_policy \u003d self.known_policies.get(qos_policy_id)"},{"line_number":173,"context_line":"        if qos_policy is None:"},{"line_number":174,"context_line":"            qos_policy \u003d self.resource_rpc.pull("}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_6001d137","line":171,"in_reply_to":"da20952f_3e447619","updated":"2015-09-04 09:00:21.000000000","message":"I am not sure I understand the scenario.  can you explain again?","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"170c1213c89a2bb7eab2d872289a8215ee5fa3c5","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        qos_policy \u003d self._cached_pull(context, qos_policy_id)"},{"line_number":169,"context_line":"        self.qos_driver.create(port, qos_policy)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _cached_pull(self, context, qos_policy_id):"},{"line_number":172,"context_line":"        qos_policy \u003d self.known_policies.get(qos_policy_id)"},{"line_number":173,"context_line":"        if qos_policy is None:"},{"line_number":174,"context_line":"            qos_policy \u003d self.resource_rpc.pull("}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_b62df347","line":171,"in_reply_to":"da20952f_6001d137","updated":"2015-09-04 09:58:41.000000000","message":"But in that case we will receive the policy update afterwards.\n\nIt\u0027s true that for a disconnection scenario (agent gets disconnected from broker, update happens, agents connects back to broker).. but that can be fixed by a full policy resync on reconnect.","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":11343,"name":"Gal Sagie","email":"gal.sagie@gmail.com","username":"GalSagie"},"change_message_id":"ddc36441aac9aaf27ee67900cd53315914670e6e","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            # Later, we may want to apply the difference between the old and"},{"line_number":187,"context_line":"            # new rule lists."},{"line_number":188,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":189,"context_line":"            self.qos_driver.update(port, qos_policy)"},{"line_number":190,"context_line":"            self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _process_reset_port(self, port):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_be9ac66c","line":189,"updated":"2015-09-03 17:43:58.000000000","message":"if you implement update like this (with deleting the old policy) i think the proper way is to call the qos driver create method.\n\nA driver could implement an update differently then create.\n\nIf the driver implements \"update\" correctly, you call update in case there is an old_qos policy or create in case there isn\u0027t","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":12171,"name":"Moshe Levi","email":"moshele@nvidia.com","username":"moshele"},"change_message_id":"9f95dd3fda0f7c3ab9ae0b3aea97172e1b2289cb","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            # Later, we may want to apply the difference between the old and"},{"line_number":187,"context_line":"            # new rule lists."},{"line_number":188,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":189,"context_line":"            self.qos_driver.update(port, qos_policy)"},{"line_number":190,"context_line":"            self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _process_reset_port(self, port):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_c02c5d04","line":189,"in_reply_to":"da20952f_4655cabf","updated":"2015-09-04 09:00:21.000000000","message":"update can be just removing some rule from the QoS and because we get only the new policy we just reset the rules and the apply them again.\n\n\n@Miguel, we can change the update api to get the old and the new in the update api. \n\nI just was thinking on calc the delete rules so that the old policy will contains  only the going to delete rules and then we call qos_driver.delete and the new policy will contains just the update/add rules and be passed to qos_pocliy.update\n\nAlso I though we are on doing it for M. do you want to do it now?","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"92f8fcf4b2bef9a72fcb5053f98ff60565797a92","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            # Later, we may want to apply the difference between the old and"},{"line_number":187,"context_line":"            # new rule lists."},{"line_number":188,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":189,"context_line":"            self.qos_driver.update(port, qos_policy)"},{"line_number":190,"context_line":"            self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _process_reset_port(self, port):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_4655cabf","line":189,"in_reply_to":"da20952f_be9ac66c","updated":"2015-09-04 06:49:08.000000000","message":"@Ihar and @moshe gave me off-gerri reasons for that I can\u0027t remember, they sounded convincing at that time.\n\nI hope they could chime in again.\n\nI guess it\u0027s related to handling the \"old policy\", \n\nmay be we can set the interface on update, to receive an optional old_policy too (possibly having other types of mixed rules), so update can do it\u0027s own magic.","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"170c1213c89a2bb7eab2d872289a8215ee5fa3c5","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            # Later, we may want to apply the difference between the old and"},{"line_number":187,"context_line":"            # new rule lists."},{"line_number":188,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":189,"context_line":"            self.qos_driver.update(port, qos_policy)"},{"line_number":190,"context_line":"            self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def _process_reset_port(self, port):"}],"source_content_type":"text/x-python","patch_set":4,"id":"da20952f_d6a747bb","line":189,"in_reply_to":"da20952f_c02c5d04","updated":"2015-09-04 09:58:41.000000000","message":"I\u0027d provide both, I\u0027m thinking that in some cases, rules may need to be combined (like max bandwidth + min bandwidth guarantee) at application, or other combinations we probably didn\u0027t think of yet.\n\nWe could provide helpers in the policy object to allow making a diff from inside the driver.\n\n   old_qos_policy.diff_rules(qos_policy) (just thinking out loud)","commit_id":"27ca5f7182b6e80864a3c37631a4975e3453ae96"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1d6d687b5927222929412b3bd4288f2d47ccf690","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.qos_driver.initialize()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # we cannot use a dict of sets here because port dicts are not hashable"},{"line_number":123,"context_line":"        self.qos_policy_ports \u003d collections.defaultdict(dict)"},{"line_number":124,"context_line":"        self.known_policies \u003d {}"},{"line_number":125,"context_line":"        self.known_ports \u003d set()"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_d21b387f","line":123,"updated":"2015-09-09 10:36:40.000000000","message":"So why do we maintain all those sets and dicts? Can\u0027t we have some single data structure to maintain them all? Synchronizing all those on each event seems error-prone. For the very least, there could be an object that hides all house-keeping.\n\nThe benefit of it, among other things, is that you would be able to target it with tests. It\u0027s hard to reason about whether you clean up and update all those data structures where it belongs now.","commit_id":"3275c3f80f22043e7275bdbf7a1f34ebc11110a7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bf22983c12cf982f0583075c0b0fdbe13074b4a3","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self.qos_driver.initialize()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"        # we cannot use a dict of sets here because port dicts are not hashable"},{"line_number":123,"context_line":"        self.qos_policy_ports \u003d collections.defaultdict(dict)"},{"line_number":124,"context_line":"        self.known_policies \u003d {}"},{"line_number":125,"context_line":"        self.known_ports \u003d set()"},{"line_number":126,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_b137744c","line":123,"in_reply_to":"da20952f_d21b387f","updated":"2015-09-10 09:30:14.000000000","message":"I agree, that sounds good.","commit_id":"3275c3f80f22043e7275bdbf7a1f34ebc11110a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1d6d687b5927222929412b3bd4288f2d47ccf690","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        self.qos_policy_ports[qos_policy_id][port_id] \u003d port"},{"line_number":167,"context_line":"        self.known_ports.add(port_id)"},{"line_number":168,"context_line":"        qos_policy \u003d self.resource_rpc.pull("},{"line_number":169,"context_line":"            context, resources.QOS_POLICY, qos_policy_id)"},{"line_number":170,"context_line":"        self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":171,"context_line":"        self.qos_driver.create(port, qos_policy)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_5285e8aa","line":168,"updated":"2015-09-09 10:36:40.000000000","message":"(No action required) What do we do if pull raises ResourceNotFound?","commit_id":"3275c3f80f22043e7275bdbf7a1f34ebc11110a7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bf22983c12cf982f0583075c0b0fdbe13074b4a3","unresolved":false,"context_lines":[{"line_number":165,"context_line":""},{"line_number":166,"context_line":"        self.qos_policy_ports[qos_policy_id][port_id] \u003d port"},{"line_number":167,"context_line":"        self.known_ports.add(port_id)"},{"line_number":168,"context_line":"        qos_policy \u003d self.resource_rpc.pull("},{"line_number":169,"context_line":"            context, resources.QOS_POLICY, qos_policy_id)"},{"line_number":170,"context_line":"        self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":171,"context_line":"        self.qos_driver.create(port, qos_policy)"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_31bfe4ab","line":168,"in_reply_to":"da20952f_5285e8aa","updated":"2015-09-10 09:30:14.000000000","message":"That\u0027d be a race condition where \n\n1) Port is assigned a qos policy\n\n2) Port is detached from a qos policy\n\n3) policy is deleted.\n\n4) port update is processed (with the original assignment from 1)\n\n\nWe can prevent that by just logging and ignoring the request.","commit_id":"3275c3f80f22043e7275bdbf7a1f34ebc11110a7"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1d6d687b5927222929412b3bd4288f2d47ccf690","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # Later, we may want to apply the difference between the old and"},{"line_number":181,"context_line":"            # new rule lists."},{"line_number":182,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":183,"context_line":"            self.qos_driver.update(port, qos_policy)"},{"line_number":184,"context_line":"            self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def _process_reset_port(self, port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_1d47814c","line":183,"updated":"2015-09-09 10:36:40.000000000","message":"Let\u0027s say update crashes. Will we leave the port with no rules whatsoever?","commit_id":"3275c3f80f22043e7275bdbf7a1f34ebc11110a7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bf22983c12cf982f0583075c0b0fdbe13074b4a3","unresolved":false,"context_lines":[{"line_number":180,"context_line":"            # Later, we may want to apply the difference between the old and"},{"line_number":181,"context_line":"            # new rule lists."},{"line_number":182,"context_line":"            self.qos_driver.delete(port, old_qos_policy)"},{"line_number":183,"context_line":"            self.qos_driver.update(port, qos_policy)"},{"line_number":184,"context_line":"            self.known_policies[qos_policy.id] \u003d qos_policy"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def _process_reset_port(self, port):"}],"source_content_type":"text/x-python","patch_set":7,"id":"da20952f_918110fe","line":183,"in_reply_to":"da20952f_1d47814c","updated":"2015-09-10 09:30:14.000000000","message":"I believe we should *at least log it*. If update cannot be applied by the underlaying driver I don\u0027t think it\u0027s valuable to retry, not likely to be possible in a later time.\n\nWe can think about reporting this state somehow to the port status, but that\u0027d be a separate feature IMO.","commit_id":"3275c3f80f22043e7275bdbf7a1f34ebc11110a7"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            rule_types \u003d self.SUPPORTED_RULES"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            rule_types \u003d set([rule.rule_type"},{"line_number":83,"context_line":"                          for rule in self._iterate_rules(qos_policy.rules)])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        for rule_type in rule_types:"},{"line_number":86,"context_line":"            self._handle_rule_delete(port, rule_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_3b0e1c35","line":83,"updated":"2015-09-15 09:06:52.000000000","message":"Nit: Indentation","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"01a5aefc22fc6aa0713d3b64ec19ac1908e91dcb","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            rule_types \u003d self.SUPPORTED_RULES"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            rule_types \u003d set([rule.rule_type"},{"line_number":83,"context_line":"                          for rule in self._iterate_rules(qos_policy.rules)])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        for rule_type in rule_types:"},{"line_number":86,"context_line":"            self._handle_rule_delete(port, rule_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_3294d6e0","line":83,"in_reply_to":"ba15a1d1_2a10e8a7","updated":"2015-09-15 13:20:24.000000000","message":"Done","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":80,"context_line":"            rule_types \u003d self.SUPPORTED_RULES"},{"line_number":81,"context_line":"        else:"},{"line_number":82,"context_line":"            rule_types \u003d set([rule.rule_type"},{"line_number":83,"context_line":"                          for rule in self._iterate_rules(qos_policy.rules)])"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"        for rule_type in rule_types:"},{"line_number":86,"context_line":"            self._handle_rule_delete(port, rule_type)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_2a10e8a7","line":83,"in_reply_to":"ba15a1d1_3b0e1c35","updated":"2015-09-15 09:39:40.000000000","message":"hmm, yikes, flake8 didn\u0027t catch this? thanks :)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class PortPolicyMap(object):"},{"line_number":111,"context_line":"    def __init__(self):"},{"line_number":112,"context_line":"        # we cannot use a dict of sets here because port dicts are not hashable"},{"line_number":113,"context_line":"        self.qos_policy_ports \u003d collections.defaultdict(dict)"},{"line_number":114,"context_line":"        self.known_policies \u003d {}"},{"line_number":115,"context_line":"        self.port_policies \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_5b2670bb","line":112,"updated":"2015-09-15 09:06:52.000000000","message":"Where do you need to hash?","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class PortPolicyMap(object):"},{"line_number":111,"context_line":"    def __init__(self):"},{"line_number":112,"context_line":"        # we cannot use a dict of sets here because port dicts are not hashable"},{"line_number":113,"context_line":"        self.qos_policy_ports \u003d collections.defaultdict(dict)"},{"line_number":114,"context_line":"        self.known_policies \u003d {}"},{"line_number":115,"context_line":"        self.port_policies \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_aae1589c","line":112,"in_reply_to":"ba15a1d1_5b2670bb","updated":"2015-09-15 09:39:40.000000000","message":"when you try to add a port dictionary to a set(), it fails trying to hash.\n\nin L142 it\u0027d be self.qos_policy_ports[policy.id].add(port) instead.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"47ac4f15515130ba701bc9d490080038d24482ba","unresolved":false,"context_lines":[{"line_number":109,"context_line":""},{"line_number":110,"context_line":"class PortPolicyMap(object):"},{"line_number":111,"context_line":"    def __init__(self):"},{"line_number":112,"context_line":"        # we cannot use a dict of sets here because port dicts are not hashable"},{"line_number":113,"context_line":"        self.qos_policy_ports \u003d collections.defaultdict(dict)"},{"line_number":114,"context_line":"        self.known_policies \u003d {}"},{"line_number":115,"context_line":"        self.port_policies \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_9bbaa422","line":112,"in_reply_to":"ba15a1d1_aae1589c","updated":"2015-09-15 10:27:46.000000000","message":"Aaah, ok. I see. Thanks. I thought that qos_policy_ports is hashed somewhere.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def has_policy_changed(self, port, policy_id):"},{"line_number":127,"context_line":"        port_id \u003d port[\u0027port_id\u0027]"},{"line_number":128,"context_line":"        return (port_id not in self.port_policies or"},{"line_number":129,"context_line":"                self.port_policies[port_id] !\u003d policy_id)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_port_policy(self, port):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_fba0a492","line":128,"updated":"2015-09-15 09:06:52.000000000","message":"return self.port_policies.get(port_id) !\u003d policy_id","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"01a5aefc22fc6aa0713d3b64ec19ac1908e91dcb","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def has_policy_changed(self, port, policy_id):"},{"line_number":127,"context_line":"        port_id \u003d port[\u0027port_id\u0027]"},{"line_number":128,"context_line":"        return (port_id not in self.port_policies or"},{"line_number":129,"context_line":"                self.port_policies[port_id] !\u003d policy_id)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_port_policy(self, port):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_d2479a75","line":128,"in_reply_to":"ba15a1d1_ca8a8cbf","updated":"2015-09-15 13:20:24.000000000","message":"Done","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def has_policy_changed(self, port, policy_id):"},{"line_number":127,"context_line":"        port_id \u003d port[\u0027port_id\u0027]"},{"line_number":128,"context_line":"        return (port_id not in self.port_policies or"},{"line_number":129,"context_line":"                self.port_policies[port_id] !\u003d policy_id)"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def get_port_policy(self, port):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_ca8a8cbf","line":128,"in_reply_to":"ba15a1d1_fba0a492","updated":"2015-09-15 09:39:40.000000000","message":"nice, That works too, and it\u0027s indeed shorter, and easier to read.:)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                    del port_dict[port_id]"},{"line_number":155,"context_line":"                    if not port_dict:"},{"line_number":156,"context_line":"                        self.clean_policy_info(qos_policy_id)"},{"line_number":157,"context_line":"                    return True"},{"line_number":158,"context_line":"        return False"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def clean_policy_info(self, qos_policy_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_ef5a0583","line":157,"updated":"2015-09-15 09:06:52.000000000","message":"It\u0027s a little bit weird that \"clean\" method returns True or False. Makes more sense to me to raise exception in case of attempt to clean unknown port and handle the exception if needed. On L245:\n\n def _process_reset_port(self, port):\n     try:\n         self.policy_map.clean_by_port(port)\n         self.qos_driver.delete(port) \n     except NoPortFound:\n         LOG.warning(\"blablabla\")","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                    del port_dict[port_id]"},{"line_number":155,"context_line":"                    if not port_dict:"},{"line_number":156,"context_line":"                        self.clean_policy_info(qos_policy_id)"},{"line_number":157,"context_line":"                    return True"},{"line_number":158,"context_line":"        return False"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def clean_policy_info(self, qos_policy_id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_7d1ea864","line":157,"in_reply_to":"ba15a1d1_ef5a0583","updated":"2015-09-15 09:39:40.000000000","message":"You\u0027re right, that makes sense.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e3bbd5a3a2c0f802e52f3738d846d493964fcad9","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class PortNotFound(exceptions.NeutronException):"},{"line_number":113,"context_line":"    message \u003d _(\"The port was not found in the PortPolicyMap\")"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class PortPolicyMap(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_06939450","line":113,"updated":"2015-09-15 13:30:14.000000000","message":"Nit: It\u0027s always useful to carry some specific information, like port ID :) But seems like we don\u0027t use the message anywhere. Anyway, if you\u0027ll respin, please add \"Port %(port_id)s was not found in PortPolicyMap\"","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"efc1b3ab3eaf2915adf654d8c55c47863092e716","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class PortNotFound(exceptions.NeutronException):"},{"line_number":113,"context_line":"    message \u003d _(\"The port was not found in the PortPolicyMap\")"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class PortPolicyMap(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_467d0cb0","line":113,"in_reply_to":"ba15a1d1_06939450","updated":"2015-09-15 13:34:46.000000000","message":"Oh,  I thought I did, but I actually just only thought it \u0027:D","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":""},{"line_number":112,"context_line":"class PortNotFound(exceptions.NeutronException):"},{"line_number":113,"context_line":"    message \u003d _(\"The port was not found in the PortPolicyMap\")"},{"line_number":114,"context_line":""},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"class PortPolicyMap(object):"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_d926da67","line":113,"in_reply_to":"ba15a1d1_467d0cb0","updated":"2015-09-15 14:27:56.000000000","message":"Done. It\u0027s gone away.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e3bbd5a3a2c0f802e52f3738d846d493964fcad9","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    if not port_dict:"},{"line_number":160,"context_line":"                        self._clean_policy_info(qos_policy_id)"},{"line_number":161,"context_line":"                    return"},{"line_number":162,"context_line":"        raise PortNotFound(port_id\u003dport[\u0027port_id\u0027])"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _clean_policy_info(self, qos_policy_id):"},{"line_number":165,"context_line":"        del self.qos_policy_ports[qos_policy_id]"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_26c5783b","line":162,"updated":"2015-09-15 13:30:14.000000000","message":"Ha! I see you planned it :)","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1825f68314e21bce9cf9f02a7e9f4e897d00b78a","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    if not port_dict:"},{"line_number":160,"context_line":"                        self._clean_policy_info(qos_policy_id)"},{"line_number":161,"context_line":"                    return"},{"line_number":162,"context_line":"        raise PortNotFound(port_id\u003dport[\u0027port_id\u0027])"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _clean_policy_info(self, qos_policy_id):"},{"line_number":165,"context_line":"        del self.qos_policy_ports[qos_policy_id]"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_068cf433","line":162,"updated":"2015-09-15 13:35:31.000000000","message":"Your exception does not receive port_id. But overall, there is no reason not to use PortNotFound from neutron/common/exceptions.py.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    if not port_dict:"},{"line_number":160,"context_line":"                        self._clean_policy_info(qos_policy_id)"},{"line_number":161,"context_line":"                    return"},{"line_number":162,"context_line":"        raise PortNotFound(port_id\u003dport[\u0027port_id\u0027])"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _clean_policy_info(self, qos_policy_id):"},{"line_number":165,"context_line":"        del self.qos_policy_ports[qos_policy_id]"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_c744b61c","line":162,"in_reply_to":"ba15a1d1_068cf433","updated":"2015-09-15 14:27:56.000000000","message":"@ihar +1\n\nDone.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"efc1b3ab3eaf2915adf654d8c55c47863092e716","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                    if not port_dict:"},{"line_number":160,"context_line":"                        self._clean_policy_info(qos_policy_id)"},{"line_number":161,"context_line":"                    return"},{"line_number":162,"context_line":"        raise PortNotFound(port_id\u003dport[\u0027port_id\u0027])"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"    def _clean_policy_info(self, qos_policy_id):"},{"line_number":165,"context_line":"        del self.qos_policy_ports[qos_policy_id]"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_0635d4f5","line":162,"in_reply_to":"ba15a1d1_26c5783b","updated":"2015-09-15 13:34:46.000000000","message":"Yikes, but I forgot to put it into the message, it\u0027s not complaining anyway.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1825f68314e21bce9cf9f02a7e9f4e897d00b78a","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        qos_policy \u003d self.resource_rpc.pull("},{"line_number":220,"context_line":"            context, resources.QOS_POLICY, qos_policy_id)"},{"line_number":221,"context_line":"        if qos_policy is None:"},{"line_number":222,"context_line":"            LOG.warning(_LW(\"QoS policy %(qos_policy_id)s applied to port \""},{"line_number":223,"context_line":"                            \"%(port_id)s is not available on server, \""},{"line_number":224,"context_line":"                            \"it has been deleted. Skipping.\"),"},{"line_number":225,"context_line":"                        {\u0027qos_policy_id\u0027: qos_policy_id, \u0027port_id\u0027: port_id})"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_4673cc15","line":222,"updated":"2015-09-15 13:35:31.000000000","message":"I believe it\u0027s a normal situation, so WARNING -\u003e INFO?","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":219,"context_line":"        qos_policy \u003d self.resource_rpc.pull("},{"line_number":220,"context_line":"            context, resources.QOS_POLICY, qos_policy_id)"},{"line_number":221,"context_line":"        if qos_policy is None:"},{"line_number":222,"context_line":"            LOG.warning(_LW(\"QoS policy %(qos_policy_id)s applied to port \""},{"line_number":223,"context_line":"                            \"%(port_id)s is not available on server, \""},{"line_number":224,"context_line":"                            \"it has been deleted. Skipping.\"),"},{"line_number":225,"context_line":"                        {\u0027qos_policy_id\u0027: qos_policy_id, \u0027port_id\u0027: port_id})"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_61735a81","line":222,"in_reply_to":"ba15a1d1_4673cc15","updated":"2015-09-15 14:27:56.000000000","message":"Ok, yes, we\u0027re just preventing issues on a race condition doing the right thing-\u003e no policy, no rules..\n\nDone","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1825f68314e21bce9cf9f02a7e9f4e897d00b78a","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            self.policy_map.clean_by_port(port)"},{"line_number":251,"context_line":"            self.qos_driver.delete(port)"},{"line_number":252,"context_line":"        except PortNotFound:"},{"line_number":253,"context_line":"            LOG.warning(_LW(\"QoS extension did have no information about the \""},{"line_number":254,"context_line":"                            \"port %s that we were trying to reset\"),"},{"line_number":255,"context_line":"                        port[\u0027port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_2607b81d","line":253,"updated":"2015-09-15 13:35:31.000000000","message":"Again, PortNotFound can be raised when we get handle_port called before we subscribed to the updates, which is probably a normal situation, so warning seems too much.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":250,"context_line":"            self.policy_map.clean_by_port(port)"},{"line_number":251,"context_line":"            self.qos_driver.delete(port)"},{"line_number":252,"context_line":"        except PortNotFound:"},{"line_number":253,"context_line":"            LOG.warning(_LW(\"QoS extension did have no information about the \""},{"line_number":254,"context_line":"                            \"port %s that we were trying to reset\"),"},{"line_number":255,"context_line":"                        port[\u0027port_id\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_07d70e24","line":253,"in_reply_to":"ba15a1d1_2607b81d","updated":"2015-09-15 14:27:56.000000000","message":"Done","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"}],"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":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class FakeDriver(qos.QosAgentDriver):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    SUPPORTED_RULES \u003d (qos_consts.RULE_TYPE_BANDWIDTH_LIMIT, )"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def initialize(self):"},{"line_number":49,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_da781d2e","line":46,"updated":"2015-09-15 09:06:52.000000000","message":"SUPPORTED_RULES \u003d {qos_consts.RULE_TYPE_BANDWIDTH_LIMIT}\n\nSUPPORTED_RULES is a set type, not tuple","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class FakeDriver(qos.QosAgentDriver):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    SUPPORTED_RULES \u003d (qos_consts.RULE_TYPE_BANDWIDTH_LIMIT, )"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def initialize(self):"},{"line_number":49,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_fd571800","line":46,"in_reply_to":"ba15a1d1_da781d2e","updated":"2015-09-15 09:39:40.000000000","message":"+++","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"01a5aefc22fc6aa0713d3b64ec19ac1908e91dcb","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class FakeDriver(qos.QosAgentDriver):"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    SUPPORTED_RULES \u003d (qos_consts.RULE_TYPE_BANDWIDTH_LIMIT, )"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def initialize(self):"},{"line_number":49,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_d871fba9","line":46,"in_reply_to":"ba15a1d1_fd571800","updated":"2015-09-15 13:20:24.000000000","message":"Done","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        for method in (\u0027create_bandwidth_limit\u0027,"},{"line_number":72,"context_line":"                       \u0027update_bandwidth_limit\u0027,"},{"line_number":73,"context_line":"                       \u0027delete_bandwidth_limit\u0027):"},{"line_number":74,"context_line":"            mock.patch.object(self.driver, method).start()"},{"line_number":75,"context_line":"        self.policy \u003d TEST_POLICY"},{"line_number":76,"context_line":"        self.rule \u003d ("},{"line_number":77,"context_line":"            rule.QosBandwidthLimitRule(context\u003dNone, id\u003d\u0027fake_rule_id\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_1a80d545","line":74,"updated":"2015-09-15 09:06:52.000000000","message":"Given that FakeDriver is used only here and always mock, you can make it simpler by:\n\n class FakeDriver(qos.QosAgentDriver):\n\n     SUPPORTED_RULE \u003d ...\n     create_bandwidth_limit \u003d mock.Mock()  \n     update_bandwidth_limit \u003d mock.Mock()\n     delete_bandwidth_limit \u003d mock.Mock()","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"01a5aefc22fc6aa0713d3b64ec19ac1908e91dcb","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        for method in (\u0027create_bandwidth_limit\u0027,"},{"line_number":72,"context_line":"                       \u0027update_bandwidth_limit\u0027,"},{"line_number":73,"context_line":"                       \u0027delete_bandwidth_limit\u0027):"},{"line_number":74,"context_line":"            mock.patch.object(self.driver, method).start()"},{"line_number":75,"context_line":"        self.policy \u003d TEST_POLICY"},{"line_number":76,"context_line":"        self.rule \u003d ("},{"line_number":77,"context_line":"            rule.QosBandwidthLimitRule(context\u003dNone, id\u003d\u0027fake_rule_id\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_b8ca07a0","line":74,"in_reply_to":"ba15a1d1_1a80d545","updated":"2015-09-15 13:20:24.000000000","message":"True :-)\n\nI\u0027m moving those to __init__ so they are regenerated on each instance of the class.\n\nDone.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":99,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_create_with_unknown_rule_type_does_not_crash(self):"},{"line_number":102,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":103,"context_line":"        self.driver.create(self.port, self.policy)"},{"line_number":104,"context_line":"        self.driver.create_bandwidth_limit.assert_called_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_bacbe952","line":101,"updated":"2015-09-15 09:06:52.000000000","message":"I think all these three test cases (create|update|delete)_with_unknown_rule_type_does_not_crash should be squashed into the single test test__iterate_rules_with_unknown_rule_type.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"08ce8d291c3d6041a0e3783a2ec7f45191aaa834","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":99,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_create_with_unknown_rule_type_does_not_crash(self):"},{"line_number":102,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":103,"context_line":"        self.driver.create(self.port, self.policy)"},{"line_number":104,"context_line":"        self.driver.create_bandwidth_limit.assert_called_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_1645096f","line":101,"in_reply_to":"ba15a1d1_1b277465","updated":"2015-09-15 11:02:47.000000000","message":"Valid point, not still those are 3-line methods, I guess we can try and see how they look as one :)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"12b9240fd82fdbcd175d1640235ba4cccd2b8077","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":99,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_create_with_unknown_rule_type_does_not_crash(self):"},{"line_number":102,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":103,"context_line":"        self.driver.create(self.port, self.policy)"},{"line_number":104,"context_line":"        self.driver.create_bandwidth_limit.assert_called_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_1b277465","line":101,"in_reply_to":"ba15a1d1_9d8cdc80","updated":"2015-09-15 10:29:42.000000000","message":"It buys us little in test execution and in test coverage. Though test code still needs to be maintained - and eventually you\u0027ll need to maintain one method instead of three - which are basically doing the same validation. Though I don\u0027t think this is a problem, it\u0027s up to you :)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":98,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":99,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    def test_create_with_unknown_rule_type_does_not_crash(self):"},{"line_number":102,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":103,"context_line":"        self.driver.create(self.port, self.policy)"},{"line_number":104,"context_line":"        self.driver.create_bandwidth_limit.assert_called_with("}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_9d8cdc80","line":101,"in_reply_to":"ba15a1d1_bacbe952","updated":"2015-09-15 09:39:40.000000000","message":"Putting them together buys us very little, (we save some lines, ok), but in the other hand being separate will point to the guilty function(s) (one or several) if that ever happens.\n\nNot fully convinced about the idea, although it\u0027d be correct too.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            port, TEST_POLICY)"},{"line_number":165,"context_line":"        self.assertEqual(port,"},{"line_number":166,"context_line":"            self.qos_ext.policy_map.qos_policy_ports[qos_policy_id][port_id])"},{"line_number":167,"context_line":"        self.assertTrue(port_id in self.qos_ext.policy_map.port_policies)"},{"line_number":168,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":169,"context_line":"            self.qos_ext.policy_map.known_policies[qos_policy_id])"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_1a39b541","line":167,"updated":"2015-09-15 09:06:52.000000000","message":"self.assertIn(port_id, self.qos_ext.policy_map.port_policies)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            port, TEST_POLICY)"},{"line_number":165,"context_line":"        self.assertEqual(port,"},{"line_number":166,"context_line":"            self.qos_ext.policy_map.qos_policy_ports[qos_policy_id][port_id])"},{"line_number":167,"context_line":"        self.assertTrue(port_id in self.qos_ext.policy_map.port_policies)"},{"line_number":168,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":169,"context_line":"            self.qos_ext.policy_map.known_policies[qos_policy_id])"},{"line_number":170,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_9d685c89","line":167,"in_reply_to":"ba15a1d1_1a39b541","updated":"2015-09-15 09:39:40.000000000","message":"true! :)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        subscribe_mock.assert_called_with(mock.ANY, resources.QOS_POLICY)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class QosPortPolicyMapTestCase(base.BaseTestCase):"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def setUp(self):"},{"line_number":272,"context_line":"        super(QosPortPolicyMapTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_7a4f91bd","line":269,"updated":"2015-09-15 09:06:52.000000000","message":"PortPolicyMapTestCase","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        subscribe_mock.assert_called_with(mock.ANY, resources.QOS_POLICY)"},{"line_number":267,"context_line":""},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"class QosPortPolicyMapTestCase(base.BaseTestCase):"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"    def setUp(self):"},{"line_number":272,"context_line":"        super(QosPortPolicyMapTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_7de8e810","line":269,"in_reply_to":"ba15a1d1_7a4f91bd","updated":"2015-09-15 09:39:40.000000000","message":"+1","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    def test_update_policy(self):"},{"line_number":276,"context_line":"        self.policy_map.update_policy(TEST_POLICY)"},{"line_number":277,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":278,"context_line":"                         self.policy_map.get_policy(TEST_POLICY.id))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _set_ports(self):"},{"line_number":281,"context_line":"        self.policy_map.set_port_policy(TEST_PORT, TEST_POLICY)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_3abd9968","line":278,"updated":"2015-09-15 09:06:52.000000000","message":"Since this is white-box testing I would prefer:\n\n self.policy_map.known_policies[TEST_POLICY.id]","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5f535f087faed5eef0f0e618550a39784a770202","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    def test_update_policy(self):"},{"line_number":276,"context_line":"        self.policy_map.update_policy(TEST_POLICY)"},{"line_number":277,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":278,"context_line":"                         self.policy_map.get_policy(TEST_POLICY.id))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _set_ports(self):"},{"line_number":281,"context_line":"        self.policy_map.set_port_policy(TEST_PORT, TEST_POLICY)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_bd4c4043","line":278,"in_reply_to":"ba15a1d1_3abd9968","updated":"2015-09-15 09:39:40.000000000","message":"I understand in unit tests you can do white box testing, but are you obligated to it?. \n\nI see the value on big classes, but this is very tiny :)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"47ac4f15515130ba701bc9d490080038d24482ba","unresolved":false,"context_lines":[{"line_number":275,"context_line":"    def test_update_policy(self):"},{"line_number":276,"context_line":"        self.policy_map.update_policy(TEST_POLICY)"},{"line_number":277,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":278,"context_line":"                         self.policy_map.get_policy(TEST_POLICY.id))"},{"line_number":279,"context_line":""},{"line_number":280,"context_line":"    def _set_ports(self):"},{"line_number":281,"context_line":"        self.policy_map.set_port_policy(TEST_PORT, TEST_POLICY)"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_fb47201b","line":278,"in_reply_to":"ba15a1d1_bd4c4043","updated":"2015-09-15 10:27:46.000000000","message":"Well, you want to test update_policy and the validation relies on something you are actually testing later. Theoretically, if get_policy() contains bug, you\u0027d get failure in test_update_policy() too, false positive, even though update_policy works, error is in validation.","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    def test_set_port_policy(self):"},{"line_number":285,"context_line":"        self._set_ports()"},{"line_number":286,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":287,"context_line":"                         self.policy_map.get_port_policy(TEST_PORT))"},{"line_number":288,"context_line":"        self.assertEqual(TEST_POLICY2,"},{"line_number":289,"context_line":"                         self.policy_map.get_port_policy(TEST_PORT2))"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_c773657f","line":287,"updated":"2015-09-15 09:06:52.000000000","message":"ditto","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"01a5aefc22fc6aa0713d3b64ec19ac1908e91dcb","unresolved":false,"context_lines":[{"line_number":284,"context_line":"    def test_set_port_policy(self):"},{"line_number":285,"context_line":"        self._set_ports()"},{"line_number":286,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":287,"context_line":"                         self.policy_map.get_port_policy(TEST_PORT))"},{"line_number":288,"context_line":"        self.assertEqual(TEST_POLICY2,"},{"line_number":289,"context_line":"                         self.policy_map.get_port_policy(TEST_PORT2))"},{"line_number":290,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_0678748e","line":287,"in_reply_to":"ba15a1d1_c773657f","updated":"2015-09-15 13:20:24.000000000","message":"I changed this function to test_get_port_policy\n\nand added a new test_set_port_policy :-)","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"545016d3a3ae55cf2a7faebe7811f591bbbc2076","unresolved":false,"context_lines":[{"line_number":286,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":287,"context_line":"                         self.policy_map.get_port_policy(TEST_PORT))"},{"line_number":288,"context_line":"        self.assertEqual(TEST_POLICY2,"},{"line_number":289,"context_line":"                         self.policy_map.get_port_policy(TEST_PORT2))"},{"line_number":290,"context_line":""},{"line_number":291,"context_line":"    def test_get_ports(self):"},{"line_number":292,"context_line":"        self._set_ports()"}],"source_content_type":"text/x-python","patch_set":9,"id":"ba15a1d1_876d6d9a","line":289,"updated":"2015-09-15 09:06:52.000000000","message":"ditto","commit_id":"d2b327ea4bae489ca62f9f6537d57a782068980e"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e3bbd5a3a2c0f802e52f3738d846d493964fcad9","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":92,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test__interate_rules_with_unknown_rule_type(self):"},{"line_number":95,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.driver.create(self.port, self.policy)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_86500460","line":94,"updated":"2015-09-15 13:30:14.000000000","message":"Typo: interate-\u003eiterate.\n\nAnd actually this is misleading a bit. The former was better now :) I meant you should isolate testing iterate_rules in separation.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"efc1b3ab3eaf2915adf654d8c55c47863092e716","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":92,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test__interate_rules_with_unknown_rule_type(self):"},{"line_number":95,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.driver.create(self.port, self.policy)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_a1573201","line":94,"in_reply_to":"ba15a1d1_86500460","updated":"2015-09-15 13:34:46.000000000","message":"Caffeine stopped making effect, yes testing \"_iterate_rules\" makes sense.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        self.driver.delete(self.port, qos_policy\u003dNone)"},{"line_number":92,"context_line":"        self.driver.delete_bandwidth_limit.assert_called_with(self.port)"},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"    def test__interate_rules_with_unknown_rule_type(self):"},{"line_number":95,"context_line":"        self.policy.rules.append(self.fake_rule)"},{"line_number":96,"context_line":""},{"line_number":97,"context_line":"        self.driver.create(self.port, self.policy)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_d9f33a09","line":94,"in_reply_to":"ba15a1d1_a1573201","updated":"2015-09-15 14:27:56.000000000","message":"Done","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"1825f68314e21bce9cf9f02a7e9f4e897d00b78a","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    def test_update_policy(self):"},{"line_number":266,"context_line":"        self.policy_map.update_policy(TEST_POLICY)"},{"line_number":267,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":268,"context_line":"                         self.policy_map.known_policies[TEST_POLICY.id])"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def _set_ports(self):"},{"line_number":271,"context_line":"        self.policy_map.set_port_policy(TEST_PORT, TEST_POLICY)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_214c826f","line":268,"updated":"2015-09-15 13:35:31.000000000","message":"Should we validate the class using public methods? (checking correct behaviour, not correct settings inside internal data structures?)","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3f0d3ed4ff7c8ec4d537ec3af1c20607607e9a97","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    def test_update_policy(self):"},{"line_number":266,"context_line":"        self.policy_map.update_policy(TEST_POLICY)"},{"line_number":267,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":268,"context_line":"                         self.policy_map.known_policies[TEST_POLICY.id])"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def _set_ports(self):"},{"line_number":271,"context_line":"        self.policy_map.set_port_policy(TEST_PORT, TEST_POLICY)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_a15892fb","line":268,"in_reply_to":"ba15a1d1_214c826f","updated":"2015-09-15 13:38:37.000000000","message":"Actually this was mine idea, see PS9. We validate update_policy() here.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":265,"context_line":"    def test_update_policy(self):"},{"line_number":266,"context_line":"        self.policy_map.update_policy(TEST_POLICY)"},{"line_number":267,"context_line":"        self.assertEqual(TEST_POLICY,"},{"line_number":268,"context_line":"                         self.policy_map.known_policies[TEST_POLICY.id])"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def _set_ports(self):"},{"line_number":271,"context_line":"        self.policy_map.set_port_policy(TEST_PORT, TEST_POLICY)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_79ba2e0c","line":268,"in_reply_to":"ba15a1d1_a15892fb","updated":"2015-09-15 14:27:56.000000000","message":"blackbox testing vs whitebox testing... I\u0027m more of blackbox, but Jakub convinced me to test one method at a time.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"46774baa2e0e598bdd203afef9985560aa0e7e92","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        # a second time the function will indicate that the port"},{"line_number":303,"context_line":"        # may not have any policy to be deleted by raising PortNotFound"},{"line_number":304,"context_line":"        self.assertRaises(qos.PortNotFound, self.policy_map.clean_by_port,"},{"line_number":305,"context_line":"                          TEST_PORT)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        self.assertIn(TEST_POLICY2.id, self.policy_map.known_policies)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_e1268ab9","line":304,"updated":"2015-09-15 13:33:57.000000000","message":"Maybe this deserves a separate test method.","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"e90b0bea03c75000769d92311d7d1bf6b7cd00d7","unresolved":false,"context_lines":[{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        # a second time the function will indicate that the port"},{"line_number":303,"context_line":"        # may not have any policy to be deleted by raising PortNotFound"},{"line_number":304,"context_line":"        self.assertRaises(qos.PortNotFound, self.policy_map.clean_by_port,"},{"line_number":305,"context_line":"                          TEST_PORT)"},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        self.assertIn(TEST_POLICY2.id, self.policy_map.known_policies)"}],"source_content_type":"text/x-python","patch_set":11,"id":"ba15a1d1_99faa2bc","line":304,"in_reply_to":"ba15a1d1_e1268ab9","updated":"2015-09-15 14:27:56.000000000","message":"Done","commit_id":"3226aec03ee46539ed02c826d38973691902c6b5"}]}
