)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a62640d586be03ab3569e40f8fd58f2f32a9a416","unresolved":false,"context_lines":[{"line_number":20,"context_line":"This patchset is to let the extension construct the response dictionary"},{"line_number":21,"context_line":"gracefully for those existing network."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: I73abc98d83372f6259f17680806e6541458e2077"},{"line_number":24,"context_line":"Closes-bug: 1461519"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5afe65bd_d4c5383c","line":23,"updated":"2015-06-04 00:18:05.000000000","message":"Can you please add:\n\nCloses-Bug: #1461647","commit_id":"0d10234901c09f7043157ad9a661097b06233f2f"},{"author":{"_account_id":12955,"name":"Aman Kumar","email":"aman.kumar3@hpe.com","username":"amank"},"change_message_id":"ab3df990403644c6150cd1bee8d954921bab729a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kahou Lei \u003ckahou82@gmail.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-06-08 09:37:31 -0700"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"net-list should return gracefully for existing non port security enabled network"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Steps to reproduce:"},{"line_number":10,"context_line":"1. Turn off port enable security flag from ml2 plugin, restart neutron service"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"3afb71cf_e80bab28","line":7,"updated":"2015-06-09 09:10:30.000000000","message":"Commit message title should not have more than 72 characters.\n\nAccording to this doc https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"6d548c6f301f994e53d53db8593c523ad8bfb9ad"}],"neutron/plugins/ml2/extensions/port_security.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"849a7aed245888f56863428187350e4136a8f416","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def extend_port_dict(self, session, db_data, result):"},{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":1,"id":"5afe65bd_54582832","line":65,"updated":"2015-06-04 00:02:08.000000000","message":"Why not treat None as port_security \u003d True (The default?)\n\nThis is very weird but a related bug was reported today:\nhttps://bugs.launchpad.net/neutron/+bug/1461647\n\nIf port_security is enabled but you create a network directly via the plugin and not via the API, and don\u0027t set port_security, then this code bombs out when it shouldn\u0027t. I think we should change it so that if the port_security key is not there then we treat it as the default (i.e. make it an optional parameter).","commit_id":"0d10234901c09f7043157ad9a661097b06233f2f"},{"author":{"_account_id":14064,"name":"Kahou Lei","email":"kahou82@gmail.com","username":"kahou82"},"change_message_id":"cf904eb13ee65c0c3e04efbfa19bc1e4cefee263","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def extend_port_dict(self, session, db_data, result):"},{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":1,"id":"5afe65bd_6186bf66","line":65,"in_reply_to":"5afe65bd_54582832","updated":"2015-06-04 03:00:57.000000000","message":"Hi Assaf,\n\nI don\u0027t quite get what you mean by \"Why not treat None as port_security \u003d True (The default?)\" as the default.\n\nCan you be more specific? \n\nThanks.","commit_id":"0d10234901c09f7043157ad9a661097b06233f2f"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"935d3face56386f1febd77a93fd7a6b1a239669f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def extend_port_dict(self, session, db_data, result):"},{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":1,"id":"5afe65bd_14fbd0c2","line":65,"in_reply_to":"5afe65bd_54582832","updated":"2015-06-04 00:08:11.000000000","message":"Reading this again, I suppose what I suggested is actually what you\u0027re doing. I guess I\u0027m saying that maybe the warning is actually unwarranted.","commit_id":"0d10234901c09f7043157ad9a661097b06233f2f"},{"author":{"_account_id":10965,"name":"Magesh GV","email":"mageshgv@gmail.com","username":"mageshgv"},"change_message_id":"7a15655f7266df30a21b4deff3eac0fa195e53bc","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            LOG.warn(_LW(\"Unable to retrieve port_security for %s\") %"},{"line_number":71,"context_line":"                     db_data[\u0027name\u0027])"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_bcf3be9d","line":69,"updated":"2015-06-04 03:52:22.000000000","message":"I would suggest something like this:\n\nif db_data[\u0027port_security\u0027] is not None:\n    response_data[psec.PORTSECURITY] \u003d (db_data[\u0027port_security\u0027][psec.PORTSECURITY])\nelse:\n   response_data[psec.PORTSECURITY] \u003d True\n\nThis is because with port security extension loaded, the calling applications may expect this field to be present.","commit_id":"899adf03a4a033b70cc9abaaf9a90b27da5beb42"},{"author":{"_account_id":14064,"name":"Kahou Lei","email":"kahou82@gmail.com","username":"kahou82"},"change_message_id":"f62c384267657530c7cfa3161f862fb4c4e6f271","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            LOG.warn(_LW(\"Unable to retrieve port_security for %s\") %"},{"line_number":71,"context_line":"                     db_data[\u0027name\u0027])"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_ec6048a7","line":69,"in_reply_to":"5afe65bd_b45069d5","updated":"2015-06-04 16:46:50.000000000","message":"Done.\n\nJust a side question, do we need to update the existing network model then?","commit_id":"899adf03a4a033b70cc9abaaf9a90b27da5beb42"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a4966875ff900814a6ef923c7fc32c4a9a26f5de","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"},{"line_number":69,"context_line":"        else:"},{"line_number":70,"context_line":"            LOG.warn(_LW(\"Unable to retrieve port_security for %s\") %"},{"line_number":71,"context_line":"                     db_data[\u0027name\u0027])"},{"line_number":72,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5afe65bd_b45069d5","line":69,"in_reply_to":"5afe65bd_bcf3be9d","updated":"2015-06-04 11:56:04.000000000","message":"Magesh explained my intent better than I could :)","commit_id":"899adf03a4a033b70cc9abaaf9a90b27da5beb42"},{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"2fee8c989d4350fefdb2a5511b36d155bde53661","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"},{"line_number":69,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_f6d09ecb","line":66,"updated":"2015-06-05 05:58:18.000000000","message":"hmmm... if I do this I get a key, error but this might be a different type of object: \n\u003e\u003e\u003e mydict\u003d{}\n\u003e\u003e\u003e if mydict[\u0027nothere\u0027] is not None:\n...     print \"ok\"\n... \nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nKeyError: \u0027nothere\u0027\n\u003e\u003e\u003e\nmay be use a try/except block here.","commit_id":"96544a227a750f1d993ce748523ae3e3682cf721"},{"author":{"_account_id":14064,"name":"Kahou Lei","email":"kahou82@gmail.com","username":"kahou82"},"change_message_id":"dbb515d26fd051a8b8f4229d2756eac88223d7b8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if db_data[\u0027port_security\u0027] is not None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":68,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"},{"line_number":69,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_7372474b","line":66,"in_reply_to":"3afb71cf_f6d09ecb","updated":"2015-06-08 03:09:30.000000000","message":"Added key check","commit_id":"96544a227a750f1d993ce748523ae3e3682cf721"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7b85daf703600c28e5f510c2b3cc1c8655affabf","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def extend_port_dict(self, session, db_data, result):"},{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if \u0027port_security\u0027 not in db_data:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d True"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_69eedab5","line":65,"updated":"2015-06-08 05:52:16.000000000","message":"The case where it is None and when it\u0027s gone are the same (set to True) so compress the logic to reflect that.\n\nif db_data.get(\u0027port_security\u0027) is not None:\n    response_data[psec.PORTSECURITY] \u003d (\n        db_data[\u0027port_security\u0027][psec.PORTSECURITY])\nelse:\n    response_data[psec.PORTSECURITY] \u003d True","commit_id":"d3cf95e44a3b2f16c969a20351e12610498392c6"},{"author":{"_account_id":14064,"name":"Kahou Lei","email":"kahou82@gmail.com","username":"kahou82"},"change_message_id":"01deb9cd662e1f81f6d33d19aa832f13cf1e8843","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    def extend_port_dict(self, session, db_data, result):"},{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if \u0027port_security\u0027 not in db_data:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d True"},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_1f053bbb","line":65,"in_reply_to":"3afb71cf_69eedab5","updated":"2015-06-08 16:46:46.000000000","message":"Done","commit_id":"d3cf95e44a3b2f16c969a20351e12610498392c6"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"79a6813b327098decfd0f7454ac82959e5e5d1f1","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if \u0027port_security\u0027 not in db_data or db_data[\u0027port_security\u0027] is None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d True"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_5ec39457","line":66,"updated":"2015-06-22 19:38:52.000000000","message":"+1 to \u0027if db_data.get(\u0027port_security\u0027) is None:\u0027","commit_id":"6d548c6f301f994e53d53db8593c523ad8bfb9ad"},{"author":{"_account_id":10965,"name":"Magesh GV","email":"mageshgv@gmail.com","username":"mageshgv"},"change_message_id":"815325e2c1c296e9ba731837630f992b81120e86","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if \u0027port_security\u0027 not in db_data or db_data[\u0027port_security\u0027] is None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d True"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_dde66f14","line":66,"updated":"2015-06-09 08:30:36.000000000","message":"These two checks can be combined into a single check as was done earlier.\nif db_data.get(\u0027port_security\u0027) is None:","commit_id":"6d548c6f301f994e53d53db8593c523ad8bfb9ad"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"21bf659ff064eb89c4e9fbb09fcd9681a1191108","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if \u0027port_security\u0027 not in db_data or db_data[\u0027port_security\u0027] is None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d True"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"3afb71cf_3f109b56","line":66,"in_reply_to":"3afb71cf_dde66f14","updated":"2015-06-10 10:00:21.000000000","message":"can \"\u0027port_security\u0027 not in db_data\" be true?\n\nlooking at the backtrace in the bug report,\nit seems db_data[\u0027port_security\u0027] was None.","commit_id":"6d548c6f301f994e53d53db8593c523ad8bfb9ad"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"c74d8946000778b2f1cba17e52d577c57c49a024","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        self._extend_port_security_dict(result, db_data)"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    def _extend_port_security_dict(self, response_data, db_data):"},{"line_number":66,"context_line":"        if \u0027port_security\u0027 not in db_data or db_data[\u0027port_security\u0027] is None:"},{"line_number":67,"context_line":"            response_data[psec.PORTSECURITY] \u003d True"},{"line_number":68,"context_line":"        else:"},{"line_number":69,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("}],"source_content_type":"text/x-python","patch_set":5,"id":"fa32b979_a4ad38ec","line":66,"in_reply_to":"fa32b979_5ec39457","updated":"2015-06-26 06:08:03.000000000","message":"Done","commit_id":"6d548c6f301f994e53d53db8593c523ad8bfb9ad"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"de76c4919609bc4155672bd499a53ddb2463696b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        # Create the network extension attributes."},{"line_number":41,"context_line":"        if psec.PORTSECURITY not in data:"},{"line_number":42,"context_line":"            data[psec.PORTSECURITY] \u003d (psec.EXTENDED_ATTRIBUTES_2_0[\u0027networks\u0027]"},{"line_number":43,"context_line":"                                       [psec.PORTSECURITY][\u0027default\u0027])"},{"line_number":44,"context_line":"        self._process_network_port_security_create(context, data, result)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def process_update_network(self, context, data, result):"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a41bdd9_b6964c3d","line":43,"updated":"2015-07-14 20:45:20.000000000","message":"I think I\u0027ve changed my mind about this particular fix because the way this is broken is really annoying to people developing/using master right now. Let\u0027s move forward with this and then revisit this once we have a central place to do this.","commit_id":"f4e1289d8d381b775f7a6e5f98c507a99fd42b54"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"39097408bcdff8adf6bdaf765ed0790ff3c03a3e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        # Create the network extension attributes."},{"line_number":41,"context_line":"        if psec.PORTSECURITY not in data:"},{"line_number":42,"context_line":"            data[psec.PORTSECURITY] \u003d (psec.EXTENDED_ATTRIBUTES_2_0[\u0027networks\u0027]"},{"line_number":43,"context_line":"                                       [psec.PORTSECURITY][\u0027default\u0027])"},{"line_number":44,"context_line":"        self._process_network_port_security_create(context, data, result)"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def process_update_network(self, context, data, result):"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_dd4fd190","line":43,"updated":"2015-06-30 02:53:11.000000000","message":"my impression is that this is not the right place to fill in default values.\n\nthis reminded me about this review. https://review.openstack.org/#/c/129773/\n\nit might be a good time to restore it and merge.\nKevin, how do you think?","commit_id":"f4e1289d8d381b775f7a6e5f98c507a99fd42b54"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"e2a82bc269688d65e7e70ca6c888d64fc1c84764","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":70,"context_line":"                psec.EXTENDED_ATTRIBUTES_2_0[\u0027networks\u0027]"},{"line_number":71,"context_line":"                [psec.PORTSECURITY][\u0027default\u0027])"},{"line_number":72,"context_line":"        else:"},{"line_number":73,"context_line":"            response_data[psec.PORTSECURITY] \u003d ("},{"line_number":74,"context_line":"                                db_data[\u0027port_security\u0027][psec.PORTSECURITY])"},{"line_number":75,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_e8e215d5","line":72,"updated":"2015-06-30 03:11:44.000000000","message":"this hunk looks ok.","commit_id":"f4e1289d8d381b775f7a6e5f98c507a99fd42b54"}],"neutron/tests/unit/extensions/test_portsecurity.py":[{"author":{"_account_id":13770,"name":"Adolfo Duarte","email":"adduarte@redhat.com","username":"adolfoduarte"},"change_message_id":"2fee8c989d4350fefdb2a5511b36d155bde53661","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        if port_security item is None"},{"line_number":408,"context_line":"        \"\"\""},{"line_number":409,"context_line":"        db_data \u003d {}"},{"line_number":410,"context_line":"        db_data[\u0027port_security\u0027] \u003d None"},{"line_number":411,"context_line":"        db_data[\u0027name\u0027] \u003d \"net1\""},{"line_number":412,"context_line":"        response_data \u003d {}"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_96860ab8","line":410,"updated":"2015-06-05 05:58:18.000000000","message":"This test should NOT assigne None to db_data[\u0027port_security\u0027]\n\nit should just call the assertion to see what happens if the dictionary does not have the key \u0027port_security\u0027 at all.","commit_id":"96544a227a750f1d993ce748523ae3e3682cf721"},{"author":{"_account_id":14064,"name":"Kahou Lei","email":"kahou82@gmail.com","username":"kahou82"},"change_message_id":"dbb515d26fd051a8b8f4229d2756eac88223d7b8","unresolved":false,"context_lines":[{"line_number":407,"context_line":"        if port_security item is None"},{"line_number":408,"context_line":"        \"\"\""},{"line_number":409,"context_line":"        db_data \u003d {}"},{"line_number":410,"context_line":"        db_data[\u0027port_security\u0027] \u003d None"},{"line_number":411,"context_line":"        db_data[\u0027name\u0027] \u003d \"net1\""},{"line_number":412,"context_line":"        response_data \u003d {}"},{"line_number":413,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3afb71cf_53906b43","line":410,"in_reply_to":"3afb71cf_96860ab8","updated":"2015-06-08 03:09:30.000000000","message":"Add one more test case","commit_id":"96544a227a750f1d993ce748523ae3e3682cf721"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7b85daf703600c28e5f510c2b3cc1c8655affabf","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        db_data \u003d {}"},{"line_number":422,"context_line":"        response_data \u003d {}"},{"line_number":423,"context_line":"        driver \u003d PortSecurityExtensionDriver()"},{"line_number":424,"context_line":"        driver._extend_port_security_dict(response_data, db_data)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        self.assertTrue(response_data[psec.PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_89f3569e","line":424,"updated":"2015-06-08 05:52:16.000000000","message":"logic here is repeated, either break it into seperate tests with a helper function or just use a loop:\n\nfor db_data in ({\u0027port_security\u0027: None, \u0027name\u0027: \u0027net1\u0027}, {}):\n    response_data \u003d {}\n    driver \u003d PortSecurityExtensionDriver()\n    driver._extend_port_security_dict(response_data, db_data)\n    self.assertTrue(response_data[psec.PORTSECURITY])","commit_id":"d3cf95e44a3b2f16c969a20351e12610498392c6"},{"author":{"_account_id":14064,"name":"Kahou Lei","email":"kahou82@gmail.com","username":"kahou82"},"change_message_id":"01deb9cd662e1f81f6d33d19aa832f13cf1e8843","unresolved":false,"context_lines":[{"line_number":421,"context_line":"        db_data \u003d {}"},{"line_number":422,"context_line":"        response_data \u003d {}"},{"line_number":423,"context_line":"        driver \u003d PortSecurityExtensionDriver()"},{"line_number":424,"context_line":"        driver._extend_port_security_dict(response_data, db_data)"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        self.assertTrue(response_data[psec.PORTSECURITY])"}],"source_content_type":"text/x-python","patch_set":4,"id":"3afb71cf_5fd0531f","line":424,"in_reply_to":"3afb71cf_89f3569e","updated":"2015-06-08 16:46:46.000000000","message":"Done","commit_id":"d3cf95e44a3b2f16c969a20351e12610498392c6"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"52d90e3689431f2df6eefc6b0914cc466f91bfa1","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron.db import securitygroups_db"},{"line_number":23,"context_line":"from neutron.extensions import portsecurity as psec"},{"line_number":24,"context_line":"from neutron.extensions import securitygroup as ext_sg"},{"line_number":25,"context_line":"from neutron import manager"},{"line_number":26,"context_line":"from neutron.plugins.ml2.extensions.port_security import \\"},{"line_number":27,"context_line":"    PortSecurityExtensionDriver"},{"line_number":28,"context_line":"from neutron.tests.unit.db import test_db_base_plugin_v2"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_5b10b8ab","line":25,"updated":"2015-06-26 15:06:55.000000000","message":"Oy vey! As they say. You should not import classes, only modules.","commit_id":"971cf626d77c2c2cdf52d71b8a89ce812f75004c"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"e70fc4889d87cc824a477f7443b97aee2a936882","unresolved":false,"context_lines":[{"line_number":22,"context_line":"from neutron.db import securitygroups_db"},{"line_number":23,"context_line":"from neutron.extensions import portsecurity as psec"},{"line_number":24,"context_line":"from neutron.extensions import securitygroup as ext_sg"},{"line_number":25,"context_line":"from neutron import manager"},{"line_number":26,"context_line":"from neutron.plugins.ml2.extensions.port_security import \\"},{"line_number":27,"context_line":"    PortSecurityExtensionDriver"},{"line_number":28,"context_line":"from neutron.tests.unit.db import test_db_base_plugin_v2"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_e62a7ae7","line":25,"in_reply_to":"fa32b979_5b10b8ab","updated":"2015-06-29 01:28:39.000000000","message":"Done","commit_id":"971cf626d77c2c2cdf52d71b8a89ce812f75004c"}],"neutron/tests/unit/plugins/ml2/test_ext_portsecurity.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"52d90e3689431f2df6eefc6b0914cc466f91bfa1","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                     self._extension_drivers,"},{"line_number":31,"context_line":"                                     group\u003d\u0027ml2\u0027)"},{"line_number":32,"context_line":"        super(PSExtDriverTestCase, self).setUp()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_create_net_port_security_default(self):"},{"line_number":35,"context_line":"        _core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":36,"context_line":"        admin_ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":7,"id":"fa32b979_fb72ece2","line":33,"updated":"2015-06-26 15:06:55.000000000","message":"You\u0027re verifying the behavior at a level too high, you don\u0027t need to create a network. You should target the modified methods directly.","commit_id":"971cf626d77c2c2cdf52d71b8a89ce812f75004c"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"e70fc4889d87cc824a477f7443b97aee2a936882","unresolved":false,"context_lines":[{"line_number":30,"context_line":"                                     self._extension_drivers,"},{"line_number":31,"context_line":"                                     group\u003d\u0027ml2\u0027)"},{"line_number":32,"context_line":"        super(PSExtDriverTestCase, self).setUp()"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    def test_create_net_port_security_default(self):"},{"line_number":35,"context_line":"        _core_plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":36,"context_line":"        admin_ctx \u003d context.get_admin_context()"}],"source_content_type":"text/x-python","patch_set":7,"id":"ba3cc151_86f5ae84","line":33,"in_reply_to":"fa32b979_fb72ece2","updated":"2015-06-29 01:28:39.000000000","message":"Assaf Muller,  the bug is caused by the codes similar to ones used by our HA l3 agent. So I think this case makes sense.","commit_id":"971cf626d77c2c2cdf52d71b8a89ce812f75004c"}]}
