)]}'
{"watcher/decision_engine/strategy/strategies/vm_workload_consolidation.py":[{"author":{"_account_id":15949,"name":"Atul Pandey","email":"atul.pandey@nectechnologies.in","username":"atulpandey"},"change_message_id":"ef8c0b7842db478c48bd22c82f2e79a9f5f1bd1c","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            return state.value"},{"line_number":111,"context_line":"        else:"},{"line_number":112,"context_line":"            LOG.error(_LE(\u0027Unexpexted resource state type, \u0027"},{"line_number":113,"context_line":"                          \u0027state\u003d%(state)s, state_type\u003d%(st)s.\u0027) % dict("},{"line_number":114,"context_line":"                              state\u003dstate,"},{"line_number":115,"context_line":"                              st\u003dtype(state)))"},{"line_number":116,"context_line":"            raise exception.WatcherException"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_56755ec8","line":113,"range":{"start_line":113,"start_character":71,"end_line":113,"end_character":72},"updated":"2016-12-07 07:34:08.000000000","message":"AFAIK changing it to dictionary type would be useful only in case when we are returning those value,so in here it is not much of use while logging. Kindly share your opinion or rationale behind this changes.","commit_id":"8bcf0ae085b4112455df8d52c728a26d06e0e7e5"},{"author":{"_account_id":21692,"name":"licanwei","email":"li.canwei2@zte.com.cn","username":"licanwei"},"change_message_id":"1877a5e875312228ad1d3c4e6a57acb5d34c4751","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            return state.value"},{"line_number":111,"context_line":"        else:"},{"line_number":112,"context_line":"            LOG.error(_LE(\u0027Unexpexted resource state type, \u0027"},{"line_number":113,"context_line":"                          \u0027state\u003d%(state)s, state_type\u003d%(st)s.\u0027) % dict("},{"line_number":114,"context_line":"                              state\u003dstate,"},{"line_number":115,"context_line":"                              st\u003dtype(state)))"},{"line_number":116,"context_line":"            raise exception.WatcherException"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_e1c67848","line":113,"range":{"start_line":113,"start_character":71,"end_line":113,"end_character":72},"in_reply_to":"3a71b18c_56755ec8","updated":"2016-12-08 01:54:29.000000000","message":"There are two ways to modify, \n1: LOG.error(_LE(\u0027Unexpexted resource state type, \u0027\n                          \u0027state\u003d%s, state_type\u003d%s.\u0027),state,type(state))\n2:             LOG.error(_LE(\u0027Unexpexted resource state type, \u0027\n                          \u0027state\u003d%(state)s, state_type\u003d%(st)s.\u0027) % dict(\n                              state\u003dstate,\n                              st\u003dtype(state)))\n\nI use the second, there are many of same usage,\nyou can search \u0027LOG\u0027 to find these\nsuch as :\nline 239\\279 :watcher/decision_engine/strategy/strategies/basic_consolidation.py\nline 365\\401 in nova/nova/compute/manager.py","commit_id":"8bcf0ae085b4112455df8d52c728a26d06e0e7e5"},{"author":{"_account_id":15949,"name":"Atul Pandey","email":"atul.pandey@nectechnologies.in","username":"atulpandey"},"change_message_id":"ba23da107486204bc39048533cb7ad11427f1308","unresolved":false,"context_lines":[{"line_number":110,"context_line":"            return state.value"},{"line_number":111,"context_line":"        else:"},{"line_number":112,"context_line":"            LOG.error(_LE(\u0027Unexpexted resource state type, \u0027"},{"line_number":113,"context_line":"                          \u0027state\u003d%(state)s, state_type\u003d%(st)s.\u0027) % dict("},{"line_number":114,"context_line":"                              state\u003dstate,"},{"line_number":115,"context_line":"                              st\u003dtype(state)))"},{"line_number":116,"context_line":"            raise exception.WatcherException"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_12be60ff","line":113,"range":{"start_line":113,"start_character":71,"end_line":113,"end_character":72},"in_reply_to":"3a71b18c_e1c67848","updated":"2016-12-08 03:36:26.000000000","message":"Okay now i understood it is used for better code readability as it give reference about the variables.","commit_id":"8bcf0ae085b4112455df8d52c728a26d06e0e7e5"},{"author":{"_account_id":15949,"name":"Atul Pandey","email":"atul.pandey@nectechnologies.in","username":"atulpandey"},"change_message_id":"ef8c0b7842db478c48bd22c82f2e79a9f5f1bd1c","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            # migration mechanism to move non active VMs."},{"line_number":162,"context_line":"            LOG.error("},{"line_number":163,"context_line":"                _LE(\u0027Cannot live migrate: instance_uuid\u003d%(instance_uuid)s, \u0027"},{"line_number":164,"context_line":"                    \u0027state\u003d%(instance_state)s.\u0027) % dict("},{"line_number":165,"context_line":"                        instance_uuid\u003dinstance_uuid,"},{"line_number":166,"context_line":"                        instance_state\u003dinstance_state_str))"},{"line_number":167,"context_line":"            raise exception.WatcherException"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a71b18c_b64cf29e","line":164,"range":{"start_line":164,"start_character":51,"end_line":164,"end_character":55},"updated":"2016-12-07 07:34:08.000000000","message":"same as above.","commit_id":"8bcf0ae085b4112455df8d52c728a26d06e0e7e5"}]}
