)]}'
{"neutron/plugins/ml2/drivers/cisco/nexus/nexus_network_driver.py":[{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        except Exception as e:"},{"line_number":70,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":71,"context_line":"                if exc_str in str(e):"},{"line_number":72,"context_line":"                    if ret_exc:"},{"line_number":73,"context_line":"                        return e"},{"line_number":74,"context_line":"                    else:"},{"line_number":75,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_be242fb0","line":72,"updated":"2014-07-08 18:49:59.000000000","message":"should this go here or just after the except line?","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        except Exception as e:"},{"line_number":70,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":71,"context_line":"                if exc_str in str(e):"},{"line_number":72,"context_line":"                    if ret_exc:"},{"line_number":73,"context_line":"                        return e"},{"line_number":74,"context_line":"                    else:"},{"line_number":75,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1b30a955","line":72,"in_reply_to":"baada198_975102db","updated":"2014-07-09 16:35:23.000000000","message":"Yes - I like the return always and leaving it to the caller to decide. Will change.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"afa1315543487c65df54e37c64f9d0f7e7c00a0d","unresolved":false,"context_lines":[{"line_number":69,"context_line":"        except Exception as e:"},{"line_number":70,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":71,"context_line":"                if exc_str in str(e):"},{"line_number":72,"context_line":"                    if ret_exc:"},{"line_number":73,"context_line":"                        return e"},{"line_number":74,"context_line":"                    else:"},{"line_number":75,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_975102db","line":72,"in_reply_to":"baada198_be242fb0","updated":"2014-07-09 04:57:29.000000000","message":"It might be simpler to not add the new \u0027ret_exc\u0027 argument, and just unconditionally return e (or str(e)) whenever the exception string matches one of the allowed strings (the caller can decide whether to use the return value or not).","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def enable_vlan_trunk(self, nexus_host, confstr,"},{"line_number":144,"context_line":"                          exc_str\u003dNone, ret_exc\u003dFalse):"},{"line_number":145,"context_line":"        rc \u003d None"},{"line_number":146,"context_line":"        rc \u003d self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr,"},{"line_number":147,"context_line":"                               allowed_exc_strs\u003dexc_str, ret_exc\u003dret_exc)"},{"line_number":148,"context_line":"        return rc"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3075ae32","line":145,"updated":"2014-07-08 18:49:59.000000000","message":"remove default","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def enable_vlan_trunk(self, nexus_host, confstr,"},{"line_number":144,"context_line":"                          exc_str\u003dNone, ret_exc\u003dFalse):"},{"line_number":145,"context_line":"        rc \u003d None"},{"line_number":146,"context_line":"        rc \u003d self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr,"},{"line_number":147,"context_line":"                               allowed_exc_strs\u003dexc_str, ret_exc\u003dret_exc)"},{"line_number":148,"context_line":"        return rc"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_30acce8c","line":146,"updated":"2014-07-08 18:49:59.000000000","message":"can just return self._edit_confug(...)","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":143,"context_line":"    def enable_vlan_trunk(self, nexus_host, confstr,"},{"line_number":144,"context_line":"                          exc_str\u003dNone, ret_exc\u003dFalse):"},{"line_number":145,"context_line":"        rc \u003d None"},{"line_number":146,"context_line":"        rc \u003d self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr,"},{"line_number":147,"context_line":"                               allowed_exc_strs\u003dexc_str, ret_exc\u003dret_exc)"},{"line_number":148,"context_line":"        return rc"},{"line_number":149,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_3b356d46","line":146,"in_reply_to":"baada198_30acce8c","updated":"2014-07-09 16:35:23.000000000","message":"Done","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"afa1315543487c65df54e37c64f9d0f7e7c00a0d","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                               allowed_exc_strs\u003dexc_str, ret_exc\u003dret_exc)"},{"line_number":148,"context_line":"        return rc"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def build_confstr(self, snippet, intf_type, interface, vlanid):"},{"line_number":151,"context_line":"        confstr \u003d snippet % (intf_type, interface, vlanid, intf_type)"},{"line_number":152,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":153,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_77762e08","line":150,"updated":"2014-07-09 04:57:29.000000000","message":"Maybe the name of this method should be more specific \"build_intf_confstr\" since there are other places where config strings are being built.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":147,"context_line":"                               allowed_exc_strs\u003dexc_str, ret_exc\u003dret_exc)"},{"line_number":148,"context_line":"        return rc"},{"line_number":149,"context_line":""},{"line_number":150,"context_line":"    def build_confstr(self, snippet, intf_type, interface, vlanid):"},{"line_number":151,"context_line":"        confstr \u003d snippet % (intf_type, interface, vlanid, intf_type)"},{"line_number":152,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":153,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7b3e052b","line":150,"in_reply_to":"baada198_77762e08","updated":"2014-07-09 16:35:23.000000000","message":"Done","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"afa1315543487c65df54e37c64f9d0f7e7c00a0d","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def enable_vlan_on_trunk_int(self, nexus_host, vlanid, intf_type,"},{"line_number":157,"context_line":"                                 interface, new_list\u003dFalse):"},{"line_number":158,"context_line":"        \"\"\"Enable a VLAN on a trunk interface.\"\"\""},{"line_number":159,"context_line":"        # If more than one VLAN is configured on this interface then"},{"line_number":160,"context_line":"        # include the \u0027add\u0027 keyword."},{"line_number":161,"context_line":"        confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_ADD_SNIPPET,"},{"line_number":162,"context_line":"                                     intf_type\u003dintf_type, interface\u003dinterface,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1787b210","line":159,"updated":"2014-07-09 04:57:29.000000000","message":"Should change the \"If more than one VLAN is configured...\" comment, since you\u0027ve removed the conditional. Consider something like \"First try to configure the VLAN on the interface using the \u0027add\u0027 keyword\".","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    def enable_vlan_on_trunk_int(self, nexus_host, vlanid, intf_type,"},{"line_number":157,"context_line":"                                 interface, new_list\u003dFalse):"},{"line_number":158,"context_line":"        \"\"\"Enable a VLAN on a trunk interface.\"\"\""},{"line_number":159,"context_line":"        # If more than one VLAN is configured on this interface then"},{"line_number":160,"context_line":"        # include the \u0027add\u0027 keyword."},{"line_number":161,"context_line":"        confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_ADD_SNIPPET,"},{"line_number":162,"context_line":"                                     intf_type\u003dintf_type, interface\u003dinterface,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_fb1135b0","line":159,"in_reply_to":"baada198_1787b210","updated":"2014-07-09 16:35:23.000000000","message":"Yep - will be updating the comments here to explain what we are doing.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                                     intf_type\u003dintf_type, interface\u003dinterface,"},{"line_number":163,"context_line":"                                     vlanid\u003dvlanid)"},{"line_number":164,"context_line":"        exc_str \u003d [\"switchport trunk allowed vlan list is empty\"]"},{"line_number":165,"context_line":"        rc \u003d None"},{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_90e11ad3","line":165,"updated":"2014-07-08 18:49:59.000000000","message":"remove","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":162,"context_line":"                                     intf_type\u003dintf_type, interface\u003dinterface,"},{"line_number":163,"context_line":"                                     vlanid\u003dvlanid)"},{"line_number":164,"context_line":"        exc_str \u003d [\"switchport trunk allowed vlan list is empty\"]"},{"line_number":165,"context_line":"        rc \u003d None"},{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5b1141ab","line":165,"in_reply_to":"baada198_90e11ad3","updated":"2014-07-09 16:35:23.000000000","message":"Done","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"afa1315543487c65df54e37c64f9d0f7e7c00a0d","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        rc \u003d None"},{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"},{"line_number":169,"context_line":"            for e in exc_str:"},{"line_number":170,"context_line":"                if e in str(rc):"},{"line_number":171,"context_line":"                    confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_SNIPPET,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_171172ac","line":168,"updated":"2014-07-09 04:57:29.000000000","message":"Consider adding a helpful comment here saying that, if configuration using the \u0027add\u0027 keyword failed, then there must be no vlans configured on the interface, so try without the \u0027add\u0027 keyword.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":165,"context_line":"        rc \u003d None"},{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"},{"line_number":169,"context_line":"            for e in exc_str:"},{"line_number":170,"context_line":"                if e in str(rc):"},{"line_number":171,"context_line":"                    confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_SNIPPET,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7b252509","line":168,"in_reply_to":"baada198_171172ac","updated":"2014-07-09 16:35:23.000000000","message":"Done","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"afa1315543487c65df54e37c64f9d0f7e7c00a0d","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"},{"line_number":169,"context_line":"            for e in exc_str:"},{"line_number":170,"context_line":"                if e in str(rc):"},{"line_number":171,"context_line":"                    confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_SNIPPET,"},{"line_number":172,"context_line":"                                                 intf_type\u003dintf_type,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_17e25203","line":169,"updated":"2014-07-09 04:57:29.000000000","message":"The \u0027for e in exc_str:\u0027 and \u0027if e in str(rc):\u0027 lines should be removed since you already know at this point (since enable_vlan_trunk returned non-None) that the exception string matches one of the strings you were looking for.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"},{"line_number":169,"context_line":"            for e in exc_str:"},{"line_number":170,"context_line":"                if e in str(rc):"},{"line_number":171,"context_line":"                    confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_SNIPPET,"},{"line_number":172,"context_line":"                                                 intf_type\u003dintf_type,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5316acf2","line":169,"updated":"2014-07-08 18:49:59.000000000","message":"do you need the for loop?","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":167,"context_line":"                                    exc_str\u003dexc_str, ret_exc\u003dTrue)"},{"line_number":168,"context_line":"        if (rc):"},{"line_number":169,"context_line":"            for e in exc_str:"},{"line_number":170,"context_line":"                if e in str(rc):"},{"line_number":171,"context_line":"                    confstr \u003d self.build_confstr(snippet\u003dsnipp.CMD_INT_VLAN_SNIPPET,"},{"line_number":172,"context_line":"                                                 intf_type\u003dintf_type,"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_1b650945","line":169,"in_reply_to":"baada198_17e25203","updated":"2014-07-09 16:35:23.000000000","message":"Hmm.. remove the check completely? I agree we would only get a return for a known exception string, but since that is a list, there isn\u0027t a chance it could be a different known exception? Let me think about this a little more.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                                                 intf_type\u003dintf_type,"},{"line_number":173,"context_line":"                                                 interface\u003dinterface,"},{"line_number":174,"context_line":"                                                 vlanid\u003dvlanid)"},{"line_number":175,"context_line":"                    exc_str \u003d None"},{"line_number":176,"context_line":"                    rc \u003d None"},{"line_number":177,"context_line":"                    rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":178,"context_line":"                                                exc_str\u003dexc_str, ret_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_10734ae8","line":175,"updated":"2014-07-08 18:49:59.000000000","message":"remove, assign exc_str\u003dNone is parameter list","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                                                 intf_type\u003dintf_type,"},{"line_number":173,"context_line":"                                                 interface\u003dinterface,"},{"line_number":174,"context_line":"                                                 vlanid\u003dvlanid)"},{"line_number":175,"context_line":"                    exc_str \u003d None"},{"line_number":176,"context_line":"                    rc \u003d None"},{"line_number":177,"context_line":"                    rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":178,"context_line":"                                                exc_str\u003dexc_str, ret_exc\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_7b53656c","line":175,"in_reply_to":"baada198_10734ae8","updated":"2014-07-09 16:35:23.000000000","message":"Done","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"b06525136b0bc7d35a763977985725151e9a2524","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                    exc_str \u003d None"},{"line_number":176,"context_line":"                    rc \u003d None"},{"line_number":177,"context_line":"                    rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":178,"context_line":"                                                exc_str\u003dexc_str, ret_exc\u003dFalse)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def disable_vlan_on_trunk_int(self, nexus_host, vlanid, intf_type,"},{"line_number":181,"context_line":"                                  interface):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_b3dc6848","line":178,"updated":"2014-07-08 18:49:59.000000000","message":"if the exception (for statement) is not in the allowed string then we should raise e","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"b9679a9b8de3c33f5d6c360c8bda05fba65071da","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                    exc_str \u003d None"},{"line_number":176,"context_line":"                    rc \u003d None"},{"line_number":177,"context_line":"                    rc \u003d self.enable_vlan_trunk(nexus_host, confstr\u003dconfstr,"},{"line_number":178,"context_line":"                                                exc_str\u003dexc_str, ret_exc\u003dFalse)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def disable_vlan_on_trunk_int(self, nexus_host, vlanid, intf_type,"},{"line_number":181,"context_line":"                                  interface):"}],"source_content_type":"text/x-python","patch_set":1,"id":"baada198_5bd6a1c6","line":178,"in_reply_to":"baada198_b3dc6848","updated":"2014-07-09 16:35:23.000000000","message":"We don\u0027t need a second exception here since _edit_config will already raise the exception.","commit_id":"279bb5340acfe124e3fdd9e10d4092aba4d17330"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2b5c46057423efdfe50fcf3482fab8c58b419539","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        :param config: Configuration string in XML format"},{"line_number":56,"context_line":"        :param allowed_exc_strs: Exceptions which have any of these strings"},{"line_number":57,"context_line":"                                 as a subset of their exception message"},{"line_number":58,"context_line":"                                 (str(exception)) can be ignored"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :raises: NexusConfigFailed"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ff2f37a5","line":58,"updated":"2014-07-23 20:40:00.000000000","message":"You have changed what this method returns, so you should add\n\n        :returns None: if config was edited successfully\n                 Exception object: if edit_config() encountered an exception\n                                   containing one of allowed_exc_strs","commit_id":"681a2d4f7d7ff42e94d6fcb439557c74aebf6b61"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"118eeb0c8f6f45ce972cb78dd8c1f0a115821b70","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        :param config: Configuration string in XML format"},{"line_number":56,"context_line":"        :param allowed_exc_strs: Exceptions which have any of these strings"},{"line_number":57,"context_line":"                                 as a subset of their exception message"},{"line_number":58,"context_line":"                                 (str(exception)) can be ignored"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :raises: NexusConfigFailed"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_cb9d5568","line":58,"in_reply_to":"baada198_ff2f37a5","updated":"2014-07-23 22:32:41.000000000","message":"Done","commit_id":"681a2d4f7d7ff42e94d6fcb439557c74aebf6b61"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2b5c46057423efdfe50fcf3482fab8c58b419539","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        :param allowed_exc_strs: Exceptions which have any of these strings"},{"line_number":57,"context_line":"                                 as a subset of their exception message"},{"line_number":58,"context_line":"                                 (str(exception)) can be ignored"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :raises: NexusConfigFailed"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_c249ba61","line":59,"updated":"2014-07-23 20:40:00.000000000","message":"This should read\n\n        :raises: NexusConfigFailed: if edit_config() encountered an exception\n                                    not containing one of allowed_exc_strs","commit_id":"681a2d4f7d7ff42e94d6fcb439557c74aebf6b61"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"118eeb0c8f6f45ce972cb78dd8c1f0a115821b70","unresolved":false,"context_lines":[{"line_number":56,"context_line":"        :param allowed_exc_strs: Exceptions which have any of these strings"},{"line_number":57,"context_line":"                                 as a subset of their exception message"},{"line_number":58,"context_line":"                                 (str(exception)) can be ignored"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"        :raises: NexusConfigFailed"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_2b8a511a","line":59,"in_reply_to":"baada198_c249ba61","updated":"2014-07-23 22:32:41.000000000","message":"Done","commit_id":"681a2d4f7d7ff42e94d6fcb439557c74aebf6b61"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"2b5c46057423efdfe50fcf3482fab8c58b419539","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":70,"context_line":"                if exc_str in str(e):"},{"line_number":71,"context_line":"                    return e"},{"line_number":72,"context_line":"            else:"},{"line_number":73,"context_line":"                # Raise a Neutron exception. Include a description of"},{"line_number":74,"context_line":"                # the original ncclient exception."},{"line_number":75,"context_line":"                raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_bfd93f24","line":72,"updated":"2014-07-23 20:40:00.000000000","message":"Since you are now returning out of the for-loop you don\u0027t need an else here.","commit_id":"681a2d4f7d7ff42e94d6fcb439557c74aebf6b61"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"118eeb0c8f6f45ce972cb78dd8c1f0a115821b70","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":70,"context_line":"                if exc_str in str(e):"},{"line_number":71,"context_line":"                    return e"},{"line_number":72,"context_line":"            else:"},{"line_number":73,"context_line":"                # Raise a Neutron exception. Include a description of"},{"line_number":74,"context_line":"                # the original ncclient exception."},{"line_number":75,"context_line":"                raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"}],"source_content_type":"text/x-python","patch_set":5,"id":"baada198_ab758134","line":72,"in_reply_to":"baada198_bfd93f24","updated":"2014-07-23 22:32:41.000000000","message":"Done","commit_id":"681a2d4f7d7ff42e94d6fcb439557c74aebf6b61"},{"author":{"_account_id":107,"name":"Arvind Somya","email":"arvind.somya@gmail.com","username":"asomya"},"change_message_id":"0f517a5b686ed383a7b806392a70070cf334bed2","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":141,"context_line":"        self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def build_intf_confstr(self, snippet, intf_type, interface, vlanid):"},{"line_number":144,"context_line":"        confstr \u003d snippet % (intf_type, interface, vlanid, intf_type)"},{"line_number":145,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":146,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_e81bd86c","line":143,"updated":"2014-07-24 17:54:30.000000000","message":"Minor nit: this need a docstring, the method name doesn\u0027t led any clarity to it\u0027s function.","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":141,"context_line":"        self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def build_intf_confstr(self, snippet, intf_type, interface, vlanid):"},{"line_number":144,"context_line":"        confstr \u003d snippet % (intf_type, interface, vlanid, intf_type)"},{"line_number":145,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":146,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_987b1f79","line":143,"in_reply_to":"baada198_e81bd86c","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":5892,"name":"pritesh","email":"pritesh@romana.io","username":"pritkoth"},"change_message_id":"c4825e6e9175fdf78da1f1f903f97713048a158b","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            allowed_exc_strs \u003d []"},{"line_number":70,"context_line":"        mgr \u003d self.nxos_connect(nexus_host)"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.debug(_(\"NexusDriver config: %s\"), config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_7684730e","line":72,"updated":"2014-07-29 17:51:53.000000000","message":"nitpick if you are rebasing: no debug translations.","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"47ee6ca5e6f11760cf0d589d4a69b1397dcdea52","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            allowed_exc_strs \u003d []"},{"line_number":70,"context_line":"        mgr \u003d self.nxos_connect(nexus_host)"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.debug(_(\"NexusDriver config: %s\"), config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_f49a3161","line":72,"in_reply_to":"baada198_7684730e","updated":"2014-07-29 22:32:59.000000000","message":"Is debug without translation ok? i.e \nLOG.debug(\"NexusDriver config: %s\", config)","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"7960d79bf81a8868ed44526d36bd50e16d3e625c","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            allowed_exc_strs \u003d []"},{"line_number":70,"context_line":"        mgr \u003d self.nxos_connect(nexus_host)"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.debug(_(\"NexusDriver config: %s\"), config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_f4c6bc9b","line":72,"in_reply_to":"baada198_7684730e","updated":"2014-07-29 18:16:47.000000000","message":"Yes, please remove.","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"cf569879c9fcfd6e4841a00b61661ac66dbae5bd","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            allowed_exc_strs \u003d []"},{"line_number":70,"context_line":"        mgr \u003d self.nxos_connect(nexus_host)"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.debug(_(\"NexusDriver config: %s\"), config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_4f4d0ac5","line":72,"in_reply_to":"baada198_9446557d","updated":"2014-07-29 23:02:25.000000000","message":"Got it. Thanks!","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":5892,"name":"pritesh","email":"pritesh@romana.io","username":"pritkoth"},"change_message_id":"d170341737c8c7c7bae0a9d3d5095bbb69a555d4","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            allowed_exc_strs \u003d []"},{"line_number":70,"context_line":"        mgr \u003d self.nxos_connect(nexus_host)"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.debug(_(\"NexusDriver config: %s\"), config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_9446557d","line":72,"in_reply_to":"baada198_f49a3161","updated":"2014-07-29 22:42:27.000000000","message":"yep debug log is good only the translations part needs to be gone like in your comment above.","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"47ee6ca5e6f11760cf0d589d4a69b1397dcdea52","unresolved":false,"context_lines":[{"line_number":69,"context_line":"            allowed_exc_strs \u003d []"},{"line_number":70,"context_line":"        mgr \u003d self.nxos_connect(nexus_host)"},{"line_number":71,"context_line":"        try:"},{"line_number":72,"context_line":"            LOG.debug(_(\"NexusDriver config: %s\"), config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_d4ac4d8b","line":72,"in_reply_to":"baada198_f4c6bc9b","updated":"2014-07-29 22:32:59.000000000","message":"I would like to leave this debug in place for any future issues especially when debugging unit tests.","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"7960d79bf81a8868ed44526d36bd50e16d3e625c","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def build_intf_confstr(self, snippet, intf_type, interface, vlanid):"},{"line_number":145,"context_line":"        \"\"\"Build the VLAN config string xml snippet to be used \"\"\""},{"line_number":146,"context_line":"        confstr \u003d snippet % (intf_type, interface, vlanid, intf_type)"},{"line_number":147,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":148,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_b428c437","line":145,"updated":"2014-07-29 18:16:47.000000000","message":"If you end up resubmitting a new patch, end the doctoring with \".\" please.","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"9cdcd05bc35d4de7d99349b6025b3df6e287504d","unresolved":false,"context_lines":[{"line_number":142,"context_line":"        self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"    def build_intf_confstr(self, snippet, intf_type, interface, vlanid):"},{"line_number":145,"context_line":"        \"\"\"Build the VLAN config string xml snippet to be used \"\"\""},{"line_number":146,"context_line":"        confstr \u003d snippet % (intf_type, interface, vlanid, intf_type)"},{"line_number":147,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":148,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_4ffb4a48","line":145,"in_reply_to":"baada198_b428c437","updated":"2014-07-29 23:04:32.000000000","message":"Done","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"feb75fd30412a4a92ea4425f5fd25a34584c198b","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":76,"context_line":"                if exc_str in str(e):"},{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e03dfabd","line":75,"updated":"2014-07-30 11:39:13.000000000","message":"Since a different exception is raised, you should use excutils save_and_reraise_exception. Sorry I missed that before.","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"30b096f3e61c80cccc51d79232c1240d4ed4aeb1","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":76,"context_line":"                if exc_str in str(e):"},{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_db5ff50e","line":75,"in_reply_to":"baada198_7688c56b","updated":"2014-07-30 19:49:53.000000000","message":"I agree. Line 76 does not raise, returns the exception string. And line 80 raises a different exception, so that is also not a case for reraise.","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"a66a2349650131c4c03e4ab45ad5bfafc3aa29ca","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            for exc_str in allowed_exc_strs:"},{"line_number":76,"context_line":"                if exc_str in str(e):"},{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_7688c56b","line":75,"in_reply_to":"baada198_e03dfabd","updated":"2014-07-30 17:12:14.000000000","message":"Paul, We aren\u0027t actually raising an exception here are we? If the exception is an allowed exception, we only return the string. Not sure why we would have to do a save_and_reraise?","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"a53b49f6c89fe5c74b5715e8441c7f5bb8324a7a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":79,"context_line":"            # the original ncclient exception."},{"line_number":80,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def nxos_connect(self, nexus_host):"},{"line_number":83,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_e80214b9","line":80,"updated":"2014-07-31 12:39:55.000000000","message":"The general practice that I\u0027ve seen is that for cases where an exception handler is throwing a different exception or reraising an exception, we should use save_and_reraise_exception() so that the exception information is preserved. In your case, we aren\u0027t switching threads in the handler, so it would be OK, but it is good defensive programming, as it is easy to make a change that could cause an issue (e.g. adding logging).\n\nRef: https://github.com/openstack/neutron/blob/master/neutron/openstack/common/excutils.py#L30","commit_id":"db89ce1023b3c3d61aab5fc1fd805aa2e12882c8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"fa7f0107909b577f6effb48faae0c8adbbdac58b","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":79,"context_line":"            # the original ncclient exception."},{"line_number":80,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def nxos_connect(self, nexus_host):"},{"line_number":83,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_84a92edf","line":80,"in_reply_to":"baada198_441d9d76","updated":"2014-08-03 17:01:26.000000000","message":"On second thoughts, \u0027e\u0027 is a local context variable and it can\u0027t be changed by another thread, can it? Since we are disabling reraise and we are not using the saved ctxt, I don\u0027t think save_and_reraise_exception is buying us anything here.","commit_id":"db89ce1023b3c3d61aab5fc1fd805aa2e12882c8"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"9282d737c146596ba3f020816b7b02489d6958e8","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":79,"context_line":"            # the original ncclient exception."},{"line_number":80,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def nxos_connect(self, nexus_host):"},{"line_number":83,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_0f90bd94","line":80,"in_reply_to":"baada198_84a92edf","updated":"2014-08-04 15:10:10.000000000","message":"I agree - which is what my original thought was as well. But as Paul suggests, this might be better defensive programming against future change such as adding a LOG message or some other which might cause a change of threads. It\u0027s a one line change and I\u0027ll add it. Was on leave on Friday and away over the weekend so didn\u0027t get around to it. I\u0027ll rebase and update it today.","commit_id":"db89ce1023b3c3d61aab5fc1fd805aa2e12882c8"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"b4d7b04055a68d7264bc8f4f2b62089e9f00a9b3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":79,"context_line":"            # the original ncclient exception."},{"line_number":80,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def nxos_connect(self, nexus_host):"},{"line_number":83,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_441d9d76","line":80,"in_reply_to":"baada198_e2122cb2","updated":"2014-07-31 19:01:39.000000000","message":"I think what Paul is saying is that you should just add\n\n    with excutils.save_and_reraise_exception(reraise\u003dFalse):\n\nbetween lines 74 and 75.\n\nBy specifying reraise\u003dFalse you suppress the reraising of the original exception and are just using the context manager to save the exception in the event that (one day) another exception gets raised by another thread before you reach line 80. In other words, without the save then \u0027e\u0027 could one day end up with the wrong value on line 80.\n\nI am OK with doing this defensive programming.","commit_id":"db89ce1023b3c3d61aab5fc1fd805aa2e12882c8"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"51a7981ca3efc40e2cbd08e07f65ed0e00f9c1f4","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":79,"context_line":"            # the original ncclient exception."},{"line_number":80,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def nxos_connect(self, nexus_host):"},{"line_number":83,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_e2122cb2","line":80,"in_reply_to":"baada198_e80214b9","updated":"2014-07-31 14:52:57.000000000","message":"Paul - I am not sure why you think we are re-raising an exception here?\nThe logic is that if we hit an exception with the nexus config sent to the switch, we look to see if the exception hit is an allowed one, in which case we raise no exception at all and simply return the exception string.\n\nIf it is not in the allowed string, we then and only then, raise an exception which is the Nexusconfigfailed.\n\nThe only change I made in the logic of this method from what was there before, was that instead of breaking out of the method, I now return the exception string. \n\nI don\u0027t see why we need to change the exception to a save and reraise now?","commit_id":"db89ce1023b3c3d61aab5fc1fd805aa2e12882c8"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"da23b77366775d3023d61e3653a6ef66bb3f1489","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                    return e"},{"line_number":78,"context_line":"            # Raise a Neutron exception. Include a description of"},{"line_number":79,"context_line":"            # the original ncclient exception."},{"line_number":80,"context_line":"            raise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def nxos_connect(self, nexus_host):"},{"line_number":83,"context_line":"        \"\"\"Make SSH connection to the Nexus Switch.\"\"\""}],"source_content_type":"text/x-python","patch_set":9,"id":"baada198_b446b2a5","line":80,"in_reply_to":"baada198_e80214b9","updated":"2014-07-31 14:07:19.000000000","message":"Paul - are you suggesting I replace \nraise cexc.NexusConfigFailed(config\u003dconfig, exc\u003de)\nwith save_and_reraise_exception() ?","commit_id":"db89ce1023b3c3d61aab5fc1fd805aa2e12882c8"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"3a8fe4ff141bee7912e200f3dfbb015724f5c9da","unresolved":false,"context_lines":[{"line_number":114,"context_line":"    def create_vlan(self, nexus_host, vlanid, vlanname):"},{"line_number":115,"context_line":"        \"\"\"Create a VLAN on Nexus Switch given the VLAN ID and Name.\"\"\""},{"line_number":116,"context_line":"        confstr \u003d self.create_xml_snippet("},{"line_number":117,"context_line":"            snipp.CMD_VLAN_CONF_SNIPPET % (vlanid, vlanname))"},{"line_number":118,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"},{"line_number":119,"context_line":"        self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":120,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_90c9f353","line":117,"updated":"2014-08-06 14:39:16.000000000","message":"since you added a LOG.debug to _edit_config(), this can be removed.","commit_id":"9fc09700d84c211638fb6342e723c8ecc24ca7d5"},{"author":{"_account_id":6694,"name":"rcurran","email":"rcurran@cisco.com","username":"rcurran"},"change_message_id":"3a8fe4ff141bee7912e200f3dfbb015724f5c9da","unresolved":false,"context_lines":[{"line_number":180,"context_line":"        confstr \u003d (snipp.CMD_NO_VLAN_INT_SNIPPET %"},{"line_number":181,"context_line":"                   (intf_type, interface, vlanid, intf_type))"},{"line_number":182,"context_line":"        confstr \u003d self.create_xml_snippet(confstr)"},{"line_number":183,"context_line":"        LOG.debug(_(\"NexusDriver: %s\"), confstr)"},{"line_number":184,"context_line":"        self._edit_config(nexus_host, target\u003d\u0027running\u0027, config\u003dconfstr)"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"    def create_and_trunk_vlan(self, nexus_host, vlan_id, vlan_name,"}],"source_content_type":"text/x-python","patch_set":10,"id":"baada198_d0d36bff","line":183,"updated":"2014-08-06 14:39:16.000000000","message":"same","commit_id":"9fc09700d84c211638fb6342e723c8ecc24ca7d5"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2a7d66f681f0d6e5a7d7a2adfd2b6a78769a68b8","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target\u003dtarget, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":76,"context_line":"                for exc_str in allowed_exc_strs:"},{"line_number":77,"context_line":"                    if exc_str in str(e):"},{"line_number":78,"context_line":"                        return e"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_029f8f60","line":75,"updated":"2014-10-20 03:48:51.000000000","message":"there\u0027s no point to use save_and_reraise_exception where you don\u0027t reraise.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"a73cde59b8334615b7cab5dd89c097415095b073","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target\u003dtarget, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":76,"context_line":"                for exc_str in allowed_exc_strs:"},{"line_number":77,"context_line":"                    if exc_str in str(e):"},{"line_number":78,"context_line":"                        return e"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_1e37dae4","line":75,"in_reply_to":"9aa7fdbe_029f8f60","updated":"2014-10-20 14:03:38.000000000","message":"Please see previous comment history. This was debated and agreed up to be written as is.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8ffc88fadef3807fcaaf38e2198187835ab891dc","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target\u003dtarget, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":76,"context_line":"                for exc_str in allowed_exc_strs:"},{"line_number":77,"context_line":"                    if exc_str in str(e):"},{"line_number":78,"context_line":"                        return e"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_9177eb39","line":75,"in_reply_to":"9aa7fdbe_1e37dae4","updated":"2014-10-22 18:02:11.000000000","message":"I agree with Yamamoto and there is no need to use save_and_reraise. I read the discussion in patch set 9 which suggested to use save_and_reraise. save_and_reraise just saves the original context in its method and construct the exception from the saved context, so if does not affect \"e\" here. The save_and_reraise is not a magic.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"43569f2d8f27e622379e29685bf7c45c6c6e73a5","unresolved":false,"context_lines":[{"line_number":72,"context_line":"            LOG.debug(\"NexusDriver config: %s\", config)"},{"line_number":73,"context_line":"            mgr.edit_config(target\u003dtarget, config\u003dconfig)"},{"line_number":74,"context_line":"        except Exception as e:"},{"line_number":75,"context_line":"            with excutils.save_and_reraise_exception(reraise\u003dFalse):"},{"line_number":76,"context_line":"                for exc_str in allowed_exc_strs:"},{"line_number":77,"context_line":"                    if exc_str in str(e):"},{"line_number":78,"context_line":"                        return e"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_67a4ff07","line":75,"in_reply_to":"9aa7fdbe_9177eb39","updated":"2014-10-28 19:14:00.000000000","message":"Very well - I\u0027m reverting this to the version without the save and re-raise then.\nAs you can see both Henry and I weren\u0027t sure we would actually need it in this scenario but decided to put it in there as good practice.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"}],"neutron/tests/unit/ml2/drivers/cisco/nexus/test_cisco_mech.py":[{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"c7087680728d035bd167b201a8be9e0ecccee01f","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        return all(word in last_cfg for word in words)"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def _is_vlan_configured(self, vlan_creation_expected\u003dTrue,"},{"line_number":211,"context_line":"                            first_vlan_addition\u003dFalse):"},{"line_number":212,"context_line":"        vlan_created \u003d self._is_in_nexus_cfg([\u0027vlan\u0027, \u0027vlan-name\u0027])"},{"line_number":213,"context_line":"        add_appears \u003d self._is_in_last_nexus_cfg([\u0027add\u0027])"},{"line_number":214,"context_line":"        if first_vlan_addition:"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_e3179d52","line":211,"updated":"2014-07-17 17:33:19.000000000","message":"Will update comments here to ensure new behavior being tested is explained properly.","commit_id":"f4cd1a832e103f531d098a5fa566ae32071ab416"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"c7087680728d035bd167b201a8be9e0ecccee01f","unresolved":false,"context_lines":[{"line_number":364,"context_line":"        the command string sent to the switch contains the keyword \u0027add\u0027."},{"line_number":365,"context_line":""},{"line_number":366,"context_line":"        \"\"\""},{"line_number":367,"context_line":"        def _mock_edit_config_first_trunk(target, config):"},{"line_number":368,"context_line":"            if all(word in config for word in [\u0027switchport\u0027,"},{"line_number":369,"context_line":"                                               \u0027trunk\u0027,"},{"line_number":370,"context_line":"                                               \u0027allowed\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"baada198_2609a32c","line":367,"updated":"2014-07-17 17:33:19.000000000","message":"Will try to see if this method call can be refactored properly since it is being used in three places. The problem is with the config argument. Will see if I can figure out a way.","commit_id":"f4cd1a832e103f531d098a5fa566ae32071ab416"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"6c4a49578f15a77b5b0314c2000ca5c6342a6193","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                               \u0027allowed\u0027,"},{"line_number":313,"context_line":"                                               \u0027vlan\u0027,"},{"line_number":314,"context_line":"                                               \u0027add\u0027]):"},{"line_number":315,"context_line":"                raise Exception(\"switchport trunk allowed vlan list is empty,\""},{"line_number":316,"context_line":"                                \" please specify a list using \""},{"line_number":317,"context_line":"                                \"\u0027switchport trunk allowed vlan X\u0027\""},{"line_number":318,"context_line":"                                \" before using the add option\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_4c56d42b","line":315,"updated":"2014-07-23 12:28:35.000000000","message":"nit: for consistency/readability, consider putting space at end of continued string lines, rather that at start.","commit_id":"cbfc3d32f11b47dc7d318729e27ea02164e83c36"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"e93ea1bf19dd6d3df59e71276062f8af7a394824","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                               \u0027allowed\u0027,"},{"line_number":313,"context_line":"                                               \u0027vlan\u0027,"},{"line_number":314,"context_line":"                                               \u0027add\u0027]):"},{"line_number":315,"context_line":"                raise Exception(\"switchport trunk allowed vlan list is empty,\""},{"line_number":316,"context_line":"                                \" please specify a list using \""},{"line_number":317,"context_line":"                                \"\u0027switchport trunk allowed vlan X\u0027\""},{"line_number":318,"context_line":"                                \" before using the add option\")"}],"source_content_type":"text/x-python","patch_set":4,"id":"baada198_9e272063","line":315,"in_reply_to":"baada198_4c56d42b","updated":"2014-07-23 18:56:02.000000000","message":"Done","commit_id":"cbfc3d32f11b47dc7d318729e27ea02164e83c36"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"bc603dcf97d6c0e992dc23515df83176c834c109","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def _is_vlan_configured(self, vlan_creation_expected\u003dTrue,"},{"line_number":211,"context_line":"                            first_vlan_addition\u003dFalse):"},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":"        The first VLAN being configured should be done without the"},{"line_number":214,"context_line":"        ADD keyword. Thereafter additional VLANs to be configured"},{"line_number":215,"context_line":"        should be done with the ADD keyword."},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_d6c25833","line":213,"updated":"2014-07-23 23:59:46.000000000","message":"Maybe this doc string should be moved as a comment just before the \u0027if first_vlan_addition:\u0027 conditional. It only explains one aspect of the method, so it\u0027s not a complete doc string.","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":210,"context_line":"    def _is_vlan_configured(self, vlan_creation_expected\u003dTrue,"},{"line_number":211,"context_line":"                            first_vlan_addition\u003dFalse):"},{"line_number":212,"context_line":"        \"\"\""},{"line_number":213,"context_line":"        The first VLAN being configured should be done without the"},{"line_number":214,"context_line":"        ADD keyword. Thereafter additional VLANs to be configured"},{"line_number":215,"context_line":"        should be done with the ADD keyword."},{"line_number":216,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_d8f3d7e4","line":213,"in_reply_to":"baada198_d6c25833","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"bc603dcf97d6c0e992dc23515df83176c834c109","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        \"\"\"Verify the syntax of the command to enable a vlan on an intf."},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        Confirm that for the first VLAN configured on a Nexus interface,"},{"line_number":391,"context_line":"        the command string sent to the switch does not contain the"},{"line_number":392,"context_line":"        keyword \u0027add\u0027."},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        Confirm that for the second VLAN configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_517bb27a","line":391,"updated":"2014-07-23 23:59:46.000000000","message":"s/the command/the last command/\nOr consider rewording this doc string to say that we\u0027re confirming that the plugin responds correctly when the switch rejects the \u0027add\u0027 keyword, and it configures the switch correctly when the switch doesn\u0027t reject the \u0027add\u0027 keyword. (Probably easier to just do the former string substitution).","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":388,"context_line":"        \"\"\"Verify the syntax of the command to enable a vlan on an intf."},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        Confirm that for the first VLAN configured on a Nexus interface,"},{"line_number":391,"context_line":"        the command string sent to the switch does not contain the"},{"line_number":392,"context_line":"        keyword \u0027add\u0027."},{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        Confirm that for the second VLAN configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_f8c33b55","line":391,"in_reply_to":"baada198_517bb27a","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"bc603dcf97d6c0e992dc23515df83176c834c109","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        where vlan_id \u003d 100"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        Confirm that for the first host configured on a Nexus interface,"},{"line_number":431,"context_line":"        the command string sent to the switch does not contain the"},{"line_number":432,"context_line":"        keyword \u0027add\u0027."},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        Confirm that for the second host configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_917aaa23","line":431,"updated":"2014-07-23 23:59:46.000000000","message":"s/the command/the last command/\n(since we\u0027re now sending multiple command strings in this case)","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":428,"context_line":"        where vlan_id \u003d 100"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"        Confirm that for the first host configured on a Nexus interface,"},{"line_number":431,"context_line":"        the command string sent to the switch does not contain the"},{"line_number":432,"context_line":"        keyword \u0027add\u0027."},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        Confirm that for the second host configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_b87b8327","line":431,"in_reply_to":"baada198_917aaa23","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"bc603dcf97d6c0e992dc23515df83176c834c109","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        keyword \u0027add\u0027."},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        Confirm that for the second host configured on a Nexus interface,"},{"line_number":435,"context_line":"        the command staring sent to the switch contains does not contain"},{"line_number":436,"context_line":"        the keyword \u0027name\u0027 [signifies vlan intf creation]."},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_11dcda17","line":435,"updated":"2014-07-23 23:59:46.000000000","message":"I know this is outside of your change, but: s/staring/string/ and s/contains does not contain/does not contain/","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":432,"context_line":"        keyword \u0027add\u0027."},{"line_number":433,"context_line":""},{"line_number":434,"context_line":"        Confirm that for the second host configured on a Nexus interface,"},{"line_number":435,"context_line":"        the command staring sent to the switch contains does not contain"},{"line_number":436,"context_line":"        the keyword \u0027name\u0027 [signifies vlan intf creation]."},{"line_number":437,"context_line":""},{"line_number":438,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_3804d37c","line":435,"in_reply_to":"baada198_11dcda17","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"bc603dcf97d6c0e992dc23515df83176c834c109","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            with self._create_resources(name\u003d\u0027net1\u0027, cidr\u003dCIDR_1):"},{"line_number":444,"context_line":"                self.assertTrue(self._is_in_last_nexus_cfg("},{"line_number":445,"context_line":"                        [\u0027allowed\u0027, \u0027vlan\u0027]))"},{"line_number":446,"context_line":"                self.assertFalse(self._is_in_last_nexus_cfg([\u0027add\u0027]))"},{"line_number":447,"context_line":"                with self._create_resources(name\u003d\u0027net2\u0027,"},{"line_number":448,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":449,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_f11926d2","line":446,"updated":"2014-07-23 23:59:46.000000000","message":"Not critical, but if you\u0027re doing another iteration of review, consider beefing this test up a little by adding check for \u0027name\u0027 in config for first VLAN and check for \u0027add\u0027 in config for second VLAN.","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            with self._create_resources(name\u003d\u0027net1\u0027, cidr\u003dCIDR_1):"},{"line_number":444,"context_line":"                self.assertTrue(self._is_in_last_nexus_cfg("},{"line_number":445,"context_line":"                        [\u0027allowed\u0027, \u0027vlan\u0027]))"},{"line_number":446,"context_line":"                self.assertFalse(self._is_in_last_nexus_cfg([\u0027add\u0027]))"},{"line_number":447,"context_line":"                with self._create_resources(name\u003d\u0027net2\u0027,"},{"line_number":448,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":449,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_d82037fa","line":446,"in_reply_to":"baada198_796b3c86","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"d1f2667da4d5e1e4054bcb2591050cf98c4b74ff","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            with self._create_resources(name\u003d\u0027net1\u0027, cidr\u003dCIDR_1):"},{"line_number":444,"context_line":"                self.assertTrue(self._is_in_last_nexus_cfg("},{"line_number":445,"context_line":"                        [\u0027allowed\u0027, \u0027vlan\u0027]))"},{"line_number":446,"context_line":"                self.assertFalse(self._is_in_last_nexus_cfg([\u0027add\u0027]))"},{"line_number":447,"context_line":"                with self._create_resources(name\u003d\u0027net2\u0027,"},{"line_number":448,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":449,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_b825430b","line":446,"in_reply_to":"baada198_f11926d2","updated":"2014-07-28 20:55:06.000000000","message":"Done","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"8b3f54f9b45e4fcb2d829c354f03217474e4fe95","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            with self._create_resources(name\u003d\u0027net1\u0027, cidr\u003dCIDR_1):"},{"line_number":444,"context_line":"                self.assertTrue(self._is_in_last_nexus_cfg("},{"line_number":445,"context_line":"                        [\u0027allowed\u0027, \u0027vlan\u0027]))"},{"line_number":446,"context_line":"                self.assertFalse(self._is_in_last_nexus_cfg([\u0027add\u0027]))"},{"line_number":447,"context_line":"                with self._create_resources(name\u003d\u0027net2\u0027,"},{"line_number":448,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":449,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_796b3c86","line":446,"in_reply_to":"baada198_f11926d2","updated":"2014-07-24 01:34:12.000000000","message":"I think this beefing up should be done. It will help prevent future regressions.","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"54a45be527d6924dfd7b28ab8e698d1929350d27","unresolved":false,"context_lines":[{"line_number":443,"context_line":"            with self._create_resources(name\u003d\u0027net1\u0027, cidr\u003dCIDR_1):"},{"line_number":444,"context_line":"                self.assertTrue(self._is_in_last_nexus_cfg("},{"line_number":445,"context_line":"                        [\u0027allowed\u0027, \u0027vlan\u0027]))"},{"line_number":446,"context_line":"                self.assertFalse(self._is_in_last_nexus_cfg([\u0027add\u0027]))"},{"line_number":447,"context_line":"                with self._create_resources(name\u003d\u0027net2\u0027,"},{"line_number":448,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":449,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"}],"source_content_type":"text/x-python","patch_set":6,"id":"baada198_3b19067b","line":446,"in_reply_to":"baada198_f11926d2","updated":"2014-07-29 17:13:05.000000000","message":"So I understand why this beefing up of this test was not done before. You see this is a two stage process for the first host. The first config creates the VLAN and the second config adds the switchport trunk.\nWe tested to ensure before that the for the first network, the VLAN is being created(with NAME which is not tested as it is not in last config) and switchport is also added (without ADD which we test as it is the last config).\n\nThen for the second host it is only a one stage process for the config. We only ensure that though we\u0027re using the second network, no new VLAN is created but a new switchport for the same VLAN is created. So we test to ensure no \u0027name\u0027 is there in the last config for the second host.\n\nI am going to hit similar issues in the new behavior as well, because the config is now a 3 stage process for the first host and a 2 stage process for the second.","commit_id":"d40d012e8dc929ba0b9054779cfc956aa11aee8c"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"c3b4afbdb485f9f581302eb2196faac9cff25f52","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        When the first VLAN is being added to the interface"},{"line_number":301,"context_line":"        the usage of the ADD keyword should throw up an exception"},{"line_number":302,"context_line":"        specifying that the ADD keyword cannot be used till"},{"line_number":303,"context_line":"        a VLAN list is created and to create a VLAN list the configuration"},{"line_number":304,"context_line":"        should not contain the ADD keyword."}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_dabba1e2","line":301,"updated":"2014-07-29 19:06:57.000000000","message":"Silly nit, take with a grain of salt. Perhaps s/throw up/raise/? \u0027throw up\u0027 brings other things to mind. :)","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"47ee6ca5e6f11760cf0d589d4a69b1397dcdea52","unresolved":false,"context_lines":[{"line_number":298,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        When the first VLAN is being added to the interface"},{"line_number":301,"context_line":"        the usage of the ADD keyword should throw up an exception"},{"line_number":302,"context_line":"        specifying that the ADD keyword cannot be used till"},{"line_number":303,"context_line":"        a VLAN list is created and to create a VLAN list the configuration"},{"line_number":304,"context_line":"        should not contain the ADD keyword."}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_f4b151e1","line":301,"in_reply_to":"baada198_dabba1e2","updated":"2014-07-29 22:32:59.000000000","message":"Done","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"c3b4afbdb485f9f581302eb2196faac9cff25f52","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":453,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"},{"line_number":454,"context_line":"                    # Ensure no new vlan is created"},{"line_number":455,"context_line":"                    self.assertFalse(self._is_in_last_nexus_cfg([\u0027name\u0027]))"},{"line_number":456,"context_line":"                    # Ensure switchport allowed vlan is done"},{"line_number":457,"context_line":"                    self.assertTrue("},{"line_number":458,"context_line":"                        self._is_in_last_nexus_cfg([\u0027allowed\u0027, \u0027vlan\u0027]))"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_9a892972","line":455,"updated":"2014-07-29 19:06:57.000000000","message":"To keep the second half of this test consistent with the first half, s/_is_in_last_nexus_cfg/_is_in_nexus_cfg/. In order for this to work, you\u0027ll need a self.mock_ncclient.reset_mock() before the second call to _create_resources.","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"47ee6ca5e6f11760cf0d589d4a69b1397dcdea52","unresolved":false,"context_lines":[{"line_number":452,"context_line":"                                            cidr\u003dCIDR_2,"},{"line_number":453,"context_line":"                                            host_id\u003dCOMP_HOST_NAME_2):"},{"line_number":454,"context_line":"                    # Ensure no new vlan is created"},{"line_number":455,"context_line":"                    self.assertFalse(self._is_in_last_nexus_cfg([\u0027name\u0027]))"},{"line_number":456,"context_line":"                    # Ensure switchport allowed vlan is done"},{"line_number":457,"context_line":"                    self.assertTrue("},{"line_number":458,"context_line":"                        self._is_in_last_nexus_cfg([\u0027allowed\u0027, \u0027vlan\u0027]))"}],"source_content_type":"text/x-python","patch_set":7,"id":"baada198_14c6c54a","line":455,"in_reply_to":"baada198_9a892972","updated":"2014-07-29 22:32:59.000000000","message":"Done","commit_id":"13200f4529e1ec4b6ddd85c71611f876e69b34d6"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"feb75fd30412a4a92ea4425f5fd25a34584c198b","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def _is_vlan_configured(self, vlan_creation_expected\u003dTrue,"},{"line_number":211,"context_line":"                            first_vlan_addition\u003dFalse):"},{"line_number":212,"context_line":"        \"\"\"Confirm if VLAN was configured or not\"\"\""},{"line_number":213,"context_line":"        vlan_created \u003d self._is_in_nexus_cfg([\u0027vlan\u0027, \u0027vlan-name\u0027])"},{"line_number":214,"context_line":"        add_appears \u003d self._is_in_last_nexus_cfg([\u0027add\u0027])"},{"line_number":215,"context_line":"        # The first VLAN being configured should be done without the"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_205ff210","line":212,"updated":"2014-07-30 11:39:13.000000000","message":"nit: add period at end of doctring (I\u0027m not sure if they removed that requirement)","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"a66a2349650131c4c03e4ab45ad5bfafc3aa29ca","unresolved":false,"context_lines":[{"line_number":209,"context_line":""},{"line_number":210,"context_line":"    def _is_vlan_configured(self, vlan_creation_expected\u003dTrue,"},{"line_number":211,"context_line":"                            first_vlan_addition\u003dFalse):"},{"line_number":212,"context_line":"        \"\"\"Confirm if VLAN was configured or not\"\"\""},{"line_number":213,"context_line":"        vlan_created \u003d self._is_in_nexus_cfg([\u0027vlan\u0027, \u0027vlan-name\u0027])"},{"line_number":214,"context_line":"        add_appears \u003d self._is_in_last_nexus_cfg([\u0027add\u0027])"},{"line_number":215,"context_line":"        # The first VLAN being configured should be done without the"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_16da2979","line":212,"in_reply_to":"baada198_205ff210","updated":"2014-07-30 17:12:14.000000000","message":"Done","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"feb75fd30412a4a92ea4425f5fd25a34584c198b","unresolved":false,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"},{"line_number":388,"context_line":"        the final command string sent to the switch does not contain the"},{"line_number":389,"context_line":"        keyword \u0027add\u0027. The intial attempt will contain \u0027add\u0027 but when"},{"line_number":390,"context_line":"        the switch rejects it, the re-attempt shouldn\u0027t contain the \u0027add\u0027."},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        Confirm that for the second VLAN configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_e0d97a85","line":389,"updated":"2014-07-30 11:39:13.000000000","message":"intial -\u003e initial","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"a66a2349650131c4c03e4ab45ad5bfafc3aa29ca","unresolved":false,"context_lines":[{"line_number":386,"context_line":""},{"line_number":387,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"},{"line_number":388,"context_line":"        the final command string sent to the switch does not contain the"},{"line_number":389,"context_line":"        keyword \u0027add\u0027. The intial attempt will contain \u0027add\u0027 but when"},{"line_number":390,"context_line":"        the switch rejects it, the re-attempt shouldn\u0027t contain the \u0027add\u0027."},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"        Confirm that for the second VLAN configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_36d56d47","line":389,"in_reply_to":"baada198_e0d97a85","updated":"2014-07-30 17:12:14.000000000","message":"Done","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"feb75fd30412a4a92ea4425f5fd25a34584c198b","unresolved":false,"context_lines":[{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        Confirm that when configuring the first host on a Nexus interface,"},{"line_number":429,"context_line":"        the final command string sent to the switch does not contain the"},{"line_number":430,"context_line":"        keyword \u0027add\u0027. The intial attempt will contain \u0027add\u0027 but when"},{"line_number":431,"context_line":"        the switch rejects it, the re-attempt shouldn\u0027t contain the \u0027add\u0027."},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        Confirm that for the second host configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_60348aac","line":430,"updated":"2014-07-30 11:39:13.000000000","message":"initial","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"a66a2349650131c4c03e4ab45ad5bfafc3aa29ca","unresolved":false,"context_lines":[{"line_number":427,"context_line":""},{"line_number":428,"context_line":"        Confirm that when configuring the first host on a Nexus interface,"},{"line_number":429,"context_line":"        the final command string sent to the switch does not contain the"},{"line_number":430,"context_line":"        keyword \u0027add\u0027. The intial attempt will contain \u0027add\u0027 but when"},{"line_number":431,"context_line":"        the switch rejects it, the re-attempt shouldn\u0027t contain the \u0027add\u0027."},{"line_number":432,"context_line":""},{"line_number":433,"context_line":"        Confirm that for the second host configured on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":8,"id":"baada198_56e4a13b","line":430,"in_reply_to":"baada198_60348aac","updated":"2014-07-30 17:12:14.000000000","message":"Done","commit_id":"63072c995d3f551558abb2be5dbe70de20d1593e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2c0de44d819b41375b799d33549b6c1d776b333b","unresolved":false,"context_lines":[{"line_number":295,"context_line":"        self.assertEqual(status, expected_http)"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"    def _mock_config_first_trunk(self):"},{"line_number":298,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        When the first VLAN is being added to the interface the usage of"},{"line_number":301,"context_line":"        the ADD keyword should raise an exception specifying that the ADD"}],"source_content_type":"text/x-python","patch_set":13,"id":"fa98f980_da08abdb","line":298,"range":{"start_line":298,"start_character":11,"end_line":298,"end_character":12},"updated":"2014-09-10 16:49:20.000000000","message":"extra space","commit_id":"6fe36f3f73aa19d2cf4df6139f08967b6574b280"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"17f27b1fca76df58623ed62ccb1435a11f3fbaf5","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        a VLAN list the configuration should not contain the ADD keyword."},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        def _mock_edit_config_a(target, config):"},{"line_number":309,"context_line":"            if all(word in config for word in [\u0027switchport\u0027,"},{"line_number":310,"context_line":"                                               \u0027trunk\u0027,"},{"line_number":311,"context_line":"                                               \u0027allowed\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_4e5cb619","line":308,"updated":"2014-10-16 14:19:21.000000000","message":"It might be possible to use _config_dependent_side_effect as a short-cut to define a side effect method, e.g.\n self._config_dependent_side_effect(\"switchport trunk allowed vlan add\",\n                                 exception)","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"198c2cabb5a61781a9073b8c32b058119f3f11b4","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        a VLAN list the configuration should not contain the ADD keyword."},{"line_number":306,"context_line":""},{"line_number":307,"context_line":"        \"\"\""},{"line_number":308,"context_line":"        def _mock_edit_config_a(target, config):"},{"line_number":309,"context_line":"            if all(word in config for word in [\u0027switchport\u0027,"},{"line_number":310,"context_line":"                                               \u0027trunk\u0027,"},{"line_number":311,"context_line":"                                               \u0027allowed\u0027,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_a9a27cf9","line":308,"in_reply_to":"baa201ad_4e5cb619","updated":"2014-10-16 14:48:14.000000000","message":"Done","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"17f27b1fca76df58623ed62ccb1435a11f3fbaf5","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        Test of the following ml2_conf_cisco_ini config:"},{"line_number":390,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":391,"context_line":"        hostA\u003d1/1"},{"line_number":392,"context_line":"        hostB\u003d1/1"},{"line_number":393,"context_line":"        where vlan_id \u003d 1000"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_cb5a58f1","line":392,"updated":"2014-10-16 14:19:21.000000000","message":"The line hostB\u003d1/1 would be a misconfig (2 hosts on same switch intf). Since this is a test for VMs on the same compute host, you can probably leave the ini config out of the doc string (it doesn\u0027t seem to add much), or set it to the values used (see comment in next method).","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"198c2cabb5a61781a9073b8c32b058119f3f11b4","unresolved":false,"context_lines":[{"line_number":389,"context_line":"        Test of the following ml2_conf_cisco_ini config:"},{"line_number":390,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":391,"context_line":"        hostA\u003d1/1"},{"line_number":392,"context_line":"        hostB\u003d1/1"},{"line_number":393,"context_line":"        where vlan_id \u003d 1000"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_ce9b4664","line":392,"in_reply_to":"baa201ad_cb5a58f1","updated":"2014-10-16 14:48:14.000000000","message":"Done","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"17f27b1fca76df58623ed62ccb1435a11f3fbaf5","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":391,"context_line":"        hostA\u003d1/1"},{"line_number":392,"context_line":"        hostB\u003d1/1"},{"line_number":393,"context_line":"        where vlan_id \u003d 1000"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"},{"line_number":396,"context_line":"        the final command string sent to the switch does not contain the"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_cbe978b8","line":393,"updated":"2014-10-16 14:19:21.000000000","message":"There are 2 VLAN IDs used (1000 and 1001), so either remove this line or change it to reflect the 2 values used.","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"198c2cabb5a61781a9073b8c32b058119f3f11b4","unresolved":false,"context_lines":[{"line_number":390,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":391,"context_line":"        hostA\u003d1/1"},{"line_number":392,"context_line":"        hostB\u003d1/1"},{"line_number":393,"context_line":"        where vlan_id \u003d 1000"},{"line_number":394,"context_line":""},{"line_number":395,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"},{"line_number":396,"context_line":"        the final command string sent to the switch does not contain the"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_8ebcdebc","line":393,"in_reply_to":"baa201ad_cbe978b8","updated":"2014-10-16 14:48:14.000000000","message":"Done","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"17f27b1fca76df58623ed62ccb1435a11f3fbaf5","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        Test of the following ml2_conf_cisco_ini config:"},{"line_number":437,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":438,"context_line":"        hostA\u003d1/1"},{"line_number":439,"context_line":"        hostB\u003d1/2"},{"line_number":440,"context_line":"        where vlan_id \u003d 1000"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_0b7aa023","line":439,"updated":"2014-10-16 14:19:21.000000000","message":"The host names should be testhost and testhost_2 (or use COMP_HOST_NAME and COMP_HOST_NAME_2).","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"198c2cabb5a61781a9073b8c32b058119f3f11b4","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        Test of the following ml2_conf_cisco_ini config:"},{"line_number":437,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":438,"context_line":"        hostA\u003d1/1"},{"line_number":439,"context_line":"        hostB\u003d1/2"},{"line_number":440,"context_line":"        where vlan_id \u003d 1000"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_aead2286","line":439,"in_reply_to":"baa201ad_0b7aa023","updated":"2014-10-16 14:48:14.000000000","message":"Done","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"17f27b1fca76df58623ed62ccb1435a11f3fbaf5","unresolved":false,"context_lines":[{"line_number":437,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":438,"context_line":"        hostA\u003d1/1"},{"line_number":439,"context_line":"        hostB\u003d1/2"},{"line_number":440,"context_line":"        where vlan_id \u003d 1000"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"},{"line_number":443,"context_line":"        the final command string sent to the switch does not contain the"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_eb3f1c23","line":440,"updated":"2014-10-16 14:19:21.000000000","message":"Same comment as earlier, there are 2 VLAN IDs used (1000 and 1001).","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"198c2cabb5a61781a9073b8c32b058119f3f11b4","unresolved":false,"context_lines":[{"line_number":437,"context_line":"        [ml2_mech_cisco_nexus:1.1.1.1]"},{"line_number":438,"context_line":"        hostA\u003d1/1"},{"line_number":439,"context_line":"        hostB\u003d1/2"},{"line_number":440,"context_line":"        where vlan_id \u003d 1000"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":"        Confirm that when configuring the first VLAN on a Nexus interface,"},{"line_number":443,"context_line":"        the final command string sent to the switch does not contain the"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_ceb266e4","line":440,"in_reply_to":"baa201ad_eb3f1c23","updated":"2014-10-16 14:48:14.000000000","message":"Done","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6695,"name":"Dane LeBlanc","email":"leblancd@cisco.com","username":"leblancd"},"change_message_id":"17f27b1fca76df58623ed62ccb1435a11f3fbaf5","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        Confirm that for the second VLAN configured on a Nexus interface,"},{"line_number":448,"context_line":"        the command string sent to the switch does not contain the"},{"line_number":449,"context_line":"        keyword \u0027add\u0027 since it on different hosts."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        \"\"\""},{"line_number":452,"context_line":"        # First vlan should be configured without \u0027add\u0027 keyword and an"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_4eb3d64c","line":449,"updated":"2014-10-16 14:19:21.000000000","message":"s/it on different hosts/it is on a different host/","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"198c2cabb5a61781a9073b8c32b058119f3f11b4","unresolved":false,"context_lines":[{"line_number":446,"context_line":""},{"line_number":447,"context_line":"        Confirm that for the second VLAN configured on a Nexus interface,"},{"line_number":448,"context_line":"        the command string sent to the switch does not contain the"},{"line_number":449,"context_line":"        keyword \u0027add\u0027 since it on different hosts."},{"line_number":450,"context_line":""},{"line_number":451,"context_line":"        \"\"\""},{"line_number":452,"context_line":"        # First vlan should be configured without \u0027add\u0027 keyword and an"}],"source_content_type":"text/x-python","patch_set":22,"id":"baa201ad_eecaca4d","line":449,"in_reply_to":"baa201ad_4eb3d64c","updated":"2014-10-16 14:48:14.000000000","message":"Done","commit_id":"8dbeb0d2f93139340741fb64eef2bae4d7b0188a"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8ffc88fadef3807fcaaf38e2198187835ab891dc","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        if first_vlan_addition:"},{"line_number":219,"context_line":"            add_keyword_expected \u003d False"},{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            add_keyword_expected \u003d True"},{"line_number":222,"context_line":"        return (self._is_in_last_nexus_cfg([\u0027allowed\u0027, \u0027vlan\u0027]) and"},{"line_number":223,"context_line":"                vlan_created \u003d\u003d vlan_creation_expected and"},{"line_number":224,"context_line":"                add_appears \u003d\u003d add_keyword_expected)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_11377b4f","line":221,"updated":"2014-10-22 18:02:11.000000000","message":"We can write it to:\n\n   add_keyword_expected \u003d not first_vlan_addition","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"43569f2d8f27e622379e29685bf7c45c6c6e73a5","unresolved":false,"context_lines":[{"line_number":218,"context_line":"        if first_vlan_addition:"},{"line_number":219,"context_line":"            add_keyword_expected \u003d False"},{"line_number":220,"context_line":"        else:"},{"line_number":221,"context_line":"            add_keyword_expected \u003d True"},{"line_number":222,"context_line":"        return (self._is_in_last_nexus_cfg([\u0027allowed\u0027, \u0027vlan\u0027]) and"},{"line_number":223,"context_line":"                vlan_created \u003d\u003d vlan_creation_expected and"},{"line_number":224,"context_line":"                add_appears \u003d\u003d add_keyword_expected)"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_27859759","line":221,"in_reply_to":"9aa7fdbe_11377b4f","updated":"2014-10-28 19:14:00.000000000","message":"Done","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"2a7d66f681f0d6e5a7d7a2adfd2b6a78769a68b8","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.assertEqual(status, expected_http)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _mock_config_first_trunk(self):"},{"line_number":300,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        When the first VLAN is being added to the interface the usage of"},{"line_number":303,"context_line":"        the ADD keyword should raise an exception specifying that the ADD"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_62a69bc3","line":300,"range":{"start_line":300,"start_character":11,"end_line":300,"end_character":12},"updated":"2014-10-20 03:48:51.000000000","message":"extra space","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"8ffc88fadef3807fcaaf38e2198187835ab891dc","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.assertEqual(status, expected_http)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _mock_config_first_trunk(self):"},{"line_number":300,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        When the first VLAN is being added to the interface the usage of"},{"line_number":303,"context_line":"        the ADD keyword should raise an exception specifying that the ADD"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_f11677a6","line":300,"in_reply_to":"9aa7fdbe_3eb9fe2e","updated":"2014-10-22 18:02:11.000000000","message":"The space at the beginning of line after opening triple quotes is unnecessary. I think this is what yamamoto pointed.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"a73cde59b8334615b7cab5dd89c097415095b073","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.assertEqual(status, expected_http)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _mock_config_first_trunk(self):"},{"line_number":300,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        When the first VLAN is being added to the interface the usage of"},{"line_number":303,"context_line":"        the ADD keyword should raise an exception specifying that the ADD"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_3eb9fe2e","line":300,"in_reply_to":"9aa7fdbe_62a69bc3","updated":"2014-10-20 14:03:38.000000000","message":"This is not an extra space. It is only one blank line (301).\nPlease see all other instances of methods in this file. I have only followed what was practiced.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"},{"author":{"_account_id":6620,"name":"Abishek Subramanian","email":"absubram@cisco.com","username":"absubram"},"change_message_id":"43569f2d8f27e622379e29685bf7c45c6c6e73a5","unresolved":false,"context_lines":[{"line_number":297,"context_line":"        self.assertEqual(status, expected_http)"},{"line_number":298,"context_line":""},{"line_number":299,"context_line":"    def _mock_config_first_trunk(self):"},{"line_number":300,"context_line":"        \"\"\" Mock the behavior for the first VLAN addition."},{"line_number":301,"context_line":""},{"line_number":302,"context_line":"        When the first VLAN is being added to the interface the usage of"},{"line_number":303,"context_line":"        the ADD keyword should raise an exception specifying that the ADD"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aa7fdbe_c7accbef","line":300,"in_reply_to":"9aa7fdbe_f11677a6","updated":"2014-10-28 19:14:00.000000000","message":"Ah! Apologies. I did not notice that. Thank you for catching it.","commit_id":"1434a0874b55604a47753e90d487d75d5fc483e0"}]}
