)]}'
{"cinder/tests/unit/test_solidfire.py":[{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"03ed1f3e10bd1794e9e17336da5db94e2c0f9105","unresolved":false,"context_lines":[{"line_number":1347,"context_line":"                return {\u0027result\u0027: {\u0027volumeID\u0027: 99}}"},{"line_number":1348,"context_line":"            elif method \u003d\u003d \u0027ModifyVolume\u0027:"},{"line_number":1349,"context_line":"                return"},{"line_number":1350,"context_line":"            else:"},{"line_number":1351,"context_line":"                return"},{"line_number":1352,"context_line":""},{"line_number":1353,"context_line":"        with mock.patch.object(solidfire.SolidFireDriver,"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_a6efa91c","line":1350,"updated":"2015-11-28 13:42:43.000000000","message":"Maybe Line 1348 to 1349 could be removed because Line 1350 to Line 1351 can include that case.","commit_id":"dbc92d3a61eb92fec8b73d787342ea0e44d3ffe0"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"17d1a05bae73945bb08632533d2033236b7bf785","unresolved":false,"context_lines":[{"line_number":1389,"context_line":"                            \u0027mvip\u0027: \u00271.1.1.1\u0027,"},{"line_number":1390,"context_line":"                            \u0027login\u0027: \u0027admin\u0027,"},{"line_number":1391,"context_line":"                            \u0027password\u0027: \u0027admin\u0027,"},{"line_number":1392,"context_line":"                            \u0027replication_enabled\u0027: False}}"},{"line_number":1393,"context_line":"        with mock.patch.object(volume_types,"},{"line_number":1394,"context_line":"                               \u0027get_volume_type\u0027,"},{"line_number":1395,"context_line":"                               return_value\u003dfake_volume_type),\\"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_8e20019d","line":1392,"updated":"2015-11-25 16:10:28.000000000","message":"Optionally could be more readable to use the @mock.patch decorator here","commit_id":"dbc92d3a61eb92fec8b73d787342ea0e44d3ffe0"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"8c88e8c5fce7782042957f501d02d7828331fcfc","unresolved":false,"context_lines":[{"line_number":1529,"context_line":"            self.assertEqual(1, rem_vag.call_count)"},{"line_number":1530,"context_line":"            rem_vag.assert_called_with(1)"},{"line_number":1531,"context_line":"                              \u0027_remove_volume_from_vag\u0027) as mock_rem_vol_vag:"},{"line_number":1532,"context_line":"            sfv.terminate_connection(testvol, connector, force\u003dFalse)"},{"line_number":1533,"context_line":"            mock_rem_vol_vag.assert_called_with(vol_id,"},{"line_number":1534,"context_line":"                                                vag[\u0027volumeAccessGroupID\u0027])"},{"line_number":1535,"context_line":"            mock_rem_vag.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a740942_d4ecb494","line":1532,"updated":"2015-12-09 12:01:57.000000000","message":"wrong indentation","commit_id":"f61f686c58490b79689215f6b347c7fdfe15dddb"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"ffe47343c13a268296ca85d81100769216b7e84c","unresolved":false,"context_lines":[{"line_number":1529,"context_line":"            self.assertEqual(1, rem_vag.call_count)"},{"line_number":1530,"context_line":"            rem_vag.assert_called_with(1)"},{"line_number":1531,"context_line":"                              \u0027_remove_volume_from_vag\u0027) as mock_rem_vol_vag:"},{"line_number":1532,"context_line":"            sfv.terminate_connection(testvol, connector, force\u003dFalse)"},{"line_number":1533,"context_line":"            mock_rem_vol_vag.assert_called_with(vol_id,"},{"line_number":1534,"context_line":"                                                vag[\u0027volumeAccessGroupID\u0027])"},{"line_number":1535,"context_line":"            mock_rem_vag.assert_not_called()"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a740942_57952686","line":1532,"in_reply_to":"7a740942_d4ecb494","updated":"2015-12-09 12:06:05.000000000","message":"Sorry, here I\u0027m blind.","commit_id":"f61f686c58490b79689215f6b347c7fdfe15dddb"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"8c88e8c5fce7782042957f501d02d7828331fcfc","unresolved":false,"context_lines":[{"line_number":1584,"context_line":""},{"line_number":1585,"context_line":"        with mock.patch.object(solidfire.SolidFireDriver,"},{"line_number":1586,"context_line":"                               \u0027_issue_api_request\u0027,"},{"line_number":1587,"context_line":"                               side_effect\u003d_fake_list_cluster_pairs),\\"},{"line_number":1588,"context_line":"                mock.patch.object(solidfire.SolidFireDriver,"},{"line_number":1589,"context_line":"                                  \u0027_create_cluster_pairing\u0027):"},{"line_number":1590,"context_line":"            self.assertEqual([],"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a740942_34a65854","line":1587,"updated":"2015-12-09 12:01:57.000000000","message":"missing whitespace between \u0027),\\\u0027","commit_id":"f61f686c58490b79689215f6b347c7fdfe15dddb"},{"author":{"_account_id":14305,"name":"Yuriy Nesenenko","email":"ynesenenko@mirantis.com","username":"yuriy_n"},"change_message_id":"ed5cee98399a32b2f719d0d8719190cb68d31cea","unresolved":false,"context_lines":[{"line_number":1584,"context_line":""},{"line_number":1585,"context_line":"        with mock.patch.object(solidfire.SolidFireDriver,"},{"line_number":1586,"context_line":"                               \u0027_issue_api_request\u0027,"},{"line_number":1587,"context_line":"                               side_effect\u003d_fake_list_cluster_pairs),\\"},{"line_number":1588,"context_line":"                mock.patch.object(solidfire.SolidFireDriver,"},{"line_number":1589,"context_line":"                                  \u0027_create_cluster_pairing\u0027):"},{"line_number":1590,"context_line":"            self.assertEqual([],"}],"source_content_type":"text/x-python","patch_set":9,"id":"7a740942_174d5ec4","line":1587,"in_reply_to":"7a740942_34a65854","updated":"2015-12-09 12:13:43.000000000","message":"Sorry, I\u0027m wrong here.","commit_id":"f61f686c58490b79689215f6b347c7fdfe15dddb"}],"cinder/volume/drivers/solidfire.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e1caa7d76a7478a55e552082aba0e4b5219b1d38","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                rep_data[key] \u003d value"},{"line_number":716,"context_line":"        # NOTE(jdg): We\u0027re going to limit rep count to 1 for now"},{"line_number":717,"context_line":"        # but plan ahead and use random choice here"},{"line_number":718,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":719,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":720,"context_line":"            pair_entry \u003d next("},{"line_number":721,"context_line":"                (cp for cp in self.cluster_pairs"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_e6115105","line":718,"updated":"2015-10-22 03:16:53.000000000","message":"There\u0027s a py34 unit test error here: \n\nraise IndexError(\u0027Cannot choose from an empty sequence\u0027)\n\nLooks like self.cluster_pairs is not populated in the unit tests?","commit_id":"011db3fa2ca4d90c93e98723b6cae2a265920eca"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"9b341ab49ab8721a5b2e99bfd40655b885f54c41","unresolved":false,"context_lines":[{"line_number":715,"context_line":"                rep_data[key] \u003d value"},{"line_number":716,"context_line":"        # NOTE(jdg): We\u0027re going to limit rep count to 1 for now"},{"line_number":717,"context_line":"        # but plan ahead and use random choice here"},{"line_number":718,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":719,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":720,"context_line":"            pair_entry \u003d next("},{"line_number":721,"context_line":"                (cp for cp in self.cluster_pairs"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_662a2192","line":718,"in_reply_to":"3a29b11f_e6115105","updated":"2015-10-22 04:21:17.000000000","message":"Yeah, that\u0027s intentional actually.  Turns out one of the changes between python 2 and 3 is that instead of returning none on rand of an empty set it raises :(\n\nI\u0027ll modify this random.choice call to check the list first.\n\nThanks!!","commit_id":"011db3fa2ca4d90c93e98723b6cae2a265920eca"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"e1caa7d76a7478a55e552082aba0e4b5219b1d38","unresolved":false,"context_lines":[{"line_number":946,"context_line":"        return vlist"},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"    def _pair_volumes(self, src_sfid, dest_sfid,"},{"line_number":949,"context_line":"                      remote_endpoint, mode\u003d\u0027Async\u0027):"},{"line_number":950,"context_line":"        pairing_key \u003d self._issue_api_request("},{"line_number":951,"context_line":"            \u0027StartVolumePairing\u0027,"},{"line_number":952,"context_line":"            {\u0027volumeID\u0027: src_sfid,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_864dfd3f","line":949,"updated":"2015-10-22 03:16:53.000000000","message":"It is \u0027async\u0027 in the tests.  Should this be changed to mode\u003d\u0027async\u0027?  I don\u0027t know if your API can handle both.","commit_id":"011db3fa2ca4d90c93e98723b6cae2a265920eca"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"9b341ab49ab8721a5b2e99bfd40655b885f54c41","unresolved":false,"context_lines":[{"line_number":946,"context_line":"        return vlist"},{"line_number":947,"context_line":""},{"line_number":948,"context_line":"    def _pair_volumes(self, src_sfid, dest_sfid,"},{"line_number":949,"context_line":"                      remote_endpoint, mode\u003d\u0027Async\u0027):"},{"line_number":950,"context_line":"        pairing_key \u003d self._issue_api_request("},{"line_number":951,"context_line":"            \u0027StartVolumePairing\u0027,"},{"line_number":952,"context_line":"            {\u0027volumeID\u0027: src_sfid,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_ec17f342","line":949,"in_reply_to":"3a29b11f_864dfd3f","updated":"2015-10-22 04:21:17.000000000","message":"Ahh, nice catch.  The code here in the driver is correct, the code in the unit test is incorrect.  I\u0027ll fix it up.  Since we don\u0027t actually call the API from the unit tests it \"still works\" :)","commit_id":"011db3fa2ca4d90c93e98723b6cae2a265920eca"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":241,"context_line":"                LOG.error(_LE(\u0027Cluster pairing failed: %s\u0027) % ex.msg)"},{"line_number":242,"context_line":"        return pair_id"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def _create_remote_volume(self, src_sfaccount, params,"},{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_e8f2049a","line":243,"updated":"2015-10-28 22:00:11.000000000","message":"probably should be \"src_sf_account\"","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"7137f2a12d65dbca222b63c067e47ea2d6dbe7bc","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":241,"context_line":"                LOG.error(_LE(\u0027Cluster pairing failed: %s\u0027) % ex.msg)"},{"line_number":242,"context_line":"        return pair_id"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def _create_remote_volume(self, src_sfaccount, params,"},{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_47bf02aa","line":243,"in_reply_to":"1a26ad4f_d7043c4b","updated":"2015-11-02 14:40:54.000000000","message":"On line 265 we have \"sf_volid\", and on line 534 we already have a \"sf_account\".  I personally find it more readable that way as it splits up \"sf\" and the resource of interested (e.g sfstate vs. sf_state).  I\u0027ll leave it up to you, just wanted to point out this inconsistency.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":240,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":241,"context_line":"                LOG.error(_LE(\u0027Cluster pairing failed: %s\u0027) % ex.msg)"},{"line_number":242,"context_line":"        return pair_id"},{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    def _create_remote_volume(self, src_sfaccount, params,"},{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_d7043c4b","line":243,"in_reply_to":"1a26ad4f_e8f2049a","updated":"2015-10-31 06:40:36.000000000","message":"Really?  Why is that?","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    def _create_remote_volume(self, src_sfaccount, params,"},{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("},{"line_number":247,"context_line":"            \u0027ListAccounts\u0027, {}, endpoint\u003dendpoint)[\u0027result\u0027][\u0027accounts\u0027]"},{"line_number":248,"context_line":"        remote_sfaccount \u003d None"},{"line_number":249,"context_line":"        for account in remote_accounts:"},{"line_number":250,"context_line":"            if src_sfaccount[\u0027username\u0027] \u003d\u003d account[\u0027username\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_883a7035","line":247,"updated":"2015-10-28 22:00:11.000000000","message":"probably should be \"remote_sf_account\"","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":244,"context_line":"    def _create_remote_volume(self, src_sfaccount, params,"},{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("},{"line_number":247,"context_line":"            \u0027ListAccounts\u0027, {}, endpoint\u003dendpoint)[\u0027result\u0027][\u0027accounts\u0027]"},{"line_number":248,"context_line":"        remote_sfaccount \u003d None"},{"line_number":249,"context_line":"        for account in remote_accounts:"},{"line_number":250,"context_line":"            if src_sfaccount[\u0027username\u0027] \u003d\u003d account[\u0027username\u0027]:"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_97fa4442","line":247,"in_reply_to":"1a26ad4f_883a7035","updated":"2015-10-31 06:40:36.000000000","message":"Same question as above.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("},{"line_number":247,"context_line":"            \u0027ListAccounts\u0027, {}, endpoint\u003dendpoint)[\u0027result\u0027][\u0027accounts\u0027]"},{"line_number":248,"context_line":"        remote_sfaccount \u003d None"},{"line_number":249,"context_line":"        for account in remote_accounts:"},{"line_number":250,"context_line":"            if src_sfaccount[\u0027username\u0027] \u003d\u003d account[\u0027username\u0027]:"},{"line_number":251,"context_line":"                remote_sfaccount \u003d account"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_4b38d2d3","line":248,"updated":"2015-10-28 22:00:11.000000000","message":"Optionally could save a few lines throwing this in a \"next\" instead of for/break","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("},{"line_number":247,"context_line":"            \u0027ListAccounts\u0027, {}, endpoint\u003dendpoint)[\u0027result\u0027][\u0027accounts\u0027]"},{"line_number":248,"context_line":"        remote_sfaccount \u003d None"},{"line_number":249,"context_line":"        for account in remote_accounts:"},{"line_number":250,"context_line":"            if src_sfaccount[\u0027username\u0027] \u003d\u003d account[\u0027username\u0027]:"},{"line_number":251,"context_line":"                remote_sfaccount \u003d account"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_779c480f","line":248,"in_reply_to":"1a26ad4f_4b38d2d3","updated":"2015-10-31 06:40:36.000000000","message":"Sure, I could but in this particular case is a generator worth a few extra lines of code in terms of readability and maintenance?  I could also do something super clever and turn into a compounded one liner using a combination of generator and expression, but I\u0027m not sure that it technically or functionally really matters?  Unless I just want to show off maybe :)","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"7137f2a12d65dbca222b63c067e47ea2d6dbe7bc","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                              endpoint, replication_target\u003dTrue):"},{"line_number":246,"context_line":"        remote_accounts \u003d self._issue_api_request("},{"line_number":247,"context_line":"            \u0027ListAccounts\u0027, {}, endpoint\u003dendpoint)[\u0027result\u0027][\u0027accounts\u0027]"},{"line_number":248,"context_line":"        remote_sfaccount \u003d None"},{"line_number":249,"context_line":"        for account in remote_accounts:"},{"line_number":250,"context_line":"            if src_sfaccount[\u0027username\u0027] \u003d\u003d account[\u0027username\u0027]:"},{"line_number":251,"context_line":"                remote_sfaccount \u003d account"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_c7d312d4","line":248,"in_reply_to":"1a26ad4f_779c480f","updated":"2015-11-02 14:40:54.000000000","message":"I just liked your use of \"next\" on line 724 so wanted to make sure you had considered it here.  You\u0027re absolutely right it functionally does not matter, hence the \"Optionally\" part - feel free to ignore it ;)","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":714,"context_line":"            if key in valid_replication_keys:"},{"line_number":715,"context_line":"                rep_data[key] \u003d value"},{"line_number":716,"context_line":"        # NOTE(jdg): We\u0027re going to limit rep count to 1 for now"},{"line_number":717,"context_line":"        # but plan ahead and use random choice here"},{"line_number":718,"context_line":"        if not self.cluster_pairs:  # NOTE(jdg): check for py3 compat"},{"line_number":719,"context_line":"            LOG.error(_LE(\u0027SolidFire requested replicated volume type, \u0027"},{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_6b826e02","line":717,"updated":"2015-10-28 22:00:11.000000000","message":"Shouldn\u0027t we only throw this error if not self.cluster_pairs AND ref_data?  Cause otherwise we\u0027ll err if there\u0027s no cluster_pairs but we don\u0027t want a replicated volume type","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":714,"context_line":"            if key in valid_replication_keys:"},{"line_number":715,"context_line":"                rep_data[key] \u003d value"},{"line_number":716,"context_line":"        # NOTE(jdg): We\u0027re going to limit rep count to 1 for now"},{"line_number":717,"context_line":"        # but plan ahead and use random choice here"},{"line_number":718,"context_line":"        if not self.cluster_pairs:  # NOTE(jdg): check for py3 compat"},{"line_number":719,"context_line":"            LOG.error(_LE(\u0027SolidFire requested replicated volume type, \u0027"},{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_f76cd836","line":717,"in_reply_to":"1a26ad4f_6b826e02","updated":"2015-10-31 06:40:36.000000000","message":"The idea was that L#707 checks to see if we\u0027re supposed to be here or not.  If that passes and and we get here, and find that there\u0027s no pairs setup we have a problem.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"7137f2a12d65dbca222b63c067e47ea2d6dbe7bc","unresolved":false,"context_lines":[{"line_number":714,"context_line":"            if key in valid_replication_keys:"},{"line_number":715,"context_line":"                rep_data[key] \u003d value"},{"line_number":716,"context_line":"        # NOTE(jdg): We\u0027re going to limit rep count to 1 for now"},{"line_number":717,"context_line":"        # but plan ahead and use random choice here"},{"line_number":718,"context_line":"        if not self.cluster_pairs:  # NOTE(jdg): check for py3 compat"},{"line_number":719,"context_line":"            LOG.error(_LE(\u0027SolidFire requested replicated volume type, \u0027"},{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_ea005303","line":717,"in_reply_to":"1a26ad4f_f76cd836","updated":"2015-11-02 14:40:54.000000000","message":"Indeed - I missed that initially","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":718,"context_line":"        if not self.cluster_pairs:  # NOTE(jdg): check for py3 compat"},{"line_number":719,"context_line":"            LOG.error(_LE(\u0027SolidFire requested replicated volume type, \u0027"},{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"},{"line_number":721,"context_line":"            return {}"},{"line_number":722,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":723,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":724,"context_line":"            pair_entry \u003d next("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_8becaac8","line":721,"updated":"2015-10-28 22:00:11.000000000","message":"If we\u0027re overwriting \"pair_entry\" when rep_data[\u0027replication_target\u0027] exists why don\u0027t we put this line in an else.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"7137f2a12d65dbca222b63c067e47ea2d6dbe7bc","unresolved":false,"context_lines":[{"line_number":718,"context_line":"        if not self.cluster_pairs:  # NOTE(jdg): check for py3 compat"},{"line_number":719,"context_line":"            LOG.error(_LE(\u0027SolidFire requested replicated volume type, \u0027"},{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"},{"line_number":721,"context_line":"            return {}"},{"line_number":722,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":723,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":724,"context_line":"            pair_entry \u003d next("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_8ac99f5b","line":721,"in_reply_to":"1a26ad4f_375d7079","updated":"2015-11-02 14:40:54.000000000","message":"Initial set would move to an \"else\", not a new if, but I understand that this is completely preference so feel free to ignore.\n\nThanks for the explanation on this -  I wanted to make sure I wasn\u0027t missing some reason it had to or was better to be done this way.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":718,"context_line":"        if not self.cluster_pairs:  # NOTE(jdg): check for py3 compat"},{"line_number":719,"context_line":"            LOG.error(_LE(\u0027SolidFire requested replicated volume type, \u0027"},{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"},{"line_number":721,"context_line":"            return {}"},{"line_number":722,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":723,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":724,"context_line":"            pair_entry \u003d next("}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_375d7079","line":721,"in_reply_to":"1a26ad4f_8becaac8","updated":"2015-10-31 06:40:36.000000000","message":"Because then I\u0027d need to put the initial set of pair_entry in an if :)\n\nSo this is my version of a short cut, we always set it to random, then just grab/use a specific target if and only if it\u0027s requested.\n\nLet me know if I\u0027m missing something perhaps.  Personally I dislike having everything in an if/else block when I\u0027m able to just set a default and overwrite it later if I need or want.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"},{"line_number":721,"context_line":"            return {}"},{"line_number":722,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":723,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":724,"context_line":"            pair_entry \u003d next("},{"line_number":725,"context_line":"                (cp for cp in self.cluster_pairs"},{"line_number":726,"context_line":"                 if cp[\"cluster_name\"] \u003d\u003d rep_data.get(\u0027replication_target\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_0bf09a8f","line":723,"updated":"2015-10-28 22:00:11.000000000","message":"Won\u0027t defaulting pair_entry to None break when we try to do **None on 728?","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"},{"line_number":721,"context_line":"            return {}"},{"line_number":722,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":723,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":724,"context_line":"            pair_entry \u003d next("},{"line_number":725,"context_line":"                (cp for cp in self.cluster_pairs"},{"line_number":726,"context_line":"                 if cp[\"cluster_name\"] \u003d\u003d rep_data.get(\u0027replication_target\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_97e324a4","line":723,"in_reply_to":"1a26ad4f_0bf09a8f","updated":"2015-10-31 06:40:36.000000000","message":"The idea here is that if a target was specified in the extra-specs but it is NOT actually a valid target (not paired), I have a couple problems to solve:\n1. the generator will be rather unhappy if it doesn\u0027t have a return value\n2. if the spec requests a target that isn\u0027t paired, well that\u0027s an error IMO and it should be treated as such.  \n\nThere is a problem here however because what I should probably do is raise and not even call _build_endpoint_info, because sadly that will just result in an invalid pairing that points at itself.  :(","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"7137f2a12d65dbca222b63c067e47ea2d6dbe7bc","unresolved":false,"context_lines":[{"line_number":720,"context_line":"                          \u0027however no cluster pairs are active!\u0027))"},{"line_number":721,"context_line":"            return {}"},{"line_number":722,"context_line":"        pair_entry \u003d random.choice(self.cluster_pairs)"},{"line_number":723,"context_line":"        if rep_data.get(\u0027replication_target\u0027, None):"},{"line_number":724,"context_line":"            pair_entry \u003d next("},{"line_number":725,"context_line":"                (cp for cp in self.cluster_pairs"},{"line_number":726,"context_line":"                 if cp[\"cluster_name\"] \u003d\u003d rep_data.get(\u0027replication_target\u0027)),"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_4ae06796","line":723,"in_reply_to":"1a26ad4f_97e324a4","updated":"2015-11-02 14:40:54.000000000","message":"Yea, seems reasonable for it to perhaps error, but I don\u0027t think it will be a pretty error.  I don\u0027t think _build_endpoint_info will get far enough to return an invalid pairing, because doing **None will complain about NoneType not being a mapping.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":8912,"name":"Ryan McNair","email":"rdmcnair@us.ibm.com","username":"rdmcnair"},"change_message_id":"644b1b172f58f52bd99e44f5b3552b5d81b67fec","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"            update_info[\u0027driver_status\u0027] \u003d ("},{"line_number":1487,"context_line":"                vol[\u0027volumePairs\u0027][0][\u0027remoteReplication\u0027])"},{"line_number":1488,"context_line":"            state \u003d update_info[\u0027driver_status\u0027].get(\u0027state\u0027, None)"},{"line_number":1489,"context_line":"            update_info[\u0027status\u0027] \u003d \u0027error\u0027"},{"line_number":1490,"context_line":"            if state and state \u003d\u003d \u0027active\u0027:"},{"line_number":1491,"context_line":"                update_info[\u0027status\u0027] \u003d \u0027ok\u0027"},{"line_number":1492,"context_line":"            status_updates.append(update_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_8ba4aa57","line":1489,"updated":"2015-10-28 22:00:11.000000000","message":"Equivalent to just \"if state \u003d\u003d \u0027active\u0027\"","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":2243,"name":"John Griffith","email":"john.griffith8@gmail.com","username":"john-griffith"},"change_message_id":"470924f6a0670b6c415dcd81b01fe42b27139d3e","unresolved":false,"context_lines":[{"line_number":1486,"context_line":"            update_info[\u0027driver_status\u0027] \u003d ("},{"line_number":1487,"context_line":"                vol[\u0027volumePairs\u0027][0][\u0027remoteReplication\u0027])"},{"line_number":1488,"context_line":"            state \u003d update_info[\u0027driver_status\u0027].get(\u0027state\u0027, None)"},{"line_number":1489,"context_line":"            update_info[\u0027status\u0027] \u003d \u0027error\u0027"},{"line_number":1490,"context_line":"            if state and state \u003d\u003d \u0027active\u0027:"},{"line_number":1491,"context_line":"                update_info[\u0027status\u0027] \u003d \u0027ok\u0027"},{"line_number":1492,"context_line":"            status_updates.append(update_info)"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a26ad4f_57f02c67","line":1489,"in_reply_to":"1a26ad4f_8ba4aa57","updated":"2015-10-31 06:40:36.000000000","message":"Yeah, formed habit after working with dicts :)  I\u0027ll change it even though it doesn\u0027t hurt anything.","commit_id":"73faca0a74e63f382bda1c29f050030dac243ee3"},{"author":{"_account_id":13203,"name":"Wilson Liu","email":"295988511@qq.com","username":"Bob-OpenStack"},"change_message_id":"03ed1f3e10bd1794e9e17336da5db94e2c0f9105","unresolved":false,"context_lines":[{"line_number":1565,"context_line":"                self.configuration.sf_volume_prefix, \u0027\u0027)"},{"line_number":1566,"context_line":"            update_info[\u0027driver_status\u0027] \u003d ("},{"line_number":1567,"context_line":"                vol[\u0027volumePairs\u0027][0][\u0027remoteReplication\u0027])"},{"line_number":1568,"context_line":"            state \u003d update_info[\u0027driver_status\u0027].get(\u0027state\u0027, None)"},{"line_number":1569,"context_line":"            update_info[\u0027status\u0027] \u003d \u0027error\u0027"},{"line_number":1570,"context_line":"            if state and state \u003d\u003d \u0027active\u0027:"},{"line_number":1571,"context_line":"                update_info[\u0027status\u0027] \u003d \u0027ok\u0027"}],"source_content_type":"text/x-python","patch_set":8,"id":"9a8ffd7b_2695f985","line":1568,"updated":"2015-11-28 13:42:43.000000000","message":"Can just use update_info[\u0027driver_status\u0027].get(\u0027state\u0027), \u0027None\u0027 would be the default return value.","commit_id":"dbc92d3a61eb92fec8b73d787342ea0e44d3ffe0"}]}
