)]}'
{"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":6610,"name":"Zhenguo Niu","email":"Niu.ZGlinux@gmail.com","username":"niu-zglinux"},"change_message_id":"ea89a48aedb0e951ec0f96ea96e880e7993d1486","unresolved":false,"context_lines":[{"line_number":998,"context_line":"# operations (integer value)"},{"line_number":999,"context_line":"#retry_interval\u003d1"},{"line_number":1000,"context_line":""},{"line_number":1001,"context_line":"# Time (in seconds) to sleep between when rebooting. (integer"},{"line_number":1002,"context_line":"# value)"},{"line_number":1003,"context_line":"#reboot_delay\u003d5"},{"line_number":1004,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"3a29b11f_26b3c251","line":1001,"updated":"2015-10-22 08:13:23.000000000","message":"This string is not same as the config option, you should generate this sample file using \u0027tox -egenconfig\u0027","commit_id":"9684750f80934faa49adb4f846f16a134b066164"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e53d2eef90b44b2c588df07865a3e572af70baff","unresolved":false,"context_lines":[{"line_number":998,"context_line":"# operations (integer value)"},{"line_number":999,"context_line":"#retry_interval\u003d1"},{"line_number":1000,"context_line":""},{"line_number":1001,"context_line":"# Time (in seconds) to sleep between when rebooting. (integer"},{"line_number":1002,"context_line":"# value)"},{"line_number":1003,"context_line":"#reboot_delay\u003d5"},{"line_number":1004,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":3,"id":"3a29b11f_6143e46c","line":1001,"in_reply_to":"3a29b11f_26b3c251","updated":"2015-10-22 08:51:52.000000000","message":"++","commit_id":"9684750f80934faa49adb4f846f16a134b066164"}],"ironic/drivers/modules/iboot.py":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"f15f0b715ab8e78b391145344b51053d089481c5","unresolved":false,"context_lines":[{"line_number":44,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":45,"context_line":"                      \u0027operations\u0027)),"},{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting.\u0027))"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_4a8b7cc3","line":47,"updated":"2015-10-08 17:30:09.000000000","message":"Maybe add:\n  min\u003d0","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"d58a124f1a1e2121e665c4c4df3c5d8d5a33b4e3","unresolved":false,"context_lines":[{"line_number":44,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":45,"context_line":"                      \u0027operations\u0027)),"},{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting.\u0027))"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_5bfb50c1","line":47,"in_reply_to":"7a2fa921_4a8b7cc3","updated":"2015-10-08 18:20:23.000000000","message":"ack.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5278df6c54e8cc8eef91fedffcb7186be31e50b4","unresolved":false,"context_lines":[{"line_number":45,"context_line":"                      \u0027operations\u0027)),"},{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting.\u0027))"},{"line_number":49,"context_line":"]"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_272af990","line":48,"updated":"2015-10-08 17:15:48.000000000","message":"between powering off and on when rebooting. Also config should be regenerated.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5278df6c54e8cc8eef91fedffcb7186be31e50b4","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":265,"context_line":"        _switch(driver_info, False)"},{"line_number":266,"context_line":"        time.sleep(CONF.iboot.retry_interval)"},{"line_number":267,"context_line":"        _switch(driver_info, True)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_87418d65","line":266,"updated":"2015-10-08 17:15:48.000000000","message":"reboot_delay I beleive.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"f15f0b715ab8e78b391145344b51053d089481c5","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":265,"context_line":"        _switch(driver_info, False)"},{"line_number":266,"context_line":"        time.sleep(CONF.iboot.retry_interval)"},{"line_number":267,"context_line":"        _switch(driver_info, True)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_cabd4c69","line":266,"in_reply_to":"7a2fa921_87418d65","updated":"2015-10-08 17:30:09.000000000","message":"+1","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"d58a124f1a1e2121e665c4c4df3c5d8d5a33b4e3","unresolved":false,"context_lines":[{"line_number":263,"context_line":"        \"\"\""},{"line_number":264,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":265,"context_line":"        _switch(driver_info, False)"},{"line_number":266,"context_line":"        time.sleep(CONF.iboot.retry_interval)"},{"line_number":267,"context_line":"        _switch(driver_info, True)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_9b0c88ed","line":266,"in_reply_to":"7a2fa921_87418d65","updated":"2015-10-08 18:20:23.000000000","message":"absolutely, will fix this right up.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"525890eea87d2e45473352ea349bf49ee0894e9e","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               min\u003d0,"},{"line_number":49,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting.\u0027))"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_3892e54c","line":49,"updated":"2015-10-09 16:49:48.000000000","message":"to sleep between off and on...?","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ec79ff44b515872f43caa4c721b551f52647ef1c","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               min\u003d0,"},{"line_number":49,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting.\u0027))"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_da928c9f","line":49,"in_reply_to":"7a2fa921_3892e54c","updated":"2015-10-12 16:13:17.000000000","message":"I think it may be misleading no? Cause if you only \"power off\" that sleeping time won\u0027t be called, it\u0027s only called when rebooting so I believe this is accurate.\n\nPerhaps something like: \"... when rebooting (powering off and on again)\"","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"96ceb36cb1f45ba53ff5a0c0df16b3342afd0d2b","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               min\u003d0,"},{"line_number":49,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting.\u0027))"},{"line_number":50,"context_line":"]"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"CONF \u003d cfg.CONF"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_09290b37","line":49,"in_reply_to":"7a2fa921_da928c9f","updated":"2015-10-21 19:54:13.000000000","message":"Done","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":11076,"name":"Shivanand Tendulker","email":"stendulker@gmail.com","username":"stendulker"},"change_message_id":"1df0ed4d7a602b0e0d1d79a83296c37b9700df98","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":266,"context_line":"        _switch(driver_info, False)"},{"line_number":267,"context_line":"        time.sleep(CONF.iboot.reboot_delay)"},{"line_number":268,"context_line":"        _switch(driver_info, True)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_79e34d34","line":267,"updated":"2015-10-12 14:09:27.000000000","message":"Would the single time of sleep would work for all the models of iboot devices? If it varies, this fix may break when conductor were to manages such diverse devices.\nHow one were to determine the appropriate sleep time?","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"96ceb36cb1f45ba53ff5a0c0df16b3342afd0d2b","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":266,"context_line":"        _switch(driver_info, False)"},{"line_number":267,"context_line":"        time.sleep(CONF.iboot.reboot_delay)"},{"line_number":268,"context_line":"        _switch(driver_info, True)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_e05dc447","line":267,"in_reply_to":"7a2fa921_039cff67","updated":"2015-10-21 19:54:13.000000000","message":"I can\u0027t answer for all users. The intent here was to set a reasonable default that is \"more kind\" to the hardware. As is the reboot would occur so quickly that it may or may not properly cycle a machine.","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"11793993f67e6e36d61d1ddba592e4d434d36419","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":266,"context_line":"        _switch(driver_info, False)"},{"line_number":267,"context_line":"        time.sleep(CONF.iboot.reboot_delay)"},{"line_number":268,"context_line":"        _switch(driver_info, True)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_039cff67","line":267,"in_reply_to":"7a2fa921_1a13240f","updated":"2015-10-13 08:13:24.000000000","message":"Shivanand, Lucas: sleep is not required for iboot devices, but for baremetal nodes. If we use external power controller off/on cycle is required after soft power off (do not forget set \"always on\" in the bios setup). But hardware can not detect external power off if off time is short due to energy accumulated in the PSU. 5s default is reasonable for me. And this change should be implemented for all external power drivers. This is my opinion, and I\u0027m an electrical engineer :)","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ec79ff44b515872f43caa4c721b551f52647ef1c","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        \"\"\""},{"line_number":265,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":266,"context_line":"        _switch(driver_info, False)"},{"line_number":267,"context_line":"        time.sleep(CONF.iboot.reboot_delay)"},{"line_number":268,"context_line":"        _switch(driver_info, True)"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"        state \u003d _power_status(driver_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_1a13240f","line":267,"in_reply_to":"7a2fa921_79e34d34","updated":"2015-10-12 16:13:17.000000000","message":"Hmm this is really hard to answer, I don\u0027t think @Dan can say for sure that this sleep is required for all types of iboot devices or how to determine the appropriated sleep time. I think this is common sense, 5 seconds by default seems very conservative already.\n\nAlso, it feels unlikely to break something by having an interval between two commands, reboot \u003d\u003d power_off() \u0026\u0026 power_on().","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b12e1b63fc7f8d83a912a57ee5fad8b88f77aa41","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    return mutable[\u0027response\u0027]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def _sleep_switch(seconds):"},{"line_number":150,"context_line":"    time.sleep(seconds)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_7b37134d","line":149,"updated":"2015-10-22 07:56:22.000000000","message":"Will be fine also mention that this function intended for unit tests in short docstring.","commit_id":"9684750f80934faa49adb4f846f16a134b066164"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e53d2eef90b44b2c588df07865a3e572af70baff","unresolved":false,"context_lines":[{"line_number":146,"context_line":"    return mutable[\u0027response\u0027]"},{"line_number":147,"context_line":""},{"line_number":148,"context_line":""},{"line_number":149,"context_line":"def _sleep_switch(seconds):"},{"line_number":150,"context_line":"    time.sleep(seconds)"},{"line_number":151,"context_line":""},{"line_number":152,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_017c70b3","line":149,"in_reply_to":"3a29b11f_7b37134d","updated":"2015-10-22 08:51:52.000000000","message":"Done","commit_id":"9684750f80934faa49adb4f846f16a134b066164"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f3c118375594469c95da533d7bc795da6972c281","unresolved":false,"context_lines":[{"line_number":46,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"},{"line_number":47,"context_line":"               default\u003d5,"},{"line_number":48,"context_line":"               min\u003d0,"},{"line_number":49,"context_line":"               help\u003d_(\u0027Time (in seconds) to sleep between when rebooting \u0027"},{"line_number":50,"context_line":"                      \u0027(powering off and on again).\u0027))"},{"line_number":51,"context_line":"]"},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3a29b11f_c5e0a42b","line":49,"updated":"2015-10-22 21:10:30.000000000","message":"I noticed this string in the snmp change, and I see we\u0027ve copy/pasted it here. It doesn\u0027t parse well for me but no sense having them both be different now.","commit_id":"735b58f2c395aefb25ca0b7c8e65195341027b94"}],"ironic/tests/unit/drivers/modules/test_iboot.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"5278df6c54e8cc8eef91fedffcb7186be31e50b4","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_aa2250a1","line":315,"updated":"2015-10-08 17:15:48.000000000","message":"You could just set new option to 0 instead of mocking.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"f15f0b715ab8e78b391145344b51053d089481c5","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_ea504834","line":315,"in_reply_to":"7a2fa921_8ae434e0","updated":"2015-10-08 17:30:09.000000000","message":"This seems good to me. I\u0027ve seen it done like this before.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"04137b63623e0e5ddd48c0b5101cd2c5acb1d9a2","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a2fa921_8ae434e0","line":315,"in_reply_to":"7a2fa921_aa2250a1","updated":"2015-10-08 17:24:24.000000000","message":"Sure, but I\u0027d kind of like the default to work. So a 5 second reboot sleep default makes sense I think.","commit_id":"1a8afa0d48e8873640bed39ffde562b3e4d72f66"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ec79ff44b515872f43caa4c721b551f52647ef1c","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def setUp(self):"},{"line_number":259,"context_line":"        super(IBootDriverTestCase, self).setUp()"},{"line_number":260,"context_line":"        self.config(max_retry\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":261,"context_line":"        self.config(retry_interval\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":262,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\u0027fake_iboot\u0027)"},{"line_number":263,"context_line":"        self.driver \u003d driver_factory.get_driver(\u0027fake_iboot\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_5f642e48","line":260,"updated":"2015-10-12 16:13:17.000000000","message":"self.config(reboot_delay\u003d0, group\u003d\u0027iboot\u0027)\n\nWe can enable it on specific tests","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"96ceb36cb1f45ba53ff5a0c0df16b3342afd0d2b","unresolved":false,"context_lines":[{"line_number":257,"context_line":""},{"line_number":258,"context_line":"    def setUp(self):"},{"line_number":259,"context_line":"        super(IBootDriverTestCase, self).setUp()"},{"line_number":260,"context_line":"        self.config(max_retry\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":261,"context_line":"        self.config(retry_interval\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":262,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\u0027fake_iboot\u0027)"},{"line_number":263,"context_line":"        self.driver \u003d driver_factory.get_driver(\u0027fake_iboot\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_89fe7bac","line":260,"in_reply_to":"7a2fa921_5f642e48","updated":"2015-10-21 19:54:13.000000000","message":"Done","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"e675fe6fb1485bae203f29215ee4bca600a5c7c2","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_2622c2a3","line":315,"updated":"2015-10-09 17:24:13.000000000","message":"This test would pass with or without changes you made to code. I think you need to assert that this mock was called.","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"92277412b92697da241f1b73549c1733d3fd73ec","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_ecc1f2e4","line":315,"in_reply_to":"7a2fa921_2622c2a3","updated":"2015-10-11 13:49:58.000000000","message":"Vladyslav, time.sleep() called 5 times inside the test (on different levels). I prefer set \u0027reboot_delay\u0027 to 0 for these tests.","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"96ceb36cb1f45ba53ff5a0c0df16b3342afd0d2b","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a29b11f_69019fae","line":315,"in_reply_to":"7a2fa921_7ffb2a48","updated":"2015-10-21 19:54:13.000000000","message":"Yuriy Zveryanskyy: I hit the same issues when trying to mock sleep.\n\nLucas: good suggestion. Next patch will do this...","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"ec79ff44b515872f43caa4c721b551f52647ef1c","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_7ffb2a48","line":315,"in_reply_to":"7a2fa921_8c6b9ef0","updated":"2015-10-12 16:13:17.000000000","message":"Yeha, perhaps the safest thing to do here is to have a guard function in the code for that sleep. E.g\n\n def _sleep_switch(seconds):\n     time.sleep(seconds)\n\nAnd then we mock _sleep_switch() to assert it was called called as part of the reboot","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"56af121c42e458996957cf6f38d726d51c4c7b00","unresolved":false,"context_lines":[{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    @mock.patch.object(iboot, \u0027_power_status\u0027, autospec\u003dTrue)"},{"line_number":314,"context_line":"    @mock.patch.object(iboot, \u0027_switch\u0027, spec_set\u003dtypes.FunctionType)"},{"line_number":315,"context_line":"    @mock.patch(\u0027time.sleep\u0027, lambda sec: None)"},{"line_number":316,"context_line":"    def test_reboot_good(self, mock_switch, mock_power_status):"},{"line_number":317,"context_line":"        manager \u003d mock.MagicMock(spec_set\u003d[\u0027switch\u0027])"},{"line_number":318,"context_line":"        mock_power_status.return_value \u003d states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":2,"id":"7a2fa921_8c6b9ef0","line":315,"in_reply_to":"7a2fa921_ecc1f2e4","updated":"2015-10-11 13:52:54.000000000","message":".. I try to change as you want and got \"Expected \u0027sleep\u0027 to be called once. Called 5 times.\"","commit_id":"c424e2b23333671124f8ac1885848a2ae302d91c"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"b12e1b63fc7f8d83a912a57ee5fad8b88f77aa41","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        super(IBootDriverTestCase, self).setUp()"},{"line_number":260,"context_line":"        self.config(max_retry\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":261,"context_line":"        self.config(retry_interval\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":262,"context_line":"        self.config(reboot_delay\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":263,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\u0027fake_iboot\u0027)"},{"line_number":264,"context_line":"        self.driver \u003d driver_factory.get_driver(\u0027fake_iboot\u0027)"},{"line_number":265,"context_line":"        self.node \u003d obj_utils.create_test_node("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_7be953b6","line":262,"updated":"2015-10-22 07:56:22.000000000","message":"Looks like this line is not needed, because this option only for reboot() method, and mock used for these tests.","commit_id":"9684750f80934faa49adb4f846f16a134b066164"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"e53d2eef90b44b2c588df07865a3e572af70baff","unresolved":false,"context_lines":[{"line_number":259,"context_line":"        super(IBootDriverTestCase, self).setUp()"},{"line_number":260,"context_line":"        self.config(max_retry\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":261,"context_line":"        self.config(retry_interval\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":262,"context_line":"        self.config(reboot_delay\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":263,"context_line":"        mgr_utils.mock_the_extension_manager(driver\u003d\u0027fake_iboot\u0027)"},{"line_number":264,"context_line":"        self.driver \u003d driver_factory.get_driver(\u0027fake_iboot\u0027)"},{"line_number":265,"context_line":"        self.node \u003d obj_utils.create_test_node("}],"source_content_type":"text/x-python","patch_set":3,"id":"3a29b11f_e180548d","line":262,"in_reply_to":"3a29b11f_7be953b6","updated":"2015-10-22 08:51:52.000000000","message":"I tend to agree but I think it\u0027s ok to leave it disabled by default for all tests in the iBootDriver test cases. From time to time we have to fix some new tests that are spending time sleeping, so I think it\u0027s ok to play the safe card here","commit_id":"9684750f80934faa49adb4f846f16a134b066164"}]}
