)]}'
{"ironic/common/driver_factory.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"521eff94feda7cc75ec700d8fdcf36ea741fcfae","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        # NOTE(deva): Drivers raise \"DriverNotFound\" if they are unable to be"},{"line_number":72,"context_line":"        #             loaded, eg. due to missing external dependencies."},{"line_number":73,"context_line":"        #             We need to tell stevedore to capture that exception"},{"line_number":74,"context_line":"        #             and log a warning rather than an error."},{"line_number":75,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":76,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":77,"context_line":"                LOG.warning(_(\"Unable to load driver %(exc)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BQVs%3D","line":74,"updated":"2014-03-28 02:58:07.000000000","message":"Also thinking more about this, whether its an error or not depends on the operators needs - if they want that driver working its an error. If they don\u0027t, its not even a warning.\n\nMaybe we should have the drivers in use be specified rather than trying to load everything?","commit_id":"aeb90645f9635308402be5ac2cb981ebc5436ae3"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"9404f3adf28aa18a3c55d29b5921ea36339f117d","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        # NOTE(deva): Drivers raise \"DriverNotFound\" if they are unable to be"},{"line_number":72,"context_line":"        #             loaded, eg. due to missing external dependencies."},{"line_number":73,"context_line":"        #             We need to tell stevedore to capture that exception"},{"line_number":74,"context_line":"        #             and log a warning rather than an error."},{"line_number":75,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":76,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":77,"context_line":"                LOG.warning(_(\"Unable to load driver %(exc)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F9%2BYU%3D","line":74,"in_reply_to":"AAAAWH%2F%2BAEk%3D","updated":"2014-03-31 20:17:56.000000000","message":"There\u0027s nothing about the status quo that breaks TripleO to the extent of making it inoperable. Concerning? Yes - but this patch will still be concerning - I think this patch is incorrect because it *should* be an error, if the driver is desired.","commit_id":"aeb90645f9635308402be5ac2cb981ebc5436ae3"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"132164c81a5e7349ab784ef5e91af4d7f3cc4bc8","unresolved":false,"context_lines":[{"line_number":71,"context_line":"        # NOTE(deva): Drivers raise \"DriverNotFound\" if they are unable to be"},{"line_number":72,"context_line":"        #             loaded, eg. due to missing external dependencies."},{"line_number":73,"context_line":"        #             We need to tell stevedore to capture that exception"},{"line_number":74,"context_line":"        #             and log a warning rather than an error."},{"line_number":75,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":76,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":77,"context_line":"                LOG.warning(_(\"Unable to load driver %(exc)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BAEk%3D","line":74,"in_reply_to":"AAAAWH%2F%2BQVs%3D","updated":"2014-03-31 16:27:20.000000000","message":"I agree, a config option to list which drivers to load, with defaults being the reference drivers, would be great.\n\nHowever, it\u0027s too late for a new config option in Icehouse. AIUI, suppressing this exception is needed to unbreak TripleO.","commit_id":"aeb90645f9635308402be5ac2cb981ebc5436ae3"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"388fec9a6c166784d2553d04f6d901b0c7fb7356","unresolved":false,"context_lines":[{"line_number":72,"context_line":"        #             loaded, eg. due to missing external dependencies."},{"line_number":73,"context_line":"        #             We need to tell stevedore to capture that exception"},{"line_number":74,"context_line":"        #             and log a warning rather than an error."},{"line_number":75,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":76,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":77,"context_line":"                LOG.warning(_(\"Unable to load driver %(exc)s.\"),"},{"line_number":78,"context_line":"                        {\u0027exc\u0027: exc})"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BOTc%3D","line":75,"updated":"2014-03-28 09:48:19.000000000","message":"Hmm maybe I need more information, but it does sounds like an error rather than a warning, if the driver can\u0027t be loaded and people want it to be loaded (because it\u0027s specified in the setup.cfg) I think it should raise an error.\n\nI like lifeless suggestion about having a mechanism to enable/disable certain drivers (where drivers with external libraries would be disabled by default)\n\nOR\n\nWe could just not set drivers that have an external libraries in the setup.cfg, making it a more manual setup for those kind of drivers.","commit_id":"aeb90645f9635308402be5ac2cb981ebc5436ae3"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"11e18238824c4b0bdc9884779f1ad1b57492b604","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        #             and log a warning rather than an error."},{"line_number":75,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":76,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":77,"context_line":"                LOG.warning(_(\"Unable to load driver %(exc)s.\"),"},{"line_number":78,"context_line":"                        {\u0027exc\u0027: exc})"},{"line_number":79,"context_line":"            else:"},{"line_number":80,"context_line":"                LOG.error(_(\"Stevedore failed to load %(name)r: %(exc)s.\"),"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAWH%2F%2BQ0Q%3D","line":77,"updated":"2014-03-28 01:16:31.000000000","message":"Maybe we only want to log the exc? I didn\u0027t test it out, but the exception itself will be \u0027Failed to load driver \u003cdriver\u003e\u0027, so this will look like \u0027Unable to load driver Failed to load driver \u003cdriver\u003e\u0027?","commit_id":"aeb90645f9635308402be5ac2cb981ebc5436ae3"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b506448200a2a1465697c7a22c137f3f4377e7ea","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise exc"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        def _check_func(ext):"},{"line_number":104,"context_line":"            if ext.name not in CONF.enabled_drivers:"},{"line_number":105,"context_line":"                return False"},{"line_number":106,"context_line":"            return True"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FWHI%3D","line":104,"updated":"2014-04-15 08:59:19.000000000","message":"return ext.name in CONF.enabled_drivers","commit_id":"f3e289a5312d5074f8b2dcb55a3ef6b80117a63d"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"4705679a428560248d4129a144d751afe5182d6a","unresolved":false,"context_lines":[{"line_number":101,"context_line":"            raise exc"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"        def _check_func(ext):"},{"line_number":104,"context_line":"            if ext.name not in CONF.enabled_drivers:"},{"line_number":105,"context_line":"                return False"},{"line_number":106,"context_line":"            return True"},{"line_number":107,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FRUY%3D","line":104,"in_reply_to":"AAAAW3%2F%2FWHI%3D","updated":"2014-04-15 17:02:23.000000000","message":"Done","commit_id":"f3e289a5312d5074f8b2dcb55a3ef6b80117a63d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"59c9e2788f9fc0f696f1f7944076856822d2357a","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # NOTE(deva): Drivers raise \"DriverNotFound\" if they are unable to be"},{"line_number":93,"context_line":"        #             loaded, eg. due to missing external dependencies."},{"line_number":94,"context_line":"        #             We capture that exception and log a more helpful message."},{"line_number":95,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":96,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":97,"context_line":"                # NOTE(deva): stevedore loads plugins *before* evaluating"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FQ6I%3D","line":94,"updated":"2014-04-15 17:39:03.000000000","message":"Nice comment but, err, the code isn\u0027t doing that?","commit_id":"a86908ebfc9674ff540003d0588d0a02394097fe"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"39d5807581658aaf64e595d031a857edad0ea7a5","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":"        # NOTE(deva): Drivers raise \"DriverNotFound\" if they are unable to be"},{"line_number":93,"context_line":"        #             loaded, eg. due to missing external dependencies."},{"line_number":94,"context_line":"        #             We capture that exception and log a more helpful message."},{"line_number":95,"context_line":"        def _catch_driver_not_found(mgr, ep, exc):"},{"line_number":96,"context_line":"            if isinstance(exc, exception.DriverNotFound):"},{"line_number":97,"context_line":"                # NOTE(deva): stevedore loads plugins *before* evaluating"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FQwg%3D","line":94,"in_reply_to":"AAAAW3%2F%2FQ6I%3D","updated":"2014-04-15 17:46:11.000000000","message":"Sure it does ...\n\nhttps://github.com/openstack/ironic/blob/master/ironic/drivers/pxe.py#L102\n\nIs there somewhere else you think it should be doing this?","commit_id":"a86908ebfc9674ff540003d0588d0a02394097fe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"42e96e1ba37631b18ec8b8b5c4219e3c22aa73dc","unresolved":false,"context_lines":[{"line_number":24,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"# TODO(deva): remove \u0027fake\u0027 and \u0027pxe_ssh\u0027 testing drivers from the defaults"},{"line_number":27,"context_line":"#             once appropriate test environemnts (devstack \u0026 triple)"},{"line_number":28,"context_line":"#             are updated"},{"line_number":29,"context_line":"driver_opts \u003d ["},{"line_number":30,"context_line":"        cfg.ListOpt(\u0027enabled_drivers\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAXH%2F%2F8xU%3D","line":27,"updated":"2014-04-16 10:04:38.000000000","message":"s/environemnts/environments/","commit_id":"4dc1eb8e1d05e0a87ad1d101bcb4a2ce86071e9d"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"771af48891b8b6b5ed436a203ac4264f2ff7b788","unresolved":false,"context_lines":[{"line_number":100,"context_line":"                #             _check_func, so we need to check here, too."},{"line_number":101,"context_line":"                if ep.name not in CONF.enabled_drivers:"},{"line_number":102,"context_line":"                    return"},{"line_number":103,"context_line":"            raise exc"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"        def _check_func(ext):"},{"line_number":106,"context_line":"            return ext.name in CONF.enabled_drivers"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAXH%2F%2F%2F%2F8%3D","line":103,"updated":"2014-04-16 00:03:24.000000000","message":"Just had this thought. The exception is raised, but the message is something like \u0027DriverNotFound: Unable to import seamicroclient library\u0027. I think we should add the driver name to the message.","commit_id":"4dc1eb8e1d05e0a87ad1d101bcb4a2ce86071e9d"}],"ironic/tests/api/v1/test_ports.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"695872eabfedcc2bcd8c5d350684c8a834463a04","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.addCleanup(p.stop)"},{"line_number":190,"context_line":"        p \u003d mock.patch.object(rpcapi.ConductorAPI, \u0027update_port\u0027)"},{"line_number":191,"context_line":"        self.mock_update_port \u003d p.start()"},{"line_number":192,"context_line":"        self.addCleanup(p.stop)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def test_update_byid(self):"},{"line_number":195,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FTJU%3D","line":192,"updated":"2014-04-15 13:56:28.000000000","message":"Hi. Could you change this to using class-level decorators? LIke\n\n @mock.patch.object(rpcapi.ConductorAPI, \u0027update_port\u0027)\n class ...\n\nThen in every method you\u0027ll get this mock as an argument. This is shorted and much more explicit.","commit_id":"f3e289a5312d5074f8b2dcb55a3ef6b80117a63d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"2e30f6556b4316664519cbb639d9cdd991771517","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.addCleanup(p.stop)"},{"line_number":190,"context_line":"        p \u003d mock.patch.object(rpcapi.ConductorAPI, \u0027update_port\u0027)"},{"line_number":191,"context_line":"        self.mock_update_port \u003d p.start()"},{"line_number":192,"context_line":"        self.addCleanup(p.stop)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def test_update_byid(self):"},{"line_number":195,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAXH%2F%2F9tc%3D","line":192,"in_reply_to":"AAAAW3%2F%2FRIM%3D","updated":"2014-04-16 08:19:16.000000000","message":"Then you can use class decorator in it\u0027s lambda form:\n\n @mock.patch.object(rpcapi.ConductorAPI, \u0027get_topic_for\u0027, lambda *_: \u0027test-topic\u0027)\n\nno additional parameters will be passed in this case","commit_id":"f3e289a5312d5074f8b2dcb55a3ef6b80117a63d"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"4705679a428560248d4129a144d751afe5182d6a","unresolved":false,"context_lines":[{"line_number":189,"context_line":"        self.addCleanup(p.stop)"},{"line_number":190,"context_line":"        p \u003d mock.patch.object(rpcapi.ConductorAPI, \u0027update_port\u0027)"},{"line_number":191,"context_line":"        self.mock_update_port \u003d p.start()"},{"line_number":192,"context_line":"        self.addCleanup(p.stop)"},{"line_number":193,"context_line":""},{"line_number":194,"context_line":"    def test_update_byid(self):"},{"line_number":195,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FRIM%3D","line":192,"in_reply_to":"AAAAW3%2F%2FTJU%3D","updated":"2014-04-15 17:02:23.000000000","message":"Done.\n\nI\u0027ve changed it for update_port, which is used in many places, but left the get_topic_for mock in setUp, since none of the tests interact with this mock - it\u0027s just here to provide a topic without needing to register a conductor.","commit_id":"f3e289a5312d5074f8b2dcb55a3ef6b80117a63d"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"5998de45570fa231f9dc48ab51ec157827805145","unresolved":false,"context_lines":[{"line_number":187,"context_line":"        p \u003d mock.patch.object(rpcapi.ConductorAPI, \u0027get_topic_for\u0027)"},{"line_number":188,"context_line":"        self.mock_gtf \u003d p.start()"},{"line_number":189,"context_line":"        self.mock_gtf.return_value \u003d \u0027test-topic\u0027"},{"line_number":190,"context_line":"        self.addCleanup(p.stop)"},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    def test_update_byid(self, mock_upd):"},{"line_number":193,"context_line":"        extra \u003d {\u0027foo\u0027: \u0027bar\u0027}"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAXH%2F%2F9s4%3D","line":190,"updated":"2014-04-16 08:20:39.000000000","message":"As I said in comments for one of the previous patch sets, you can use:\n\n @mock.patch.object(rpcapi.ConductorAPI, \u0027get_topic_for\u0027, lambda *_: \u0027test-topic\u0027)\n\nOne line vs 4 :) Anyway, I leave it up to you","commit_id":"4dc1eb8e1d05e0a87ad1d101bcb4a2ce86071e9d"}]}
