)]}'
{"ironic/drivers/modules/redfish/management.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"f2c24b9b5f3c73ed4221c61aa92fe2a789e56ffb","unresolved":false,"context_lines":[{"line_number":226,"context_line":"    def _sensor2dict(resource, *fields):"},{"line_number":227,"context_line":"        return {field: getattr(resource, field)"},{"line_number":228,"context_line":"                for field in fields"},{"line_number":229,"context_line":"                if hasattr(resource, field)}"},{"line_number":230,"context_line":""},{"line_number":231,"context_line":"    def _get_sensors_fan(self, chassis):"},{"line_number":232,"context_line":"        \"\"\"Get fan sensors reading."}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_b390a3ef","line":229,"updated":"2019-06-17 13:13:33.000000000","message":"Is there some way for an API consumer to discover all of the fields for a given type of device? Because the way this is written, some fields will be left out of the output sometimes, and that means 2 different devices of the same type may look different to the API user. I would just pass back None for cases where a value isn\u0027t available, unless the outbound REST API code does that for us somewhere else as it makes the objects look consistent.","commit_id":"d52cc6b509e12187976166e8cf39e940d8c4d4eb"}],"ironic/tests/unit/drivers/modules/redfish/test_management.py":[{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"f2c24b9b5f3c73ed4221c61aa92fe2a789e56ffb","unresolved":false,"context_lines":[{"line_number":364,"context_line":"            \u0027model\u0027: \u0027IBM 350A\u0027,"},{"line_number":365,"context_line":"            \u0027capacity_bytes\u0027: 3750000000,"},{"line_number":366,"context_line":"            \u0027failure_predicted\u0027: True,"},{"line_number":367,"context_line":"            \u0027serial_number\u0027: \u0027SN010203040506\u0027,"},{"line_number":368,"context_line":"            \u0027status\u0027: {"},{"line_number":369,"context_line":"                \u0027health\u0027: \u0027OK\u0027,"},{"line_number":370,"context_line":"                \u0027state\u0027: \u0027enabled\u0027"}],"source_content_type":"text/x-python","patch_set":1,"id":"9fb8cfa7_1372cfe4","line":367,"updated":"2019-06-17 13:13:33.000000000","message":"We appear to lose the serial number in the conversion for drives. It would be good if we could keep that.","commit_id":"d52cc6b509e12187976166e8cf39e940d8c4d4eb"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dcc24532f2602c9ef9af62eb0a97149b600a1554","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        expected \u003d {"},{"line_number":386,"context_line":"            \u002732ADF365C6C1B7BD:XXX-YYY-ZZZ@ZZZ-YYY-XXX\u0027: {"},{"line_number":387,"context_line":"                \u0027capacity_bytes\u0027: 3750000000,"},{"line_number":388,"context_line":"                \u0027failure_predicted\u0027: True,"},{"line_number":389,"context_line":"                \u0027health\u0027: \u0027OK\u0027,"},{"line_number":390,"context_line":"                \u0027identity\u0027: \u002732ADF365C6C1B7BD\u0027,"},{"line_number":391,"context_line":"                \u0027model\u0027: \u0027IBM 350A\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_206409e5","line":388,"range":{"start_line":388,"start_character":1,"end_line":388,"end_character":42},"updated":"2019-06-20 22:52:45.000000000","message":"This is huge!","commit_id":"8296cf8fe065c578dc0038e6f3fd4b9d9304588a"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"12e4df415c6f74b331f5ebd841b2d09438a076a6","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        expected \u003d {"},{"line_number":386,"context_line":"            \u002732ADF365C6C1B7BD:XXX-YYY-ZZZ@ZZZ-YYY-XXX\u0027: {"},{"line_number":387,"context_line":"                \u0027capacity_bytes\u0027: 3750000000,"},{"line_number":388,"context_line":"                \u0027failure_predicted\u0027: True,"},{"line_number":389,"context_line":"                \u0027health\u0027: \u0027OK\u0027,"},{"line_number":390,"context_line":"                \u0027identity\u0027: \u002732ADF365C6C1B7BD\u0027,"},{"line_number":391,"context_line":"                \u0027model\u0027: \u0027IBM 350A\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_4fa7e60c","line":388,"range":{"start_line":388,"start_character":1,"end_line":388,"end_character":42},"in_reply_to":"9fb8cfa7_206409e5","updated":"2019-06-21 08:09:44.000000000","message":"Ironic is obviously taking over the world, but raw iron is clearly manipulating ironic!","commit_id":"8296cf8fe065c578dc0038e6f3fd4b9d9304588a"},{"author":{"_account_id":11655,"name":"Julia Kreger","email":"juliaashleykreger@gmail.com","username":"jkreger","status":"Flying to the moon with a Jetpack!"},"change_message_id":"dcc24532f2602c9ef9af62eb0a97149b600a1554","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        }"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        self.assertEqual(expected, sensors)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    @mock.patch.object(redfish_utils, \u0027get_system\u0027, autospec\u003dTrue)"},{"line_number":417,"context_line":"    def test_inject_nmi(self, mock_get_system):"},{"line_number":418,"context_line":"        fake_system \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_c0908d98","line":415,"updated":"2019-06-20 22:52:45.000000000","message":"It would likely be really good to also the sensor runner for the entire conductor to call this interface so we ensure that when redfish is used, that it loads through and parses the data correctly.","commit_id":"8296cf8fe065c578dc0038e6f3fd4b9d9304588a"},{"author":{"_account_id":26340,"name":"Ilya Etingof","email":"etingof@gmail.com","username":"etingof"},"change_message_id":"12e4df415c6f74b331f5ebd841b2d09438a076a6","unresolved":false,"context_lines":[{"line_number":412,"context_line":"        }"},{"line_number":413,"context_line":""},{"line_number":414,"context_line":"        self.assertEqual(expected, sensors)"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"    @mock.patch.object(redfish_utils, \u0027get_system\u0027, autospec\u003dTrue)"},{"line_number":417,"context_line":"    def test_inject_nmi(self, mock_get_system):"},{"line_number":418,"context_line":"        fake_system \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":4,"id":"9fb8cfa7_0f648ee4","line":415,"in_reply_to":"9fb8cfa7_c0908d98","updated":"2019-06-21 08:09:44.000000000","message":"Hmm, but why do we need to test the whole call chain rather than just units of it? \n\nLooking at current test suite, it seems that we have conductor-\u003eget_sensors_data test [1] and a bunch of driver-specific get_sensors_data tests [2]. If feels like being in the spirit of unit tests... Also, would the end-to-end testing you are proposing ultimately enhance test coverage?\n\n1. https://github.com/openstack/ironic/blob/master/ironic/tests/unit/conductor/test_manager.py#L5608\n2. https://github.com/openstack/ironic/blob/master/ironic/tests/unit/drivers/modules/ilo/test_management.py#L187","commit_id":"8296cf8fe065c578dc0038e6f3fd4b9d9304588a"}]}
