)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a5cbd3e44961209d783ced335df7c6d92999e1cc","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Dan Prince \u003cdprince@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-11-03 10:44:22 -0500"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"iboot: add wait loop for pstate to be effective"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Add a short retry loop so that power state changes can"},{"line_number":10,"context_line":"have some time to become active on iboot devices with"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa80f949_8055741e","line":7,"updated":"2015-11-03 16:01:25.000000000","message":"Maybe:\n\n iboot: add wait loop for pstate change to become active\n\nI know, more than 50 characters ;)","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"}],"ironic/drivers/modules/iboot.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"df28da72953f0d613335a88799ccce37cf7ccf58","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def _check_power_state(driver_info, pstate):"},{"line_number":155,"context_line":"    \"\"\"Function to check power state is correct. Up to 10 retries.\"\"\""},{"line_number":156,"context_line":"    for num in range(0, 10):"},{"line_number":157,"context_line":"        state \u003d _power_status(driver_info)"},{"line_number":158,"context_line":"        if state \u003d\u003d pstate:"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_6168a0bb","line":155,"updated":"2015-11-03 11:56:47.000000000","message":"to check the desired power state is set?","commit_id":"e30d1a31fcdadaa37f13e9dafe5f9160808987c2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"df28da72953f0d613335a88799ccce37cf7ccf58","unresolved":false,"context_lines":[{"line_number":156,"context_line":"    for num in range(0, 10):"},{"line_number":157,"context_line":"        state \u003d _power_status(driver_info)"},{"line_number":158,"context_line":"        if state \u003d\u003d pstate:"},{"line_number":159,"context_line":"            break"},{"line_number":160,"context_line":"        if num \u003d\u003d 9:"},{"line_number":161,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":162,"context_line":"        time.sleep(1)"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_4655721b","line":159,"updated":"2015-11-03 11:56:47.000000000","message":"nit - you could return here instead of break, and then raise without any condition after the cycle ends.","commit_id":"e30d1a31fcdadaa37f13e9dafe5f9160808987c2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"0b466b6d4cf481c1a12b5b267690ef9792c90d00","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            break"},{"line_number":160,"context_line":"        if num \u003d\u003d 9:"},{"line_number":161,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":162,"context_line":"        time.sleep(1)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def _power_status(driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_ff3ec189","line":162,"updated":"2015-11-02 22:29:40.000000000","message":"Dan, I don\u0027t really like hard-coded values -- the 10 retries and sleeping 1 sec here.\n\n_power_status() already uses two configs max_retry \u0026 retry_interval.\n\nIt looks like get_power_state() is the only method which calls _power_status() that you didn\u0027t modify with this new _check_power_state().\n\nIf it is OK for get_power_state() to take longer before returning, wouldn\u0027t this code change be similar (not exactly but close enough) to not having this change and up\u0027ing max_retry to 10*existing-value?","commit_id":"e30d1a31fcdadaa37f13e9dafe5f9160808987c2"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"a5b76dac1ba7f3aaf4e420eae5471a85c4479791","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            break"},{"line_number":160,"context_line":"        if num \u003d\u003d 9:"},{"line_number":161,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":162,"context_line":"        time.sleep(1)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def _power_status(driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_c239a9d8","line":162,"in_reply_to":"1a26ad4f_0e290d37","updated":"2015-11-03 03:22:57.000000000","message":"Dan, understand you, but we can not assume 10*1 seconds are enough for all cases, so can we get it more time to try, such as 20 or 30 seconds, make sense?","commit_id":"e30d1a31fcdadaa37f13e9dafe5f9160808987c2"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"df28da72953f0d613335a88799ccce37cf7ccf58","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            break"},{"line_number":160,"context_line":"        if num \u003d\u003d 9:"},{"line_number":161,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":162,"context_line":"        time.sleep(1)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def _power_status(driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa80f949_01d51442","line":162,"in_reply_to":"1a26ad4f_c239a9d8","updated":"2015-11-03 11:56:47.000000000","message":"using max_retry and retry_interval seems to be better, as it refers to all \u0027iBoot operations\u0027","commit_id":"e30d1a31fcdadaa37f13e9dafe5f9160808987c2"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"674f3173cc758a17ba380c86f7f72c802ee4edbd","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            break"},{"line_number":160,"context_line":"        if num \u003d\u003d 9:"},{"line_number":161,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":162,"context_line":"        time.sleep(1)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"def _power_status(driver_info):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_0e290d37","line":162,"in_reply_to":"1a26ad4f_ff3ec189","updated":"2015-11-03 02:43:37.000000000","message":"I can probably ditch the hard coded values and use max_retries instead. Functionally however I don\u0027t expect this would ever take more than a couple seconds, functionally just a sleep(1) seems fine when using real hardware that exhibits this issue.\n\nAs for moving this function into get_power_state I don\u0027t think we can assume that covers this case. get_power_state has a retry that covers communication issues with the power devices. In this case I\u0027m trying to write a function that checks for a known power state, up until a timeout is hit. Slightly different use cases I think, and the new _check_power_state function is only used internally.","commit_id":"e30d1a31fcdadaa37f13e9dafe5f9160808987c2"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a5cbd3e44961209d783ced335df7c6d92999e1cc","unresolved":false,"context_lines":[{"line_number":151,"context_line":"    time.sleep(seconds)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def _check_power_state(driver_info, pstate):"},{"line_number":155,"context_line":"    \"\"\"Function to check power state is correct. Up to max retries.\"\"\""},{"line_number":156,"context_line":"    retries \u003d CONF.iboot.max_retry"},{"line_number":157,"context_line":"    if retries \u003c 1:"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_83001eac","line":154,"updated":"2015-11-03 16:01:25.000000000","message":"Can a unit test for this function be added? I prefer to not have the only unit tests be a function which calls the function to be tested.","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9a7aefa2da629a5c63dd65b43b1a185e733e7d7","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def _check_power_state(driver_info, pstate):"},{"line_number":155,"context_line":"    \"\"\"Function to check power state is correct. Up to max retries.\"\"\""},{"line_number":156,"context_line":"    retries \u003d CONF.iboot.max_retry"},{"line_number":157,"context_line":"    if retries \u003c 1:"},{"line_number":158,"context_line":"        retries \u003d 1"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_43879661","line":155,"updated":"2015-11-03 16:01:38.000000000","message":"I always have to be careful about off by one with \u0027retries\u0027. It looks like you aren\u0027t re-trying this many times, but this is the max number of tries. (vs it looks correct in _power_status())","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"},{"author":{"_account_id":14810,"name":"Kan","email":"sofaopenstack@gmail.com","username":"Kan"},"change_message_id":"1c96d4ebc6bd03b6d2d9f2db590a2e378159b608","unresolved":false,"context_lines":[{"line_number":153,"context_line":""},{"line_number":154,"context_line":"def _check_power_state(driver_info, pstate):"},{"line_number":155,"context_line":"    \"\"\"Function to check power state is correct. Up to max retries.\"\"\""},{"line_number":156,"context_line":"    retries \u003d CONF.iboot.max_retry"},{"line_number":157,"context_line":"    if retries \u003c 1:"},{"line_number":158,"context_line":"        retries \u003d 1"},{"line_number":159,"context_line":"    for num in range(0, retries):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_58052ec0","line":156,"updated":"2015-11-04 04:04:33.000000000","message":"To my understanding, CONF.iboot.max_retry should be the retry times besides the first time power check. If the first time power check is included in the retry parameter, it will cause some misunderstanding named with \u0027retry\u0027.\n\nSo, if just define the retry parameter, this logic can be like:\ndef _check_power_state(driver_info, pstate):\n    \"\"\"Function to check power state is correct. Up to max retries.\"\"\"\n    retries \u003d CONF.iboot.max_retry\n    assert retries \u003e 0\n\n    for num in range(0, retries):\n        time.sleep(CONF..iboot.retry_interval)\n        state \u003d _power_status(driver_info)\n        if state \u003d\u003d pstate:\n            return\n    raise exception.PowerStateFailure(pstate\u003dpstate)\n\nAnd when calling this function, the usage can be like:\nstate \u003d _power_status(driver_info)\nif state !\u003d pstate:\n    _check_power_state(driver_info, pstate)","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9a7aefa2da629a5c63dd65b43b1a185e733e7d7","unresolved":false,"context_lines":[{"line_number":157,"context_line":"    if retries \u003c 1:"},{"line_number":158,"context_line":"        retries \u003d 1"},{"line_number":159,"context_line":"    for num in range(0, retries):"},{"line_number":160,"context_line":"        state \u003d _power_status(driver_info)"},{"line_number":161,"context_line":"        if state \u003d\u003d pstate:"},{"line_number":162,"context_line":"            return"},{"line_number":163,"context_line":"        if num \u003d\u003d (retries - 1):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_436316b2","line":160,"updated":"2015-11-03 16:01:38.000000000","message":"I was actually wondering about pushing down the logic/check to _power_status(driver_info, pstate\u003dpstate), and bumping up the value for CONF. iboot.max_retry but maybe it isn\u0027t worth it. This might be easier to understand.","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"a5cbd3e44961209d783ced335df7c6d92999e1cc","unresolved":false,"context_lines":[{"line_number":161,"context_line":"        if state \u003d\u003d pstate:"},{"line_number":162,"context_line":"            return"},{"line_number":163,"context_line":"        if num \u003d\u003d (retries - 1):"},{"line_number":164,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":165,"context_line":"        time.sleep(CONF.iboot.retry_interval)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_6362dada","line":164,"updated":"2015-11-03 16:01:25.000000000","message":"nit: Could just have this raise exception after the for loop without needing to do a test, I think.\n\nI guess it would cause an extra sleep to occur though. Now I\u0027m not sure which is better :)","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"c9a7aefa2da629a5c63dd65b43b1a185e733e7d7","unresolved":false,"context_lines":[{"line_number":162,"context_line":"            return"},{"line_number":163,"context_line":"        if num \u003d\u003d (retries - 1):"},{"line_number":164,"context_line":"            raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":165,"context_line":"        time.sleep(CONF.iboot.retry_interval)"},{"line_number":166,"context_line":""},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"def _power_status(driver_info):"}],"source_content_type":"text/x-python","patch_set":2,"id":"fa80f949_c0093c33","line":165,"updated":"2015-11-03 16:01:38.000000000","message":"I\u0027d prefer if the exception is raised outside the for loop, so something like\n    for ...\n        if num \u003c (retries-1):\n            time.sleep()\n    raise exception.PowerStateFailure()","commit_id":"1b72f84a0acfbe8e1b46b4439df5a00ba25f687c"},{"author":{"_account_id":14810,"name":"Kan","email":"sofaopenstack@gmail.com","username":"Kan"},"change_message_id":"75ead52e8c59f705370d5b07fb9b6bb34c89a47e","unresolved":false,"context_lines":[{"line_number":41,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":42,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":43,"context_line":"               default\u003d1,"},{"line_number":44,"context_line":"               min\u003d1,"},{"line_number":45,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":46,"context_line":"                      \u0027operations\u0027)),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_47975e90","line":44,"updated":"2015-11-05 02:32:16.000000000","message":"Seems like this configuration should be set in the \u0027max_retry\u0027 parameter section.","commit_id":"ac61b2ac1e3221fb6253ec8251ec8c76cee3f3ed"},{"author":{"_account_id":14810,"name":"Kan","email":"sofaopenstack@gmail.com","username":"Kan"},"change_message_id":"75ead52e8c59f705370d5b07fb9b6bb34c89a47e","unresolved":false,"context_lines":[{"line_number":159,"context_line":"        state \u003d _power_status(driver_info)"},{"line_number":160,"context_line":"        if state \u003d\u003d pstate:"},{"line_number":161,"context_line":"            return"},{"line_number":162,"context_line":"        time.sleep(CONF.iboot.retry_interval)"},{"line_number":163,"context_line":"    raise exception.PowerStateFailure(pstate\u003dpstate)"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa80f949_2716daf1","line":162,"updated":"2015-11-05 02:32:16.000000000","message":"It will cause one more sleep here when \u0027num\u0027 equals to \u0027CONF.iboot.max_retry\u0027, and adding a check here can avoid this:\n\nif num \u003c CONF.iboot.max_retry:\n    time.sleep(CONF.iboot.retry_interval)","commit_id":"ac61b2ac1e3221fb6253ec8251ec8c76cee3f3ed"},{"author":{"_account_id":14760,"name":"John L. Villalovos","email":"openstack.org@sodarock.com","username":"jlvillal"},"change_message_id":"07016411732aba65d2ee406d0ae9e4c6589df0fe","unresolved":false,"context_lines":[{"line_number":41,"context_line":"               min\u003d1,"},{"line_number":42,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":44,"context_line":"               default\u003d1,"},{"line_number":45,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":46,"context_line":"                      \u0027operations\u0027)),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_15edfd24","line":44,"updated":"2015-11-05 06:33:48.000000000","message":"Should there also be a min\u003d value here also?","commit_id":"83957016d484fad6f3481044f44cee4f238cb7d4"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"cd7ee5848ebeb1e21c76a850c1144750871bef99","unresolved":false,"context_lines":[{"line_number":41,"context_line":"               min\u003d1,"},{"line_number":42,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":44,"context_line":"               default\u003d1,"},{"line_number":45,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":46,"context_line":"                      \u0027operations\u0027)),"},{"line_number":47,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa80f949_9ca266ad","line":44,"in_reply_to":"fa80f949_15edfd24","updated":"2015-11-05 14:56:44.000000000","message":"Done","commit_id":"83957016d484fad6f3481044f44cee4f238cb7d4"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"08489621cc6fede94a0858652bd83e9b73f0b553","unresolved":false,"context_lines":[{"line_number":38,"context_line":"opts \u003d ["},{"line_number":39,"context_line":"    cfg.IntOpt(\u0027max_retry\u0027,"},{"line_number":40,"context_line":"               default\u003d3,"},{"line_number":41,"context_line":"               min\u003d1,"},{"line_number":42,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":44,"context_line":"               default\u003d1,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_6a99296e","line":41,"updated":"2015-11-09 14:20:28.000000000","message":"I don\u0027t really see why we\u0027d set the min to 1. I think 0 would be useful if you don\u0027t want any retries.\n\nI also think that adding the min to the configs should be in a separate patch since that seems to be outside the scope of this one (but I\u0027d let it go through if I thought it was OK).","commit_id":"67216c819b773b9166a86b373788c8c379d65494"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"08489621cc6fede94a0858652bd83e9b73f0b553","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":44,"context_line":"               default\u003d1,"},{"line_number":45,"context_line":"               min\u003d1,"},{"line_number":46,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":47,"context_line":"                      \u0027operations\u0027)),"},{"line_number":48,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_cae295d5","line":45,"updated":"2015-11-09 14:20:28.000000000","message":"I am wondering whether it would be useful if min was 0 here (to eg just keep retrying w/o waiting)","commit_id":"67216c819b773b9166a86b373788c8c379d65494"},{"author":{"_account_id":360,"name":"Dan Prince","email":"dprince@redhat.com","username":"dan-prince"},"change_message_id":"90652718e8c6532b61bfd9ff93400c96ba4b37b6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":44,"context_line":"               default\u003d1,"},{"line_number":45,"context_line":"               min\u003d1,"},{"line_number":46,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":47,"context_line":"                      \u0027operations\u0027)),"},{"line_number":48,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_4b08d491","line":45,"in_reply_to":"da85f559_cae295d5","updated":"2015-11-09 20:43:15.000000000","message":"Agree, This came up in a previous patch and it was suggested I change this. I will remove all the min\u003d1 from the next patch entirely.","commit_id":"67216c819b773b9166a86b373788c8c379d65494"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"fe3a87e6b847c8907d00018e68b9b0355ce0e33b","unresolved":false,"context_lines":[{"line_number":42,"context_line":"               help\u003d_(\u0027Maximum retries for iBoot operations\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027retry_interval\u0027,"},{"line_number":44,"context_line":"               default\u003d1,"},{"line_number":45,"context_line":"               min\u003d1,"},{"line_number":46,"context_line":"               help\u003d_(\u0027Time (in seconds) between retry attempts for iBoot \u0027"},{"line_number":47,"context_line":"                      \u0027operations\u0027)),"},{"line_number":48,"context_line":"    cfg.IntOpt(\u0027reboot_delay\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_b05ea4e7","line":45,"in_reply_to":"da85f559_cae295d5","updated":"2015-11-09 14:49:30.000000000","message":"Oh I haven\u0027t thought about it, yeah I agree with being able to set those to 0","commit_id":"67216c819b773b9166a86b373788c8c379d65494"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"151079446855d8b39039c68a3d1f44148cd12355","unresolved":false,"context_lines":[{"line_number":153,"context_line":"    time.sleep(seconds)"},{"line_number":154,"context_line":""},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"def _check_power_state(driver_info, pstate):"},{"line_number":157,"context_line":"    \"\"\"Function to check power state is correct. Up to max retries.\"\"\""},{"line_number":158,"context_line":"    # always try once + number of retries"},{"line_number":159,"context_line":"    for num in range(0, 1 + CONF.iboot.max_retry):"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_c7792b95","line":156,"updated":"2015-11-09 15:12:04.000000000","message":"just thoughts for future: it would be nice to have more general method check_state(info , state , max_retry, interval, ...","commit_id":"67216c819b773b9166a86b373788c8c379d65494"},{"author":{"_account_id":13636,"name":"aarefiev","display_name":"Anton","email":"arefyevanton@gmail.com","username":"aarefiev"},"change_message_id":"151079446855d8b39039c68a3d1f44148cd12355","unresolved":false,"context_lines":[{"line_number":156,"context_line":"def _check_power_state(driver_info, pstate):"},{"line_number":157,"context_line":"    \"\"\"Function to check power state is correct. Up to max retries.\"\"\""},{"line_number":158,"context_line":"    # always try once + number of retries"},{"line_number":159,"context_line":"    for num in range(0, 1 + CONF.iboot.max_retry):"},{"line_number":160,"context_line":"        state \u003d _power_status(driver_info)"},{"line_number":161,"context_line":"        if state \u003d\u003d pstate:"},{"line_number":162,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_64f39d0b","line":159,"updated":"2015-11-09 15:12:04.000000000","message":"nit: start \u003d 0 by default, so 0 is redundant","commit_id":"67216c819b773b9166a86b373788c8c379d65494"}],"ironic/tests/unit/drivers/modules/test_iboot.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"f12f276cb0f8c9bade6fcb4d904b7cb55967a3ce","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    def setUp(self):"},{"line_number":41,"context_line":"        super(IBootPrivateMethodTestCase, self).setUp()"},{"line_number":42,"context_line":"        self.config(max_retry\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":43,"context_line":"        self.config(retry_interval\u003d0, group\u003d\u0027iboot\u0027)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def test__parse_driver_info_good(self):"},{"line_number":46,"context_line":"        node \u003d obj_utils.create_test_node("}],"source_content_type":"text/x-python","patch_set":5,"id":"da85f559_1591a2f0","line":43,"updated":"2015-11-09 14:43:15.000000000","message":"We actually use values of 0 for testing :)","commit_id":"67216c819b773b9166a86b373788c8c379d65494"}]}
