)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6a8602bd5ca8084a3ddb021525412ed77d370175","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"flavorid\" instead of \"instance_type_id\" as the flavor id."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The instance_ref has all the flavor infomation, not need to get info from"},{"line_number":19,"context_line":"DB again."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I5bd19b2bc2f874d31fd4609306c24e0f51517281"},{"line_number":22,"context_line":"Closes-Bug: #1273638"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F%2BJ14%3D","line":19,"updated":"2014-01-29 16:44:05.000000000","message":"Sorry, it\u0027s quite difficult to follow what you are saying in this commit message. Perhaps, would you mind adding some examples of what the specific IDs contain. That would make it easier to understand.\n\nFor instance, you could say something like \"instance_type_id is a UUID that the primary key in Nova\u0027s instance_types table. flavorid is the numeric ID for an instance type that appears if you do nova instance-types-list.\"","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"749130ffa37f4ba2ab52e436067088505a821495","unresolved":false,"context_lines":[{"line_number":16,"context_line":"\"flavorid\" instead of \"instance_type_id\" as the flavor id."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"The instance_ref has all the flavor infomation, not need to get info from"},{"line_number":19,"context_line":"DB again."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I5bd19b2bc2f874d31fd4609306c24e0f51517281"},{"line_number":22,"context_line":"Closes-Bug: #1273638"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"AAAAUH%2F%2BGvc%3D","line":19,"in_reply_to":"AAAAUH%2F%2BJ14%3D","updated":"2014-01-30 03:22:05.000000000","message":"Jay, sorry for may poor english, more details, pls see the bug web. \nthanks","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"}],"ceilometer/compute/nova_notifier.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"e9b8bd304d6f88562bc0378f7fdb2971f2165cf0","unresolved":false,"context_lines":[{"line_number":48,"context_line":"LOG \u003d logging.getLogger(\u0027nova.ceilometer.notifier\u0027)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"_gatherer \u003d None"},{"line_number":51,"context_line":"conductor_api \u003d conductor.API()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class DeletedInstanceStatsGatherer(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BOm4%3D","line":51,"updated":"2014-01-28 21:47:19.000000000","message":"this isn\u0027t used...","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"d37e2f3bca016669a61af838a7a6d22c5d503ecd","unresolved":false,"context_lines":[{"line_number":48,"context_line":"LOG \u003d logging.getLogger(\u0027nova.ceilometer.notifier\u0027)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"_gatherer \u003d None"},{"line_number":51,"context_line":"conductor_api \u003d conductor.API()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class DeletedInstanceStatsGatherer(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BLAY%3D","line":51,"in_reply_to":"AAAAUH%2F%2BNm4%3D","updated":"2014-01-29 13:18:46.000000000","message":"whoops, didn\u0027t look at code after. my bad.","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"3fbfd771e13c0cc0469dceb75cf9b371d03a28f2","unresolved":false,"context_lines":[{"line_number":48,"context_line":"LOG \u003d logging.getLogger(\u0027nova.ceilometer.notifier\u0027)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"_gatherer \u003d None"},{"line_number":51,"context_line":"conductor_api \u003d conductor.API()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"class DeletedInstanceStatsGatherer(object):"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BNm4%3D","line":51,"in_reply_to":"AAAAUH%2F%2BOm4%3D","updated":"2014-01-29 01:05:05.000000000","message":"@ gordon, hi, also use this to get instance details at line:155","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"7a659a10d51b1ca485ff119d67c3605ed97bf5ba","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            else:"},{"line_number":109,"context_line":"                setattr(self, k, v)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        instance_type \u003d flavors.extract_flavor(info)"},{"line_number":112,"context_line":"        self.flavor_name \u003d instance_type.get(\u0027name\u0027, \u0027UNKNOWN\u0027)"},{"line_number":113,"context_line":"        self.instance_flavor_id \u003d instance_type.get(\u0027flavorid\u0027, \u0027\u0027)"},{"line_number":114,"context_line":"        LOG.debug(_(\u0027INFO %r\u0027), info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BJ10%3D","line":111,"updated":"2014-01-29 16:41:41.000000000","message":"now that i dig deeper in, it seems there\u0027s some duplication with the iteritems above.\n\nvcpus, memory_mb, etc... values are processed with iteritems above i believe. if that\u0027s true, i would think flavor_name and flavor_id would also be part of it.","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"69066a6f6b95fc67d636c7d823623432222755e1","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            else:"},{"line_number":109,"context_line":"                setattr(self, k, v)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        instance_type \u003d flavors.extract_flavor(info)"},{"line_number":112,"context_line":"        self.flavor_name \u003d instance_type.get(\u0027name\u0027, \u0027UNKNOWN\u0027)"},{"line_number":113,"context_line":"        self.instance_flavor_id \u003d instance_type.get(\u0027flavorid\u0027, \u0027\u0027)"},{"line_number":114,"context_line":"        LOG.debug(_(\u0027INFO %r\u0027), info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BI4k%3D","line":111,"in_reply_to":"AAAAUH%2F%2BJ10%3D","updated":"2014-01-29 19:54:43.000000000","message":"@gordon you are right,  the info contains the flavorid and the name, but we can not directly get the value, some of flavor keys maybe the key of info dict, others in  sys-metadata dict, actually info don\u0027t have the key name \u0027flavorid\u0027, the key is \"instance_flavor_id\" in sys-metadata.\n the extract_flavor just return a new dict cotaining all flavor\u0027s elements (just like the return using nova \u0027flavor-show).\nhttps://github.com/openstack/nova/blob/master/nova/notifications.py#L362\n\n\n\n.","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"d9111f6f210549f4f8b2581c94ad54c9f8e44f1b","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            else:"},{"line_number":109,"context_line":"                setattr(self, k, v)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        instance_type \u003d flavors.extract_flavor(info)"},{"line_number":112,"context_line":"        self.flavor_name \u003d instance_type.get(\u0027name\u0027, \u0027UNKNOWN\u0027)"},{"line_number":113,"context_line":"        self.instance_flavor_id \u003d instance_type.get(\u0027flavorid\u0027, \u0027\u0027)"},{"line_number":114,"context_line":"        LOG.debug(_(\u0027INFO %r\u0027), info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BGxc%3D","line":111,"in_reply_to":"AAAAUH%2F%2BJ10%3D","updated":"2014-01-30 03:11:45.000000000","message":"@gordon, I add a instance example in :https://bugs.launchpad.net/ceilometer/+bug/1273638\nyou can see the flavor info is in the system_metadata list, and the extract_flavor function can transform the message to a flavor dict.","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"6a8602bd5ca8084a3ddb021525412ed77d370175","unresolved":false,"context_lines":[{"line_number":110,"context_line":""},{"line_number":111,"context_line":"        instance_type \u003d flavors.extract_flavor(info)"},{"line_number":112,"context_line":"        self.flavor_name \u003d instance_type.get(\u0027name\u0027, \u0027UNKNOWN\u0027)"},{"line_number":113,"context_line":"        self.instance_flavor_id \u003d instance_type.get(\u0027flavorid\u0027, \u0027\u0027)"},{"line_number":114,"context_line":"        LOG.debug(_(\u0027INFO %r\u0027), info)"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    @property"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUH%2F%2BJ1E%3D","line":113,"updated":"2014-01-29 16:44:05.000000000","message":"Please also include a code comment above here that explains what \"instance_flavor_id\" is being set to and how it is different from the UUID value of instance_type_id. Remember that code is read much more frequently than written, so we want to make sure readers of the code in the future understand why something is being done :)","commit_id":"c82debdd080cfa24d127d1b9abd0e36651dec559"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"aad94cafae853826451b72f251b9055b5c7a1f2b","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    sys.modules[\u0027ceilometer.\u0027 + name] \u003d sys.modules[\u0027nova.\u0027 + name]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from nova.compute import flavors"},{"line_number":34,"context_line":"from nova import conductor"},{"line_number":35,"context_line":"from nova import utils"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from stevedore import extension"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BEHQ%3D","line":34,"updated":"2014-01-30 14:54:34.000000000","message":"This can be removed","commit_id":"938dfecb8b123d2b706f14b4f85ddead310983c1"},{"author":{"_account_id":7641,"name":"Shuangtai Tian","email":"hitianst@gmail.com","username":"shuangtai"},"change_message_id":"e685cbec24115d7e5b9afbd49f93f92a300e9a30","unresolved":false,"context_lines":[{"line_number":31,"context_line":"    sys.modules[\u0027ceilometer.\u0027 + name] \u003d sys.modules[\u0027nova.\u0027 + name]"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"from nova.compute import flavors"},{"line_number":34,"context_line":"from nova import conductor"},{"line_number":35,"context_line":"from nova import utils"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"from stevedore import extension"}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BEFs%3D","line":34,"in_reply_to":"AAAAUH%2F%2BEHQ%3D","updated":"2014-01-30 15:01:33.000000000","message":"@Mehdi, We also need this to get instance info from DB :line 155","commit_id":"938dfecb8b123d2b706f14b4f85ddead310983c1"},{"author":{"_account_id":2813,"name":"Mehdi Abaakouk","email":"sileht@sileht.net","username":"sileht"},"change_message_id":"aad94cafae853826451b72f251b9055b5c7a1f2b","unresolved":false,"context_lines":[{"line_number":47,"context_line":"# in the log file."},{"line_number":48,"context_line":"LOG \u003d logging.getLogger(\u0027nova.ceilometer.notifier\u0027)"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"_gatherer \u003d None"},{"line_number":51,"context_line":"conductor_api \u003d conductor.API()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"AAAAUH%2F%2BEHU%3D","line":50,"updated":"2014-01-30 14:54:34.000000000","message":"This can be removed","commit_id":"938dfecb8b123d2b706f14b4f85ddead310983c1"}]}
