)]}'
{"os_brick/initiator/connectors/scaleio.py":[{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"648526f6aba10e10a18091e855da73882cae74c9","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        self.iops_limit \u003d None"},{"line_number":80,"context_line":"        self.bandwidth_limit \u003d None"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    def _prepare_get_guid_cmd(self):"},{"line_number":83,"context_line":"        return ["},{"line_number":84,"context_line":"            sys.executable, \"-c\","},{"line_number":85,"context_line":"            \"import binascii as b2a, fcntl, os, struct, sys; \""}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_479890cb","line":82,"updated":"2019-10-17 14:07:20.000000000","message":"nit: not sure why you implemented this one-liner as a separate function (same at L95).","commit_id":"daafc3445d9aa7035173ccf50915fe2e7c0cdca8"},{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"648526f6aba10e10a18091e855da73882cae74c9","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            }"},{"line_number":104,"context_line":"        ]"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"    def get_guid(self):"},{"line_number":107,"context_line":"        get_guid_cmd \u003d self._prepare_get_guid_cmd()"},{"line_number":108,"context_line":"        LOG.info(\"ScaleIO sdc query guid command: %(cmd)s\","},{"line_number":109,"context_line":"                 {\u0027cmd\u0027: get_guid_cmd})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_27a7940e","line":106,"updated":"2019-10-17 14:07:20.000000000","message":"nit: this is a private function, but no leading \u0027_\u0027","commit_id":"daafc3445d9aa7035173ccf50915fe2e7c0cdca8"},{"author":{"_account_id":21129,"name":"Alan Bishop","email":"abishopsweng@gmail.com","username":"ASBishop","status":"ex Red Hat"},"change_message_id":"648526f6aba10e10a18091e855da73882cae74c9","unresolved":false,"context_lines":[{"line_number":127,"context_line":"            LOG.error(msg)"},{"line_number":128,"context_line":"            raise exception.BrickException(message\u003dmsg)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def rescan_vols(self):"},{"line_number":131,"context_line":"        rescan_vols_cmd \u003d self._prepare_rescan_vols_cmd()"},{"line_number":132,"context_line":"        LOG.info(\"ScaleIO rescan volumes: %(cmd)s\","},{"line_number":133,"context_line":"                 {\u0027cmd\u0027: rescan_vols_cmd})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_c7ab20d5","line":130,"updated":"2019-10-17 14:07:20.000000000","message":"nit: this is a private function, but no leading \u0027_\u0027","commit_id":"daafc3445d9aa7035173ccf50915fe2e7c0cdca8"},{"author":{"_account_id":7160,"name":"arkady kanevsky","email":"akanevsk@redhat.com","username":"arkady"},"change_message_id":"9f5b3d3500a8d542d890bc8d38f94638c2f41e78","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        :param device_info: historical difference, but same as connection_props"},{"line_number":490,"context_line":"        :type device_info: dict"},{"line_number":491,"context_line":"        :type force: bool"},{"line_number":492,"context_line":"        :param ignore_errors: When force is True, this will decide whether to"},{"line_number":493,"context_line":"                              ignore errors or raise an exception once finished"},{"line_number":494,"context_line":"                              the operation.  Default is False."},{"line_number":495,"context_line":"        \"\"\""},{"line_number":496,"context_line":"        self.get_config(connection_properties)"},{"line_number":497,"context_line":"        self.volume_id \u003d self.volume_id or self._get_volume_id()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_3a1a65c5","line":494,"range":{"start_line":492,"start_character":30,"end_line":494,"end_character":63},"updated":"2019-10-16 03:17:07.000000000","message":"Can you rewrite to make it simpler?\n\nSomething like:\nIf True - ignore errors and do not raise exceptions,\nIf False - raise exception on error.\nDefault is False.","commit_id":"daafc3445d9aa7035173ccf50915fe2e7c0cdca8"},{"author":{"_account_id":31016,"name":"Ivan Pchelintsev","email":"i.pchelintsev@yadro.com","username":"pcheli"},"change_message_id":"8e12abe8a800bb7f9034ae154bfe998062907830","unresolved":false,"context_lines":[{"line_number":489,"context_line":"        :param device_info: historical difference, but same as connection_props"},{"line_number":490,"context_line":"        :type device_info: dict"},{"line_number":491,"context_line":"        :type force: bool"},{"line_number":492,"context_line":"        :param ignore_errors: When force is True, this will decide whether to"},{"line_number":493,"context_line":"                              ignore errors or raise an exception once finished"},{"line_number":494,"context_line":"                              the operation.  Default is False."},{"line_number":495,"context_line":"        \"\"\""},{"line_number":496,"context_line":"        self.get_config(connection_properties)"},{"line_number":497,"context_line":"        self.volume_id \u003d self.volume_id or self._get_volume_id()"}],"source_content_type":"text/x-python","patch_set":1,"id":"3fa7e38b_076f1128","line":494,"range":{"start_line":492,"start_character":30,"end_line":494,"end_character":63},"in_reply_to":"3fa7e38b_3a1a65c5","updated":"2019-10-16 07:52:27.000000000","message":"This docstring was copied from disconnect_volume method of parent class and should not be changed i think.","commit_id":"daafc3445d9aa7035173ccf50915fe2e7c0cdca8"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":77,"context_line":"        self.bandwidth_limit \u003d None"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def _get_guid(self):"},{"line_number":80,"context_line":"        LOG.info(\"ScaleIO sdc query guid\")"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            guid \u003d priv_scaleio.get_guid(self.GET_GUID_OP_CODE)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_4fce425c","line":80,"updated":"2019-10-21 12:17:14.000000000","message":"This seems excessive at the info level, as it will be logged on every connect and disconnect request and doesn\u0027t really provide much info over L84 and L87","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            guid \u003d priv_scaleio.get_guid(self.GET_GUID_OP_CODE)"},{"line_number":84,"context_line":"            LOG.info(\"Current sdc guid: %(guid)s\", {\u0027guid\u0027: guid})"},{"line_number":85,"context_line":"            return guid"},{"line_number":86,"context_line":"        except (IOError, OSError, ValueError) as e:"},{"line_number":87,"context_line":"            msg \u003d (_(\"Error querying sdc guid: %(err)s\") % {\u0027err\u0027: str(e)})"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_0fc36a3a","line":84,"range":{"start_line":84,"start_character":12,"end_line":84,"end_character":66},"updated":"2019-10-21 12:17:14.000000000","message":"nit: No need to build a dict for this:\n\n   LOG.info(\"Current sdc guid: %s\", guid)","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            LOG.info(\"Current sdc guid: %(guid)s\", {\u0027guid\u0027: guid})"},{"line_number":85,"context_line":"            return guid"},{"line_number":86,"context_line":"        except (IOError, OSError, ValueError) as e:"},{"line_number":87,"context_line":"            msg \u003d (_(\"Error querying sdc guid: %(err)s\") % {\u0027err\u0027: str(e)})"},{"line_number":88,"context_line":"            LOG.error(msg)"},{"line_number":89,"context_line":"            raise exception.BrickException(message\u003dmsg)"},{"line_number":90,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_8faf5a7c","line":87,"updated":"2019-10-21 12:17:14.000000000","message":"nit: No need to build a dict for this...\n\n   msg \u003d _(\"Error querying sdc guid: %s\") % e","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            priv_scaleio.rescan_vols(self.RESCAN_VOLS_OP_CODE)"},{"line_number":96,"context_line":"        except (IOError, OSError) as e:"},{"line_number":97,"context_line":"            msg \u003d (_(\"Error querying volumes: %(err)s\") % {\u0027err\u0027: str(e)})"},{"line_number":98,"context_line":"            LOG.error(msg)"},{"line_number":99,"context_line":"            raise exception.BrickException(message\u003dmsg)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_0fd84a1c","line":97,"updated":"2019-10-21 12:17:14.000000000","message":"nit: ditto","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"}],"os_brick/privileged/scaleio.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    :rtype: str"},{"line_number":32,"context_line":"    \"\"\""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"    fd \u003d os.open(SCINI_DEVICE_PATH, os.O_RDWR)"},{"line_number":35,"context_line":"    out \u003d ioctl(fd, op_code, struct.pack(\u0027QQQ\u0027, 0, 0, 0))"},{"line_number":36,"context_line":"    # The first 8 bytes contain a return code that is not used"},{"line_number":37,"context_line":"    # so they can be discarded."},{"line_number":38,"context_line":"    out_to_hex \u003d hexlify(out[8:]).decode()"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_ef8cce36","line":35,"range":{"start_line":34,"start_character":0,"end_line":35,"end_character":57},"updated":"2019-10-21 12:17:14.000000000","message":"-1: This doesn\u0027t close the fd, it\u0027s better to use a context manager:\n\n   with os.open(SCINI_DEVICE_PATH, os.O_RDWR) as fd:\n       out \u003d ioctl(fd, op_code, struct.pack(\u0027QQQ\u0027, 0, 0, 0))","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"},{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    :type op_code: int"},{"line_number":48,"context_line":"    \"\"\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    fd \u003d os.open(SCINI_DEVICE_PATH, os.O_RDWR)"},{"line_number":51,"context_line":"    ioctl(fd, op_code, struct.pack(\u0027Q\u0027, 0))"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_af86d612","line":50,"updated":"2019-10-21 12:17:14.000000000","message":"-1: ditto","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"}],"os_brick/tests/initiator/connectors/test_scaleio.py":[{"author":{"_account_id":9535,"name":"Gorka Eguileor","email":"geguileo@redhat.com","username":"Gorka"},"change_message_id":"19e093377cc377789a32999cb82cae55f6ec034f","unresolved":false,"context_lines":[{"line_number":86,"context_line":"        # Patch scaleio privileged calls"},{"line_number":87,"context_line":"        self.mock_object(scaleio.priv_scaleio, \u0027get_guid\u0027,"},{"line_number":88,"context_line":"                         return_value\u003dself.fake_guid)"},{"line_number":89,"context_line":"        self.mock_object(scaleio.priv_scaleio, \u0027rescan_vols\u0027)"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        # The actual ScaleIO connector"},{"line_number":92,"context_line":"        self.connector \u003d scaleio.ScaleIOConnector("}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_6ff45e88","line":89,"updated":"2019-10-21 12:17:14.000000000","message":"-1: The mocks are great, but we need to confirm they are being called in some tests to ensure they are being called with the right values.\n\nWe can store the mock here:\n\n   self.get_guid_mock \u003d self.mock_object(scaleio.priv_scaleio, \u0027get_guid\u0027,\n                                         return_value\u003dself.fake_guid)\n\n\nAnd then on a test use the different assert methods available in the mock.  For example:\n\n   mock.assert_called_once_with(","commit_id":"9b802cf2f87ba4a0c5c4cc20b41acc8780663363"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"f4376950fd452f4009892b14a649abe3b87aabcd","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    # Fake SDC GUID"},{"line_number":37,"context_line":"    fake_guid \u003d str(uuid.uuid4())"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def setUp(self):"},{"line_number":40,"context_line":"        super(ScaleIOConnectorTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_50900bee","line":37,"updated":"2019-10-22 13:19:50.000000000","message":"Please don\u0027t randomly generate uuids in unit tests -- would be better to use something like fake_constants.UUID1.","commit_id":"5d801924c595a8a8f246130e4854c97d09779b7d"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"0df37b11d9068bb5d7f9ce86bbdf774f3f50a25b","unresolved":false,"context_lines":[{"line_number":34,"context_line":"    }"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"    # Fake SDC GUID"},{"line_number":37,"context_line":"    fake_guid \u003d str(uuid.uuid4())"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"    def setUp(self):"},{"line_number":40,"context_line":"        super(ScaleIOConnectorTestCase, self).setUp()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_f06fb7f9","line":37,"in_reply_to":"3fa7e38b_50900bee","updated":"2019-10-22 13:21:54.000000000","message":"Sorry, fake_constants is in cinder -- it would better to just hard-code a UUID here.","commit_id":"5d801924c595a8a8f246130e4854c97d09779b7d"}]}
