)]}'
{"ironic/drivers/modules/ilo_power.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3e6e4474b6287fb4c3812a8fa2a80349b0c4aa26","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except Exception as e:"},{"line_number":61,"context_line":"        LOG.error(_(\" iLO get_power_state failed for node %(node_id)s with \""},{"line_number":62,"context_line":"                    \"error: %(error)s.\")"},{"line_number":63,"context_line":"                  % {\u0027node_id\u0027: node[\u0027uuid\u0027], \u0027error\u0027: e})"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    if power_status \u003d\u003d \"ON\":"},{"line_number":66,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5QA%3D","line":63,"updated":"2014-03-03 15:40:54.000000000","message":"For python logging, don\u0027t interpolate here. Instead do:\n\n    LOG.error(_(\" iLO get_power_state failed for node %(node_id)s with \"\n                \"error: %(error)s.\"), {\u0027node_id\u0027: node[\u0027uuid\u0027], \u0027error\u0027: e})","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"dc02ec545637e1bfd27284af232093ae658dc792","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except Exception as e:"},{"line_number":61,"context_line":"        LOG.error(_(\" iLO get_power_state failed for node %(node_id)s with \""},{"line_number":62,"context_line":"                    \"error: %(error)s.\")"},{"line_number":63,"context_line":"                  % {\u0027node_id\u0027: node[\u0027uuid\u0027], \u0027error\u0027: e})"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    if power_status \u003d\u003d \"ON\":"},{"line_number":66,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2Fu7o%3D","line":63,"in_reply_to":"AAAAVn%2F%2F1%2B4%3D","updated":"2014-03-04 12:15:10.000000000","message":"I think need a separate patch for this, but please stick of what not to interpolate python logging. Explanation of why? you\u0027ll find here [1]\n\n[1] http://stackoverflow.com/questions/11615053/why-use-multiple-arguments-to-log-instead-of-interpolation","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":60,"context_line":"    except Exception as e:"},{"line_number":61,"context_line":"        LOG.error(_(\" iLO get_power_state failed for node %(node_id)s with \""},{"line_number":62,"context_line":"                    \"error: %(error)s.\")"},{"line_number":63,"context_line":"                  % {\u0027node_id\u0027: node[\u0027uuid\u0027], \u0027error\u0027: e})"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    if power_status \u003d\u003d \"ON\":"},{"line_number":66,"context_line":"        return states.POWER_ON"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F1%2B4%3D","line":63,"in_reply_to":"AAAAVn%2F%2F5QA%3D","updated":"2014-03-03 20:46:01.000000000","message":"Is this something that we want to move towards ? \n\nI see the other files pxe.py, deploy_utils.py all using the below form for python logging:\nLOG.error(_(\"\u003cstring\u003e\") % {\u003cvars\u003e})","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3cc20e5d1c7577d8e5070835d49ce67072b81319","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    # Check if any invalid states were passed."},{"line_number":115,"context_line":"    if target_state not in [states.POWER_OFF, states.POWER_ON, states.REBOOT]:"},{"line_number":116,"context_line":"        raise exception.InvalidParameterValue(\"set_power_state called \""},{"line_number":117,"context_line":"                                              \"with invalid power state\""},{"line_number":118,"context_line":"                                              \"\u0027%s\u0027.\" % target_state)"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F%2BUo%3D","line":116,"updated":"2014-03-03 03:12:09.000000000","message":"i18n enablement with _(\"...\") is required here.","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    # Check if any invalid states were passed."},{"line_number":115,"context_line":"    if target_state not in [states.POWER_OFF, states.POWER_ON, states.REBOOT]:"},{"line_number":116,"context_line":"        raise exception.InvalidParameterValue(\"set_power_state called \""},{"line_number":117,"context_line":"                                              \"with invalid power state\""},{"line_number":118,"context_line":"                                              \"\u0027%s\u0027.\" % target_state)"},{"line_number":119,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F1%2BQ%3D","line":116,"in_reply_to":"AAAAVn%2F%2F%2BUo%3D","updated":"2014-03-03 20:46:01.000000000","message":"Done","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3e6e4474b6287fb4c3812a8fa2a80349b0c4aa26","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        LOG.error(_(\"iLO set_power_state failed to set state to %(tstate)s \""},{"line_number":135,"context_line":"                    \" for node %(node_id)s with error: %(error)s \")"},{"line_number":136,"context_line":"                  % {\u0027tstate\u0027: target_state, \u0027node_id\u0027: node[\u0027uuid\u0027],"},{"line_number":137,"context_line":"                     \u0027error\u0027: e})"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    if state !\u003d target_state:"},{"line_number":140,"context_line":"        timeout \u003d (CONF.ilo.power_wait) * (CONF.ilo.power_retry)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5PU%3D","line":137,"updated":"2014-03-03 15:40:54.000000000","message":"ditto","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        LOG.error(_(\"iLO set_power_state failed to set state to %(tstate)s \""},{"line_number":135,"context_line":"                    \" for node %(node_id)s with error: %(error)s \")"},{"line_number":136,"context_line":"                  % {\u0027tstate\u0027: target_state, \u0027node_id\u0027: node[\u0027uuid\u0027],"},{"line_number":137,"context_line":"                     \u0027error\u0027: e})"},{"line_number":138,"context_line":""},{"line_number":139,"context_line":"    if state !\u003d target_state:"},{"line_number":140,"context_line":"        timeout \u003d (CONF.ilo.power_wait) * (CONF.ilo.power_retry)"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F1%2Bk%3D","line":137,"in_reply_to":"AAAAVn%2F%2F5PU%3D","updated":"2014-03-03 20:46:01.000000000","message":"Same as above:\n\nI see the other files pxe.py, deploy_utils.py all using the below form for python logging: LOG.error(_(\"\u003cstring\u003e\") % {\u003cvars\u003e})","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3e6e4474b6287fb4c3812a8fa2a80349b0c4aa26","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        timeout \u003d (CONF.ilo.power_wait) * (CONF.ilo.power_retry)"},{"line_number":141,"context_line":"        LOG.error(_(\"iLO failed to change state to %(tstate)s \""},{"line_number":142,"context_line":"                    \"within %(timeout) sec \")"},{"line_number":143,"context_line":"                    % {\u0027tstate\u0027: target_state, \u0027timeout\u0027: timeout})"},{"line_number":144,"context_line":"        raise exception.PowerStateFailure(pstate\u003dtarget_state)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5PM%3D","line":143,"updated":"2014-03-03 15:40:54.000000000","message":"ditto","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        timeout \u003d (CONF.ilo.power_wait) * (CONF.ilo.power_retry)"},{"line_number":141,"context_line":"        LOG.error(_(\"iLO failed to change state to %(tstate)s \""},{"line_number":142,"context_line":"                    \"within %(timeout) sec \")"},{"line_number":143,"context_line":"                    % {\u0027tstate\u0027: target_state, \u0027timeout\u0027: timeout})"},{"line_number":144,"context_line":"        raise exception.PowerStateFailure(pstate\u003dtarget_state)"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F1%2Bc%3D","line":143,"in_reply_to":"AAAAVn%2F%2F5PM%3D","updated":"2014-03-03 20:46:01.000000000","message":"I see the other files pxe.py, deploy_utils.py all using the below form for python logging: LOG.error(_(\"\u003cstring\u003e\") % {\u003cvars\u003e})","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"}],"ironic/tests/drivers/test_ilo_power.py":[{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3e6e4474b6287fb4c3812a8fa2a80349b0c4aa26","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.ribcl_ilo.iLO\u0027)"},{"line_number":54,"context_line":"    def test__get_power_state(self, ilomock):"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        instance \u003d ilomock.return_value"},{"line_number":57,"context_line":"        instance.get_host_power_status.return_value \u003d \u0027ON\u0027"},{"line_number":58,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5TE%3D","line":55,"updated":"2014-03-03 15:40:54.000000000","message":"no space line here required I think.","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.ribcl_ilo.iLO\u0027)"},{"line_number":54,"context_line":"    def test__get_power_state(self, ilomock):"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        instance \u003d ilomock.return_value"},{"line_number":57,"context_line":"        instance.get_host_power_status.return_value \u003d \u0027ON\u0027"},{"line_number":58,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F2HY%3D","line":55,"in_reply_to":"AAAAVn%2F%2F5TE%3D","updated":"2014-03-03 20:46:01.000000000","message":"Done","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3e6e4474b6287fb4c3812a8fa2a80349b0c4aa26","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.ribcl_ilo.iLO\u0027)"},{"line_number":69,"context_line":"    def test__set_power_state(self, ilomock):"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Check whether it raises exception when invalid power state is"},{"line_number":72,"context_line":"        # passed"},{"line_number":73,"context_line":"        CONF.ilo.ilo_power_retry \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5TM%3D","line":70,"updated":"2014-03-03 15:40:54.000000000","message":"no space line here required I think.","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.ribcl_ilo.iLO\u0027)"},{"line_number":69,"context_line":"    def test__set_power_state(self, ilomock):"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"        # Check whether it raises exception when invalid power state is"},{"line_number":72,"context_line":"        # passed"},{"line_number":73,"context_line":"        CONF.ilo.ilo_power_retry \u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F2Hc%3D","line":70,"in_reply_to":"AAAAVn%2F%2F5TM%3D","updated":"2014-03-03 20:46:01.000000000","message":"Done","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":8412,"name":"Mike Durnosvistov","email":"glacierr.dev@gmail.com","username":"mdurnosvistov"},"change_message_id":"3e6e4474b6287fb4c3812a8fa2a80349b0c4aa26","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.ribcl_ilo.iLO\u0027)"},{"line_number":142,"context_line":"    def test_set_power_state(self, ilomock):"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":145,"context_line":"                                  [self.node[\u0027uuid\u0027]], shared\u003dFalse) as task:"},{"line_number":146,"context_line":"            instance \u003d ilomock.return_value"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F5TU%3D","line":143,"updated":"2014-03-03 15:40:54.000000000","message":"no space line here required I think.","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"},{"author":{"_account_id":9315,"name":"ramesh","email":"rameshg87@gmail.com","username":"rameshg87"},"change_message_id":"eaa35f2c0c5cf5423322cc985182df9c79ddfa5a","unresolved":false,"context_lines":[{"line_number":140,"context_line":""},{"line_number":141,"context_line":"    @mock.patch(\u0027ironic.drivers.modules.ribcl_ilo.iLO\u0027)"},{"line_number":142,"context_line":"    def test_set_power_state(self, ilomock):"},{"line_number":143,"context_line":""},{"line_number":144,"context_line":"        with task_manager.acquire(self.context,"},{"line_number":145,"context_line":"                                  [self.node[\u0027uuid\u0027]], shared\u003dFalse) as task:"},{"line_number":146,"context_line":"            instance \u003d ilomock.return_value"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAVn%2F%2F2Hg%3D","line":143,"in_reply_to":"AAAAVn%2F%2F5TU%3D","updated":"2014-03-03 20:46:01.000000000","message":"Done","commit_id":"d0f0c3e270708f228335b33c00ead599544605a9"}]}
