)]}'
{"ironic/conductor/manager.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"1981d947f17823054a8a89120540417b79331a9e","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                            \"%(node)s is out of sync. Setting the \""},{"line_number":428,"context_line":"                            \"hardware state to %(state)s.\"),"},{"line_number":429,"context_line":"                            {\u0027node\u0027: node.uuid, \u0027state\u0027: node.power_state})"},{"line_number":430,"context_line":"                        utils.node_power_action(task, task.node,"},{"line_number":431,"context_line":"                                                node.power_state)"},{"line_number":432,"context_line":"                    else:"},{"line_number":433,"context_line":"                        LOG.warning(_(\"During sync_power_state, node \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2FemA%3D","line":430,"updated":"2014-02-26 12:01:49.000000000","message":"Exception from this function will break whole loop, we need something like l407-413.","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"145f6b513cfdbdd145a74a8d3a47b59c2d0d8bd2","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                            \"%(node)s is out of sync. Setting the \""},{"line_number":428,"context_line":"                            \"hardware state to %(state)s.\"),"},{"line_number":429,"context_line":"                            {\u0027node\u0027: node.uuid, \u0027state\u0027: node.power_state})"},{"line_number":430,"context_line":"                        utils.node_power_action(task, task.node,"},{"line_number":431,"context_line":"                                                node.power_state)"},{"line_number":432,"context_line":"                    else:"},{"line_number":433,"context_line":"                        LOG.warning(_(\"During sync_power_state, node \""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2FYvU%3D","line":430,"in_reply_to":"AAAAU3%2F%2FemA%3D","updated":"2014-02-26 23:15:08.000000000","message":"Ah! good catch, thanks Yuriy","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        cfg.BoolOpt(\u0027force_power_state_during_sync\u0027,"},{"line_number":86,"context_line":"                   default\u003dTrue,"},{"line_number":87,"context_line":"                   help\u003d\u0027During sync_power_state, should the hardware power \u0027"},{"line_number":88,"context_line":"                        \u0027state be set to the expected state (True) or should \u0027"},{"line_number":89,"context_line":"                        \u0027the database be updated based on the hardware \u0027"},{"line_number":90,"context_line":"                        \u0027state (False). Default: True.\u0027),"},{"line_number":91,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5JM%3D","line":88,"updated":"2014-02-27 15:06:34.000000000","message":"Just wondering if it is clear that \u0027expected state\u0027 \u003d\u003d what is in the database.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"        cfg.BoolOpt(\u0027force_power_state_during_sync\u0027,"},{"line_number":86,"context_line":"                   default\u003dTrue,"},{"line_number":87,"context_line":"                   help\u003d\u0027During sync_power_state, should the hardware power \u0027"},{"line_number":88,"context_line":"                        \u0027state be set to the expected state (True) or should \u0027"},{"line_number":89,"context_line":"                        \u0027the database be updated based on the hardware \u0027"},{"line_number":90,"context_line":"                        \u0027state (False). Default: True.\u0027),"},{"line_number":91,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F34A%3D","line":88,"in_reply_to":"AAAAVX%2F%2F5JM%3D","updated":"2014-02-27 17:50:13.000000000","message":"Done","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                    if node.power_state is None:"},{"line_number":416,"context_line":"                        LOG.info(_(\"During sync_power_state, node %(node)s \""},{"line_number":417,"context_line":"                            \"has no power state recorded in the database. \""},{"line_number":418,"context_line":"                            \"Updating database.\"), {\u0027node\u0027: node.uuid})"},{"line_number":419,"context_line":"                        node.power_state \u003d power_state"},{"line_number":420,"context_line":"                        node.save(context)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5c8%3D","line":418,"updated":"2014-02-27 15:06:34.000000000","message":"It might be useful to mention the power_state value being recorded.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                    if node.power_state is None:"},{"line_number":416,"context_line":"                        LOG.info(_(\"During sync_power_state, node %(node)s \""},{"line_number":417,"context_line":"                            \"has no power state recorded in the database. \""},{"line_number":418,"context_line":"                            \"Updating database.\"), {\u0027node\u0027: node.uuid})"},{"line_number":419,"context_line":"                        node.power_state \u003d power_state"},{"line_number":420,"context_line":"                        node.save(context)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F34Q%3D","line":418,"in_reply_to":"AAAAVX%2F%2F5c8%3D","updated":"2014-02-27 17:50:13.000000000","message":"Done","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                    if CONF.conductor.force_power_state_during_sync:"},{"line_number":426,"context_line":"                        LOG.warning(_(\"During sync_power_state, node \""},{"line_number":427,"context_line":"                            \"%(node)s is out of sync. Setting the \""},{"line_number":428,"context_line":"                            \"hardware state to %(state)s.\"),"},{"line_number":429,"context_line":"                            {\u0027node\u0027: node.uuid, \u0027state\u0027: node.power_state})"},{"line_number":430,"context_line":"                        try:"},{"line_number":431,"context_line":"                            utils.node_power_action(task, task.node,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5XU%3D","line":428,"updated":"2014-02-27 15:06:34.000000000","message":"Mention the hardware\u0027s power state before the change?","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":425,"context_line":"                    if CONF.conductor.force_power_state_during_sync:"},{"line_number":426,"context_line":"                        LOG.warning(_(\"During sync_power_state, node \""},{"line_number":427,"context_line":"                            \"%(node)s is out of sync. Setting the \""},{"line_number":428,"context_line":"                            \"hardware state to %(state)s.\"),"},{"line_number":429,"context_line":"                            {\u0027node\u0027: node.uuid, \u0027state\u0027: node.power_state})"},{"line_number":430,"context_line":"                        try:"},{"line_number":431,"context_line":"                            utils.node_power_action(task, task.node,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F3tI%3D","line":428,"in_reply_to":"AAAAVX%2F%2F5XU%3D","updated":"2014-02-27 17:50:13.000000000","message":"Done","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                        except Exception as e:"},{"line_number":434,"context_line":"                            # TODO(rloo): change to IronicException after"},{"line_number":435,"context_line":"                            # https://bugs.launchpad.net/ironic/+bug/1267693"},{"line_number":436,"context_line":"                            LOG.warning(_(\"During sync_power_state, failed to \""},{"line_number":437,"context_line":"                                \"change power state of node %(node)s. Error: \""},{"line_number":438,"context_line":"                                \"%(err)s.\"), {\u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":439,"context_line":"                            continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5UI%3D","line":436,"updated":"2014-02-27 15:06:34.000000000","message":"If we get to here, the node\u0027s \u0027last_error\u0027 will be set. Will that be a surprise to the user? I think it is probably OK but thought I\u0027d mention it.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":433,"context_line":"                        except Exception as e:"},{"line_number":434,"context_line":"                            # TODO(rloo): change to IronicException after"},{"line_number":435,"context_line":"                            # https://bugs.launchpad.net/ironic/+bug/1267693"},{"line_number":436,"context_line":"                            LOG.warning(_(\"During sync_power_state, failed to \""},{"line_number":437,"context_line":"                                \"change power state of node %(node)s. Error: \""},{"line_number":438,"context_line":"                                \"%(err)s.\"), {\u0027node\u0027: node.uuid, \u0027err\u0027: e})"},{"line_number":439,"context_line":"                            continue"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F34Y%3D","line":436,"in_reply_to":"AAAAVX%2F%2F5UI%3D","updated":"2014-02-27 17:50:13.000000000","message":"Yep - I think we *should* set last_error so that the user might know something is wrong. Eg, either ipmitool has errored, or even if it hasn\u0027t actually errored but the node did not successfully change power state, this will still reflect it.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                    else:"},{"line_number":441,"context_line":"                        LOG.warning(_(\"During sync_power_state, node \""},{"line_number":442,"context_line":"                            \"%(node)s is out of sync. Updating the \""},{"line_number":443,"context_line":"                            \"database to %(state)s.\"),"},{"line_number":444,"context_line":"                            {\u0027node\u0027: node.uuid, \u0027state\u0027: power_state})"},{"line_number":445,"context_line":"                        node.power_state \u003d power_state"},{"line_number":446,"context_line":"                        node.save(context)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5Tc%3D","line":443,"updated":"2014-02-27 15:06:34.000000000","message":"I liked having the old db value being logged.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":440,"context_line":"                    else:"},{"line_number":441,"context_line":"                        LOG.warning(_(\"During sync_power_state, node \""},{"line_number":442,"context_line":"                            \"%(node)s is out of sync. Updating the \""},{"line_number":443,"context_line":"                            \"database to %(state)s.\"),"},{"line_number":444,"context_line":"                            {\u0027node\u0027: node.uuid, \u0027state\u0027: power_state})"},{"line_number":445,"context_line":"                        node.power_state \u003d power_state"},{"line_number":446,"context_line":"                        node.save(context)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F34U%3D","line":443,"in_reply_to":"AAAAVX%2F%2F5Tc%3D","updated":"2014-02-27 17:50:13.000000000","message":"Done","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"de8b6e4818125958a264b9b4c621751763b87a45","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    else:"},{"line_number":138,"context_line":"        LOG.warning(_(\"During sync_power_state, node %(node)s state \""},{"line_number":139,"context_line":"                      \"\u0027%(actual)s\u0027 does not match expected state. \""},{"line_number":140,"context_line":"                      \"Updating recorded state to \u0027%(state)s\u0027.\"),"},{"line_number":141,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027actual\u0027: power_state,"},{"line_number":142,"context_line":"                       \u0027state\u0027: node.power_state})"},{"line_number":143,"context_line":"        node.power_state \u003d power_state"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVX%2F%2F1qI%3D","line":140,"updated":"2014-02-27 22:53:12.000000000","message":"How about \u0027... does not match expected state \u0027%(state)s\u0027. Updating recorded state to \u0027%(actual)s\u0027.  \n\nOr something like that.","commit_id":"9eff021c55827bf20982a8a7c15feb29062a32e2"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"54752efe64b1e90b6f3eaf0e9135b6dd0cd7a0fc","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    else:"},{"line_number":138,"context_line":"        LOG.warning(_(\"During sync_power_state, node %(node)s state \""},{"line_number":139,"context_line":"                      \"\u0027%(actual)s\u0027 does not match expected state. \""},{"line_number":140,"context_line":"                      \"Updating recorded state to \u0027%(state)s\u0027.\"),"},{"line_number":141,"context_line":"                      {\u0027node\u0027: node.uuid, \u0027actual\u0027: power_state,"},{"line_number":142,"context_line":"                       \u0027state\u0027: node.power_state})"},{"line_number":143,"context_line":"        node.power_state \u003d power_state"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAVX%2F%2F1Pc%3D","line":140,"in_reply_to":"AAAAVX%2F%2F1qI%3D","updated":"2014-02-28 00:19:18.000000000","message":"Ah, thanks! That\u0027s actually a copy/paste error -- the log message is incorrect right now.","commit_id":"9eff021c55827bf20982a8a7c15feb29062a32e2"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8dce3ab7fc3f8b1a99a7cebca832bc867e5690a6","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    self.assertFalse(npa_mock.called)"},{"line_number":159,"context_line":"                    node \u003d self.dbapi.get_node(n[\u0027id\u0027])"},{"line_number":160,"context_line":"                    self.assertEqual(node[\u0027power_state\u0027], states.POWER_OFF)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def test__sync_power_state_node_locked(self):"},{"line_number":163,"context_line":"        self.service.start()"},{"line_number":164,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003d\u0027fake-power\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2FeC8%3D","line":161,"updated":"2014-02-26 13:03:51.000000000","message":"And please add a test with exception from utils.node_power_action().","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"145f6b513cfdbdd145a74a8d3a47b59c2d0d8bd2","unresolved":false,"context_lines":[{"line_number":158,"context_line":"                    self.assertFalse(npa_mock.called)"},{"line_number":159,"context_line":"                    node \u003d self.dbapi.get_node(n[\u0027id\u0027])"},{"line_number":160,"context_line":"                    self.assertEqual(node[\u0027power_state\u0027], states.POWER_OFF)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    def test__sync_power_state_node_locked(self):"},{"line_number":163,"context_line":"        self.service.start()"},{"line_number":164,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003d\u0027fake-power\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F%2Ftw%3D","line":161,"in_reply_to":"AAAAU3%2F%2FeC8%3D","updated":"2014-02-26 23:15:08.000000000","message":"Done","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8dce3ab7fc3f8b1a99a7cebca832bc867e5690a6","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test__sync_power_state_multiple_nodes(self):"},{"line_number":175,"context_line":"        self.service.start()"},{"line_number":176,"context_line":"        cfg.CONF.conductor.force_power_state_during_sync \u003d False"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        # create three nodes"},{"line_number":179,"context_line":"        nodes \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2Fd%2F0%3D","line":176,"updated":"2014-02-26 13:03:51.000000000","message":"IMO better to use special method for conf override\n self.config(force_power_state_during_sync\u003dFalse, group\u003d\u0027conductor\u0027)","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"145f6b513cfdbdd145a74a8d3a47b59c2d0d8bd2","unresolved":false,"context_lines":[{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def test__sync_power_state_multiple_nodes(self):"},{"line_number":175,"context_line":"        self.service.start()"},{"line_number":176,"context_line":"        cfg.CONF.conductor.force_power_state_during_sync \u003d False"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        # create three nodes"},{"line_number":179,"context_line":"        nodes \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVX%2F%2F%2Ft0%3D","line":176,"in_reply_to":"AAAAU3%2F%2Fd%2F0%3D","updated":"2014-02-26 23:15:08.000000000","message":"Done","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"8dce3ab7fc3f8b1a99a7cebca832bc867e5690a6","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    def test__sync_power_state_node_no_power_state(self):"},{"line_number":208,"context_line":"        self.service.start()"},{"line_number":209,"context_line":"        cfg.CONF.conductor.force_power_state_during_sync \u003d False"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        # create three nodes"},{"line_number":212,"context_line":"        nodes \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAU3%2F%2Fd%2Fw%3D","line":209,"updated":"2014-02-26 13:03:51.000000000","message":"ditto","commit_id":"fe33534a343d43c75b2c69b6ae3a8bfc8e1a6312"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"f74407510ead62c06d8b57ab6dd44d93d4dee062","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            self.assertEqual(node[\u0027power_state\u0027], states.POWER_ON)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":126,"context_line":"    def test__sync_power_state_changed_sync(self, save_mock):"},{"line_number":127,"context_line":"        self.service.start()"},{"line_number":128,"context_line":"        self.config(force_power_state_during_sync\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":129,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003dstates.POWER_ON)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F3%2FY%3D","line":126,"updated":"2014-02-27 16:53:32.000000000","message":"Would be better if we used, whenever possible, decorators:\n\n    @mock.patch.object(objects.node.Node, \u0027save\u0027)\n    @mock.patch.object(conductor_utils, \u0027node_power_action\u0027)\n    def test__sync_power_state_changed_sync(self, npa_mock, save_mock):","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":123,"context_line":"            self.assertEqual(node[\u0027power_state\u0027], states.POWER_ON)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":126,"context_line":"    def test__sync_power_state_changed_sync(self, save_mock):"},{"line_number":127,"context_line":"        self.service.start()"},{"line_number":128,"context_line":"        self.config(force_power_state_during_sync\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":129,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003dstates.POWER_ON)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F3k0%3D","line":126,"in_reply_to":"AAAAVX%2F%2F3%2FY%3D","updated":"2014-02-27 17:50:13.000000000","message":"Done","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"f74407510ead62c06d8b57ab6dd44d93d4dee062","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                self.assertFalse(save_mock.called)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":143,"context_line":"    def test__sync_power_state_changed_failed(self, save_mock):"},{"line_number":144,"context_line":"        self.service.start()"},{"line_number":145,"context_line":"        self.config(force_power_state_during_sync\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":146,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003dstates.POWER_ON)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F39w%3D","line":143,"updated":"2014-02-27 16:53:32.000000000","message":"ditto","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                self.assertFalse(save_mock.called)"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":143,"context_line":"    def test__sync_power_state_changed_failed(self, save_mock):"},{"line_number":144,"context_line":"        self.service.start()"},{"line_number":145,"context_line":"        self.config(force_power_state_during_sync\u003dTrue, group\u003d\u0027conductor\u0027)"},{"line_number":146,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003dstates.POWER_ON)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F3kw%3D","line":143,"in_reply_to":"AAAAVX%2F%2F39w%3D","updated":"2014-02-27 17:50:13.000000000","message":"Done","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                get_power_mock.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":158,"context_line":"                npa_mock.assert_called_once_with(mock.ANY, mock.ANY,"},{"line_number":159,"context_line":"                                                 states.POWER_ON)"},{"line_number":160,"context_line":"                self.assertFalse(save_mock.called)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":163,"context_line":"    def test__sync_power_state_changed_save(self, save_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5Iw%3D","line":160,"updated":"2014-02-27 15:06:34.000000000","message":"I suppose you could check node\u0027s \u0027last_error\u0027, it should have something.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":157,"context_line":"                get_power_mock.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":158,"context_line":"                npa_mock.assert_called_once_with(mock.ANY, mock.ANY,"},{"line_number":159,"context_line":"                                                 states.POWER_ON)"},{"line_number":160,"context_line":"                self.assertFalse(save_mock.called)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":163,"context_line":"    def test__sync_power_state_changed_save(self, save_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F3gQ%3D","line":160,"in_reply_to":"AAAAVX%2F%2F5Iw%3D","updated":"2014-02-27 17:50:13.000000000","message":"No, we can\u0027t -- last_error is set within utils.node_power_action, which is mocked.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"f74407510ead62c06d8b57ab6dd44d93d4dee062","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                self.assertFalse(save_mock.called)"},{"line_number":161,"context_line":""},{"line_number":162,"context_line":"    @mock.patch.object(objects.node.Node, \u0027save\u0027)"},{"line_number":163,"context_line":"    def test__sync_power_state_changed_save(self, save_mock):"},{"line_number":164,"context_line":"        self.service.start()"},{"line_number":165,"context_line":"        self.config(force_power_state_during_sync\u003dFalse, group\u003d\u0027conductor\u0027)"},{"line_number":166,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027, power_state\u003dstates.POWER_OFF)"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F39o%3D","line":163,"updated":"2014-02-27 16:53:32.000000000","message":"ditto","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3558f15ae98b01c2d09df8f9297e7f1d19e64427","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                self.assertEqual(1, save_mock.call_count)"},{"line_number":176,"context_line":"                self.assertFalse(npa_mock.called)"},{"line_number":177,"context_line":"                node \u003d self.dbapi.get_node(n[\u0027id\u0027])"},{"line_number":178,"context_line":"                self.assertEqual(node[\u0027power_state\u0027], states.POWER_OFF)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def test__sync_power_state_node_locked(self):"},{"line_number":181,"context_line":"        self.service.start()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F5Is%3D","line":178,"updated":"2014-02-27 15:06:34.000000000","message":"I thought it would be states.POWER_ON, not POWER_OFF? (Maybe I\u0027ll try out the code to see where I\u0027m wrong.)","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"264faec394aab6fbb1d5774cc3b1f7a781a26e7e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                self.assertEqual(1, save_mock.call_count)"},{"line_number":176,"context_line":"                self.assertFalse(npa_mock.called)"},{"line_number":177,"context_line":"                node \u003d self.dbapi.get_node(n[\u0027id\u0027])"},{"line_number":178,"context_line":"                self.assertEqual(node[\u0027power_state\u0027], states.POWER_OFF)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def test__sync_power_state_node_locked(self):"},{"line_number":181,"context_line":"        self.service.start()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F3gI%3D","line":178,"in_reply_to":"AAAAVX%2F%2F43c%3D","updated":"2014-02-27 17:50:13.000000000","message":"Yea, this shouldn\u0027t be tested because save is being mocked.","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"40c4322e768430a88eeeb70f8cae7cea59416d19","unresolved":false,"context_lines":[{"line_number":175,"context_line":"                self.assertEqual(1, save_mock.call_count)"},{"line_number":176,"context_line":"                self.assertFalse(npa_mock.called)"},{"line_number":177,"context_line":"                node \u003d self.dbapi.get_node(n[\u0027id\u0027])"},{"line_number":178,"context_line":"                self.assertEqual(node[\u0027power_state\u0027], states.POWER_OFF)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"    def test__sync_power_state_node_locked(self):"},{"line_number":181,"context_line":"        self.service.start()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAVX%2F%2F43c%3D","line":178,"in_reply_to":"AAAAVX%2F%2F5Is%3D","updated":"2014-02-27 15:27:53.000000000","message":"Thought about it. I don\u0027t think anything actually got saved because the \u0027save\u0027 is being mocked. Does the objects.node.Node.save need to be mocked?","commit_id":"313f88b6832128cbacee769dee6ca6c94aa1fd06"}]}
