)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"6b64b283955b6fa968b8b85f18e6786e1860de3a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"meaning that \u0027ip link\u0027 fails like this when trying to set state:"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":" # ip l set dev p2p1 vf 6 state disable"},{"line_number":13,"context_line":" RTNETLINK answers: Operation not supported"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"The sriov-nic-agent tries to do that in"},{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"9a41bdd9_ee546655","line":13,"updated":"2015-07-13 06:52:16.000000000","message":"The original design of he SRIOV MD is that agent is an optional component.\nOnce vendor SRIOV  NIC does not support link state change, agent should not be deployed at all.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"b036027e2ba89d5210e9b4e25cdab087efa226e6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"},{"line_number":17,"context_line":"exit status from \u0027ip link\u0027 and, therefore, doesn\u0027t reach the code"},{"line_number":18,"context_line":"that updates the actual port status, so port could hang in a BUILD"},{"line_number":19,"context_line":"state even if binding was successful."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Also, replace LOG.exception with LOG.warning for set_device_state()"},{"line_number":22,"context_line":"as the exception would be logged by PciDeviceIPWrapper.set_vf_state()"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_b8ccdb6a","line":19,"updated":"2015-07-02 08:59:45.000000000","message":"the device/driver in question is always enabled?\nif so, ignoring the error when enabling sounds ok.\nbut ignoring the error when disabling might not be a good idea.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"3916cf7af560f0044bcfe724e7b94735e5652513","unresolved":false,"context_lines":[{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"},{"line_number":17,"context_line":"exit status from \u0027ip link\u0027 and, therefore, doesn\u0027t reach the code"},{"line_number":18,"context_line":"that updates the actual port status, so port could hang in a BUILD"},{"line_number":19,"context_line":"state even if binding was successful."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Also, replace LOG.exception with LOG.warning for set_device_state()"},{"line_number":22,"context_line":"as the exception would be logged by PciDeviceIPWrapper.set_vf_state()"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_5e1b3473","line":19,"in_reply_to":"ba3cc151_3be442df","updated":"2015-07-02 10:44:37.000000000","message":"IMO the user should be notified the failure.\nis there a big problem if the agent refrains from calling update_device_down in that case?","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"045f0f8a4d6e9c2e0da4e20f3f1208f0bee4ffbc","unresolved":false,"context_lines":[{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"},{"line_number":17,"context_line":"exit status from \u0027ip link\u0027 and, therefore, doesn\u0027t reach the code"},{"line_number":18,"context_line":"that updates the actual port status, so port could hang in a BUILD"},{"line_number":19,"context_line":"state even if binding was successful."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Also, replace LOG.exception with LOG.warning for set_device_state()"},{"line_number":22,"context_line":"as the exception would be logged by PciDeviceIPWrapper.set_vf_state()"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_9971ab0e","line":19,"in_reply_to":"ba3cc151_5e1b3473","updated":"2015-07-03 06:57:34.000000000","message":"In a typical scenario when user creates a port, creates a VM with this port and then deletes the VM, in current implementation the port will be deleted anyway and user would not notice anything.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"9c6c8558edb2d766cc861e88dd68a8b282e3041e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"},{"line_number":17,"context_line":"exit status from \u0027ip link\u0027 and, therefore, doesn\u0027t reach the code"},{"line_number":18,"context_line":"that updates the actual port status, so port could hang in a BUILD"},{"line_number":19,"context_line":"state even if binding was successful."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Also, replace LOG.exception with LOG.warning for set_device_state()"},{"line_number":22,"context_line":"as the exception would be logged by PciDeviceIPWrapper.set_vf_state()"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_3be442df","line":19,"in_reply_to":"ba3cc151_9b98eec1","updated":"2015-07-02 10:33:26.000000000","message":"That\u0027s true.\n\nIt doesn\u0027t seem to be a problem from my point of view, because if the driver doesn\u0027t support changing state there\u0027s nothing user can do about it.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"46776ced4853da872bf4a10b821e09ba26159328","unresolved":false,"context_lines":[{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"},{"line_number":17,"context_line":"exit status from \u0027ip link\u0027 and, therefore, doesn\u0027t reach the code"},{"line_number":18,"context_line":"that updates the actual port status, so port could hang in a BUILD"},{"line_number":19,"context_line":"state even if binding was successful."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Also, replace LOG.exception with LOG.warning for set_device_state()"},{"line_number":22,"context_line":"as the exception would be logged by PciDeviceIPWrapper.set_vf_state()"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_fb0b3a22","line":19,"in_reply_to":"ba3cc151_b8ccdb6a","updated":"2015-07-02 10:17:48.000000000","message":"If the state change is not supported, normally it\u0027s always enabled. As you might notice by the implementation, we\u0027re not ignoring the error, but check what kind of error is that.\n\nIf the error is because of such operation is not supported, i.e. state change is not supported, we throw a specific exception that we handle in a special way later. If that\u0027s the other kind of error, behavior is not changed.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"707cb992aea924934e56228ac6519e56753fb3bf","unresolved":false,"context_lines":[{"line_number":16,"context_line":"SriovNicSwitchAgent.treat_device() and fails because of non-zero"},{"line_number":17,"context_line":"exit status from \u0027ip link\u0027 and, therefore, doesn\u0027t reach the code"},{"line_number":18,"context_line":"that updates the actual port status, so port could hang in a BUILD"},{"line_number":19,"context_line":"state even if binding was successful."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Also, replace LOG.exception with LOG.warning for set_device_state()"},{"line_number":22,"context_line":"as the exception would be logged by PciDeviceIPWrapper.set_vf_state()"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba3cc151_9b98eec1","line":19,"in_reply_to":"ba3cc151_fb0b3a22","updated":"2015-07-02 10:25:17.000000000","message":"my undestanding is that, if it failed to disable the interface (with IpCommandOperationNotSupportedError), it just logs a warning\nand call update_device_down.  is it right?\n\ni\u0027m not sure if it\u0027s a good idea because a user will not notice\nthe problem unless he happens to look at agent logs.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/common/exceptions.py":[{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"5f2909c9987e84666711cb7cd4d8adcededeb791","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    message \u003d _(\"ip command failed on device %(dev_name)s: %(reason)s\")"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"class IpCommandOperationNotSupportedError(SriovNicError):"},{"line_number":32,"context_line":"    message \u003d _(\"Operation not supported on device %(dev_name)s\")"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_a0a960e1","line":31,"updated":"2015-08-28 06:23:08.000000000","message":"how about making this a subclass of IpCommandError?","commit_id":"bacc47909d4740f84df59e25d8d8ae01461059b4"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/pci_lib.py":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59f8e9df6a497fae552295fb922ff869d356de50","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            self._execute(\u0027\u0027, \"link\", (\"set\", self.dev_name, \"vf\","},{"line_number":105,"context_line":"                                       str(vf_index), \"state\", status_str))"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":108,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":109,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":110,"context_line":"                    dev_name\u003dself.dev_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a4dcd0f_50cc0789","line":107,"updated":"2015-08-04 12:46:17.000000000","message":"Would this make more sense as a warning for the \u0027IP_LINK_OP_NOT_SUPPORTED\u0027 case?","commit_id":"20fa3b9d54830c602d85725dab67c74f56b9b87e"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"b1d277e46e0f2e1ad100bae399de7fe9565c1399","unresolved":false,"context_lines":[{"line_number":104,"context_line":"            self._execute(\u0027\u0027, \"link\", (\"set\", self.dev_name, \"vf\","},{"line_number":105,"context_line":"                                       str(vf_index), \"state\", status_str))"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":108,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":109,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":110,"context_line":"                    dev_name\u003dself.dev_name)"}],"source_content_type":"text/x-python","patch_set":7,"id":"1a4dcd0f_2c177bee","line":107,"in_reply_to":"1a4dcd0f_50cc0789","updated":"2015-08-05 05:04:08.000000000","message":"In other words, do you propose to log a warning only if it\u0027s NOT the IP_LINK_OP_NOT_SUPPORTED case (i.e. we didn\u0027t know why it failed)?","commit_id":"20fa3b9d54830c602d85725dab67c74f56b9b87e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"df8227a86fbc74e161f3fe645ab9e72aba73d92f","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                       str(vf_index), \"state\", status_str))"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":108,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":109,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":110,"context_line":"                    dev_name\u003dself.dev_name)"},{"line_number":111,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_48740267","line":108,"updated":"2015-07-28 08:55:52.000000000","message":"doesn\u0027t this have locale problems?","commit_id":"20fa3b9d54830c602d85725dab67c74f56b9b87e"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"a4d9e7599d55c0561388cdb4726e0951c2708911","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                       str(vf_index), \"state\", status_str))"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":108,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":109,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":110,"context_line":"                    dev_name\u003dself.dev_name)"},{"line_number":111,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_fd60ee02","line":108,"in_reply_to":"3a50d1a3_48740267","updated":"2015-07-29 09:43:16.000000000","message":"Do you mean i18ned error messages because of the NLS support or something else? If that\u0027s the case, we should not be affected by it as iproute2 does not support NLS.","commit_id":"20fa3b9d54830c602d85725dab67c74f56b9b87e"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"931296a1089d4cae3696f69572ebc47d4ded0fff","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                       str(vf_index), \"state\", status_str))"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":108,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":109,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":110,"context_line":"                    dev_name\u003dself.dev_name)"},{"line_number":111,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"3a50d1a3_47b10bdf","line":108,"in_reply_to":"3a50d1a3_fd60ee02","updated":"2015-07-29 12:00:00.000000000","message":"yes, it\u0027s what i meant.  thank you for clarification.","commit_id":"20fa3b9d54830c602d85725dab67c74f56b9b87e"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"68aab29f3fde8edbb49546c1a44d023e25999f8e","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        try:"},{"line_number":104,"context_line":"            self._as_root([], \"link\", (\"set\", self.dev_name, \"vf\","},{"line_number":105,"context_line":"                                       str(vf_index), \"state\", status_str))"},{"line_number":106,"context_line":"        except Exception as e:"},{"line_number":107,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":108,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":109,"context_line":"                raise exc.IpCommandOperationNotSupportedError("}],"source_content_type":"text/x-python","patch_set":8,"id":"fa1b9901_fe2b7292","line":106,"updated":"2015-08-19 08:44:55.000000000","message":"Please consider to extract exception handling to separate method and reuse for 2 following methods as well","commit_id":"f83b238bf51a8f27cc4b0c66bb6e03bb578417f0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"68aab29f3fde8edbb49546c1a44d023e25999f8e","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            self._as_root(\u0027\u0027, \"link\", (\"set\", self.dev_name, \"vf\","},{"line_number":126,"context_line":"                                       str(vf_index), \"spoofchk\", setting))"},{"line_number":127,"context_line":"        except Exception as e:"},{"line_number":128,"context_line":"            raise exc.IpCommandError(dev_name\u003dself.dev_name,"},{"line_number":129,"context_line":"                                     reason\u003dstr(e))"},{"line_number":130,"context_line":""},{"line_number":131,"context_line":"    def set_vf_max_rate(self, vf_index, max_tx_rate):"}],"source_content_type":"text/x-python","patch_set":8,"id":"fa1b9901_fe54d221","line":128,"updated":"2015-08-19 08:44:55.000000000","message":"I think you can handle the exception in the same way as for vf_state failure by checking if IP_LINK_OP_NOT_SUPPORTED is in the exception. For all set_vf_xxx methods I would suggest to unify the exception handling since it\u0027s the same code.","commit_id":"f83b238bf51a8f27cc4b0c66bb6e03bb578417f0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"68aab29f3fde8edbb49546c1a44d023e25999f8e","unresolved":false,"context_lines":[{"line_number":139,"context_line":"                                       str(vf_index), \"rate\","},{"line_number":140,"context_line":"                                       str(max_tx_rate)))"},{"line_number":141,"context_line":"        except Exception as e:"},{"line_number":142,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":143,"context_line":"            raise exc.IpCommandError(dev_name\u003dself.dev_name,"},{"line_number":144,"context_line":"                                     reason\u003de)"},{"line_number":145,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa1b9901_be35faf7","line":142,"updated":"2015-08-19 08:44:55.000000000","message":"Ditto","commit_id":"f83b238bf51a8f27cc4b0c66bb6e03bb578417f0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"1d993f4eaf14e73ea4b2678800a999f4a1278969","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        \"\"\"Sets vf feature"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        Checks if the feature is not supported or there\u0027s some"},{"line_number":55,"context_line":"        general error during ip link invocation."},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        @param vf_index: vf index"},{"line_number":58,"context_line":"        @param feature: name of a feature to be passed to ip link,"}],"source_content_type":"text/x-python","patch_set":9,"id":"fa1b9901_cb6b9184","line":55,"updated":"2015-08-23 11:14:13.000000000","message":"+ Raises exception accordingly","commit_id":"fd1cc8d1b3d4e98697f2fe27e2e96ed9cf6b8ab1"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"f918258d5e2f1fdfc8089add23373c8599ef703e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"        \"\"\""},{"line_number":124,"context_line":"        status_str \u003d self.LinkState.ENABLE if state else \\"},{"line_number":125,"context_line":"            self.LinkState.DISABLE"},{"line_number":126,"context_line":"        self._set_feature(vf_index, \"state\", status_str)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"    def set_vf_spoofcheck(self, vf_index, enabled):"},{"line_number":129,"context_line":"        \"\"\"sets vf spoofcheck"}],"source_content_type":"text/x-python","patch_set":10,"id":"da20952f_342a892d","line":126,"updated":"2015-08-27 20:35:26.000000000","message":"+1 nice cleanup with adding _set_feature.","commit_id":"bacc47909d4740f84df59e25d8d8ae01461059b4"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        general error during ip link invocation and raises"},{"line_number":56,"context_line":"        exception accordingly."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        @param vf_index: vf index"},{"line_number":59,"context_line":"        @param feature: name of a feature to be passed to ip link,"},{"line_number":60,"context_line":"                        such as \u0027state\u0027 or \u0027spoofchk\u0027"},{"line_number":61,"context_line":"        @param value: value of the feature setting"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_feccf062","line":58,"updated":"2015-09-02 19:33:02.000000000","message":"nit: The format is incorrect for these params.\n\n  :param vf_index: vf_index","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":55,"context_line":"        general error during ip link invocation and raises"},{"line_number":56,"context_line":"        exception accordingly."},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        @param vf_index: vf index"},{"line_number":59,"context_line":"        @param feature: name of a feature to be passed to ip link,"},{"line_number":60,"context_line":"                        such as \u0027state\u0027 or \u0027spoofchk\u0027"},{"line_number":61,"context_line":"        @param value: value of the feature setting"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_cdecb2f5","line":58,"in_reply_to":"da20952f_feccf062","updated":"2015-09-03 17:27:59.000000000","message":"Oh, funny, I used this pattern as it\u0027s used in other places in this file. But that needs to be fixed separately, I guess.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            self._as_root([], \"link\", (\"set\", self.dev_name, \"vf\","},{"line_number":65,"context_line":"                                       str(vf_index), feature, value))"},{"line_number":66,"context_line":"        except Exception as e:"},{"line_number":67,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":68,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":69,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":70,"context_line":"                    dev_name\u003dself.dev_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_fe9e3053","line":67,"updated":"2015-09-02 19:33:02.000000000","message":"Do we really need to log when we\u0027re raising another exception anyway?  This seems a bit verbose to me.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":64,"context_line":"            self._as_root([], \"link\", (\"set\", self.dev_name, \"vf\","},{"line_number":65,"context_line":"                                       str(vf_index), feature, value))"},{"line_number":66,"context_line":"        except Exception as e:"},{"line_number":67,"context_line":"            LOG.exception(_LE(\"Failed executing ip command\"))"},{"line_number":68,"context_line":"            if self.IP_LINK_OP_NOT_SUPPORTED in str(e):"},{"line_number":69,"context_line":"                raise exc.IpCommandOperationNotSupportedError("},{"line_number":70,"context_line":"                    dev_name\u003dself.dev_name)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_8dbd5ad9","line":67,"in_reply_to":"da20952f_fe9e3053","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"}],"neutron/plugins/ml2/drivers/mech_sriov/agent/sriov_nic_agent.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"537558768c7e61c778c5a76c3e61172bafba8fa2","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                self.eswitch_mgr.set_device_state(device, pci_slot,"},{"line_number":176,"context_line":"                                                  admin_state_up)"},{"line_number":177,"context_line":"            except exc.IpCommandOperationNotSupportedError:"},{"line_number":178,"context_line":"                LOG.warning(_LW(\"Device does not support state change\"),"},{"line_number":179,"context_line":"                            device)"},{"line_number":180,"context_line":"            except exc.SriovNicError:"},{"line_number":181,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_30332d64","line":178,"updated":"2015-07-01 14:10:20.000000000","message":"\"Device does\" -\u003e \"Device %s does\"?","commit_id":"af9c71a81eba1debfcf7277ab0837d2954d975de"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"fea9b7575e2abcdcc7c6a71acf8fad826bf8e609","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                self.eswitch_mgr.set_device_state(device, pci_slot,"},{"line_number":176,"context_line":"                                                  admin_state_up)"},{"line_number":177,"context_line":"            except exc.IpCommandOperationNotSupportedError:"},{"line_number":178,"context_line":"                LOG.warning(_LW(\"Device does not support state change\"),"},{"line_number":179,"context_line":"                            device)"},{"line_number":180,"context_line":"            except exc.SriovNicError:"},{"line_number":181,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_7ddacce9","line":178,"in_reply_to":"ba3cc151_30332d64","updated":"2015-07-02 04:41:29.000000000","message":"Done","commit_id":"af9c71a81eba1debfcf7277ab0837d2954d975de"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"2290404429753d0ee766220d8ecab8007fbcf7ff","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            try:"},{"line_number":175,"context_line":"                self.eswitch_mgr.set_device_state(device, pci_slot,"},{"line_number":176,"context_line":"                                                  admin_state_up)"},{"line_number":177,"context_line":"            except exc.IpCommandOperationNotSupportedError:"},{"line_number":178,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":179,"context_line":"                            device)"},{"line_number":180,"context_line":"            except exc.SriovNicError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_2156a15c","line":177,"updated":"2015-07-14 08:17:39.000000000","message":"Maybe it makes sense to check during agent initialization if set_device_state operation is supported, based on this you may skip setting it if not supported.\nAs an option, the inspected capability may be added to the report state sent by agent to the server, so server may later leverage this information.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"b06fc77c9ad471d27f29d47f15758649c3ff7c00","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            try:"},{"line_number":175,"context_line":"                self.eswitch_mgr.set_device_state(device, pci_slot,"},{"line_number":176,"context_line":"                                                  admin_state_up)"},{"line_number":177,"context_line":"            except exc.IpCommandOperationNotSupportedError:"},{"line_number":178,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":179,"context_line":"                            device)"},{"line_number":180,"context_line":"            except exc.SriovNicError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_3a6f9fc6","line":177,"in_reply_to":"9a41bdd9_2156a15c","updated":"2015-07-14 10:59:03.000000000","message":"It would be a good thing to do, but I\u0027m not aware how to check if that\u0027s supported other than trying to run the actual \u0027ip link vf state enable\u0027 command and see if it fails with a specific error message.\n\nProbably, on initialization we could pick some random vf and probe on that, but that sounds like we can break some existing / intentional configurations.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"dd250c06f38a986e7b42bb509b36afc027804b13","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            try:"},{"line_number":175,"context_line":"                self.eswitch_mgr.set_device_state(device, pci_slot,"},{"line_number":176,"context_line":"                                                  admin_state_up)"},{"line_number":177,"context_line":"            except exc.IpCommandOperationNotSupportedError:"},{"line_number":178,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":179,"context_line":"                            device)"},{"line_number":180,"context_line":"            except exc.SriovNicError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_ff2609cd","line":177,"in_reply_to":"9a41bdd9_2156a15c","updated":"2015-07-14 11:08:13.000000000","message":"not throwing an exception is always preferable in my book however what you propose would not work if you had mixed nics on the platform.\n\nfor example some Melonox NICs which support changing the link state and some older Intel NICs that don\u0027t.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"d9b4f6002d6d9e425297de3377507888660e05e0","unresolved":false,"context_lines":[{"line_number":174,"context_line":"            try:"},{"line_number":175,"context_line":"                self.eswitch_mgr.set_device_state(device, pci_slot,"},{"line_number":176,"context_line":"                                                  admin_state_up)"},{"line_number":177,"context_line":"            except exc.IpCommandOperationNotSupportedError:"},{"line_number":178,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":179,"context_line":"                            device)"},{"line_number":180,"context_line":"            except exc.SriovNicError:"}],"source_content_type":"text/x-python","patch_set":6,"id":"9a41bdd9_4e450815","line":177,"in_reply_to":"9a41bdd9_ff2609cd","updated":"2015-07-14 11:22:37.000000000","message":"I do think its doable even with mixed nics, since capability is per PCI slot. But anyway its just an optimization and I am OK with proposed way as well.\nAs for user driven admin state change,  user should get an error when the operation is not supported. As we discussed with Roman at IRC, this can be handled in different patch.","commit_id":"3d48a4d042e754857bc230fa3456bf43ffaab704"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":202,"context_line":"                            device)"},{"line_number":203,"context_line":"            except exc.SriovNicError:"},{"line_number":204,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"},{"line_number":205,"context_line":"                return"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_5b9e53b9","line":204,"updated":"2015-09-02 19:33:02.000000000","message":"nit:  Change from exception to warning level is a bit out of scope for this change.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9d0c0d61c7e21525c36de7b9dfbf773c94551e40","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":202,"context_line":"                            device)"},{"line_number":203,"context_line":"            except exc.SriovNicError:"},{"line_number":204,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"},{"line_number":205,"context_line":"                return"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_564cea9c","line":204,"in_reply_to":"da20952f_2d5a0e84","updated":"2015-09-09 16:44:04.000000000","message":"Fair enough.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                LOG.warning(_LW(\"Device %s does not support state change\"),"},{"line_number":202,"context_line":"                            device)"},{"line_number":203,"context_line":"            except exc.SriovNicError:"},{"line_number":204,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"},{"line_number":205,"context_line":"                return"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_2d5a0e84","line":204,"in_reply_to":"da20952f_5b9e53b9","updated":"2015-09-03 17:27:59.000000000","message":"This doesn\u0027t seem to be completely out of scope because I\u0027m touching this code anyway and I provided reasoning in the commit message why I\u0027m doing it.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            except exc.SriovNicError:"},{"line_number":204,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"},{"line_number":205,"context_line":"                return"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            if admin_state_up:"},{"line_number":208,"context_line":"                # update plugin about port status"},{"line_number":209,"context_line":"                self.plugin_rpc.update_device_up(self.context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_1b5a1b2b","line":206,"updated":"2015-09-02 19:33:02.000000000","message":"nit:  Avoid gratuitous whitespace changes.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":203,"context_line":"            except exc.SriovNicError:"},{"line_number":204,"context_line":"                LOG.warning(_LW(\"Failed to set device %s state\"), device)"},{"line_number":205,"context_line":"                return"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"            if admin_state_up:"},{"line_number":208,"context_line":"                # update plugin about port status"},{"line_number":209,"context_line":"                self.plugin_rpc.update_device_up(self.context,"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_0d694a25","line":206,"in_reply_to":"da20952f_1b5a1b2b","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"}],"neutron/plugins/sriovnicagent/sriov_nic_agent.py":[{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"104f47d40b627e886999b9adbb45e8e49b27a394","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                # some drivers don\u0027t allow to set vf state, in this"},{"line_number":179,"context_line":"                # case we should just proceed to report an appropriate"},{"line_number":180,"context_line":"                # device state"},{"line_number":181,"context_line":"                if \u0027RTNETLINK answers: Operation not supported\u0027 not in e.msg:"},{"line_number":182,"context_line":"                    return"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_ee04b64a","line":181,"updated":"2015-06-25 06:08:56.000000000","message":"I worry about the constant string. I guess that it should be defined on which other place but I have no idea.","commit_id":"9d26ec84985e621353825955e040c9883853e94e"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"bf2520fbc2de367a1e4a64c88f012114ba720a21","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                # some drivers don\u0027t allow to set vf state, in this"},{"line_number":179,"context_line":"                # case we should just proceed to report an appropriate"},{"line_number":180,"context_line":"                # device state"},{"line_number":181,"context_line":"                if \u0027RTNETLINK answers: Operation not supported\u0027 not in e.msg:"},{"line_number":182,"context_line":"                    return"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_b71d9063","line":181,"in_reply_to":"fa32b979_c63c3631","updated":"2015-06-25 13:20:30.000000000","message":"Updated the change according to this description.","commit_id":"9d26ec84985e621353825955e040c9883853e94e"},{"author":{"_account_id":7715,"name":"Hirofumi Ichihara","email":"ichihara.hirofumi@gmail.com","username":"Hirofumi-Ichihara"},"change_message_id":"09167c84461e9542076e121ca7c2a51e0c5115a9","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                # some drivers don\u0027t allow to set vf state, in this"},{"line_number":179,"context_line":"                # case we should just proceed to report an appropriate"},{"line_number":180,"context_line":"                # device state"},{"line_number":181,"context_line":"                if \u0027RTNETLINK answers: Operation not supported\u0027 not in e.msg:"},{"line_number":182,"context_line":"                    return"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_c63c3631","line":181,"in_reply_to":"fa32b979_e6793a83","updated":"2015-06-25 07:41:02.000000000","message":"I prefer the idea over current implementation.","commit_id":"9d26ec84985e621353825955e040c9883853e94e"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"56b429dc31fec6b215a6ecbdd267287884f57d7d","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                # some drivers don\u0027t allow to set vf state, in this"},{"line_number":179,"context_line":"                # case we should just proceed to report an appropriate"},{"line_number":180,"context_line":"                # device state"},{"line_number":181,"context_line":"                if \u0027RTNETLINK answers: Operation not supported\u0027 not in e.msg:"},{"line_number":182,"context_line":"                    return"},{"line_number":183,"context_line":""},{"line_number":184,"context_line":"            if admin_state_up:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa32b979_e6793a83","line":181,"in_reply_to":"fa32b979_ee04b64a","updated":"2015-06-25 07:27:54.000000000","message":"Yes, that was my concern as well.\n\nThinking a little bit more about it I got the following idea. Actually, having sriovagent rely on implementation detail, i.e. that eswitch_mrg uses ip-link in \u0027set_device_state\u0027 is not good either. \n\nI guess the right thing to do would be to update pci_lib.py \u0027set_vf_state\u0027 method to throw different type of exception for \u0027operation not supported\u0027 errors, e.g. IpCommandOperationNotSupported instead of IpCommandError. It would allow to store this constant with other constants that pci_lib.py already uses to work with \u0027ip-link\u0027 and also will allow not to depend on implementation details in sriov agent itself.","commit_id":"9d26ec84985e621353825955e040c9883853e94e"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_pci_lib.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            self.assertRaises(exc.IpCommandOperationNotSupportedError,"},{"line_number":141,"context_line":"                              self.pci_wrapper.set_vf_state,"},{"line_number":142,"context_line":"                              self.VF_INDEX,"},{"line_number":143,"context_line":"                              True)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_3beeff8b","line":143,"updated":"2015-09-02 19:33:02.000000000","message":"See comment is other test file (L233)","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":140,"context_line":"            self.assertRaises(exc.IpCommandOperationNotSupportedError,"},{"line_number":141,"context_line":"                              self.pci_wrapper.set_vf_state,"},{"line_number":142,"context_line":"                              self.VF_INDEX,"},{"line_number":143,"context_line":"                              True)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_03227b01","line":143,"in_reply_to":"da20952f_3beeff8b","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"}],"neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/test_sriov_nic_agent.py":[{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        agent.plugin_rpc \u003d mock.Mock()"},{"line_number":227,"context_line":"        agent.eswitch_mgr \u003d mock.Mock()"},{"line_number":228,"context_line":"        agent.eswitch_mgr.device_exists.return_value \u003d True"},{"line_number":229,"context_line":"        agent.eswitch_mgr.set_device_state.side_effect \u003d \\"},{"line_number":230,"context_line":"            exceptions.IpCommandOperationNotSupportedError("},{"line_number":231,"context_line":"                dev_name\u003d\u0027aa:bb:cc:dd:ee:ff\u0027)"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_5bd3b35f","line":229,"updated":"2015-09-02 19:33:02.000000000","message":"Don\u0027t use \\ to continue a line.  Use parens.\n\n  agent.eswitch_mgr.set_device_state.side_effect \u003d (\n      exceptions.IpCommandOperationNotSupportedError(\n          dev_name\u003d\u0027aa:bb:cc:dd:ee:ff\u0027))","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        agent.plugin_rpc \u003d mock.Mock()"},{"line_number":227,"context_line":"        agent.eswitch_mgr \u003d mock.Mock()"},{"line_number":228,"context_line":"        agent.eswitch_mgr.device_exists.return_value \u003d True"},{"line_number":229,"context_line":"        agent.eswitch_mgr.set_device_state.side_effect \u003d \\"},{"line_number":230,"context_line":"            exceptions.IpCommandOperationNotSupportedError("},{"line_number":231,"context_line":"                dev_name\u003d\u0027aa:bb:cc:dd:ee:ff\u0027)"},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_cd7cb2b7","line":229,"in_reply_to":"da20952f_5bd3b35f","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            exceptions.IpCommandOperationNotSupportedError("},{"line_number":231,"context_line":"                dev_name\u003d\u0027aa:bb:cc:dd:ee:ff\u0027)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, True)"},{"line_number":234,"context_line":"        self.assertTrue(agent.plugin_rpc.update_device_up.called)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_treat_device_set_device_state_exception(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_bbd1affd","line":233,"updated":"2015-09-02 19:33:02.000000000","message":"nit:  it would be more readable if you passed True as a named argument:\n\n  agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, admin_state_up\u003dTrue)\n\nOtherwise, it is hard to know what True means in this context.","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            exceptions.IpCommandOperationNotSupportedError("},{"line_number":231,"context_line":"                dev_name\u003d\u0027aa:bb:cc:dd:ee:ff\u0027)"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"        agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, True)"},{"line_number":234,"context_line":"        self.assertTrue(agent.plugin_rpc.update_device_up.called)"},{"line_number":235,"context_line":""},{"line_number":236,"context_line":"    def test_treat_device_set_device_state_exception(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_8d4d5a9b","line":233,"in_reply_to":"da20952f_bbd1affd","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        agent.plugin_rpc \u003d mock.Mock()"},{"line_number":239,"context_line":"        agent.eswitch_mgr \u003d mock.Mock()"},{"line_number":240,"context_line":"        agent.eswitch_mgr.device_exists.return_value \u003d True"},{"line_number":241,"context_line":"        agent.eswitch_mgr.set_device_state.side_effect \u003d \\"},{"line_number":242,"context_line":"            exceptions.SriovNicError()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, True)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_3b059fc1","line":241,"updated":"2015-09-02 19:33:02.000000000","message":"ditto (L229)","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":238,"context_line":"        agent.plugin_rpc \u003d mock.Mock()"},{"line_number":239,"context_line":"        agent.eswitch_mgr \u003d mock.Mock()"},{"line_number":240,"context_line":"        agent.eswitch_mgr.device_exists.return_value \u003d True"},{"line_number":241,"context_line":"        agent.eswitch_mgr.set_device_state.side_effect \u003d \\"},{"line_number":242,"context_line":"            exceptions.SriovNicError()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, True)"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_0d5aaa50","line":241,"in_reply_to":"da20952f_3b059fc1","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ab4819eb860faa62279c9a4e1a388020ac9b24f5","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        agent.eswitch_mgr.set_device_state.side_effect \u003d \\"},{"line_number":242,"context_line":"            exceptions.SriovNicError()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, True)"},{"line_number":245,"context_line":"        self.assertFalse(agent.plugin_rpc.update_device_up.called)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def test_treat_devices_added_updated_admin_state_up_false(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_3b127fb5","line":244,"updated":"2015-09-02 19:33:02.000000000","message":"ditto (L233)","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"},{"author":{"_account_id":6509,"name":"Roman Bogorodskiy","email":"rbogorodskiy@mirantis.com","username":"novel"},"change_message_id":"82fd2f17aa3dd719be947af6780f7d67933f9d80","unresolved":false,"context_lines":[{"line_number":241,"context_line":"        agent.eswitch_mgr.set_device_state.side_effect \u003d \\"},{"line_number":242,"context_line":"            exceptions.SriovNicError()"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"        agent.treat_device(\u0027aa:bb:cc:dd:ee:ff\u0027, \u00271:2:3:0\u0027, True)"},{"line_number":245,"context_line":"        self.assertFalse(agent.plugin_rpc.update_device_up.called)"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def test_treat_devices_added_updated_admin_state_up_false(self):"}],"source_content_type":"text/x-python","patch_set":12,"id":"da20952f_cd535238","line":244,"in_reply_to":"da20952f_3b127fb5","updated":"2015-09-03 17:27:59.000000000","message":"Done","commit_id":"c35be1dd6cee9d173b4a5a4a812ad3f4781fbfe7"}]}
