)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implements send-data-to-ceilometer"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This blueprint will define the sensor data collection interface and implement"},{"line_number":10,"context_line":"a driver based on IPMI to collect sensor data and send them to Ceilometer."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The change covered by this patch:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":36,"id":"baada198_2d5dc9ec","line":9,"updated":"2014-07-25 10:17:45.000000000","message":"This is not quite what you want to say here. This is not the blueprint, this is the implementation.","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Implements send-data-to-ceilometer"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This blueprint will define the sensor data collection interface and implement"},{"line_number":10,"context_line":"a driver based on IPMI to collect sensor data and send them to Ceilometer."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"The change covered by this patch:"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":36,"id":"baada198_bee57d0b","line":9,"in_reply_to":"baada198_2d5dc9ec","updated":"2014-07-28 06:07:32.000000000","message":"yes, will change \u0027blueprint\u0027 to \u0027implementation\u0027","commit_id":"b95f05843940572d378996374ff96524c104a5e5"}],"doc/source/deploy/install-guide.rst":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver,"},{"line_number":357,"context_line":"by default, it is disabled, so if you want to enable, please change below "},{"line_number":358,"context_line":"options value in ironic.conf conductor section:"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"* notification_driver\u003dmessaging"}],"source_content_type":"text/x-rst","patch_set":35,"id":"baada198_e7ecd0be","line":357,"updated":"2014-07-25 09:02:16.000000000","message":"trailing white space","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver,"},{"line_number":357,"context_line":"by default, it is disabled, so if you want to enable, please change below "},{"line_number":358,"context_line":"options value in ironic.conf conductor section:"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"* notification_driver\u003dmessaging"}],"source_content_type":"text/x-rst","patch_set":35,"id":"baada198_e7a4d04d","line":357,"in_reply_to":"baada198_e7ecd0be","updated":"2014-07-25 09:19:42.000000000","message":"done","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":351,"context_line":"Note that certain distros, notably Mac OS X and SLES, install ``openipmi``"},{"line_number":352,"context_line":"instead of ``ipmitool`` by default. THIS DRIVER IS NOT COMPATIBLE WITH"},{"line_number":353,"context_line":"``openipmi`` AS IT RELIES ON ERROR HANDLING OPTIONS NOT PROVIDED BY THIS TOOL."},{"line_number":354,"context_line":""},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver,"},{"line_number":357,"context_line":"by default, it is disabled, so if you want to enable, please change below"}],"source_content_type":"text/x-rst","patch_set":36,"id":"baada198_cdf44dd1","line":354,"updated":"2014-07-25 10:17:45.000000000","message":"Unnecessary blank line?","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver,"},{"line_number":357,"context_line":"by default, it is disabled, so if you want to enable, please change below"},{"line_number":358,"context_line":"options value in ironic.conf conductor section:"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"* notification_driver\u003dmessaging"},{"line_number":361,"context_line":"* send_sensor_data\u003dtrue"}],"source_content_type":"text/x-rst","patch_set":36,"id":"baada198_adc8f956","line":358,"updated":"2014-07-25 10:17:45.000000000","message":"Maybe try something like:\n\nBy default, support for sending IPMI sensor data to Ceilometer is disabled. If you want to enable the functional change or set the following options in the ``conductor`` section of ``ironic.conf``:","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":355,"context_line":""},{"line_number":356,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver,"},{"line_number":357,"context_line":"by default, it is disabled, so if you want to enable, please change below"},{"line_number":358,"context_line":"options value in ironic.conf conductor section:"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"* notification_driver\u003dmessaging"},{"line_number":361,"context_line":"* send_sensor_data\u003dtrue"}],"source_content_type":"text/x-rst","patch_set":36,"id":"baada198_3ea08da4","line":358,"in_reply_to":"baada198_adc8f956","updated":"2014-07-28 06:07:32.000000000","message":"good suggestion, thank you Chris.","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":361,"context_line":"* send_sensor_data\u003dtrue"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If you want to customize the sensor types which will be sent to Ceilometer,"},{"line_number":364,"context_line":"change the send_sensor_data_types option, for example, the below settings will"},{"line_number":365,"context_line":"send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":36,"id":"baada198_2ddce917","line":364,"updated":"2014-07-25 10:17:45.000000000","message":"``send_sensort_data_types`` ?","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":361,"context_line":"* send_sensor_data\u003dtrue"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If you want to customize the sensor types which will be sent to Ceilometer,"},{"line_number":364,"context_line":"change the send_sensor_data_types option, for example, the below settings will"},{"line_number":365,"context_line":"send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":36,"id":"baada198_3eb5edcf","line":364,"in_reply_to":"baada198_2ddce917","updated":"2014-07-28 06:07:32.000000000","message":"good idea, should highlight the new option name","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[],"source_content_type":"","patch_set":36,"id":"baada198_cdcc4d64","line":368,"updated":"2014-07-25 10:17:45.000000000","message":"Does Current still exist?","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":352,"context_line":"instead of ``ipmitool`` by default. THIS DRIVER IS NOT COMPATIBLE WITH"},{"line_number":353,"context_line":"``openipmi`` AS IT RELIES ON ERROR HANDLING OPTIONS NOT PROVIDED BY THIS TOOL."},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver."},{"line_number":356,"context_line":"By default, support for sending IPMI sensor data to Ceilometer is disabled. If"},{"line_number":357,"context_line":"you want to enable the functional change or set the following options in the"},{"line_number":358,"context_line":"``conductor`` section of ``ironic.conf``:"}],"source_content_type":"text/x-rst","patch_set":38,"id":"baada198_b8263cb8","line":355,"updated":"2014-07-28 09:57:34.000000000","message":"s/support to send/supports sending/","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":352,"context_line":"instead of ``ipmitool`` by default. THIS DRIVER IS NOT COMPATIBLE WITH"},{"line_number":353,"context_line":"``openipmi`` AS IT RELIES ON ERROR HANDLING OPTIONS NOT PROVIDED BY THIS TOOL."},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver."},{"line_number":356,"context_line":"By default, support for sending IPMI sensor data to Ceilometer is disabled. If"},{"line_number":357,"context_line":"you want to enable the functional change or set the following options in the"},{"line_number":358,"context_line":"``conductor`` section of ``ironic.conf``:"}],"source_content_type":"text/x-rst","patch_set":38,"id":"baada198_ea419a36","line":355,"in_reply_to":"baada198_b8263cb8","updated":"2014-07-29 02:21:57.000000000","message":"done","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver."},{"line_number":356,"context_line":"By default, support for sending IPMI sensor data to Ceilometer is disabled. If"},{"line_number":357,"context_line":"you want to enable the functional change or set the following options in the"},{"line_number":358,"context_line":"``conductor`` section of ``ironic.conf``:"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"* notification_driver\u003dmessaging"}],"source_content_type":"text/x-rst","patch_set":38,"id":"baada198_b84d5c74","line":357,"updated":"2014-07-28 09:57:34.000000000","message":"better s/the functional change or /it/","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":354,"context_line":""},{"line_number":355,"context_line":"Ironic support to send IPMI sensor data to Ceilometer with pxe_ipmitool driver."},{"line_number":356,"context_line":"By default, support for sending IPMI sensor data to Ceilometer is disabled. If"},{"line_number":357,"context_line":"you want to enable the functional change or set the following options in the"},{"line_number":358,"context_line":"``conductor`` section of ``ironic.conf``:"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"* notification_driver\u003dmessaging"}],"source_content_type":"text/x-rst","patch_set":38,"id":"baada198_0a740e9a","line":357,"in_reply_to":"baada198_b84d5c74","updated":"2014-07-29 02:21:57.000000000","message":"done","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":361,"context_line":"* send_sensor_data\u003dtrue"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If you want to customize the sensor types which will be sent to Ceilometer,"},{"line_number":364,"context_line":"change the ``send_sensor_data_types`` option, for example, the below settings"},{"line_number":365,"context_line":"will send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":38,"id":"baada198_98425839","line":364,"updated":"2014-07-28 09:57:34.000000000","message":"s/option, for example/option. For example/","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":361,"context_line":"* send_sensor_data\u003dtrue"},{"line_number":362,"context_line":""},{"line_number":363,"context_line":"If you want to customize the sensor types which will be sent to Ceilometer,"},{"line_number":364,"context_line":"change the ``send_sensor_data_types`` option, for example, the below settings"},{"line_number":365,"context_line":"will send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":38,"id":"baada198_eaafdadd","line":364,"in_reply_to":"baada198_98425839","updated":"2014-07-29 02:21:57.000000000","message":"done, thanks","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"unresolved":false,"context_lines":[{"line_number":364,"context_line":"change the ``send_sensor_data_types`` option. For example, the below settings"},{"line_number":365,"context_line":"will send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":39,"id":"baada198_1f4e0439","line":367,"updated":"2014-07-29 08:17:24.000000000","message":"Except for Temperature, Fan, Voltage, are there any more settable sensor type? Anyway, listing all settable values is better rather than \"for example...\", I think.","commit_id":"07329d335ba726732b6da7b47c4df7a1dade53c7"},{"author":{"_account_id":7882,"name":"Yuiko Takada Mori","email":"yuiko-mori@nec.com","username":"YuikoTakada"},"unresolved":false,"context_lines":[{"line_number":364,"context_line":"change the ``send_sensor_data_types`` option. For example, the below settings"},{"line_number":365,"context_line":"will send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":39,"id":"baada198_827e3b1a","line":367,"in_reply_to":"baada198_025eab13","updated":"2014-07-29 08:30:06.000000000","message":"Sorry, my word choice was inappropriate. If there are more settable sensor types except for Temperature, Fan, Voltage -- for example, humidity(no way, of course) -- all settable  sensor types should be written.","commit_id":"07329d335ba726732b6da7b47c4df7a1dade53c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":364,"context_line":"change the ``send_sensor_data_types`` option. For example, the below settings"},{"line_number":365,"context_line":"will send Temperature,Fan,Voltage these three sensor types data to Ceilometer:"},{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"}],"source_content_type":"text/x-rst","patch_set":39,"id":"baada198_025eab13","line":367,"in_reply_to":"baada198_1f4e0439","updated":"2014-07-29 08:23:27.000000000","message":"Yes, we can list all the sensor types which are supported by Ceilometer. For Ironic, can support all the sensor types which return by ipmitool command call.","commit_id":"07329d335ba726732b6da7b47c4df7a1dade53c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"Else we use default value \u0027All\u0027 for all the sensor tyeps which supportted by"},{"line_number":370,"context_line":"Ceilometer, they are:"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"* Temperature,Fan,Voltage,Current"}],"source_content_type":"text/x-rst","patch_set":40,"id":"baada198_e237f749","line":369,"updated":"2014-07-29 08:45:57.000000000","message":"s/tyeps which supportted/types supported/","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":366,"context_line":""},{"line_number":367,"context_line":"* send_sensor_data_types\u003dTemperature,Fan,Voltage"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"Else we use default value \u0027All\u0027 for all the sensor tyeps which supportted by"},{"line_number":370,"context_line":"Ceilometer, they are:"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"* Temperature,Fan,Voltage,Current"}],"source_content_type":"text/x-rst","patch_set":40,"id":"baada198_29760fa4","line":369,"in_reply_to":"baada198_e237f749","updated":"2014-07-31 02:06:18.000000000","message":"done","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"}],"etc/ironic/ironic.conf.sample":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":523,"context_line":"# Seconds to sleep between node lock attempts. (integer value)"},{"line_number":524,"context_line":"#node_locked_retry_interval\u003d1"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"# Allow to send sensor data message via notification bus"},{"line_number":527,"context_line":"# (boolean value)"},{"line_number":528,"context_line":"#send_sensor_data\u003dfalse"},{"line_number":529,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":36,"id":"baada198_edecb1be","line":526,"updated":"2014-07-25 10:17:45.000000000","message":"Enable sending sensor data message via the notification bus","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":523,"context_line":"# Seconds to sleep between node lock attempts. (integer value)"},{"line_number":524,"context_line":"#node_locked_retry_interval\u003d1"},{"line_number":525,"context_line":""},{"line_number":526,"context_line":"# Allow to send sensor data message via notification bus"},{"line_number":527,"context_line":"# (boolean value)"},{"line_number":528,"context_line":"#send_sensor_data\u003dfalse"},{"line_number":529,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":36,"id":"baada198_1c89e3c9","line":526,"in_reply_to":"baada198_edecb1be","updated":"2014-07-28 07:40:08.000000000","message":"done, thank you Chris.","commit_id":"b95f05843940572d378996374ff96524c104a5e5"}],"ironic/common/exception.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"class FailedToGetSensorData(IronicException):"},{"line_number":383,"context_line":"    message \u003d _(\"Failed to get sensor data\")"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class FailedToParseSensorData(IronicException):"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_26039c0e","line":383,"updated":"2014-07-16 15:35:13.000000000","message":"Can we add something more specific to the exception, i.e. reason, why failed?","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"class FailedToGetSensorData(IronicException):"},{"line_number":383,"context_line":"    message \u003d _(\"Failed to get sensor data\")"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class FailedToParseSensorData(IronicException):"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_2f051d14","line":383,"in_reply_to":"baada198_26039c0e","updated":"2014-07-17 06:39:47.000000000","message":"Good idea, will add error message,","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class FailedToParseSensorData(IronicException):"},{"line_number":387,"context_line":"    message \u003d _(\"Failed to parse sensor data\")"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_660d9437","line":387,"updated":"2014-07-16 15:35:13.000000000","message":"ditto","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"class FailedToGetSensorData(IronicException):"},{"line_number":383,"context_line":"    message \u003d _(\"Failed to get sensor data. %(error)s\")"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class FailedToParseSensorData(IronicException):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_5214aa9e","line":383,"updated":"2014-07-17 09:40:08.000000000","message":"I think it would be good to indicate on which node it actually failed to get the data from. What about:\n\n\"Failed to get sensor data for node %(node)s. Error: %(error)s\"","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":380,"context_line":""},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"class FailedToGetSensorData(IronicException):"},{"line_number":383,"context_line":"    message \u003d _(\"Failed to get sensor data. %(error)s\")"},{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class FailedToParseSensorData(IronicException):"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_c326f5b9","line":383,"in_reply_to":"baada198_5214aa9e","updated":"2014-07-18 13:13:42.000000000","message":"ok, good idea, will add node id into exception info","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":""},{"line_number":386,"context_line":"class FailedToParseSensorData(IronicException):"},{"line_number":387,"context_line":"    message \u003d _(\"Failed to parse sensor data. %(error)s\")"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_d21fdab6","line":387,"updated":"2014-07-17 09:40:08.000000000","message":"ditto","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"}],"ironic/conductor/manager.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":501,"context_line":"            return"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":504,"context_line":"        filters \u003d {\u0027reserved\u0027: False, \u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":505,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":506,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtP8%3D","line":503,"updated":"2014-02-11 10:36:50.000000000","message":"And what about fake_ipmitool driver?","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":500,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":501,"context_line":"            return"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":504,"context_line":"        filters \u003d {\u0027reserved\u0027: False, \u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":505,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":506,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm40%3D","line":503,"in_reply_to":"AAAAUX%2F%2FtP8%3D","updated":"2014-02-13 08:36:45.000000000","message":"done","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":501,"context_line":"            return"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":504,"context_line":"        filters \u003d {\u0027reserved\u0027: False, \u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":505,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":506,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":507,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtYI%3D","line":504,"updated":"2014-02-11 10:36:50.000000000","message":"Why we cannot to get sensor data on reserved nodes?","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":501,"context_line":"            return"},{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":504,"context_line":"        filters \u003d {\u0027reserved\u0027: False, \u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":505,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":506,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":507,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm4k%3D","line":504,"in_reply_to":"AAAAUX%2F%2FtYI%3D","updated":"2014-02-13 08:36:45.000000000","message":"Removed.","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":504,"context_line":"        filters \u003d {\u0027reserved\u0027: False, \u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":505,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":506,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":507,"context_line":"                                                 filters\u003dfilters)"},{"line_number":508,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtW8%3D","line":505,"updated":"2014-02-11 10:36:50.000000000","message":"\u0027id\u0027 not used, \u0027driver\u0027 should be \u0027pxe_ipmitool\u0027 only, column not needed.","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":502,"context_line":""},{"line_number":503,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":504,"context_line":"        filters \u003d {\u0027reserved\u0027: False, \u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":505,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":506,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":507,"context_line":"                                                 filters\u003dfilters)"},{"line_number":508,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm3w%3D","line":505,"in_reply_to":"AAAAUX%2F%2FtW8%3D","updated":"2014-02-13 08:36:45.000000000","message":"Yes, \u0027id\u0027 is not required, will remove it, but column is the list of column names to return.","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        for (node_id, node_uuid, driver, instance_uuid) in node_list:"},{"line_number":510,"context_line":"            # only handle the nodes mapped to this conductor"},{"line_number":511,"context_line":"            mapped_hosts \u003d self.driver_rings[driver].get_hosts(node_uuid)"},{"line_number":512,"context_line":"            if self.host not in mapped_hosts:"},{"line_number":513,"context_line":"                continue"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"            # populate the message which will be sent to ceilometer"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtVU%3D","line":512,"updated":"2014-02-11 10:36:50.000000000","message":"Maybe \n if self.host !\u003d mapped_hosts[0]:\nneeded here?","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":509,"context_line":"        for (node_id, node_uuid, driver, instance_uuid) in node_list:"},{"line_number":510,"context_line":"            # only handle the nodes mapped to this conductor"},{"line_number":511,"context_line":"            mapped_hosts \u003d self.driver_rings[driver].get_hosts(node_uuid)"},{"line_number":512,"context_line":"            if self.host not in mapped_hosts:"},{"line_number":513,"context_line":"                continue"},{"line_number":514,"context_line":""},{"line_number":515,"context_line":"            # populate the message which will be sent to ceilometer"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm3M%3D","line":512,"in_reply_to":"AAAAUX%2F%2FtVU%3D","updated":"2014-02-13 08:36:45.000000000","message":"If get_hosts() return empty, we will get IndexError exception with mapped_hosts[0].","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                       \u0027instance_uuid\u0027: instance_uuid,"},{"line_number":523,"context_line":"                       \u0027node_uuid\u0027: node_uuid,"},{"line_number":524,"context_line":"                       \u0027timestamp\u0027: timeutils.utcnow()}"},{"line_number":525,"context_line":"            node \u003d objects.Node.get_by_uuid(context, node_uuid)"},{"line_number":526,"context_line":"            try:"},{"line_number":527,"context_line":"                sensors_data \u003d node.driver.sensor.get_sensors_data(node)"},{"line_number":528,"context_line":"                message[\u0027payload\u0027] \u003d sensors_data"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtUg%3D","line":525,"updated":"2014-02-11 10:36:50.000000000","message":"with task_manager.acquire(context, node_uuid, shared\u003dTrue) as task:\n\nneeded this instead.","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":522,"context_line":"                       \u0027instance_uuid\u0027: instance_uuid,"},{"line_number":523,"context_line":"                       \u0027node_uuid\u0027: node_uuid,"},{"line_number":524,"context_line":"                       \u0027timestamp\u0027: timeutils.utcnow()}"},{"line_number":525,"context_line":"            node \u003d objects.Node.get_by_uuid(context, node_uuid)"},{"line_number":526,"context_line":"            try:"},{"line_number":527,"context_line":"                sensors_data \u003d node.driver.sensor.get_sensors_data(node)"},{"line_number":528,"context_line":"                message[\u0027payload\u0027] \u003d sensors_data"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm3I%3D","line":525,"in_reply_to":"AAAAUX%2F%2FtUg%3D","updated":"2014-02-13 08:36:45.000000000","message":"done","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                       \u0027timestamp\u0027: timeutils.utcnow()}"},{"line_number":525,"context_line":"            node \u003d objects.Node.get_by_uuid(context, node_uuid)"},{"line_number":526,"context_line":"            try:"},{"line_number":527,"context_line":"                sensors_data \u003d node.driver.sensor.get_sensors_data(node)"},{"line_number":528,"context_line":"                message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":529,"context_line":"                notifier_api.notify(context, node_id, \u0027sensordata\u0027,"},{"line_number":530,"context_line":"                                            notifier_api.INFO, message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtRs%3D","line":527,"updated":"2014-02-11 10:36:50.000000000","message":"sensor_data \u003d task.driver.sensor.get_power_state(task.node)","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":524,"context_line":"                       \u0027timestamp\u0027: timeutils.utcnow()}"},{"line_number":525,"context_line":"            node \u003d objects.Node.get_by_uuid(context, node_uuid)"},{"line_number":526,"context_line":"            try:"},{"line_number":527,"context_line":"                sensors_data \u003d node.driver.sensor.get_sensors_data(node)"},{"line_number":528,"context_line":"                message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":529,"context_line":"                notifier_api.notify(context, node_id, \u0027sensordata\u0027,"},{"line_number":530,"context_line":"                                            notifier_api.INFO, message)"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm3E%3D","line":527,"in_reply_to":"AAAAUX%2F%2FtRs%3D","updated":"2014-02-13 08:36:45.000000000","message":"done","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0ccf80a591811b8f2fa7399f5004ed8bea5d981a","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                           \"found and presumed deleted by another process.\") %"},{"line_number":583,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":584,"context_line":"                continue"},{"line_number":585,"context_line":"            except exception.NodeLocked:"},{"line_number":586,"context_line":"                LOG.info(_(\"During send_sensor_data, node %(node)s was \""},{"line_number":587,"context_line":"                           \"already locked by another process. Skip.\") %"},{"line_number":588,"context_line":"                           {\u0027node\u0027: node_uuid})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2B4tw%3D","line":585,"updated":"2014-02-18 12:49:31.000000000","message":"With shared\u003dTrue this exception will newer raised.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"b2b732d86ea7a9190516dfa11dfcad692bbaa35f","unresolved":false,"context_lines":[{"line_number":582,"context_line":"                           \"found and presumed deleted by another process.\") %"},{"line_number":583,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":584,"context_line":"                continue"},{"line_number":585,"context_line":"            except exception.NodeLocked:"},{"line_number":586,"context_line":"                LOG.info(_(\"During send_sensor_data, node %(node)s was \""},{"line_number":587,"context_line":"                           \"already locked by another process. Skip.\") %"},{"line_number":588,"context_line":"                           {\u0027node\u0027: node_uuid})"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2BzHA%3D","line":585,"in_reply_to":"AAAAUX%2F%2B4tw%3D","updated":"2014-02-19 00:24:32.000000000","message":"good catch, will remove it.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":535,"context_line":"            return"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":538,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":539,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":540,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":541,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B6I%3D","line":538,"updated":"2014-02-27 01:13:33.000000000","message":"you should filter by associated nodes (instance_uuid is not null) since an unassociated node does not have a tenant or user.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":535,"context_line":"            return"},{"line_number":536,"context_line":""},{"line_number":537,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":538,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027}"},{"line_number":539,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":540,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":541,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW8o%3D","line":538,"in_reply_to":"AAAAVX%2F%2F%2B6I%3D","updated":"2014-04-30 10:16:45.000000000","message":"agree with you, added \" \u0027associated\u0027: True\" into the filter to check out associated nodes only.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":568,"context_line":"                    notifier_api.notify(context, node_id, \u0027sensordata\u0027,"},{"line_number":569,"context_line":"                                            notifier_api.INFO, message)"},{"line_number":570,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":571,"context_line":"                LOG.debug(_(\"During get_sensors_data, could not parse \""},{"line_number":572,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":573,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":574,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B%2Fs%3D","line":571,"updated":"2014-02-27 01:13:33.000000000","message":"please log at warning level.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":568,"context_line":"                    notifier_api.notify(context, node_id, \u0027sensordata\u0027,"},{"line_number":569,"context_line":"                                            notifier_api.INFO, message)"},{"line_number":570,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":571,"context_line":"                LOG.debug(_(\"During get_sensors_data, could not parse \""},{"line_number":572,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":573,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":574,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW8Y%3D","line":571,"in_reply_to":"AAAAVX%2F%2F%2B%2Fs%3D","updated":"2014-04-30 10:16:45.000000000","message":"done","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":573,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":574,"context_line":"                continue"},{"line_number":575,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":576,"context_line":"                LOG.debug(_(\"During get_sensors_data, could not get \""},{"line_number":577,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":578,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":579,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B%2Fg%3D","line":576,"updated":"2014-02-27 01:13:33.000000000","message":"please log at warning level.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":573,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":574,"context_line":"                continue"},{"line_number":575,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":576,"context_line":"                LOG.debug(_(\"During get_sensors_data, could not get \""},{"line_number":577,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":578,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":579,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW8U%3D","line":576,"in_reply_to":"AAAAVX%2F%2F%2B%2Fg%3D","updated":"2014-04-30 10:16:45.000000000","message":"done","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":577,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":578,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":579,"context_line":"                continue"},{"line_number":580,"context_line":"            except exception.NodeNotFound:"},{"line_number":581,"context_line":"                LOG.info(_(\"During send_sensor_data, node %(node)s was not \""},{"line_number":582,"context_line":"                           \"found and presumed deleted by another process.\") %"},{"line_number":583,"context_line":"                           {\u0027node\u0027: node_uuid})"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B%2F4%3D","line":580,"updated":"2014-02-27 01:13:33.000000000","message":"must handle NodeLocked here too, and there is no need to log (or just log at debug level)","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":577,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":578,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":579,"context_line":"                continue"},{"line_number":580,"context_line":"            except exception.NodeNotFound:"},{"line_number":581,"context_line":"                LOG.info(_(\"During send_sensor_data, node %(node)s was not \""},{"line_number":582,"context_line":"                           \"found and presumed deleted by another process.\") %"},{"line_number":583,"context_line":"                           {\u0027node\u0027: node_uuid})"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW8M%3D","line":580,"in_reply_to":"AAAAVX%2F%2F%2B%2F4%3D","updated":"2014-04-30 10:16:45.000000000","message":"done","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"94086bf6e640c530d9fddf52d9d56e7290c9036a","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":918,"context_line":"            return"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":921,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":922,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":923,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FWo4%3D","line":920,"updated":"2014-04-15 08:31:47.000000000","message":"And fake_ipmitool maybe?","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":917,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":918,"context_line":"            return"},{"line_number":919,"context_line":""},{"line_number":920,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":921,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":922,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":923,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2F%2BhU%3D","line":920,"in_reply_to":"AAAAW3%2F%2FWo4%3D","updated":"2014-04-16 05:49:24.000000000","message":"yes, support fake_ipmitool also.","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"94086bf6e640c530d9fddf52d9d56e7290c9036a","unresolved":false,"context_lines":[{"line_number":947,"context_line":"                    sensors_data \u003d task.driver.sensor.get_sensors_data("},{"line_number":948,"context_line":"                                              task, node)"},{"line_number":949,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":950,"context_line":"                    notifier_api.notify(context, node_id, \u0027sensordata\u0027,"},{"line_number":951,"context_line":"                                            notifier_api.INFO, message)"},{"line_number":952,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":953,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FWik%3D","line":950,"updated":"2014-04-15 08:31:47.000000000","message":"Looks like publisher_id should be self.host, not node_id.","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":947,"context_line":"                    sensors_data \u003d task.driver.sensor.get_sensors_data("},{"line_number":948,"context_line":"                                              task, node)"},{"line_number":949,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":950,"context_line":"                    notifier_api.notify(context, node_id, \u0027sensordata\u0027,"},{"line_number":951,"context_line":"                                            notifier_api.INFO, message)"},{"line_number":952,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":953,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2F%2BhQ%3D","line":950,"in_reply_to":"AAAAW3%2F%2FWik%3D","updated":"2014-04-16 05:49:24.000000000","message":"good idea, will apply self.host","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        \u0027 to ceilometer via the notification bus.\u0027),"},{"line_number":127,"context_line":"        cfg.StrOpt(\u0027send_sensor_data_types\u0027,"},{"line_number":128,"context_line":"                   default\u003d\"ALL\","},{"line_number":129,"context_line":"                   help\u003d\u0027list what types of data user want to send, default\u0027"},{"line_number":130,"context_line":"                        \u0027 value is \"ALL\" we could send everything, a sample of\u0027"},{"line_number":131,"context_line":"                        \u0027 customization setting value is \u0027"},{"line_number":132,"context_line":"                        \u0027\"Temperature,Fan,Voltage,Current\", which will send \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_94cbe351","line":129,"updated":"2014-07-15 15:16:19.000000000","message":"s/list/List\n\nHow about simplifying it a bit like:\n\"List of comma separated metric types which need to be sent to Ceilometer.\"","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02c7a9b497679ec3cd225d20c594af4ef04509ed","unresolved":false,"context_lines":[{"line_number":126,"context_line":"                        \u0027 to ceilometer via the notification bus.\u0027),"},{"line_number":127,"context_line":"        cfg.StrOpt(\u0027send_sensor_data_types\u0027,"},{"line_number":128,"context_line":"                   default\u003d\"ALL\","},{"line_number":129,"context_line":"                   help\u003d\u0027list what types of data user want to send, default\u0027"},{"line_number":130,"context_line":"                        \u0027 value is \"ALL\" we could send everything, a sample of\u0027"},{"line_number":131,"context_line":"                        \u0027 customization setting value is \u0027"},{"line_number":132,"context_line":"                        \u0027\"Temperature,Fan,Voltage,Current\", which will send \u0027"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_538eacd1","line":129,"in_reply_to":"baada198_94cbe351","updated":"2014-07-16 02:17:08.000000000","message":"Ok, thanks","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":1013,"context_line":"                                              task, node)"},{"line_number":1014,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1015,"context_line":"                    transport \u003d messaging.get_transport(CONF)"},{"line_number":1016,"context_line":"                    messaging.Notifier(transport, self.host).info("},{"line_number":1017,"context_line":"                                          \"hardware.ipmi.metrics\", message)"},{"line_number":1018,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1019,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_3b7cc3eb","line":1016,"updated":"2014-07-15 16:26:59.000000000","message":"info( requires an additional first argument a `context`. Putting a {} as the first arg makes the code work, but I don\u0027t know if that is correct.","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02c7a9b497679ec3cd225d20c594af4ef04509ed","unresolved":false,"context_lines":[{"line_number":1013,"context_line":"                                              task, node)"},{"line_number":1014,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1015,"context_line":"                    transport \u003d messaging.get_transport(CONF)"},{"line_number":1016,"context_line":"                    messaging.Notifier(transport, self.host).info("},{"line_number":1017,"context_line":"                                          \"hardware.ipmi.metrics\", message)"},{"line_number":1018,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1019,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_93bf6460","line":1016,"in_reply_to":"baada198_3b7cc3eb","updated":"2014-07-16 02:17:08.000000000","message":"Yes, we need the first context parameters, I find the issue with the unittest code, will fix this with next patch, thank you.","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":991,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":992,"context_line":"            return"},{"line_number":993,"context_line":""},{"line_number":994,"context_line":"        # support pxe_ipmitool and fake_ipmitool driver only now"},{"line_number":995,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":996,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":997,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_0673f8b4","line":994,"updated":"2014-07-16 15:35:13.000000000","message":"I don\u0027t see fake_ipmitool supported on the following line.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":991,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":992,"context_line":"            return"},{"line_number":993,"context_line":""},{"line_number":994,"context_line":"        # support pxe_ipmitool and fake_ipmitool driver only now"},{"line_number":995,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":996,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":997,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_75d28235","line":994,"in_reply_to":"baada198_0673f8b4","updated":"2014-07-17 06:39:47.000000000","message":"yes, it is mismatch with comments, will remove \u0027fake_ipmitool\u0027 from above comments, we support pxe_ipmitool only, no need to support fake_ipmitool for such implementation logic in details.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1014,"context_line":"                         as task:"},{"line_number":1015,"context_line":"                    node \u003d task.node"},{"line_number":1016,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1017,"context_line":"                                              task, node)"},{"line_number":1018,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1019,"context_line":"                    transport \u003d messaging.get_transport(CONF, _ALIASES)"},{"line_number":1020,"context_line":"                    messaging.Notifier(context, transport, self.host).info("}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_66a914df","line":1017,"updated":"2014-07-16 15:35:13.000000000","message":"hanging indent, should be 4 spaces from the beginning","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1014,"context_line":"                         as task:"},{"line_number":1015,"context_line":"                    node \u003d task.node"},{"line_number":1016,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1017,"context_line":"                                              task, node)"},{"line_number":1018,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1019,"context_line":"                    transport \u003d messaging.get_transport(CONF, _ALIASES)"},{"line_number":1020,"context_line":"                    messaging.Notifier(context, transport, self.host).info("}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_9d973ceb","line":1017,"in_reply_to":"baada198_66a914df","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1018,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1019,"context_line":"                    transport \u003d messaging.get_transport(CONF, _ALIASES)"},{"line_number":1020,"context_line":"                    messaging.Notifier(context, transport, self.host).info("},{"line_number":1021,"context_line":"                                          \"hardware.ipmi.metrics\", message)"},{"line_number":1022,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1023,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_467b307b","line":1021,"updated":"2014-07-16 15:35:13.000000000","message":"1. ditto\n\n2. please move this call outside of try..except..","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1018,"context_line":"                    message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1019,"context_line":"                    transport \u003d messaging.get_transport(CONF, _ALIASES)"},{"line_number":1020,"context_line":"                    messaging.Notifier(context, transport, self.host).info("},{"line_number":1021,"context_line":"                                          \"hardware.ipmi.metrics\", message)"},{"line_number":1022,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1023,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_3d80f08a","line":1021,"in_reply_to":"baada198_467b307b","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1021,"context_line":"                                          \"hardware.ipmi.metrics\", message)"},{"line_number":1022,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1023,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1025,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_8694688d","line":1024,"updated":"2014-07-16 15:35:13.000000000","message":"nit: use , instead of % for LOG.xxx","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1021,"context_line":"                                          \"hardware.ipmi.metrics\", message)"},{"line_number":1022,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1023,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1025,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_1d588c56","line":1024,"in_reply_to":"baada198_8694688d","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1025,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":1028,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not get \""},{"line_number":1029,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1030,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_66ebd4b0","line":1027,"updated":"2014-07-16 15:35:13.000000000","message":"In your IPMI implementation you actually convert any Exception into this error. Won\u0027t it better to not introduce FailedToGetSensorData and just convert any Exception here?","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1025,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":1028,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not get \""},{"line_number":1029,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1030,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_802513b0","line":1027,"in_reply_to":"baada198_66ebd4b0","updated":"2014-07-17 06:39:47.000000000","message":"you mean we should catch Exception here and translate to FailedToGetSensorData? I understand we need the special exception not general exception for Ironic, right?","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1024,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1025,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":1028,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not get \""},{"line_number":1029,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1030,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_46d5cc19","line":1027,"in_reply_to":"baada198_802513b0","updated":"2014-07-17 10:07:05.000000000","message":"Yes, but here it\u0027s just converting back-and-forth. You need a special exception class, if you let it out.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":1028,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not get \""},{"line_number":1029,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1030,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1031,"context_line":"                continue"},{"line_number":1032,"context_line":"            except exception.NodeLocked:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e68b6466","line":1029,"updated":"2014-07-16 15:35:13.000000000","message":"nit: use , instead of % for LOG.xxx","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1026,"context_line":"                continue"},{"line_number":1027,"context_line":"            except exception.FailedToGetSensorData as e:"},{"line_number":1028,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not get \""},{"line_number":1029,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\") %"},{"line_number":1030,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1031,"context_line":"                continue"},{"line_number":1032,"context_line":"            except exception.NodeLocked:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_dd14544f","line":1029,"in_reply_to":"baada198_e68b6466","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                continue"},{"line_number":1032,"context_line":"            except exception.NodeLocked:"},{"line_number":1033,"context_line":"                LOG.debug(_(\"During send_sensor_data, node %(node)s \""},{"line_number":1034,"context_line":"                            \"was locked.\") % {\u0027node\u0027: node_uuid})"},{"line_number":1035,"context_line":"                continue"},{"line_number":1036,"context_line":"            except exception.NodeNotFound:"},{"line_number":1037,"context_line":"                LOG.debug(_(\"During send_sensor_data, node %(node)s was not \""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_86db887c","line":1034,"updated":"2014-07-16 15:35:13.000000000","message":"ditto + debug messages should not be translated","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1031,"context_line":"                continue"},{"line_number":1032,"context_line":"            except exception.NodeLocked:"},{"line_number":1033,"context_line":"                LOG.debug(_(\"During send_sensor_data, node %(node)s \""},{"line_number":1034,"context_line":"                            \"was locked.\") % {\u0027node\u0027: node_uuid})"},{"line_number":1035,"context_line":"                continue"},{"line_number":1036,"context_line":"            except exception.NodeNotFound:"},{"line_number":1037,"context_line":"                LOG.debug(_(\"During send_sensor_data, node %(node)s was not \""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c008eb2a","line":1034,"in_reply_to":"baada198_86db887c","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":1035,"context_line":"                continue"},{"line_number":1036,"context_line":"            except exception.NodeNotFound:"},{"line_number":1037,"context_line":"                LOG.debug(_(\"During send_sensor_data, node %(node)s was not \""},{"line_number":1038,"context_line":"                           \"found and presumed deleted by another process.\") %"},{"line_number":1039,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":1040,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_a6d88c80","line":1038,"updated":"2014-07-16 15:35:13.000000000","message":"ditto + debug messages should not be translated","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1035,"context_line":"                continue"},{"line_number":1036,"context_line":"            except exception.NodeNotFound:"},{"line_number":1037,"context_line":"                LOG.debug(_(\"During send_sensor_data, node %(node)s was not \""},{"line_number":1038,"context_line":"                           \"found and presumed deleted by another process.\") %"},{"line_number":1039,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":1040,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_e00b2f22","line":1038,"in_reply_to":"baada198_a6d88c80","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":124,"context_line":"                   default\u003d600,"},{"line_number":125,"context_line":"                   help\u003d\u0027Seconds between conductor sending sensor data message\u0027"},{"line_number":126,"context_line":"                        \u0027 to ceilometer via the notification bus.\u0027),"},{"line_number":127,"context_line":"        cfg.StrOpt(\u0027send_sensor_data_types\u0027,"},{"line_number":128,"context_line":"                   default\u003d\"ALL\","},{"line_number":129,"context_line":"                   help\u003d\u0027List of comma separated metric types which need to be\u0027"},{"line_number":130,"context_line":"                        \u0027 sent to Ceilometer. The default value is \"ALL\" we \u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_f87f5fa9","line":127,"updated":"2014-07-17 09:40:08.000000000","message":"As it says \"List of...\". We have a cfg.ListOpt, I think we could use that.\n\nAnd we can say that \u0027ALL\u0027 is a special value and it means send all the sensor data.","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":124,"context_line":"                   default\u003d600,"},{"line_number":125,"context_line":"                   help\u003d\u0027Seconds between conductor sending sensor data message\u0027"},{"line_number":126,"context_line":"                        \u0027 to ceilometer via the notification bus.\u0027),"},{"line_number":127,"context_line":"        cfg.StrOpt(\u0027send_sensor_data_types\u0027,"},{"line_number":128,"context_line":"                   default\u003d\"ALL\","},{"line_number":129,"context_line":"                   help\u003d\u0027List of comma separated metric types which need to be\u0027"},{"line_number":130,"context_line":"                        \u0027 sent to Ceilometer. The default value is \"ALL\" we \u0027"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_e3a059f6","line":127,"in_reply_to":"baada198_f87f5fa9","updated":"2014-07-18 13:13:42.000000000","message":"OK","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":987,"context_line":"            return"},{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":990,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":991,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":992,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":993,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_7685b0ab","line":990,"updated":"2014-07-21 10:46:39.000000000","message":"Is the plan to only meter associated nodes? I thought there was some discussion to also meter registered-only nodes?","commit_id":"0382cef5ac685da31df0a64e28311e70e09d0e29"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":987,"context_line":"            return"},{"line_number":988,"context_line":""},{"line_number":989,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":990,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":991,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":992,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":993,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_a712865e","line":990,"in_reply_to":"baada198_7685b0ab","updated":"2014-07-22 06:41:26.000000000","message":"Chris, yes, we handle the nodes which is associated, because these nodes are in correct status and controlled by nova already, including the correct ipmi credential and bmc status.","commit_id":"0382cef5ac685da31df0a64e28311e70e09d0e29"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"767b5bb886a0bb995a57bda9c8e445fb4480fcf5","unresolved":false,"context_lines":[{"line_number":1005,"context_line":"                       \u0027timestamp\u0027: datetime.datetime.utcnow(),"},{"line_number":1006,"context_line":"                       \u0027event_type\u0027: \u0027hardware.ipmi.metrics.update\u0027}"},{"line_number":1007,"context_line":""},{"line_number":1008,"context_line":"            sensors_data \u003d {}"},{"line_number":1009,"context_line":""},{"line_number":1010,"context_line":"            try:"},{"line_number":1011,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dTrue) \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_ad1a926c","line":1008,"updated":"2014-07-21 13:58:12.000000000","message":"This line not needed.","commit_id":"0382cef5ac685da31df0a64e28311e70e09d0e29"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1005,"context_line":"                       \u0027timestamp\u0027: datetime.datetime.utcnow(),"},{"line_number":1006,"context_line":"                       \u0027event_type\u0027: \u0027hardware.ipmi.metrics.update\u0027}"},{"line_number":1007,"context_line":""},{"line_number":1008,"context_line":"            sensors_data \u003d {}"},{"line_number":1009,"context_line":""},{"line_number":1010,"context_line":"            try:"},{"line_number":1011,"context_line":"                with task_manager.acquire(context, node_uuid, shared\u003dTrue) \\"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_12152e3c","line":1008,"in_reply_to":"baada198_ad1a926c","updated":"2014-07-22 06:41:26.000000000","message":"ok, will remove it.","commit_id":"0382cef5ac685da31df0a64e28311e70e09d0e29"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"767b5bb886a0bb995a57bda9c8e445fb4480fcf5","unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\"),"},{"line_number":1024,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1025,"context_line":"                continue"},{"line_number":1026,"context_line":"            except exception.NodeLocked:"},{"line_number":1027,"context_line":"                LOG.warn(_(\"During send_sensor_data, node %(node)s \""},{"line_number":1028,"context_line":"                            \"was locked.\") % {\u0027node\u0027: node_uuid})"},{"line_number":1029,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_5ab52aeb","line":1026,"updated":"2014-07-21 13:58:12.000000000","message":"This exception will never be raised because shared\u003dTrue.","commit_id":"0382cef5ac685da31df0a64e28311e70e09d0e29"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1023,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\"),"},{"line_number":1024,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: e})"},{"line_number":1025,"context_line":"                continue"},{"line_number":1026,"context_line":"            except exception.NodeLocked:"},{"line_number":1027,"context_line":"                LOG.warn(_(\"During send_sensor_data, node %(node)s \""},{"line_number":1028,"context_line":"                            \"was locked.\") % {\u0027node\u0027: node_uuid})"},{"line_number":1029,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":22,"id":"baada198_92205e9b","line":1026,"in_reply_to":"baada198_5ab52aeb","updated":"2014-07-22 06:41:26.000000000","message":"ok, will remove it.","commit_id":"0382cef5ac685da31df0a64e28311e70e09d0e29"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                         as task:"},{"line_number":1011,"context_line":"                    node \u003d task.node"},{"line_number":1012,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1013,"context_line":"                        task, node)"},{"line_number":1014,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1015,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1016,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\"),"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_e46b7f84","line":1013,"updated":"2014-07-22 12:43:33.000000000","message":"Node is not required here, the get_sensors_data implementation only requires task (which has a node member).","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1010,"context_line":"                         as task:"},{"line_number":1011,"context_line":"                    node \u003d task.node"},{"line_number":1012,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1013,"context_line":"                        task, node)"},{"line_number":1014,"context_line":"            except exception.FailedToParseSensorData as e:"},{"line_number":1015,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1016,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\"),"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_0f2f8ba8","line":1013,"in_reply_to":"baada198_e46b7f84","updated":"2014-07-23 01:29:42.000000000","message":"yes, will remove it","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1025,"context_line":"                LOG.warn(_(\"During send_sensor_data, node %(node)s was not \""},{"line_number":1026,"context_line":"                           \"found and presumed deleted by another process.\"),"},{"line_number":1027,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":1028,"context_line":"                continue"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"            message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1031,"context_line":"            rpc.get_notifier().info(context, \"hardware.ipmi.metrics\", message)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_100d0a36","line":1028,"updated":"2014-07-22 13:17:30.000000000","message":"if you want to catch all exceptions, do it here, please","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1025,"context_line":"                LOG.warn(_(\"During send_sensor_data, node %(node)s was not \""},{"line_number":1026,"context_line":"                           \"found and presumed deleted by another process.\"),"},{"line_number":1027,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":1028,"context_line":"                continue"},{"line_number":1029,"context_line":""},{"line_number":1030,"context_line":"            message[\u0027payload\u0027] \u003d sensors_data"},{"line_number":1031,"context_line":"            rpc.get_notifier().info(context, \"hardware.ipmi.metrics\", message)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_2f344ffa","line":1028,"in_reply_to":"baada198_100d0a36","updated":"2014-07-23 01:29:42.000000000","message":"ok, thanks","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1016,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1017,"context_line":"                        task)"},{"line_number":1018,"context_line":"            except exception.FailedToParseSensorData as fps:"},{"line_number":1019,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1020,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\"),"},{"line_number":1021,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: str(fps)})"},{"line_number":1022,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_4e3a1ec5","line":1019,"updated":"2014-07-24 12:32:32.000000000","message":"seems like we\u0027re now using _LW imported from oslo.i18n instead of _ for LOG.warn","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1016,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1017,"context_line":"                        task)"},{"line_number":1018,"context_line":"            except exception.FailedToParseSensorData as fps:"},{"line_number":1019,"context_line":"                LOG.warn(_(\"During get_sensors_data, could not parse \""},{"line_number":1020,"context_line":"                    \"sensor data for node %(node)s. Error: %(err)s.\"),"},{"line_number":1021,"context_line":"                    {\u0027node\u0027: node_uuid, \u0027err\u0027: str(fps)})"},{"line_number":1022,"context_line":"                continue"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_44a83dd9","line":1019,"in_reply_to":"baada198_4e3a1ec5","updated":"2014-07-24 13:09:47.000000000","message":"yes, I want to create new patch to use _LW for all code, but I can do in this patch for my code change.","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1032,"context_line":"                continue"},{"line_number":1033,"context_line":"            except Exception as e:"},{"line_number":1034,"context_line":"                LOG.warn(_(\"Failed to get sensor data for node %(node)s. \""},{"line_number":1035,"context_line":"                \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1036,"context_line":"                continue"},{"line_number":1037,"context_line":""},{"line_number":1038,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_8e443648","line":1035,"updated":"2014-07-24 12:32:32.000000000","message":"nit: indentation is off, should be like above","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1042,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"},{"line_number":1043,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"},{"line_number":1044,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"},{"line_number":1045,"context_line":"        allowed \u003d [x.lower() for x in allowed]"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"        if \u0027all\u0027 in allowed:"},{"line_number":1048,"context_line":"            return sensors_data"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_ae357aa9","line":1045,"updated":"2014-07-24 12:32:32.000000000","message":"to be completely nit-picking, more efficient for `in` operation would be using a set:\n\n allowed \u003d set(x.lower() for x in CONF.conductor.send_sensor_data_types\n\nas below, that\u0027s my opinion only.","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1042,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"},{"line_number":1043,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"},{"line_number":1044,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"},{"line_number":1045,"context_line":"        allowed \u003d [x.lower() for x in allowed]"},{"line_number":1046,"context_line":""},{"line_number":1047,"context_line":"        if \u0027all\u0027 in allowed:"},{"line_number":1048,"context_line":"            return sensors_data"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_c4ea8d0d","line":1045,"in_reply_to":"baada198_ae357aa9","updated":"2014-07-24 13:09:47.000000000","message":"yes, one line is cool!","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"        for sensor_type in list(sensors_data):"},{"line_number":1051,"context_line":"            if sensor_type.lower() not in allowed:"},{"line_number":1052,"context_line":"                sensors_data.pop(sensor_type)"},{"line_number":1053,"context_line":""},{"line_number":1054,"context_line":"        return sensors_data"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_6ee52237","line":1052,"updated":"2014-07-24 12:32:32.000000000","message":"I would rather write it\n\n return dict((sensor_type, sensor_value) for (sensor_type, sensor_value) in sensors_data.items() if sensor_type in allowed)\n\nleave it up to you though","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1049,"context_line":""},{"line_number":1050,"context_line":"        for sensor_type in list(sensors_data):"},{"line_number":1051,"context_line":"            if sensor_type.lower() not in allowed:"},{"line_number":1052,"context_line":"                sensors_data.pop(sensor_type)"},{"line_number":1053,"context_line":""},{"line_number":1054,"context_line":"        return sensors_data"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_c4d1ad57","line":1052,"in_reply_to":"baada198_6ee52237","updated":"2014-07-24 13:09:47.000000000","message":"this single line is cool, accept it.","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":1066,"context_line":"    @periodic_task.periodic_task("},{"line_number":1067,"context_line":"            spacing\u003dCONF.conductor.send_sensor_data_interval)"},{"line_number":1068,"context_line":"    def _send_sensor_data(self, context):"},{"line_number":1069,"context_line":""},{"line_number":1070,"context_line":"        # do nothing if send_sensor_data option is False"},{"line_number":1071,"context_line":"        if not CONF.conductor.send_sensor_data:"},{"line_number":1072,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_271168af","line":1069,"updated":"2014-07-25 09:02:16.000000000","message":"unneeded new line","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":1075,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":1076,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1077,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1078,"context_line":"                                                 filters\u003dfilters)"},{"line_number":1079,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_2736c8b4","line":1076,"updated":"2014-07-25 09:02:16.000000000","message":"nit: is the id being used anywhere? I only see uuid being used in the code","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":1075,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":1076,"context_line":"        columns \u003d [\u0027id\u0027, \u0027uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1077,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1078,"context_line":"                                                 filters\u003dfilters)"},{"line_number":1079,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_c7598c5c","line":1076,"in_reply_to":"baada198_2736c8b4","updated":"2014-07-25 09:19:42.000000000","message":"yes, we can remove it.","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":137,"context_line":"        cfg.ListOpt(\u0027send_sensor_data_types\u0027,"},{"line_number":138,"context_line":"                   default\u003d[\u0027ALL\u0027],"},{"line_number":139,"context_line":"                   help\u003d\u0027List of comma separated metric types which need to be\u0027"},{"line_number":140,"context_line":"                        \u0027 sent to Ceilometer. The default value is \"ALL\" is a \u0027"},{"line_number":141,"context_line":"                        \u0027special value and it means send all the sensor data.\u0027"},{"line_number":142,"context_line":"                        ),"},{"line_number":143,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_8d0c1595","line":140,"updated":"2014-07-25 10:17:45.000000000","message":"\"The default value, \"ALL\", is a special value meaning send all the sensor data.\"","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                    \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1114,"context_line":"                continue"},{"line_number":1115,"context_line":""},{"line_number":1116,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1117,"context_line":"                                                              sensors_data)"},{"line_number":1118,"context_line":"            rpc.get_notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1119,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_5e9f01b4","line":1116,"updated":"2014-07-25 11:26:07.000000000","message":"Empty payload possible here after filtering, IMO better do not send message with empty payload and write log warning.","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                    \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1114,"context_line":"                continue"},{"line_number":1115,"context_line":""},{"line_number":1116,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1117,"context_line":"                                                              sensors_data)"},{"line_number":1118,"context_line":"            rpc.get_notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1119,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_e1875559","line":1116,"in_reply_to":"baada198_5e9f01b4","updated":"2014-07-28 06:07:32.000000000","message":"Good catch, I have such logic at previous patches, but missed now:)","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":1115,"context_line":""},{"line_number":1116,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1117,"context_line":"                                                              sensors_data)"},{"line_number":1118,"context_line":"            rpc.get_notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"},{"line_number":1121,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_185a011e","line":1118,"updated":"2014-07-25 10:17:45.000000000","message":"Does it make any sense to do `rcp.get_notifier()` outside of _send_sensor_data? Each time it is called, it seems, it will need to call `prepare()` on the notifier. Maybe that is necessary to confirm it is \"alive\"? I don\u0027t know. Just seemed something worth thinking about.","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1115,"context_line":""},{"line_number":1116,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1117,"context_line":"                                                              sensors_data)"},{"line_number":1118,"context_line":"            rpc.get_notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"},{"line_number":1121,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_b1d3c05d","line":1118,"in_reply_to":"baada198_185a011e","updated":"2014-07-28 06:07:32.000000000","message":"Good idea, i want to move this rpc.get_notifier() into __init__()","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            return"},{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":1075,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":1076,"context_line":"        columns \u003d [\u0027node_uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1077,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1078,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_debe67ff","line":1075,"updated":"2014-07-28 18:29:50.000000000","message":"SUGGESTION: \n\nI missed it on the previous review, but I\u0027m a bit concerned about having the pxe_ipmitool driver hardcoded here... I\u0027m wondering if it would be better to remove this driver filter and make it generic for all drivers implementing get_sensor_data?\n\nLike having a sanity check to see if the driver has the management interface and if get_sensor_data doesn\u0027t raise NotImplemented (that would require drivers that not implement this method to raise NotImplemented instead of a empty dict)\n\nWhat you think?","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1072,"context_line":"            return"},{"line_number":1073,"context_line":""},{"line_number":1074,"context_line":"        # support pxe_ipmitool driver only now"},{"line_number":1075,"context_line":"        filters \u003d {\u0027driver\u0027: \u0027pxe_ipmitool\u0027, \u0027associated\u0027: True}"},{"line_number":1076,"context_line":"        columns \u003d [\u0027node_uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1077,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1078,"context_line":"                                                 filters\u003dfilters)"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_6a7bca79","line":1075,"in_reply_to":"baada198_debe67ff","updated":"2014-07-29 02:21:57.000000000","message":"Yes, Lucas, good idea, will address this in next patch, thanks.","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"unresolved":false,"context_lines":[{"line_number":1116,"context_line":""},{"line_number":1117,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1118,"context_line":"                                                              sensors_data)"},{"line_number":1119,"context_line":"            if not message[\u0027payload\u0027]:"},{"line_number":1120,"context_line":"                self.notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_62c95578","line":1119,"updated":"2014-07-28 09:12:50.000000000","message":"We send message if it is not empty, \n if message[\u0027payload\u0027]:","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":1116,"context_line":""},{"line_number":1117,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1118,"context_line":"                                                              sensors_data)"},{"line_number":1119,"context_line":"            if not message[\u0027payload\u0027]:"},{"line_number":1120,"context_line":"                self.notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_22d74bef","line":1119,"in_reply_to":"baada198_62c95578","updated":"2014-07-28 18:29:50.000000000","message":"+1 here, it looks like a bug","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1116,"context_line":""},{"line_number":1117,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1118,"context_line":"                                                              sensors_data)"},{"line_number":1119,"context_line":"            if not message[\u0027payload\u0027]:"},{"line_number":1120,"context_line":"                self.notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_2abd52d7","line":1119,"in_reply_to":"baada198_62c95578","updated":"2014-07-29 02:21:57.000000000","message":"done","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"unresolved":false,"context_lines":[{"line_number":1117,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1118,"context_line":"                                                              sensors_data)"},{"line_number":1119,"context_line":"            if not message[\u0027payload\u0027]:"},{"line_number":1120,"context_line":"                self.notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"},{"line_number":1123,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_8272e947","line":1120,"updated":"2014-07-28 09:12:50.000000000","message":"Superfluous \u0027()\u0027\n self.notifier.info(context, \"hardware.ipmi.metrics\", message)","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1117,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1118,"context_line":"                                                              sensors_data)"},{"line_number":1119,"context_line":"            if not message[\u0027payload\u0027]:"},{"line_number":1120,"context_line":"                self.notifier().info(context, \"hardware.ipmi.metrics\", message)"},{"line_number":1121,"context_line":""},{"line_number":1122,"context_line":"    def _filter_out_unsupported_types(self, sensors_data):"},{"line_number":1123,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_4ab0c6fc","line":1120,"in_reply_to":"baada198_8272e947","updated":"2014-07-29 02:21:57.000000000","message":"done","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1095,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1096,"context_line":"                        task)"},{"line_number":1097,"context_line":"            except NotImplementedError as nie:"},{"line_number":1098,"context_line":"                LOG.warn(_LW(\"NotImplementedError, Error: %(err)s.\"),"},{"line_number":1099,"context_line":"                    {\u0027err\u0027: str(nie)})"},{"line_number":1100,"context_line":"            except exception.FailedToParseSensorData as fps:"},{"line_number":1101,"context_line":"                LOG.warn(_LW(\"During get_sensors_data, could not parse \""}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_22472fa5","line":1098,"updated":"2014-07-29 08:45:57.000000000","message":"NotImplementedError probably won\u0027t have a meaningful text, better use something like:\n\n LOG.warn(_LW(\u0027get_sensors_data is not implemented for driver %s\u0027), driver)\n\nyou may also include node_uuid in logging","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1095,"context_line":"                    sensors_data \u003d task.driver.management.get_sensors_data("},{"line_number":1096,"context_line":"                        task)"},{"line_number":1097,"context_line":"            except NotImplementedError as nie:"},{"line_number":1098,"context_line":"                LOG.warn(_LW(\"NotImplementedError, Error: %(err)s.\"),"},{"line_number":1099,"context_line":"                    {\u0027err\u0027: str(nie)})"},{"line_number":1100,"context_line":"            except exception.FailedToParseSensorData as fps:"},{"line_number":1101,"context_line":"                LOG.warn(_LW(\"During get_sensors_data, could not parse \""}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_83b18b03","line":1098,"in_reply_to":"baada198_22472fa5","updated":"2014-07-31 02:06:18.000000000","message":"done","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1115,"context_line":"            except Exception as e:"},{"line_number":1116,"context_line":"                LOG.warn(_LW(\"Failed to get sensor data for node %(node)s. \""},{"line_number":1117,"context_line":"                    \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1118,"context_line":"                continue"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1121,"context_line":"                                                              sensors_data)"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_425fc34d","line":1118,"updated":"2014-07-29 08:45:57.000000000","message":"All these `continue` are easy to forget (and you forgot it after line #1098). Please delete all `continue` and instead use `else` clause of try..except statement:\n\n except Exception as e:\n     LOG.warn(_LW(\"Failed to get sensor data for node %(node)s. \"\n         \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})\n else:\n     message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types(\n     ....","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1115,"context_line":"            except Exception as e:"},{"line_number":1116,"context_line":"                LOG.warn(_LW(\"Failed to get sensor data for node %(node)s. \""},{"line_number":1117,"context_line":"                    \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1118,"context_line":"                continue"},{"line_number":1119,"context_line":""},{"line_number":1120,"context_line":"            message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("},{"line_number":1121,"context_line":"                                                              sensors_data)"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_d54c6bcc","line":1118,"in_reply_to":"baada198_425fc34d","updated":"2014-07-31 02:06:18.000000000","message":"ok, good idea, done","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"unresolved":false,"context_lines":[{"line_number":1130,"context_line":"            return sensors_data"},{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"        return dict((sensor_type, sensor_value) for (sensor_type, sensor_value)"},{"line_number":1133,"context_line":"            in sensors_data.items() if sensor_type in allowed)"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_04706cd9","line":1133,"updated":"2014-07-29 14:44:41.000000000","message":"We use lowercase for allowed (l1127), therefore this line should be:\n in sensors_data.items() if sensor_type.lower() in allowed)","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1130,"context_line":"            return sensors_data"},{"line_number":1131,"context_line":""},{"line_number":1132,"context_line":"        return dict((sensor_type, sensor_value) for (sensor_type, sensor_value)"},{"line_number":1133,"context_line":"            in sensors_data.items() if sensor_type in allowed)"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_63a1d7a7","line":1133,"in_reply_to":"baada198_04706cd9","updated":"2014-07-31 02:06:18.000000000","message":"good catch","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":1075,"context_line":"            return"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"        filters \u003d {\u0027associated\u0027: True}"},{"line_number":1078,"context_line":"        columns \u003d [\u0027node_uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1079,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1080,"context_line":"                                                 filters\u003dfilters)"},{"line_number":1081,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_ae43c53d","line":1078,"updated":"2014-07-31 13:00:26.000000000","message":"I think you need \u0027uuid\u0027 instead of \u0027node_uuid\u0027. I had to make that change to get things to work in my live test. Once I did that I was able to capture metrics.","commit_id":"22837c4a7a59014e7eba928935179ae28b83ca6b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1075,"context_line":"            return"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"        filters \u003d {\u0027associated\u0027: True}"},{"line_number":1078,"context_line":"        columns \u003d [\u0027node_uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1079,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1080,"context_line":"                                                 filters\u003dfilters)"},{"line_number":1081,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_71141a41","line":1078,"in_reply_to":"baada198_ae43c53d","updated":"2014-07-31 21:35:40.000000000","message":"Chris, thanks for your testing.","commit_id":"22837c4a7a59014e7eba928935179ae28b83ca6b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1075,"context_line":"            return"},{"line_number":1076,"context_line":""},{"line_number":1077,"context_line":"        filters \u003d {\u0027associated\u0027: True}"},{"line_number":1078,"context_line":"        columns \u003d [\u0027node_uuid\u0027, \u0027driver\u0027, \u0027instance_uuid\u0027]"},{"line_number":1079,"context_line":"        node_list \u003d self.dbapi.get_nodeinfo_list(columns\u003dcolumns,"},{"line_number":1080,"context_line":"                                                 filters\u003dfilters)"},{"line_number":1081,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_2ecb35a5","line":1078,"in_reply_to":"baada198_ae43c53d","updated":"2014-07-31 13:04:07.000000000","message":"Right. I\u0027m surprised I didn\u0027t notice it, thank you!","commit_id":"22837c4a7a59014e7eba928935179ae28b83ca6b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                           \"found and presumed deleted by another process.\"),"},{"line_number":1114,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":1115,"context_line":"            except Exception as e:"},{"line_number":1116,"context_line":"                LOG.warn(_LW(\"Failed to get sensor data for node %(node)s. \""},{"line_number":1117,"context_line":"                    \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1118,"context_line":"            else:"},{"line_number":1119,"context_line":"                message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_0b802d48","line":1116,"updated":"2014-07-31 07:53:23.000000000","message":"if you make one more version of this patch, please change this to LOG.exception(_LE()), as it will log the traceback.","commit_id":"22837c4a7a59014e7eba928935179ae28b83ca6b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1113,"context_line":"                           \"found and presumed deleted by another process.\"),"},{"line_number":1114,"context_line":"                           {\u0027node\u0027: node_uuid})"},{"line_number":1115,"context_line":"            except Exception as e:"},{"line_number":1116,"context_line":"                LOG.warn(_LW(\"Failed to get sensor data for node %(node)s. \""},{"line_number":1117,"context_line":"                    \"Error: %(error)s\"), {\u0027node\u0027: node_uuid, \u0027error\u0027: str(e)})"},{"line_number":1118,"context_line":"            else:"},{"line_number":1119,"context_line":"                message[\u0027payload\u0027] \u003d self._filter_out_unsupported_types("}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_6bffe966","line":1116,"in_reply_to":"baada198_0b802d48","updated":"2014-07-31 08:02:07.000000000","message":"sure, thanks for your review again!","commit_id":"22837c4a7a59014e7eba928935179ae28b83ca6b"}],"ironic/drivers/base.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"76b747fcba0c76dfeec85f3c104f0165b900a2e1","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        \"\"\""},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    @abc.abstractmethod"},{"line_number":334,"context_line":"    def get_sensors_data(self, node):"},{"line_number":335,"context_line":"        \"\"\"Get sensors data method."},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        :param node: a single Node."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FtOQ%3D","line":334,"updated":"2014-02-11 10:36:50.000000000","message":"What about get_sensors_data(self, task, node) to be consistent with another interfaces (or only get_sensors_data(self, task) in future)?","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"3087b72b4e2ec685b55873b196d905e585c04088","unresolved":false,"context_lines":[{"line_number":331,"context_line":"        \"\"\""},{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    @abc.abstractmethod"},{"line_number":334,"context_line":"    def get_sensors_data(self, node):"},{"line_number":335,"context_line":"        \"\"\"Get sensors data method."},{"line_number":336,"context_line":""},{"line_number":337,"context_line":"        :param node: a single Node."}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fm20%3D","line":334,"in_reply_to":"AAAAUX%2F%2FtOQ%3D","updated":"2014-02-13 08:36:45.000000000","message":"done","commit_id":"568c01d5ee20e172902cbe8ffd202e253f49df86"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @abc.abstractmethod"},{"line_number":339,"context_line":"    def validate(self, task, node):"},{"line_number":340,"context_line":"        \"\"\"Validate the driver-specific Node console info."},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        This method validates whether the \u0027driver_info\u0027 property of the"},{"line_number":343,"context_line":"        supplied node contains the required information for this driver to"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B%2FA%3D","line":340,"updated":"2014-02-27 01:13:33.000000000","message":"s/console/sensor/","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"    @abc.abstractmethod"},{"line_number":339,"context_line":"    def validate(self, task, node):"},{"line_number":340,"context_line":"        \"\"\"Validate the driver-specific Node console info."},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        This method validates whether the \u0027driver_info\u0027 property of the"},{"line_number":343,"context_line":"        supplied node contains the required information for this driver to"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW7U%3D","line":340,"in_reply_to":"AAAAVX%2F%2F%2B%2FA%3D","updated":"2014-04-30 10:16:45.000000000","message":"done","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"unresolved":false,"context_lines":[{"line_number":336,"context_line":""},{"line_number":337,"context_line":""},{"line_number":338,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":339,"context_line":"class SensorInterface(object):"},{"line_number":340,"context_line":"    \"\"\"Interface for sensor functionality."},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    SensorInterface defines the interface to get hardware sensor data."}],"source_content_type":"text/x-python","patch_set":11,"id":"7adec928_be1eee0b","line":339,"updated":"2014-05-20 22:05:43.000000000","message":"Hao Meng, \nSince there is a new ManagementInterface,\nI think the get_sensor_data should be put under that interface.(see patch 86092)\nOtherwise, we have way too many interfaces in Ironic. \n\nOf course, one could argue that get_sensor_data is for \nmonitoring, it should have its own interface. I can be either way in\n this case. But just would like to bring this topic up for \ndiscussion.\n \nThe ManagementInterface will cover most of the functions that \nyou can get out of the service processor, in IPMI case the BMC.\nCurrently, it has get/set_boot_dev, more functions can be added \nto it like reset_service_processor etc.","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":339,"context_line":"class SensorInterface(object):"},{"line_number":340,"context_line":"    \"\"\"Interface for sensor functionality."},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"    SensorInterface defines the interface to get hardware sensor data."},{"line_number":343,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":11,"id":"7adec928_02b5a3cc","line":340,"updated":"2014-05-21 19:55:15.000000000","message":"I agree - this should now become part of the ManagementInterface","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"unresolved":false,"context_lines":[{"line_number":368,"context_line":"                  eg, {"},{"line_number":369,"context_line":"                        \u0027Sensor Type 1\u0027: {"},{"line_number":370,"context_line":"                          \u0027Sensor ID 1\u0027: {"},{"line_number":371,"context_line":"                            \u0027key1\u0027: \u0027value1\u0027,"},{"line_number":372,"context_line":"                            \u0027key2\u0027: \u0027value2\u0027"},{"line_number":373,"context_line":"                          },"},{"line_number":374,"context_line":"                          \u0027Sensor ID 2\u0027: {"}],"source_content_type":"text/x-python","patch_set":11,"id":"7adec928_dbd66cc3","line":371,"updated":"2014-05-20 22:05:43.000000000","message":"Why there are two values here?","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"},{"author":{"_account_id":7589,"name":"linggao","email":"linggao@us.ibm.com","username":"linggao"},"unresolved":false,"context_lines":[{"line_number":370,"context_line":"                          \u0027Sensor ID 1\u0027: {"},{"line_number":371,"context_line":"                            \u0027key1\u0027: \u0027value1\u0027,"},{"line_number":372,"context_line":"                            \u0027key2\u0027: \u0027value2\u0027"},{"line_number":373,"context_line":"                          },"},{"line_number":374,"context_line":"                          \u0027Sensor ID 2\u0027: {"},{"line_number":375,"context_line":"                            \u0027key1\u0027: \u0027value1\u0027,"},{"line_number":376,"context_line":"                            \u0027key2\u0027: \u0027value2\u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"7adec928_be118e55","line":373,"updated":"2014-05-20 22:05:43.000000000","message":"pyghmi returns the following data for your reference:\n({\n            \u0027value\u0027: xx,\n            \u0027states\u0027: xx,\n            \u0027units\u0027: xx,\n            \u0027imprecision\u0027: xx,\n            \u0027name\u0027: xx,\n            \u0027type\u0027: xx,\n            \u0027health\u0027: xx\n        })\nFor example:\n({\u0027name\u0027: \u0027Fan 2 Tach\u0027, \u0027imprecision\u0027: 20.0, \u0027value\u0027: 3840.0, \u0027states\u0027: [], \u0027health\u0027: 0, \u0027units\u0027: \u0027RPM\u0027, \u0027type\u0027: \u0027Fan\u0027}\n{\u0027name\u0027: \u0027MEM Avg Power\u0027, \u0027imprecision\u0027: 2.0, \u0027value\u0027: 12.0, \u0027states\u0027: [], \u0027health\u0027: 0, \u0027units\u0027: \u0027W\u0027, \u0027type\u0027: \u0027Current\u0027}\n{\u0027name\u0027: \u0027Paddle Card Temp\u0027, \u0027imprecision\u0027: 0.5, \u0027value\u0027: 34.0, \u0027states\u0027: [], \u0027health\u0027: 0, \u0027units\u0027: \u0027\\xc2\\xb0C\u0027, \u0027type\u0027: \u0027Temperature\u0027})\n\nIt would be great if the sensor reading contains more information such as \"health\", this way it is useful for caller to apply filter to the sensor data to get the sensors that have problems. \nOr the get_sensor_data function can have some parameters for filtering.","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"}],"ironic/drivers/modules/fake.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":168,"context_line":"        return True"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def get_sensors_data(self, task, node):"},{"line_number":171,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B%2Bk%3D","line":171,"updated":"2014-02-27 01:13:33.000000000","message":"this violates the interface definition, which claims that it will return a dict.\n\nEven if the dict is empty, I think it should still return a dict.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        return True"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def get_sensors_data(self, task, node):"},{"line_number":171,"context_line":"        pass"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW58%3D","line":171,"in_reply_to":"AAAAVX%2F%2F%2B%2Bk%3D","updated":"2014-04-30 10:16:45.000000000","message":"Yes, done.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def get_boot_device(self, task):"},{"line_number":164,"context_line":"        return {\u0027boot_device\u0027: boot_devices.PXE, \u0027persistent\u0027: False}"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def get_sensors_data(self, task, node):"},{"line_number":167,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_4dd52fe4","line":166,"updated":"2014-07-22 13:17:30.000000000","message":"also node is not required here","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":163,"context_line":"    def get_boot_device(self, task):"},{"line_number":164,"context_line":"        return {\u0027boot_device\u0027: boot_devices.PXE, \u0027persistent\u0027: False}"},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"    def get_sensors_data(self, task, node):"},{"line_number":167,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_af1f7f6f","line":166,"in_reply_to":"baada198_4dd52fe4","updated":"2014-07-23 01:29:42.000000000","message":"ok, will remove, thanks","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"}],"ironic/drivers/modules/ipminative.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":389,"context_line":"                                            if hdev \u003d\u003d bootdev), None)"},{"line_number":390,"context_line":"        return response"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def get_sensors_data(self, task):"},{"line_number":393,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_e7705043","line":392,"updated":"2014-07-25 09:02:16.000000000","message":"Missing docstring\n\n\"\"\"Get sensors data.\n\nNot implemented by this driver.\n\n:param task: a TaskManager instance.\n\n\"\"\"","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":389,"context_line":"                                            if hdev \u003d\u003d bootdev), None)"},{"line_number":390,"context_line":"        return response"},{"line_number":391,"context_line":""},{"line_number":392,"context_line":"    def get_sensors_data(self, task):"},{"line_number":393,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_c720acb2","line":392,"in_reply_to":"baada198_e7705043","updated":"2014-07-25 09:19:42.000000000","message":"done, thank you Lucas.","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":"        raise NotImplementedError(_(\"get_sensors_data is unsupported by \""},{"line_number":401,"context_line":"                                    \"pxe_ipminative driver\"))"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_82371bfe","line":401,"updated":"2014-07-29 08:45:57.000000000","message":"you can just raise NotImplementedError() and leave proper logging to conductor (as I stated there)","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        \"\"\""},{"line_number":400,"context_line":"        raise NotImplementedError(_(\"get_sensors_data is unsupported by \""},{"line_number":401,"context_line":"                                    \"pxe_ipminative driver\"))"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_0373bb4e","line":401,"in_reply_to":"baada198_82371bfe","updated":"2014-07-31 02:06:18.000000000","message":"done","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"}],"ironic/drivers/modules/ipmitool.py":[{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0ccf80a591811b8f2fa7399f5004ed8bea5d981a","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    try:"},{"line_number":252,"context_line":"        sensors_data_array \u003d sensors_data.split(\u0027\\n\\n\u0027)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        for i in range(len(sensors_data_array)):"},{"line_number":255,"context_line":"            sensor_data \u003d sensors_data_array[i]"},{"line_number":256,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":257,"context_line":"            sensor_data_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2B4nc%3D","line":254,"updated":"2014-02-18 12:49:31.000000000","message":"for sensor_data in sensors_data_array:","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"b2b732d86ea7a9190516dfa11dfcad692bbaa35f","unresolved":false,"context_lines":[{"line_number":251,"context_line":"    try:"},{"line_number":252,"context_line":"        sensors_data_array \u003d sensors_data.split(\u0027\\n\\n\u0027)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        for i in range(len(sensors_data_array)):"},{"line_number":255,"context_line":"            sensor_data \u003d sensors_data_array[i]"},{"line_number":256,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":257,"context_line":"            sensor_data_dict \u003d {}"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2BzG0%3D","line":254,"in_reply_to":"AAAAUX%2F%2B4nc%3D","updated":"2014-02-19 00:24:32.000000000","message":"good idea, that is more straightforward, thanks.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0ccf80a591811b8f2fa7399f5004ed8bea5d981a","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":257,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            for j in range(len(sensor_data_fields)):"},{"line_number":260,"context_line":"                if len(sensor_data_fields[j]) \u003d\u003d 0:"},{"line_number":261,"context_line":"                    continue"},{"line_number":262,"context_line":"                kv_value \u003d sensor_data_fields[j].split(\u0027:\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2B4lo%3D","line":259,"updated":"2014-02-18 12:49:31.000000000","message":"for field in sensor_data_fields:","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"b2b732d86ea7a9190516dfa11dfcad692bbaa35f","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":257,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":258,"context_line":""},{"line_number":259,"context_line":"            for j in range(len(sensor_data_fields)):"},{"line_number":260,"context_line":"                if len(sensor_data_fields[j]) \u003d\u003d 0:"},{"line_number":261,"context_line":"                    continue"},{"line_number":262,"context_line":"                kv_value \u003d sensor_data_fields[j].split(\u0027:\u0027)"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2BzD8%3D","line":259,"in_reply_to":"AAAAUX%2F%2B4lo%3D","updated":"2014-02-19 00:24:32.000000000","message":"will do, thanks.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0ccf80a591811b8f2fa7399f5004ed8bea5d981a","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":281,"context_line":"                    \u003d sensor_data_dict"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    except Exception as e:"},{"line_number":284,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % str(e))"},{"line_number":285,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2B4es%3D","line":283,"updated":"2014-02-18 12:49:31.000000000","message":"I don\u0027t see possibility of any exception in lines 252-281. Please show me one if I wrong.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"b2b732d86ea7a9190516dfa11dfcad692bbaa35f","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":281,"context_line":"                    \u003d sensor_data_dict"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    except Exception as e:"},{"line_number":284,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % str(e))"},{"line_number":285,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":286,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2BzFU%3D","line":283,"in_reply_to":"AAAAUX%2F%2B4es%3D","updated":"2014-02-19 00:24:32.000000000","message":"During parsing, for some invalid data case, we will encounter some Potential exceptions, such as key error etc, so I just catch Exception to make sure we can convert any of them to our IronicException.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0ccf80a591811b8f2fa7399f5004ed8bea5d981a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    \u003d sensor_data_dict"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    except Exception as e:"},{"line_number":284,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % str(e))"},{"line_number":285,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    # get nothing, should raise exception"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2B4p0%3D","line":284,"updated":"2014-02-18 12:49:31.000000000","message":"str() not needed here.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"b2b732d86ea7a9190516dfa11dfcad692bbaa35f","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                    \u003d sensor_data_dict"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    except Exception as e:"},{"line_number":284,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % str(e))"},{"line_number":285,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    # get nothing, should raise exception"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2BzFA%3D","line":284,"in_reply_to":"AAAAUX%2F%2B4p0%3D","updated":"2014-02-19 00:24:32.000000000","message":"done","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"0ccf80a591811b8f2fa7399f5004ed8bea5d981a","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":440,"context_line":"        # with \u0027-v\u0027 option, we can get the entire sensor data including the"},{"line_number":441,"context_line":"        # extended sensor informations"},{"line_number":442,"context_line":"        cmd \u003d \"sdr -v\""},{"line_number":443,"context_line":"        try:"},{"line_number":444,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":445,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2B38Y%3D","line":442,"updated":"2014-02-18 13:49:05.000000000","message":"I see in man ipmitool that subcommand is needed also, but I\u0027m not sure and I don\u0027t have access to hardware for test.","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"b2b732d86ea7a9190516dfa11dfcad692bbaa35f","unresolved":false,"context_lines":[{"line_number":439,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":440,"context_line":"        # with \u0027-v\u0027 option, we can get the entire sensor data including the"},{"line_number":441,"context_line":"        # extended sensor informations"},{"line_number":442,"context_line":"        cmd \u003d \"sdr -v\""},{"line_number":443,"context_line":"        try:"},{"line_number":444,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":445,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUX%2F%2BzEQ%3D","line":442,"in_reply_to":"AAAAUX%2F%2B38Y%3D","updated":"2014-02-19 00:24:32.000000000","message":"Yuriy, I have tested the command with my real hardware env, this is the command line and output, should work:\n\nhttp://paste.openstack.org/show/63267/","commit_id":"803e7478d638dc2c7a662452138af138ae7de464"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":449,"context_line":"        :raises: FailedToGetSensorData when getting the sensor data fails."},{"line_number":450,"context_line":"        :raises: FailedToParseSensorData when parsing sensor data fails."},{"line_number":451,"context_line":"        :returns: returns a dict of sensor data group by sensor type,"},{"line_number":452,"context_line":"                  eg, {"},{"line_number":453,"context_line":"                        \u0027Sensor Type 1\u0027: {"},{"line_number":454,"context_line":"                          \u0027Sensor ID 1\u0027: {"},{"line_number":455,"context_line":"                            \u0027key1\u0027: \u0027value1\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B%2BI%3D","line":452,"updated":"2014-02-27 01:13:33.000000000","message":"instead of copying the sample from the base class, I think you can just reference it here.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":449,"context_line":"        :raises: FailedToGetSensorData when getting the sensor data fails."},{"line_number":450,"context_line":"        :raises: FailedToParseSensorData when parsing sensor data fails."},{"line_number":451,"context_line":"        :returns: returns a dict of sensor data group by sensor type,"},{"line_number":452,"context_line":"                  eg, {"},{"line_number":453,"context_line":"                        \u0027Sensor Type 1\u0027: {"},{"line_number":454,"context_line":"                          \u0027Sensor ID 1\u0027: {"},{"line_number":455,"context_line":"                            \u0027key1\u0027: \u0027value1\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAW3%2F%2FW5Y%3D","line":452,"in_reply_to":"AAAAVX%2F%2F%2B%2BI%3D","updated":"2014-04-30 10:16:45.000000000","message":"ok, will remove these duplicated samples.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"94086bf6e640c530d9fddf52d9d56e7290c9036a","unresolved":false,"context_lines":[{"line_number":456,"context_line":"class IPMISensor(base.SensorInterface):"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    def validate(self, task, node):"},{"line_number":459,"context_line":"        \"\"\"Check that node[\u0027driver_info\u0027] contains IPMI credentials."},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        :param task: a TaskManager instance."},{"line_number":462,"context_line":"        :param node: Single node object."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FWfo%3D","line":459,"updated":"2014-04-15 08:31:47.000000000","message":"node.driver_info","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":456,"context_line":"class IPMISensor(base.SensorInterface):"},{"line_number":457,"context_line":""},{"line_number":458,"context_line":"    def validate(self, task, node):"},{"line_number":459,"context_line":"        \"\"\"Check that node[\u0027driver_info\u0027] contains IPMI credentials."},{"line_number":460,"context_line":""},{"line_number":461,"context_line":"        :param task: a TaskManager instance."},{"line_number":462,"context_line":"        :param node: Single node object."}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2F%2BhI%3D","line":459,"in_reply_to":"AAAAW3%2F%2FWfo%3D","updated":"2014-04-16 05:49:24.000000000","message":"done","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":7711,"name":"Yuriy Zveryanskyy","email":"yzveryanskyy@mirantis.com","username":"yuriyz"},"change_message_id":"94086bf6e640c530d9fddf52d9d56e7290c9036a","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"        \"\"\""},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        LOG.info(\"get_sensors_data for node: %s\" % node.uuid)"},{"line_number":480,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":481,"context_line":"        # with \u0027-v\u0027 option, we can get the entire sensor data including the"},{"line_number":482,"context_line":"        # extended sensor informations"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAW3%2F%2FWhA%3D","line":479,"updated":"2014-04-15 08:31:47.000000000","message":"i18n. And IMO this logging not needed.","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"cde7bde6c09b0b6074adb1122ec6977607c700d1","unresolved":false,"context_lines":[{"line_number":476,"context_line":""},{"line_number":477,"context_line":"        \"\"\""},{"line_number":478,"context_line":""},{"line_number":479,"context_line":"        LOG.info(\"get_sensors_data for node: %s\" % node.uuid)"},{"line_number":480,"context_line":"        driver_info \u003d _parse_driver_info(node)"},{"line_number":481,"context_line":"        # with \u0027-v\u0027 option, we can get the entire sensor data including the"},{"line_number":482,"context_line":"        # extended sensor informations"}],"source_content_type":"text/x-python","patch_set":10,"id":"AAAAXH%2F%2F%2BhA%3D","line":479,"in_reply_to":"AAAAW3%2F%2FWhA%3D","updated":"2014-04-16 05:49:24.000000000","message":"done, thanks.","commit_id":"1902a8be3fc72e174fe4d3f143330604dd6b9f34"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"unresolved":false,"context_lines":[{"line_number":58,"context_line":"                group\u003d\u0027ipmi\u0027)"},{"line_number":59,"context_line":"CONF.import_opt(\u0027send_sensor_data_types\u0027,"},{"line_number":60,"context_line":"                \u0027ironic.conductor.manager\u0027,"},{"line_number":61,"context_line":"                group\u003d\u0027conductor\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_f4189fce","line":61,"updated":"2014-07-15 15:16:19.000000000","message":"Shouldn\u0027t it be group\u003d\u0027ipmi\u0027?","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02c7a9b497679ec3cd225d20c594af4ef04509ed","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                group\u003d\u0027ipmi\u0027)"},{"line_number":59,"context_line":"CONF.import_opt(\u0027send_sensor_data_types\u0027,"},{"line_number":60,"context_line":"                \u0027ironic.conductor.manager\u0027,"},{"line_number":61,"context_line":"                group\u003d\u0027conductor\u0027)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_9e1e8b5e","line":61,"in_reply_to":"baada198_f4189fce","updated":"2014-07-16 02:24:14.000000000","message":"This is conductor period task options, so I think we can take the group as \u0027conductor\u0027, make sense?","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":7419,"name":"Imre Farkas","email":"farkas.imre@gmail.com","username":"ifarkas"},"unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"            # Have only two sensor type name IDs: \u0027Sensor Type (Analog)\u0027"},{"line_number":391,"context_line":"            # \u0027Sensor Type (Discrete)\u0027"},{"line_number":392,"context_line":"            if \u0027Sensor Type (Analog)\u0027 in sensor_data_dict:"},{"line_number":393,"context_line":"                sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Analog)\u0027]"},{"line_number":394,"context_line":"            elif \u0027Sensor Type (Discrete)\u0027 in sensor_data_dict:"},{"line_number":395,"context_line":"                sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Discrete)\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_b45aa74d","line":392,"updated":"2014-07-15 15:16:19.000000000","message":"From where are these hard-coded strings coming from? Are they the same for all IPMI implementation?","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02c7a9b497679ec3cd225d20c594af4ef04509ed","unresolved":false,"context_lines":[{"line_number":389,"context_line":""},{"line_number":390,"context_line":"            # Have only two sensor type name IDs: \u0027Sensor Type (Analog)\u0027"},{"line_number":391,"context_line":"            # \u0027Sensor Type (Discrete)\u0027"},{"line_number":392,"context_line":"            if \u0027Sensor Type (Analog)\u0027 in sensor_data_dict:"},{"line_number":393,"context_line":"                sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Analog)\u0027]"},{"line_number":394,"context_line":"            elif \u0027Sensor Type (Discrete)\u0027 in sensor_data_dict:"},{"line_number":395,"context_line":"                sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Discrete)\u0027]"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_f37420d2","line":392,"in_reply_to":"baada198_b45aa74d","updated":"2014-07-16 02:17:08.000000000","message":"The IPMI implementation is following the IPMI stand, and we have hard-coded here is because the output from ipmitool which parse the hex-ipmi-data and translate to \"Sensor Type (Analog)\" based on the IPMI stand. So align with ipmitool, this should work for all ipmi implementations. However, for other ipmi implementation which dont use ipmitool(out of this ipmitool.py), we should take care such details.","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":617,"context_line":"        return {\u0027type\u0027: \u0027shellinabox\u0027, \u0027url\u0027: url}"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"class IPMIToolManagement(base.ManagementInterface):"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def validate(self, task):"},{"line_number":623,"context_line":"        _parse_driver_info(task.node)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_fe1240fb","line":620,"updated":"2014-07-15 14:16:59.000000000","message":"The abstract class on which this class is based has three methods that are required for this class to instantiate:\n\n* get_boot_device\n* get_supported_boot_devices\n* set_boot_device\n\n(For my testing I\u0027ve put in stubs that `pass`.)\n\nFurther, in order for this class be found the PXEAndIPMIToolDriver class constructor needs:\n\n   self.management \u003d ipmitool.IPMIToolManagement()","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02c7a9b497679ec3cd225d20c594af4ef04509ed","unresolved":false,"context_lines":[{"line_number":617,"context_line":"        return {\u0027type\u0027: \u0027shellinabox\u0027, \u0027url\u0027: url}"},{"line_number":618,"context_line":""},{"line_number":619,"context_line":""},{"line_number":620,"context_line":"class IPMIToolManagement(base.ManagementInterface):"},{"line_number":621,"context_line":""},{"line_number":622,"context_line":"    def validate(self, task):"},{"line_number":623,"context_line":"        _parse_driver_info(task.node)"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_337f78ad","line":620,"in_reply_to":"baada198_fe1240fb","updated":"2014-07-16 02:17:08.000000000","message":"Yes, I have found such issue with the unittest code, thanks for your commnts, I will address and commit new patch, welcome your more comments:)","commit_id":"4f5c7d39b82a45699f7265142fe43847cb82b018"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":362,"context_line":"    out via notification bus and consumed by Ceilometer Collector."},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    :param sensors_data: the sensor data returned by ipmitool command."},{"line_number":365,"context_line":"    :returns: the sensor data with JSON format, ordered by sensor type."},{"line_number":366,"context_line":"    :raises: FailedToParseSensorData when error encountered during parsing."},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_4657b0ca","line":365,"updated":"2014-07-16 15:35:13.000000000","message":"dict cannot be ordered, did you mean \"grouped\"?","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":362,"context_line":"    out via notification bus and consumed by Ceilometer Collector."},{"line_number":363,"context_line":""},{"line_number":364,"context_line":"    :param sensors_data: the sensor data returned by ipmitool command."},{"line_number":365,"context_line":"    :returns: the sensor data with JSON format, ordered by sensor type."},{"line_number":366,"context_line":"    :raises: FailedToParseSensorData when error encountered during parsing."},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_804c3378","line":365,"in_reply_to":"baada198_4657b0ca","updated":"2014-07-17 06:39:47.000000000","message":"yes, done.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if len(field) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c67580fb","line":377,"updated":"2014-07-16 15:35:13.000000000","message":"are you sure you want to clear your resulting dict on every step? looks strange to me.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if len(field) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_26a0d8a4","line":377,"in_reply_to":"baada198_20a9a7dd","updated":"2014-07-17 10:07:05.000000000","message":"that means, you\u0027re getting the data only from the last sensor. Then why iterating over  sensors_data_array?","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if len(field) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_20a9a7dd","line":377,"in_reply_to":"baada198_c67580fb","updated":"2014-07-17 06:39:47.000000000","message":"this sensor_data_dict hold one sensor\u0027s data, not all sensor\u0027s data, so need to be clear for each time for different sensors.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if len(field) \u003d\u003d 0:"},{"line_number":381,"context_line":"                    continue"},{"line_number":382,"context_line":"                kv_value \u003d field.split(\u0027:\u0027)"},{"line_number":383,"context_line":"                if len(kv_value) !\u003d 2:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_863d482f","line":380,"updated":"2014-07-16 15:35:13.000000000","message":"more pythonic is\n\n if not field:","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if len(field) \u003d\u003d 0:"},{"line_number":381,"context_line":"                    continue"},{"line_number":382,"context_line":"                kv_value \u003d field.split(\u0027:\u0027)"},{"line_number":383,"context_line":"                if len(kv_value) !\u003d 2:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_408f7b75","line":380,"in_reply_to":"baada198_863d482f","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":384,"context_line":"                    continue"},{"line_number":385,"context_line":"                sensor_data_dict[kv_value[0].strip()] \u003d kv_value[1].strip()"},{"line_number":386,"context_line":""},{"line_number":387,"context_line":"            if len(sensor_data_dict) \u003d\u003d 0:"},{"line_number":388,"context_line":"                continue"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"            # Have only three sensor type name IDs: \u0027Sensor Type (Analog)\u0027"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_a64facbd","line":387,"updated":"2014-07-16 15:35:13.000000000","message":"ditto","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":397,"context_line":"                sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Threshold)\u0027]"},{"line_number":398,"context_line":"            else:"},{"line_number":399,"context_line":"                LOG.warning(_(\"Invalid sensor type in the sensor data: %s\")"},{"line_number":400,"context_line":"                              % sensor_data_dict)"},{"line_number":401,"context_line":"                continue"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"            # support the Conf.send_sensor_data_types sensor types only"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_86d9c8f6","line":400,"updated":"2014-07-16 15:35:13.000000000","message":"nit: % -\u003e ,","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":397,"context_line":"                sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Threshold)\u0027]"},{"line_number":398,"context_line":"            else:"},{"line_number":399,"context_line":"                LOG.warning(_(\"Invalid sensor type in the sensor data: %s\")"},{"line_number":400,"context_line":"                              % sensor_data_dict)"},{"line_number":401,"context_line":"                continue"},{"line_number":402,"context_line":""},{"line_number":403,"context_line":"            # support the Conf.send_sensor_data_types sensor types only"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_80cfd3b2","line":400,"in_reply_to":"baada198_86d9c8f6","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                    \u003d sensor_data_dict"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        # remove the sensor types in case there is no any sensor data under it"},{"line_number":418,"context_line":"        for sensor_type in sensors_data_dict.keys():"},{"line_number":419,"context_line":"            if len(sensors_data_dict[sensor_type]) \u003d\u003d 0:"},{"line_number":420,"context_line":"                sensors_data_dict.pop(sensor_type)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_468170fa","line":418,"updated":"2014-07-16 15:35:13.000000000","message":"list(sensors_data_dict.keys())\n\ncould you write here works perfectly under Python 2, but under Python 3 will cause dictionary to be mutated while iterating over it.\n\nEven better:\n\n sensors_data_dict \u003d dict((key, value) for (key, value) in sensors_data_dict.items() if value)","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":415,"context_line":"                    \u003d sensor_data_dict"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        # remove the sensor types in case there is no any sensor data under it"},{"line_number":418,"context_line":"        for sensor_type in sensors_data_dict.keys():"},{"line_number":419,"context_line":"            if len(sensors_data_dict[sensor_type]) \u003d\u003d 0:"},{"line_number":420,"context_line":"                sensors_data_dict.pop(sensor_type)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_a03937a5","line":418,"in_reply_to":"baada198_468170fa","updated":"2014-07-17 06:39:47.000000000","message":"good idea.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            if len(sensors_data_dict[sensor_type]) \u003d\u003d 0:"},{"line_number":420,"context_line":"                sensors_data_dict.pop(sensor_type)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    except Exception as e:"},{"line_number":423,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % e)"},{"line_number":424,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":425,"context_line":"    if len(sensors_data_dict) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_062a18e7","line":422,"updated":"2014-07-16 15:35:13.000000000","message":"As I wrote in manager.py, I see no point in this conversion Exception -\u003e FailedToParseSensorData. You can just catch all Exception\u0027s there in manager.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":419,"context_line":"            if len(sensors_data_dict[sensor_type]) \u003d\u003d 0:"},{"line_number":420,"context_line":"                sensors_data_dict.pop(sensor_type)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    except Exception as e:"},{"line_number":423,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % e)"},{"line_number":424,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":425,"context_line":"    if len(sensors_data_dict) \u003d\u003d 0:"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_208fe72f","line":422,"in_reply_to":"baada198_062a18e7","updated":"2014-07-17 06:39:47.000000000","message":"ok, will catch it from manager.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":420,"context_line":"                sensors_data_dict.pop(sensor_type)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    except Exception as e:"},{"line_number":423,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, errors:%s\") % e)"},{"line_number":424,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":425,"context_line":"    if len(sensors_data_dict) \u003d\u003d 0:"},{"line_number":426,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, get nothing with input\""}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_c60100b1","line":423,"updated":"2014-07-16 15:35:13.000000000","message":"need space before %, also replace % with ,","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":424,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":425,"context_line":"    if len(sensors_data_dict) \u003d\u003d 0:"},{"line_number":426,"context_line":"        LOG.warning(_(\"parse ipmi sensor data failed, get nothing with input\""},{"line_number":427,"context_line":"                      \" data: %s\") % sensors_data)"},{"line_number":428,"context_line":"        raise exception.FailedToParseSensorData()"},{"line_number":429,"context_line":""},{"line_number":430,"context_line":"    return sensors_data_dict"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_4625f05a","line":427,"updated":"2014-07-16 15:35:13.000000000","message":"% -\u003e ,","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":652,"context_line":"        try:"},{"line_number":653,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":654,"context_line":"        except Exception:"},{"line_number":655,"context_line":"            raise exception.FailedToGetSensorData()"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        return _parse_ipmi_sensors_data(out)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_a6fdec3d","line":655,"updated":"2014-07-16 15:35:13.000000000","message":"again, here you lose all information about happened exception.","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":652,"context_line":"        try:"},{"line_number":653,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":654,"context_line":"        except Exception:"},{"line_number":655,"context_line":"            raise exception.FailedToGetSensorData()"},{"line_number":656,"context_line":""},{"line_number":657,"context_line":"        return _parse_ipmi_sensors_data(out)"}],"source_content_type":"text/x-python","patch_set":17,"id":"baada198_6048ffb3","line":655,"in_reply_to":"baada198_a6fdec3d","updated":"2014-07-17 06:39:47.000000000","message":"done","commit_id":"6f4675416aef7a54a6768df9e26dc7c21a348adf"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_c6755c34","line":377,"updated":"2014-07-17 10:08:46.000000000","message":"Will repeat my previous point: if you clear the array every time, you provide data only from the last sensor. You probably wanted to use different variables for this one and for the final result.","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_609b31c9","line":377,"in_reply_to":"baada198_392520c2","updated":"2014-07-21 03:00:21.000000000","message":"Dmity, sorry, still not understanding about why my code ignore all iterations but last one, I have verify the result parsed by this method, it works, and try to your solution, and it will pick up the last sensor data only, so will ignore all sensors but last one.\n\nSo will discuss with you in the IRC about your concern, thank you.","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_e3d85955","line":377,"in_reply_to":"baada198_a3e02127","updated":"2014-07-18 13:19:15.000000000","message":"Dmitry, I try to remove it and run again, found it does not work, so it is necessary here to clean for each sensor data(key is \u0027Sensor ID\u0027), such as below section that is a sensor data section:\n\n\n\nSensor ID              : Planar 3.3V (0x16)\n Entity ID             : 7.1 (System Board)\n Sensor Type (Analog)  : Voltage\n Sensor Reading        : 3.309 (+/- 0) Volts\n Status                : ok\n Nominal Reading       : 3.309\n Upper critical        : 3.564\n Lower critical        : 3.039\n Positive Hysteresis   : 0.028\n Negative Hysteresis   : 0.028\n Minimum sensor range  : Unspecified\n Maximum sensor range  : Unspecified\n Event Message Control : Per-threshold\n Readable Thresholds   : lcr ucr\n Settable Thresholds   : lcr ucr\n Threshold Read Mask   : lcr ucr\n Assertion Events      :\n Assertions Enabled    : lcr- ucr+\n Deassertions Enabled  : lcr- ucr+","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_a3e02127","line":377,"in_reply_to":"baada198_c6755c34","updated":"2014-07-18 13:13:42.000000000","message":"Sorry, misunderstand you, will remove this from next patch, thank you Dmitry.","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":19,"id":"baada198_392520c2","line":377,"in_reply_to":"baada198_e3d85955","updated":"2014-07-18 14:27:23.000000000","message":"than just replace \n\n for sensor_data in sensors_data_array:\n\nwith\n\n sensor_data \u003d sensors_data_array[-1]\n\nbecause that\u0027s what your code actually does. You ignoring results from all iterations but the last one.","commit_id":"fb7aaa2e4327e602638a77b115c38e8a7faf8d67"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_b6b74f84","line":377,"updated":"2014-07-21 06:46:30.000000000","message":"I may be missing something, would like you to point out :) here you clear this value of sensor_data_dict, which is the result variable, right? So that means, that only last iteration really counts.","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_8c0ebe3b","line":377,"in_reply_to":"baada198_51ffdd00","updated":"2014-07-21 08:28:57.000000000","message":"ok, I think this is good solution, thanks.","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":374,"context_line":""},{"line_number":375,"context_line":"        for sensor_data in sensors_data_array:"},{"line_number":376,"context_line":"            sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":377,"context_line":"            sensor_data_dict \u003d {}"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"            for field in sensor_data_fields:"},{"line_number":380,"context_line":"                if not field:"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_51ffdd00","line":377,"in_reply_to":"baada198_b6b74f84","updated":"2014-07-21 06:58:48.000000000","message":"Ok, I guess it\u0027s anyway better to split out the code for a single sensor in a separate function, so that this code will look like:\n\n for sensor_data in sensors_data_array:\n   sensor_data_dict \u003d _process_sensor(sensor_data)\n   for sensor_type in sensors_data_dict:\n     sensors_data_dict \u003d dict((key, value) for (key, value) ....\n\n(where _process_sensor is a new function).\n\nOtherwise this logic is a bit hard to reason about.","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":403,"context_line":"            # support the Conf.send_sensor_data_types sensor types only"},{"line_number":404,"context_line":"            if (\u0027ALL\u0027 not in CONF.conductor.send_sensor_data_types and"},{"line_number":405,"context_line":"                      sensor_type.upper() not in"},{"line_number":406,"context_line":"                      CONF.conductor.send_sensor_data_types.upper()):"},{"line_number":407,"context_line":"                continue"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"            if sensor_type not in sensors_data_dict:"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_f13631e6","line":406,"updated":"2014-07-21 06:58:48.000000000","message":"That\u0027s not the best check, what if you have 2 data types, that share a common substring? I would but it like:\n\n allowed \u003d CONF.conductor.send_sensor_data_types.upper().split(\u0027,\u0027)\n if \u0027ALL\u0027 not in allowed and sensor_type.upper() not in allowed:\n   continue","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":403,"context_line":"            # support the Conf.send_sensor_data_types sensor types only"},{"line_number":404,"context_line":"            if (\u0027ALL\u0027 not in CONF.conductor.send_sensor_data_types and"},{"line_number":405,"context_line":"                      sensor_type.upper() not in"},{"line_number":406,"context_line":"                      CONF.conductor.send_sensor_data_types.upper()):"},{"line_number":407,"context_line":"                continue"},{"line_number":408,"context_line":""},{"line_number":409,"context_line":"            if sensor_type not in sensors_data_dict:"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_cc0b5629","line":406,"in_reply_to":"baada198_f13631e6","updated":"2014-07-21 08:28:57.000000000","message":"ok, good idea","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":415,"context_line":"                    \u003d sensor_data_dict"},{"line_number":416,"context_line":""},{"line_number":417,"context_line":"        # remove the sensor types in case there is no any sensor data under it"},{"line_number":418,"context_line":"        for sensor_type in sensors_data_dict.keys():"},{"line_number":419,"context_line":"            sensors_data_dict \u003d dict((key, value) for (key, value)"},{"line_number":420,"context_line":"                in sensors_data_dict.items() if value)"},{"line_number":421,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_312d0990","line":418,"updated":"2014-07-21 06:58:48.000000000","message":"nit: keys() is redundant","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":419,"context_line":"            sensors_data_dict \u003d dict((key, value) for (key, value)"},{"line_number":420,"context_line":"                in sensors_data_dict.items() if value)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    except Exception as e:"},{"line_number":423,"context_line":"        raise exception.FailedToParseSensorData(node\u003dnode.uuid, error\u003dstr(e))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    # get nothing, no valid sensor data"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_f16471e6","line":422,"updated":"2014-07-21 06:58:48.000000000","message":"I\u0027m still not convinced we should catch all exceptions here. It\u0027s generally a bad practice and I don\u0027t see where you actually expect exceptions (probably you also don\u0027t know). Please delete this try..except.. block.","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":419,"context_line":"            sensors_data_dict \u003d dict((key, value) for (key, value)"},{"line_number":420,"context_line":"                in sensors_data_dict.items() if value)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"    except Exception as e:"},{"line_number":423,"context_line":"        raise exception.FailedToParseSensorData(node\u003dnode.uuid, error\u003dstr(e))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    # get nothing, no valid sensor data"}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_e70f532c","line":422,"in_reply_to":"baada198_f16471e6","updated":"2014-07-21 08:28:57.000000000","message":"ok, maybe I missed your previous comments, will delete this try in next patch.","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":423,"context_line":"        raise exception.FailedToParseSensorData(node\u003dnode.uuid, error\u003dstr(e))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    # get nothing, no valid sensor data"},{"line_number":426,"context_line":"    if len(sensors_data_dict) \u003d\u003d 0:"},{"line_number":427,"context_line":"        raise exception.FailedToParseSensorData("},{"line_number":428,"context_line":"            node\u003dnode.uuid,"},{"line_number":429,"context_line":"            error\u003d(_(\"parse ipmi sensor data failed, get nothing with input\""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_71522114","line":426,"updated":"2014-07-21 06:58:48.000000000","message":"nit: if not sensors_data_dict:","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":423,"context_line":"        raise exception.FailedToParseSensorData(node\u003dnode.uuid, error\u003dstr(e))"},{"line_number":424,"context_line":""},{"line_number":425,"context_line":"    # get nothing, no valid sensor data"},{"line_number":426,"context_line":"    if len(sensors_data_dict) \u003d\u003d 0:"},{"line_number":427,"context_line":"        raise exception.FailedToParseSensorData("},{"line_number":428,"context_line":"            node\u003dnode.uuid,"},{"line_number":429,"context_line":"            error\u003d(_(\"parse ipmi sensor data failed, get nothing with input\""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_0719a779","line":426,"in_reply_to":"baada198_71522114","updated":"2014-07-21 08:28:57.000000000","message":"ok","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"0a01955f94f5a4bf8ac5ffeb3cc34e2f5a00da4b","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        cmd \u003d \"sdr -v\""},{"line_number":755,"context_line":"        try:"},{"line_number":756,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":757,"context_line":"        except Exception as e:"},{"line_number":758,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":759,"context_line":"                                                  error\u003dstr(e))"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_115e4513","line":757,"updated":"2014-07-21 06:58:48.000000000","message":"you should catch a specific error here (smth like ProcessExecutionFailed, IIRC)","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":754,"context_line":"        cmd \u003d \"sdr -v\""},{"line_number":755,"context_line":"        try:"},{"line_number":756,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":757,"context_line":"        except Exception as e:"},{"line_number":758,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":759,"context_line":"                                                  error\u003dstr(e))"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_c7396fd9","line":757,"in_reply_to":"baada198_115e4513","updated":"2014-07-21 08:28:57.000000000","message":"good catch, will catch the special exceptions raised from _exec_ipmitool call, thanks.","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":754,"context_line":"        cmd \u003d \"sdr -v\""},{"line_number":755,"context_line":"        try:"},{"line_number":756,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":757,"context_line":"        except Exception as e:"},{"line_number":758,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":759,"context_line":"                                                  error\u003dstr(e))"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_5ec7ac97","line":757,"in_reply_to":"baada198_4d62abad","updated":"2014-07-22 07:23:36.000000000","message":"sure, sorry","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":754,"context_line":"        cmd \u003d \"sdr -v\""},{"line_number":755,"context_line":"        try:"},{"line_number":756,"context_line":"            out, err \u003d _exec_ipmitool(driver_info, cmd)"},{"line_number":757,"context_line":"        except Exception as e:"},{"line_number":758,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":759,"context_line":"                                                  error\u003dstr(e))"},{"line_number":760,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"baada198_4d62abad","line":757,"in_reply_to":"baada198_c7396fd9","updated":"2014-07-22 06:41:34.000000000","message":"I can not find such \u0027ProcessExecutionFailed\u0027 in our ironic code tree, do you meean \u0027ProcessExecutionError\u0027?","commit_id":"f66e5f9bd668eb3c3d7fb1854911514324327d39"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":402,"context_line":"        else:"},{"line_number":403,"context_line":"            LOG.warning(_(\"Invalid sensor type in the sensor data: %s\"),"},{"line_number":404,"context_line":"                sensor_data_dict)"},{"line_number":405,"context_line":"            continue"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"},{"line_number":408,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_0dc41740","line":405,"updated":"2014-07-22 13:09:41.000000000","message":"In my test runs it is necessary to have the following code to get things working:\n\n    sensor_type \u003d sensor_type.split(\u0027 \u0027, 1)[0]\n\nThis is because the sensor_type is reported in forms like \u0027Temperature (0x1)\u0027 but the filtering here in this code, as well as the ceilometer code, is expecting just \u0027Temperature\u0027, \u0027Fan\u0027, \u0027Voltage\u0027 or \u0027Current\u0027.","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":402,"context_line":"        else:"},{"line_number":403,"context_line":"            LOG.warning(_(\"Invalid sensor type in the sensor data: %s\"),"},{"line_number":404,"context_line":"                sensor_data_dict)"},{"line_number":405,"context_line":"            continue"},{"line_number":406,"context_line":""},{"line_number":407,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"},{"line_number":408,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_cf03d30e","line":405,"in_reply_to":"baada198_0dc41740","updated":"2014-07-23 01:29:42.000000000","message":"from my ipmitool result, have no such \u0027Temperature (0x1)\u0027 value, so thanks for your input, I will enhance this processing","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":418,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"},{"line_number":419,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":420,"context_line":"                \u003d sensor_data_dict"},{"line_number":421,"context_line":"    # remove the sensor types in case there is no any sensor data under it"},{"line_number":422,"context_line":"    for sensor_type in sensors_data_dict:"},{"line_number":423,"context_line":"        sensors_data_dict \u003d dict((key, value) for (key, value)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_30692e8d","line":420,"updated":"2014-07-22 13:17:30.000000000","message":"please move all the code from line #392 to this line to _process_sensor. this will be much easier to track and reason about.","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":417,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":418,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"},{"line_number":419,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":420,"context_line":"                \u003d sensor_data_dict"},{"line_number":421,"context_line":"    # remove the sensor types in case there is no any sensor data under it"},{"line_number":422,"context_line":"    for sensor_type in sensors_data_dict:"},{"line_number":423,"context_line":"        sensors_data_dict \u003d dict((key, value) for (key, value)"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_3a1e4b60","line":420,"in_reply_to":"baada198_30692e8d","updated":"2014-07-23 01:29:42.000000000","message":"Dmitry, lines #392-#420 is trying to process sensor_type and populate the single sensor_data_dict to sensors_data_dict, and check if the sensor types are supported by the configuration CONF.conductor.send_sensor_data_types, so I want to create new method to handle sensor_type logic in next patch, make sense?","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":440,"context_line":"            raise exception.DriverLoadError("},{"line_number":441,"context_line":"                    driver\u003dself.__class__.__name__,"},{"line_number":442,"context_line":"                    reason\u003d\"Unable to locate usable ipmitool command in \""},{"line_number":443,"context_line":"                           \"the system path when checking ipmitool version\")"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def validate(self, task):"},{"line_number":446,"context_line":"        \"\"\"Validate driver_info for ipmitool driver."}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_ed5a8350","line":443,"updated":"2014-07-22 13:17:30.000000000","message":"this code should be copied to IPMIToolManagement","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":440,"context_line":"            raise exception.DriverLoadError("},{"line_number":441,"context_line":"                    driver\u003dself.__class__.__name__,"},{"line_number":442,"context_line":"                    reason\u003d\"Unable to locate usable ipmitool command in \""},{"line_number":443,"context_line":"                           \"the system path when checking ipmitool version\")"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    def validate(self, task):"},{"line_number":446,"context_line":"        \"\"\"Validate driver_info for ipmitool driver."}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_7a6523e1","line":443,"in_reply_to":"baada198_ed5a8350","updated":"2014-07-23 01:29:42.000000000","message":"ok","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":740,"context_line":"        \"\"\"Get sensors data."},{"line_number":741,"context_line":""},{"line_number":742,"context_line":"        :param task: a TaskManager instance."},{"line_number":743,"context_line":"        :param node: a single Node."},{"line_number":744,"context_line":"        :raises: FailedToGetSensorData when getting the sensor data fails."},{"line_number":745,"context_line":"        :raises: FailedToParseSensorData when parsing sensor data fails."},{"line_number":746,"context_line":"        :returns: returns a dict of sensor data group by sensor type."}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_648a0f1c","line":743,"updated":"2014-07-22 12:43:33.000000000","message":"There is no node parameter.","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":740,"context_line":"        \"\"\"Get sensors data."},{"line_number":741,"context_line":""},{"line_number":742,"context_line":"        :param task: a TaskManager instance."},{"line_number":743,"context_line":"        :param node: a single Node."},{"line_number":744,"context_line":"        :raises: FailedToGetSensorData when getting the sensor data fails."},{"line_number":745,"context_line":"        :raises: FailedToParseSensorData when parsing sensor data fails."},{"line_number":746,"context_line":"        :returns: returns a dict of sensor data group by sensor type."}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_da5c6f1c","line":743,"in_reply_to":"baada198_648a0f1c","updated":"2014-07-23 01:29:42.000000000","message":"yes, will remove","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":756,"context_line":"        except processutils.ProcessExecutionError as pee:"},{"line_number":757,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":758,"context_line":"                                                  error\u003dstr(pee))"},{"line_number":759,"context_line":"        except Exception as e:"},{"line_number":760,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":761,"context_line":"                                                  error\u003dstr(e))"},{"line_number":762,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_ed7363e6","line":759,"updated":"2014-07-22 13:17:30.000000000","message":"please don\u0027t catch Exception. if you don\u0027t know what to catch, you should not catch anything. please delete the second `except`","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":756,"context_line":"        except processutils.ProcessExecutionError as pee:"},{"line_number":757,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":758,"context_line":"                                                  error\u003dstr(pee))"},{"line_number":759,"context_line":"        except Exception as e:"},{"line_number":760,"context_line":"            raise exception.FailedToGetSensorData(node\u003dtask.node.uuid,"},{"line_number":761,"context_line":"                                                  error\u003dstr(e))"},{"line_number":762,"context_line":""}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_3aa3ab01","line":759,"in_reply_to":"baada198_ed7363e6","updated":"2014-07-23 01:29:42.000000000","message":"ok, will delete second except in next patch","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":762,"context_line":""},{"line_number":763,"context_line":"        try:"},{"line_number":764,"context_line":"            sensors_data \u003d _parse_ipmi_sensors_data(task.node, out)"},{"line_number":765,"context_line":"        except Exception as e:"},{"line_number":766,"context_line":"            raise exception.FailedToParseSensorData(node\u003dtask.node.uuid,"},{"line_number":767,"context_line":"                                                  error\u003dstr(e))"},{"line_number":768,"context_line":"        return sensors_data"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_2d463bc1","line":765,"updated":"2014-07-22 13:17:30.000000000","message":"sorry, I didn\u0027t ask for moving this `except Exception`, I asked to delete it.","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":762,"context_line":""},{"line_number":763,"context_line":"        try:"},{"line_number":764,"context_line":"            sensors_data \u003d _parse_ipmi_sensors_data(task.node, out)"},{"line_number":765,"context_line":"        except Exception as e:"},{"line_number":766,"context_line":"            raise exception.FailedToParseSensorData(node\u003dtask.node.uuid,"},{"line_number":767,"context_line":"                                                  error\u003dstr(e))"},{"line_number":768,"context_line":"        return sensors_data"}],"source_content_type":"text/x-python","patch_set":24,"id":"baada198_5aa85fdb","line":765,"in_reply_to":"baada198_2d463bc1","updated":"2014-07-23 01:29:42.000000000","message":"ok, will remove it","commit_id":"199c607bca5a0d54fe6ea4e891199f72bde6e1c7"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":380,"context_line":"    elif \u0027Sensor Type (Discrete)\u0027 in sensor_data_dict:"},{"line_number":381,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Discrete)\u0027]"},{"line_number":382,"context_line":"    elif \u0027Sensor Type (Threshold)\u0027 in sensor_data_dict:"},{"line_number":383,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Threshold)\u0027]"},{"line_number":384,"context_line":"    sensor_type \u003d sensor_type.split(\u0027 \u0027, 1)[0]"},{"line_number":385,"context_line":"    return sensor_type"},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_6a98e075","line":383,"updated":"2014-07-23 09:38:59.000000000","message":"I am not sure, maybe we should add the final `else` clause here for unexpected type? Otherwise on line #384 you\u0027ll get NameError. What about smth like\n\n else:\n   raise exception.FailedToParseSensorData(\n\t\t\tnode\u003dnode.uuid,\n\t\t\terror\u003d(_(\"parse ipmi sensor data failed, unknown sensor type\"\t\n\t\t\t\" data: %(sensors_data)s\"), {\u0027sensors_data\u0027: sensors_data_dict}))","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":380,"context_line":"    elif \u0027Sensor Type (Discrete)\u0027 in sensor_data_dict:"},{"line_number":381,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Discrete)\u0027]"},{"line_number":382,"context_line":"    elif \u0027Sensor Type (Threshold)\u0027 in sensor_data_dict:"},{"line_number":383,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Threshold)\u0027]"},{"line_number":384,"context_line":"    sensor_type \u003d sensor_type.split(\u0027 \u0027, 1)[0]"},{"line_number":385,"context_line":"    return sensor_type"},{"line_number":386,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_f7d11330","line":383,"in_reply_to":"baada198_6a98e075","updated":"2014-07-24 03:34:20.000000000","message":"good idea, will add","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    sensors_data_array \u003d sensors_data.split(\u0027\\n\\n\u0027)"},{"line_number":407,"context_line":"    for sensor_data in sensors_data_array:"},{"line_number":408,"context_line":"        sensor_data_dict \u003d _process_sensor(sensor_data)"},{"line_number":409,"context_line":"        if not sensor_data_dict:"},{"line_number":410,"context_line":"            continue"},{"line_number":411,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_6a6540ae","line":408,"updated":"2014-07-23 09:38:59.000000000","message":"Wow, I finally understand source of my confusion for all these revisions! I didn\u0027t notice that sensors_data_array is different from sensor_data_dict. Sorry for the whole confusion, but could you please think of names, that do not look so similar?\n\nAnyway, I like how we split the big function into several small.\n\nSorry again :)","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":405,"context_line":""},{"line_number":406,"context_line":"    sensors_data_array \u003d sensors_data.split(\u0027\\n\\n\u0027)"},{"line_number":407,"context_line":"    for sensor_data in sensors_data_array:"},{"line_number":408,"context_line":"        sensor_data_dict \u003d _process_sensor(sensor_data)"},{"line_number":409,"context_line":"        if not sensor_data_dict:"},{"line_number":410,"context_line":"            continue"},{"line_number":411,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_a005b77a","line":408,"in_reply_to":"baada198_6a6540ae","updated":"2014-07-24 03:34:20.000000000","message":"dont worry, that is professional way to split the big function into small ones, I like current code also:)","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        sensor_type \u003d _get_sensor_type(sensor_data_dict)"},{"line_number":413,"context_line":"        if not sensor_type:"},{"line_number":414,"context_line":"            continue"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"},{"line_number":417,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_2aca6846","line":414,"updated":"2014-07-23 09:38:59.000000000","message":"Is this really possible? And if it is, should not we raise an exception here? See also my comment in _get_sensor_type.","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":411,"context_line":""},{"line_number":412,"context_line":"        sensor_type \u003d _get_sensor_type(sensor_data_dict)"},{"line_number":413,"context_line":"        if not sensor_type:"},{"line_number":414,"context_line":"            continue"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"        # support the CONF.send_sensor_data_types sensor types only"},{"line_number":417,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_17d5a71a","line":414,"in_reply_to":"baada198_2aca6846","updated":"2014-07-24 03:34:20.000000000","message":"yes, we need raise exception from _get_sensor_type method","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":417,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"},{"line_number":418,"context_line":"        allowed \u003d [x.lower() for x in allowed]"},{"line_number":419,"context_line":"        if \u0027all\u0027 not in allowed and sensor_type.lower() not in allowed:"},{"line_number":420,"context_line":"            continue"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # init the new type"},{"line_number":423,"context_line":"        if sensor_type not in sensors_data_dict:"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_1d9c0c5b","line":420,"updated":"2014-07-23 09:38:59.000000000","message":"I think it makes sense to nove this code to conductor, as it should be the same for all possible implementations (and add unit tests for it).","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":417,"context_line":"        allowed \u003d CONF.conductor.send_sensor_data_types"},{"line_number":418,"context_line":"        allowed \u003d [x.lower() for x in allowed]"},{"line_number":419,"context_line":"        if \u0027all\u0027 not in allowed and sensor_type.lower() not in allowed:"},{"line_number":420,"context_line":"            continue"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # init the new type"},{"line_number":423,"context_line":"        if sensor_type not in sensors_data_dict:"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_17be8764","line":420,"in_reply_to":"baada198_1d9c0c5b","updated":"2014-07-24 03:34:20.000000000","message":"Ok, make sense, we can reuse this logic for other implementations.","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # init the new type"},{"line_number":423,"context_line":"        if sensor_type not in sensors_data_dict:"},{"line_number":424,"context_line":"            sensors_data_dict[sensor_type] \u003d {}"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":427,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_2a38a83a","line":424,"updated":"2014-07-23 09:38:59.000000000","message":"just FYI there\u0027s special idiom for such a code (lines #423-#429):\n\n sensor_type_dict \u003d sensors_data_dict.setdefault(sensor_type, {})\n sensor_type_dict[sensor_data_dict[\u0027Sensor ID\u0027]] \u003d sensor_data_dict\n\nnot required to change, but looks cleaner IMO","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":421,"context_line":""},{"line_number":422,"context_line":"        # init the new type"},{"line_number":423,"context_line":"        if sensor_type not in sensors_data_dict:"},{"line_number":424,"context_line":"            sensors_data_dict[sensor_type] \u003d {}"},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":427,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_576f1ffc","line":424,"in_reply_to":"baada198_2a38a83a","updated":"2014-07-24 03:34:20.000000000","message":"yes, agree with your cleaner code:)","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":436,"context_line":"        raise exception.FailedToParseSensorData("},{"line_number":437,"context_line":"            node\u003dnode.uuid,"},{"line_number":438,"context_line":"            error\u003d(_(\"parse ipmi sensor data failed, get nothing with input\""},{"line_number":439,"context_line":"                \" data: %(sensors_data)s\"), {\u0027sensors_data\u0027: sensors_data}))"},{"line_number":440,"context_line":"    return sensors_data_dict"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_6a70e008","line":439,"updated":"2014-07-23 09:38:59.000000000","message":"this does not look correct, automatic string interpolation works only for LOG.xxx(). here it should be explicit:\n\n error\u003d_(\"parse ipmi sensor data failed, get nothing with input\"\n\t\t\t\" data: %(sensors_data)s\") % {\u0027sensors_data\u0027: sensors_data})","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":436,"context_line":"        raise exception.FailedToParseSensorData("},{"line_number":437,"context_line":"            node\u003dnode.uuid,"},{"line_number":438,"context_line":"            error\u003d(_(\"parse ipmi sensor data failed, get nothing with input\""},{"line_number":439,"context_line":"                \" data: %(sensors_data)s\"), {\u0027sensors_data\u0027: sensors_data}))"},{"line_number":440,"context_line":"    return sensors_data_dict"},{"line_number":441,"context_line":""},{"line_number":442,"context_line":""}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_777503cb","line":439,"in_reply_to":"baada198_6a70e008","updated":"2014-07-24 03:34:20.000000000","message":"yes, for non-log message, should use \u0027%\u0027","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":400,"context_line":"    elif \u0027Sensor Type (Discrete)\u0027 in sensor_data_dict:"},{"line_number":401,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Discrete)\u0027]"},{"line_number":402,"context_line":"    elif \u0027Sensor Type (Threshold)\u0027 in sensor_data_dict:"},{"line_number":403,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Threshold)\u0027]"},{"line_number":404,"context_line":"    else:"},{"line_number":405,"context_line":"        raise exception.FailedToParseSensorData("},{"line_number":406,"context_line":"            node\u003dnode.uuid,"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_6e9d2266","line":403,"updated":"2014-07-24 12:32:32.000000000","message":"I would rather write it like:\n\n for key in (\u0027Sensor Type (Analog)\u0027, \u0027Sensor Type (Discrete)\u0027, \u0027Sensor Type (Threshold)\u0027):\n   try:\n     return sensor_data_dict[key].split(\u0027 \u0027, 1)[0]\n   except KeyError:\n     continue\n raise exception.FailedToParseSensorData...\n\nreasons: 1. in theory, with multiple if\u0027s you have to test all possible code paths; 2. less dict lookups (both `in` and [] operators do the same), 3. less chances for typos in keys\n\nAgain, only my opinion","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":400,"context_line":"    elif \u0027Sensor Type (Discrete)\u0027 in sensor_data_dict:"},{"line_number":401,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Discrete)\u0027]"},{"line_number":402,"context_line":"    elif \u0027Sensor Type (Threshold)\u0027 in sensor_data_dict:"},{"line_number":403,"context_line":"        sensor_type \u003d sensor_data_dict[\u0027Sensor Type (Threshold)\u0027]"},{"line_number":404,"context_line":"    else:"},{"line_number":405,"context_line":"        raise exception.FailedToParseSensorData("},{"line_number":406,"context_line":"            node\u003dnode.uuid,"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_a403d9bc","line":403,"in_reply_to":"baada198_6e9d2266","updated":"2014-07-24 13:09:47.000000000","message":"yes, this is python-style, I like it:) \n\nthanks for your good code reference again.","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":443,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":444,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"},{"line_number":445,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":446,"context_line":"                \u003d sensor_data_dict"},{"line_number":447,"context_line":"    # remove the sensor types in case there is no any sensor data under it"},{"line_number":448,"context_line":"    for sensor_type in sensors_data_dict:"},{"line_number":449,"context_line":"        sensors_data_dict \u003d dict((key, value) for (key, value)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_4e1f7eb8","line":446,"updated":"2014-07-24 12:32:32.000000000","message":"you can drop the code #440-#441 and use the following here:\n\n sensors_data_dict.setdefault(sensor_type, {})[sensor_data_dict[\u0027Sensor ID\u0027]] \\\n\t\t\t\u003d sensor_data_dict\n\nthan you can also delete check on #448-#450 (which is btw not correct - `for` loop is redundant), because for every sensor type you\u0027ll definitely have some value.","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":443,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":444,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"},{"line_number":445,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":446,"context_line":"                \u003d sensor_data_dict"},{"line_number":447,"context_line":"    # remove the sensor types in case there is no any sensor data under it"},{"line_number":448,"context_line":"    for sensor_type in sensors_data_dict:"},{"line_number":449,"context_line":"        sensors_data_dict \u003d dict((key, value) for (key, value)"}],"source_content_type":"text/x-python","patch_set":30,"id":"baada198_4444bd18","line":446,"in_reply_to":"baada198_4e1f7eb8","updated":"2014-07-24 13:09:47.000000000","message":"ok, will try with your solution to remove the redundant lines.","commit_id":"6bc7e5dcf95a7a0b151b82c528af90e35a86fb11"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":446,"context_line":"    # remove the sensor types in case there is no any sensor data under it"},{"line_number":447,"context_line":"    for sensor_type in sensors_data_dict:"},{"line_number":448,"context_line":"        sensors_data_dict \u003d dict((key, value) for (key, value)"},{"line_number":449,"context_line":"            in sensors_data_dict.items() if value)"},{"line_number":450,"context_line":"    # get nothing, no valid sensor data"},{"line_number":451,"context_line":"    if not sensors_data_dict:"},{"line_number":452,"context_line":"        raise exception.FailedToParseSensorData("}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_081f370a","line":449,"updated":"2014-07-24 14:05:04.000000000","message":"please apply my solution from patchset 30 or at least drop the `for` loop here - it\u0027s redundant","commit_id":"9e0c1984b09f1907ed4125fdc97ba42f2ecda0a0"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":446,"context_line":"    # remove the sensor types in case there is no any sensor data under it"},{"line_number":447,"context_line":"    for sensor_type in sensors_data_dict:"},{"line_number":448,"context_line":"        sensors_data_dict \u003d dict((key, value) for (key, value)"},{"line_number":449,"context_line":"            in sensors_data_dict.items() if value)"},{"line_number":450,"context_line":"    # get nothing, no valid sensor data"},{"line_number":451,"context_line":"    if not sensors_data_dict:"},{"line_number":452,"context_line":"        raise exception.FailedToParseSensorData("}],"source_content_type":"text/x-python","patch_set":31,"id":"baada198_b46e8e62","line":449,"in_reply_to":"baada198_081f370a","updated":"2014-07-24 23:39:21.000000000","message":"ok, missed this one, sorry","commit_id":"9e0c1984b09f1907ed4125fdc97ba42f2ecda0a0"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def _process_sensor(sensor_data):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":383,"context_line":"    sensor_data_dict \u003d {}"},{"line_number":384,"context_line":"    for field in sensor_data_fields:"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_e7d5b0e6","line":381,"updated":"2014-07-25 09:02:16.000000000","message":"unneeded new line","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":378,"context_line":""},{"line_number":379,"context_line":""},{"line_number":380,"context_line":"def _process_sensor(sensor_data):"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    sensor_data_fields \u003d sensor_data.split(\u0027\\n\u0027)"},{"line_number":383,"context_line":"    sensor_data_dict \u003d {}"},{"line_number":384,"context_line":"    for field in sensor_data_fields:"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_aa11bf54","line":381,"in_reply_to":"baada198_e7d5b0e6","updated":"2014-07-25 09:19:42.000000000","message":"done","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":395,"context_line":"def _get_sensor_type(node, sensor_data_dict):"},{"line_number":396,"context_line":"    # Have only three sensor type name IDs: \u0027Sensor Type (Analog)\u0027"},{"line_number":397,"context_line":"    # \u0027Sensor Type (Discrete)\u0027 and \u0027Sensor Type (Threshold)\u0027"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    for key in (\u0027Sensor Type (Analog)\u0027, \u0027Sensor Type (Discrete)\u0027,"},{"line_number":400,"context_line":"                \u0027Sensor Type (Threshold)\u0027):"},{"line_number":401,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_47081c91","line":398,"updated":"2014-07-25 09:02:16.000000000","message":"unneeded new line","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":395,"context_line":"def _get_sensor_type(node, sensor_data_dict):"},{"line_number":396,"context_line":"    # Have only three sensor type name IDs: \u0027Sensor Type (Analog)\u0027"},{"line_number":397,"context_line":"    # \u0027Sensor Type (Discrete)\u0027 and \u0027Sensor Type (Threshold)\u0027"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"    for key in (\u0027Sensor Type (Analog)\u0027, \u0027Sensor Type (Discrete)\u0027,"},{"line_number":400,"context_line":"                \u0027Sensor Type (Threshold)\u0027):"},{"line_number":401,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_ca0ef331","line":398,"in_reply_to":"baada198_47081c91","updated":"2014-07-25 09:19:42.000000000","message":"done","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":422,"context_line":"    :raises: FailedToParseSensorData when error encountered during parsing."},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    \"\"\""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    sensors_data_dict \u003d {}"},{"line_number":427,"context_line":"    if not sensors_data:"},{"line_number":428,"context_line":"        return sensors_data_dict"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_c7218cfd","line":425,"updated":"2014-07-25 09:02:16.000000000","message":"unneeded new line","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":422,"context_line":"    :raises: FailedToParseSensorData when error encountered during parsing."},{"line_number":423,"context_line":""},{"line_number":424,"context_line":"    \"\"\""},{"line_number":425,"context_line":""},{"line_number":426,"context_line":"    sensors_data_dict \u003d {}"},{"line_number":427,"context_line":"    if not sensors_data:"},{"line_number":428,"context_line":"        return sensors_data_dict"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_ea173744","line":425,"in_reply_to":"baada198_c7218cfd","updated":"2014-07-25 09:19:42.000000000","message":"done","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param task: a TaskManager instance."},{"line_number":664,"context_line":"        :raises: FailedToGetSensorData when getting the sensor data fails."},{"line_number":665,"context_line":"        :raises: FailedToParseSensorData when parsing sensor data fails."},{"line_number":666,"context_line":"        :returns: returns a dict of sensor data group by sensor type."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_47be5cd5","line":665,"updated":"2014-07-25 09:02:16.000000000","message":":raises: InvalidParameterValue if required ipmi parameters are missing\n\nfrom _parse_driver_info","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":662,"context_line":""},{"line_number":663,"context_line":"        :param task: a TaskManager instance."},{"line_number":664,"context_line":"        :raises: FailedToGetSensorData when getting the sensor data fails."},{"line_number":665,"context_line":"        :raises: FailedToParseSensorData when parsing sensor data fails."},{"line_number":666,"context_line":"        :returns: returns a dict of sensor data group by sensor type."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_2a25afad","line":665,"in_reply_to":"baada198_47be5cd5","updated":"2014-07-25 09:19:42.000000000","message":"yes, good catch, thanks","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":666,"context_line":"        :returns: returns a dict of sensor data group by sensor type."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        \"\"\""},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":671,"context_line":"        # with \u0027-v\u0027 option, we can get the entire sensor data including the"},{"line_number":672,"context_line":"        # extended sensor informations"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_87feb468","line":669,"updated":"2014-07-25 09:02:16.000000000","message":"non needed new line","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":666,"context_line":"        :returns: returns a dict of sensor data group by sensor type."},{"line_number":667,"context_line":""},{"line_number":668,"context_line":"        \"\"\""},{"line_number":669,"context_line":""},{"line_number":670,"context_line":"        driver_info \u003d _parse_driver_info(task.node)"},{"line_number":671,"context_line":"        # with \u0027-v\u0027 option, we can get the entire sensor data including the"},{"line_number":672,"context_line":"        # extended sensor informations"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_4a2ae37e","line":669,"in_reply_to":"baada198_87feb468","updated":"2014-07-25 09:19:42.000000000","message":"done","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":440,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":441,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"},{"line_number":442,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":443,"context_line":"                \u003d sensor_data_dict"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    # get nothing, no valid sensor data"},{"line_number":446,"context_line":"    if not sensors_data_dict:"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_4e52f012","line":443,"updated":"2014-07-25 12:38:35.000000000","message":"A reminder to either move #436-#437 here or use setdefault().","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":440,"context_line":"        # ignore the sensors which has no current \u0027Sensor Reading\u0027 data"},{"line_number":441,"context_line":"        if \u0027Sensor Reading\u0027 in sensor_data_dict:"},{"line_number":442,"context_line":"            sensors_data_dict[sensor_type][sensor_data_dict[\u0027Sensor ID\u0027]] \\"},{"line_number":443,"context_line":"                \u003d sensor_data_dict"},{"line_number":444,"context_line":""},{"line_number":445,"context_line":"    # get nothing, no valid sensor data"},{"line_number":446,"context_line":"    if not sensors_data_dict:"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_d753c413","line":443,"in_reply_to":"baada198_4e52f012","updated":"2014-07-28 07:40:08.000000000","message":"ok, missed this one, thank you.","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":405,"context_line":"    raise exception.FailedToParseSensorData("},{"line_number":406,"context_line":"        node\u003dnode.uuid,"},{"line_number":407,"context_line":"            error\u003d(_(\"parse ipmi sensor data failed, unknown sensor type\""},{"line_number":408,"context_line":"            \" data: %(sensors_data)s\"), {\u0027sensors_data\u0027: sensor_data_dict}))"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"def _parse_ipmi_sensors_data(node, sensors_data):"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_d8ecd02b","line":408,"updated":"2014-07-28 09:57:34.000000000","message":"indentation nit: `error\u003d` should be in line with `node\u003d`","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":405,"context_line":"    raise exception.FailedToParseSensorData("},{"line_number":406,"context_line":"        node\u003dnode.uuid,"},{"line_number":407,"context_line":"            error\u003d(_(\"parse ipmi sensor data failed, unknown sensor type\""},{"line_number":408,"context_line":"            \" data: %(sensors_data)s\"), {\u0027sensors_data\u0027: sensor_data_dict}))"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":""},{"line_number":411,"context_line":"def _parse_ipmi_sensors_data(node, sensors_data):"}],"source_content_type":"text/x-python","patch_set":38,"id":"baada198_6aaaea84","line":408,"in_reply_to":"baada198_d8ecd02b","updated":"2014-07-29 02:21:57.000000000","message":"done","commit_id":"547aafcad78fed0247db268a58c548e15e66ecfe"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"                group\u003d\u0027ipmi\u0027)"},{"line_number":64,"context_line":"CONF.import_opt(\u0027send_sensor_data_types\u0027,"},{"line_number":65,"context_line":"                \u0027ironic.conductor.manager\u0027,"},{"line_number":66,"context_line":"                group\u003d\u0027conductor\u0027)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_e204571b","line":66,"updated":"2014-07-29 08:45:57.000000000","message":"Btw, you no longer need to import this option - filtering is done within conductor","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":63,"context_line":"                group\u003d\u0027ipmi\u0027)"},{"line_number":64,"context_line":"CONF.import_opt(\u0027send_sensor_data_types\u0027,"},{"line_number":65,"context_line":"                \u0027ironic.conductor.manager\u0027,"},{"line_number":66,"context_line":"                group\u003d\u0027conductor\u0027)"},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":69,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_c39f0350","line":66,"in_reply_to":"baada198_e204571b","updated":"2014-07-31 02:06:18.000000000","message":"yes, it is not used now","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"}],"ironic/drivers/modules/seamicro.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"unresolved":false,"context_lines":[{"line_number":560,"context_line":"        # it\u0027s implemented."},{"line_number":561,"context_line":"        return {\u0027boot_device\u0027: None, \u0027persistent\u0027: None}"},{"line_number":562,"context_line":""},{"line_number":563,"context_line":"    def get_sensors_data(self, task):"},{"line_number":564,"context_line":"        return {}"}],"source_content_type":"text/x-python","patch_set":35,"id":"baada198_87e794e2","line":563,"updated":"2014-07-25 09:02:16.000000000","message":"Missing docstring\n\n\"\"\"Get sensors data method.\n\nNot implemented by this driver.\n\n:param task: a TaskManager instance.\n\n\"\"\"","commit_id":"5ea3f9deaca9ea96abda8e57cddf2f9100189658"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":568,"context_line":""},{"line_number":569,"context_line":"        \"\"\""},{"line_number":570,"context_line":"        raise NotImplementedError(_(\"get_sensors_data is unsupported by \""},{"line_number":571,"context_line":"                                    \"pxe_seamicro driver\"))"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_55005b00","line":571,"updated":"2014-07-29 08:45:57.000000000","message":"ditto about message","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":568,"context_line":""},{"line_number":569,"context_line":"        \"\"\""},{"line_number":570,"context_line":"        raise NotImplementedError(_(\"get_sensors_data is unsupported by \""},{"line_number":571,"context_line":"                                    \"pxe_seamicro driver\"))"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_e3c16731","line":571,"in_reply_to":"baada198_55005b00","updated":"2014-07-31 02:06:18.000000000","message":"done","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"}],"ironic/tests/conductor/test_manager.py":[{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":707,"context_line":"        thread.link(link_callback)"},{"line_number":708,"context_line":""},{"line_number":709,"context_line":"        link_callback.assert_called_once_with(thread)"},{"line_number":710,"context_line":""},{"line_number":711,"context_line":"    def test___send_sensor_data(self):"},{"line_number":712,"context_line":"        self.service.start()"},{"line_number":713,"context_line":"        n \u003d utils.get_test_node(driver\u003d\u0027fake\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B8M%3D","line":710,"updated":"2014-02-27 01:13:33.000000000","message":"please also test that the periodic task handles the exception paths","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"unresolved":false,"context_lines":[{"line_number":721,"context_line":"                get_n_l_mock.return_value \u003d [(1, node.uuid, node.driver,"},{"line_number":722,"context_line":"                                                 node.instance_uuid)]"},{"line_number":723,"context_line":"                self.service._send_sensor_data(self.context)"},{"line_number":724,"context_line":"            get_sensors_data_mock.assert_called_once_with(mock.ANY, mock.ANY)"},{"line_number":725,"context_line":""},{"line_number":726,"context_line":"    def test___send_sensor_data_disabled(self):"},{"line_number":727,"context_line":"        self.service.start()"}],"source_content_type":"text/x-python","patch_set":9,"id":"AAAAVX%2F%2F%2B9U%3D","line":724,"updated":"2014-02-27 01:13:33.000000000","message":"since you\u0027re already passing in the node.uuid, you might as well assert that the right value is being passed down.","commit_id":"522d59f2ab613318a9bdf8d053269a691ca6c24b"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1195,"context_line":"                get_n_l_mock.return_value \u003d [(1, node.uuid, node.driver,"},{"line_number":1196,"context_line":"                                                 node.instance_uuid)]"},{"line_number":1197,"context_line":"                self.service._send_sensor_data(self.context)"},{"line_number":1198,"context_line":"            get_sensors_data_mock.assert_not_called()"},{"line_number":1199,"context_line":""},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"class ManagerSpawnWorkerTestCase(tests_base.TestCase):"}],"source_content_type":"text/x-python","patch_set":26,"id":"baada198_0a23e4be","line":1198,"updated":"2014-07-23 09:38:59.000000000","message":"there is no assert_not_called, should be:\n\n self.assertFalse(get_sensors_data_mock.called)","commit_id":"c339d6eb958bb2b5559ab540c338a914f41206ef"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                get_n_l_mock.return_value \u003d [(1, node.uuid, node.driver,"},{"line_number":1232,"context_line":"                                                 node.instance_uuid)]"},{"line_number":1233,"context_line":"                self.service._send_sensor_data(self.context)"},{"line_number":1234,"context_line":"            get_sensors_data_mock.assert_not_called()"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def test___send_sensor_data_disabled(self):"},{"line_number":1237,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_0e7398b4","line":1234,"updated":"2014-07-25 12:38:35.000000000","message":"There is not assert_not_called(). If there was, you\u0027d have an error, because get_sensors_data_mock should be actually called. Please fix to assert_called_once_with","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1231,"context_line":"                get_n_l_mock.return_value \u003d [(1, node.uuid, node.driver,"},{"line_number":1232,"context_line":"                                                 node.instance_uuid)]"},{"line_number":1233,"context_line":"                self.service._send_sensor_data(self.context)"},{"line_number":1234,"context_line":"            get_sensors_data_mock.assert_not_called()"},{"line_number":1235,"context_line":""},{"line_number":1236,"context_line":"    def test___send_sensor_data_disabled(self):"},{"line_number":1237,"context_line":"        node \u003d obj_utils.create_test_node(self.context,"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_bca477b9","line":1234,"in_reply_to":"baada198_0e7398b4","updated":"2014-07-28 06:07:32.000000000","message":"yes, it is changed by mistake","commit_id":"b95f05843940572d378996374ff96524c104a5e5"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1240,"context_line":"            self.assertTrue(_mapped_to_this_conductor_mock.called)"},{"line_number":1241,"context_line":"            self.assertTrue(acquire_mock.called)"},{"line_number":1242,"context_line":"            #TODO(whaom): will fix, below line still not working, any idea?"},{"line_number":1243,"context_line":"            #self.assertTrue(get_sensors_data_mock.called)"},{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"    @mock.patch.object(manager.ConductorManager, \u0027_mapped_to_this_conductor\u0027)"},{"line_number":1246,"context_line":"    @mock.patch.object(dbapi.IMPL, \u0027get_nodeinfo_list\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_357e876e","line":1243,"updated":"2014-07-29 08:45:57.000000000","message":"Driver that is used inside manager is `task.driver`. As you mock `acquire`, `task.driver` is a mock. You may need to do something like (didn\u0027t check):\n\n acquire_mock.return_value.__enter__.return_value.driver \u003d self.driver","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1240,"context_line":"            self.assertTrue(_mapped_to_this_conductor_mock.called)"},{"line_number":1241,"context_line":"            self.assertTrue(acquire_mock.called)"},{"line_number":1242,"context_line":"            #TODO(whaom): will fix, below line still not working, any idea?"},{"line_number":1243,"context_line":"            #self.assertTrue(get_sensors_data_mock.called)"},{"line_number":1244,"context_line":""},{"line_number":1245,"context_line":"    @mock.patch.object(manager.ConductorManager, \u0027_mapped_to_this_conductor\u0027)"},{"line_number":1246,"context_line":"    @mock.patch.object(dbapi.IMPL, \u0027get_nodeinfo_list\u0027)"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_a30f6fdf","line":1243,"in_reply_to":"baada198_357e876e","updated":"2014-07-31 02:06:18.000000000","message":"thanks for your hint, I try with it, works","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"46000fe1b8e640c498fe63abc9f3e7dafe63d3a8","unresolved":false,"context_lines":[{"line_number":1260,"context_line":"            self.assertFalse(get_nodeinfo_list_mock.called)"},{"line_number":1261,"context_line":"            self.assertFalse(_mapped_to_this_conductor_mock.called)"},{"line_number":1262,"context_line":"            self.assertFalse(acquire_mock.called)"},{"line_number":1263,"context_line":"            self.assertFalse(get_sensors_data_mock.called)"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"class ManagerSpawnWorkerTestCase(tests_base.TestCase):"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_f5b96f17","line":1263,"updated":"2014-07-29 08:45:57.000000000","message":"ditto","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"unresolved":false,"context_lines":[{"line_number":1260,"context_line":"            self.assertFalse(get_nodeinfo_list_mock.called)"},{"line_number":1261,"context_line":"            self.assertFalse(_mapped_to_this_conductor_mock.called)"},{"line_number":1262,"context_line":"            self.assertFalse(acquire_mock.called)"},{"line_number":1263,"context_line":"            self.assertFalse(get_sensors_data_mock.called)"},{"line_number":1264,"context_line":""},{"line_number":1265,"context_line":""},{"line_number":1266,"context_line":"class ManagerSpawnWorkerTestCase(tests_base.TestCase):"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_23bc3fb5","line":1263,"in_reply_to":"baada198_f5b96f17","updated":"2014-07-31 02:06:18.000000000","message":"done","commit_id":"9ffca8a9fae15f030d441874667a7e9c4ca730ba"}],"ironic/tests/drivers/test_ipmitool.py":[{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"unresolved":false,"context_lines":[{"line_number":483,"context_line":"        fake_sensors_data \u003d \"\"\""},{"line_number":484,"context_line":"                            Sensor ID              : Temp (0x1)"},{"line_number":485,"context_line":"                             Entity ID             : 3.1 (Processor)"},{"line_number":486,"context_line":"                             Sensor Type (Analog)  : Temperature"},{"line_number":487,"context_line":"                             Sensor Reading        : -58 (+/- 1) degrees C"},{"line_number":488,"context_line":"                             Status                : ok"},{"line_number":489,"context_line":"                             Nominal Reading       : 50.000"}],"source_content_type":"text/x-python","patch_set":11,"id":"baada198_27dd3215","line":486,"updated":"2014-07-10 10:39:35.000000000","message":"The ipmitool tool and sample data I have access to shows Sensor Type in this form:\n\n  Sensor ID              : Ambient Temp (0x32)\n   Entity ID             : 12.1 (Front Panel Board)\n   Sensor Type (Threshold)  : Temperature (0x01)\n   Sensor Reading        : 19 (+/- 0) degrees C\n\nWhich suggests some slightly more robust parsing may be required?","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a25a8af637e0341f9dd8a75bbead685482cfdabb","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                             Positive Hysteresis   : 375.000"},{"line_number":532,"context_line":"                             Negative Hysteresis   : 375.000"},{"line_number":533,"context_line":"                             \"\"\""},{"line_number":534,"context_line":"        expected_return \u003d {"},{"line_number":535,"context_line":"                             \u0027Fan\u0027: {"},{"line_number":536,"context_line":"                                 \u0027FAN MOD 1A RPM (0x30)\u0027: {"},{"line_number":537,"context_line":"                                     \u0027Status\u0027: \u0027ok\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_f9cd3c5e","line":534,"updated":"2014-06-19 16:50:59.000000000","message":"Here, and in http://paste.openstack.org/show/68808/ , the data being produced is quite verbose and oriented towards human rather than computer readability. At least on the ceilometer side this information needs to be munged to be more accessible and readable by both actors. http://docs.openstack.org/developer/ceilometer/measurements.html describes some of the existing names for meters from other systems.\n\nThe name changing could happen on the ceilometer side but that would mean that anything that was hearing these notifications would need to do similar translations. It would be better if Ironic was producing data that was more consumable. Part of what nova does is shown here: https://github.com/openstack/nova/blob/master/nova/notifications.py#L318\n\nIn addition to the name handling, the other thing which needs to be known is which of the data is relevant and needs to be stored and some sense of the units involved.  A fan\u0027s status and rpm is probably relevant but maybe not \"entity id\" (is it? I don\u0027t know).\n\nI\u0027d like to help move this along so please let me know how I can get involved.","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"},{"author":{"_account_id":8106,"name":"Haomeng,Wang","email":"wanghaomeng@gmail.com","username":"whaom"},"change_message_id":"02c7a9b497679ec3cd225d20c594af4ef04509ed","unresolved":false,"context_lines":[{"line_number":531,"context_line":"                             Positive Hysteresis   : 375.000"},{"line_number":532,"context_line":"                             Negative Hysteresis   : 375.000"},{"line_number":533,"context_line":"                             \"\"\""},{"line_number":534,"context_line":"        expected_return \u003d {"},{"line_number":535,"context_line":"                             \u0027Fan\u0027: {"},{"line_number":536,"context_line":"                                 \u0027FAN MOD 1A RPM (0x30)\u0027: {"},{"line_number":537,"context_line":"                                     \u0027Status\u0027: \u0027ok\u0027,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_edca876e","line":534,"in_reply_to":"1ae5cdf2_f9cd3c5e","updated":"2014-06-23 13:37:36.000000000","message":"That is fine with Ironic to translate these notifications, such as the date format etc, and we should make a list, which fields value should be translated, and what is the expected format.\n\nI think for each sensor, the \u0027status\u0027 and \u0027sensor reading\u0027(current value), these two fields are important data, theirs value is not fixed all time. However for the \u0027normal minimum\u0027, \u0027maximum\u0027 values, they are configuration value I think, will not be changed frequently.  \n\n\nThanks for your comments, and let us work together to complete the bps:)","commit_id":"58ac1c6da605b48a2b05067e9bb94fc04b05f4d2"}]}
