)]}'
{"nova/scheduler/host_manager.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"62ab3cb345376d76bbae75628c19d9a988714a6b","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            try:"},{"line_number":203,"context_line":"                return self.stats[name]"},{"line_number":204,"context_line":"            except KeyError:"},{"line_number":205,"context_line":"                raise AttributeError(\"%s object has no attribute %s\" %"},{"line_number":206,"context_line":"                                     (HostState.__name__, name)"},{"line_number":207,"context_line":"                                    )"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2F2B8%3D","line":205,"updated":"2013-07-10 14:44:45.000000000","message":"please use the i18n format","commit_id":"0baf05cdb101960ab02545c52655550d1f81a112"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"71b1d71ed7c209bf8c39f5fc556d0e1c6a54e563","unresolved":false,"context_lines":[{"line_number":202,"context_line":"            try:"},{"line_number":203,"context_line":"                return self.stats[name]"},{"line_number":204,"context_line":"            except KeyError:"},{"line_number":205,"context_line":"                raise AttributeError(\"%s object has no attribute %s\" %"},{"line_number":206,"context_line":"                                     (HostState.__name__, name)"},{"line_number":207,"context_line":"                                    )"},{"line_number":208,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAP3%2F%2FzUU%3D","line":205,"in_reply_to":"AAAAP3%2F%2F2B8%3D","updated":"2013-07-11 07:26:01.000000000","message":"Done","commit_id":"0baf05cdb101960ab02545c52655550d1f81a112"},{"author":{"_account_id":7073,"name":"mouad benchchaoui","email":"m.benchchaoui@x-ion.de","username":"mouad"},"change_message_id":"e7438a832cad19781dc1bb9aea36807a3d06b318","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            raise TypeError()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class ResourceItem(object):"},{"line_number":95,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":96,"context_line":"        self.update(value, timestamp, source)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FudI%3D","line":94,"updated":"2013-07-12 11:13:49.000000000","message":"Is there a reason why you are not using Python functools.total_ordering:  http://docs.python.org/2/library/functools.html#functools.total_ordering","commit_id":"26bd39a0b5df0ebd390829e2609b46cc4ccfe066"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d811ba575f51d4327701f60eec02996111e0964e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"            raise TypeError()"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":""},{"line_number":94,"context_line":"class ResourceItem(object):"},{"line_number":95,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":96,"context_line":"        self.update(value, timestamp, source)"},{"line_number":97,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2Fqaw%3D","line":94,"in_reply_to":"AAAAP3%2F%2FudI%3D","updated":"2013-07-15 02:01:43.000000000","message":"total_ordering is not supported by python 2.6.","commit_id":"26bd39a0b5df0ebd390829e2609b46cc4ccfe066"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"73a94b49fd4fb688b92798307e2bad1b646cf025","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":96,"context_line":"        self.update(value, timestamp, source)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def update(self, value\u003dNone, timestamp\u003dNone, source\u003dNone, json\u003dTrue):"},{"line_number":99,"context_line":"        self.value \u003d value"},{"line_number":100,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":101,"context_line":"        self.source \u003d source"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FuN8%3D","line":98,"updated":"2013-07-12 13:09:13.000000000","message":"the json parameter is not used","commit_id":"26bd39a0b5df0ebd390829e2609b46cc4ccfe066"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d811ba575f51d4327701f60eec02996111e0964e","unresolved":false,"context_lines":[{"line_number":95,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":96,"context_line":"        self.update(value, timestamp, source)"},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"    def update(self, value\u003dNone, timestamp\u003dNone, source\u003dNone, json\u003dTrue):"},{"line_number":99,"context_line":"        self.value \u003d value"},{"line_number":100,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":101,"context_line":"        self.source \u003d source"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2Fqak%3D","line":98,"in_reply_to":"AAAAP3%2F%2FuN8%3D","updated":"2013-07-15 02:01:43.000000000","message":"thanks for catching this.","commit_id":"26bd39a0b5df0ebd390829e2609b46cc4ccfe066"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"73a94b49fd4fb688b92798307e2bad1b646cf025","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                k.startswith(\"num_proj_\")]"},{"line_number":283,"context_line":"        for key in project_id_keys:"},{"line_number":284,"context_line":"            project_id \u003d key[9:]"},{"line_number":285,"context_line":"            temp \u003d self.stats[\u0027num_instances_by_project\u0027]"},{"line_number":286,"context_line":"            temp[project_id] \u003d int(statmap[key])"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        # Track number of instances in certain vm_states"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FuNo%3D","line":285,"updated":"2013-07-12 13:09:13.000000000","message":"does this work?","commit_id":"26bd39a0b5df0ebd390829e2609b46cc4ccfe066"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"d811ba575f51d4327701f60eec02996111e0964e","unresolved":false,"context_lines":[{"line_number":282,"context_line":"                k.startswith(\"num_proj_\")]"},{"line_number":283,"context_line":"        for key in project_id_keys:"},{"line_number":284,"context_line":"            project_id \u003d key[9:]"},{"line_number":285,"context_line":"            temp \u003d self.stats[\u0027num_instances_by_project\u0027]"},{"line_number":286,"context_line":"            temp[project_id] \u003d int(statmap[key])"},{"line_number":287,"context_line":""},{"line_number":288,"context_line":"        # Track number of instances in certain vm_states"}],"source_content_type":"text/x-python","patch_set":6,"id":"AAAAP3%2F%2FqaI%3D","line":285,"in_reply_to":"AAAAP3%2F%2FuNo%3D","updated":"2013-07-15 02:01:43.000000000","message":"This is meant to avoid pep8 \u0027line too long\u0027 error.","commit_id":"26bd39a0b5df0ebd390829e2609b46cc4ccfe066"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"0b57888b92799985bde56df5eb126ae2c04b1fde","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # Resource oversubscription values for the compute host:"},{"line_number":184,"context_line":"        self.limits \u003d {}"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        # Generic metrics for the cmopute host"},{"line_number":187,"context_line":"        self.metrics \u003d {}"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.updated \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2FjrI%3D","line":186,"updated":"2013-07-29 08:59:19.000000000","message":"compute","commit_id":"e58a66d104753475dd0416910bcdfb5297196edc"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5019952fa07aa632d31d0edae489ca27ae27ef93","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        # Resource oversubscription values for the compute host:"},{"line_number":184,"context_line":"        self.limits \u003d {}"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"        # Generic metrics for the cmopute host"},{"line_number":187,"context_line":"        self.metrics \u003d {}"},{"line_number":188,"context_line":""},{"line_number":189,"context_line":"        self.updated \u003d None"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAQn%2F%2Fjd8%3D","line":186,"in_reply_to":"AAAAQn%2F%2FjrI%3D","updated":"2013-07-29 10:48:18.000000000","message":"Done","commit_id":"e58a66d104753475dd0416910bcdfb5297196edc"},{"author":{"_account_id":4992,"name":"malini-k-bhandaru","email":"malini.k.bhandaru@intel.com","username":"malini-k-bhandaru"},"change_message_id":"eff9a8849f7dbd8139a9844d2fc4d4b3891e7f0d","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    def update(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":101,"context_line":"        self.value \u003d value"},{"line_number":102,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":103,"context_line":"        self.source \u003d source"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"    def __eq__(self, other):"}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAARH%2F%2F%2Bps%3D","line":102,"updated":"2013-08-14 09:35:35.000000000","message":"Do we want to provide current time in case the timestamp object is None? Perhaps have _update_metrics_from_compute_node(self, compute): compute current-timestamp and pass it in as a default for timestamp when it is null (so one single value for all updates that carry no such information). Like:\nmetric[\u0027timestamp\u0027] || current-timestamp.\nPerhaps you always send in timestamp from the compute nodes and hence not dealing with that scenario here?","commit_id":"b8eb3923c3bab01e4e0163165313c18e8672ea79"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"2ed1ebe00a765a946d240558f601837755af9ca6","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            raise TypeError()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class MetricItem(object):"},{"line_number":97,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":98,"context_line":"        self.update(value, timestamp, source)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAASn%2F%2F3zY%3D","line":96,"updated":"2013-08-28 15:51:10.000000000","message":"Do all these overloaded operator methods get used anywhere?","commit_id":"bdfb2b46f10ddaf53331caad41141c62cd0a8ef1"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"c1eb06dd91dd24d9b10e2aef4ff82a8f1b2f8bac","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            raise TypeError()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class MetricItem(object):"},{"line_number":97,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":98,"context_line":"        self.update(value, timestamp, source)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAASn%2F%2FiJg%3D","line":96,"in_reply_to":"AAAASn%2F%2F1Vc%3D","updated":"2013-09-03 18:44:16.000000000","message":"Scheduler hints is probably a bad example to use since most of would like to see less use of scheduler hints rather than more.\n\nThe code\u0027s pretty simple.  Just all things considered, if it\u0027s not used, I\u0027d rather see it go away.","commit_id":"bdfb2b46f10ddaf53331caad41141c62cd0a8ef1"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"c8c48458f51bcc71b536d96dc957ee3396c303f3","unresolved":false,"context_lines":[{"line_number":93,"context_line":"            raise TypeError()"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"class MetricItem(object):"},{"line_number":97,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":98,"context_line":"        self.update(value, timestamp, source)"},{"line_number":99,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"AAAASn%2F%2F1Vc%3D","line":96,"in_reply_to":"AAAASn%2F%2F3zY%3D","updated":"2013-08-29 01:20:12.000000000","message":"These overloaded operator enables the metrics could be used by existing scheduler filters, e.g. jsonfilter. The user may specify the following as the scheduler_hint:\n\n\u0027os:scheduler_hints\u0027: {\n        \u0027query\u0027: \u0027[\"\u003e\u003d\",\"$metrics.foo\",1024]\u0027,\n    }\n\nThis means find the host with host_state.metrics[\u0027foo\u0027].value\u003e\u003d1024.\n\nMaybe I should add some description in the code.","commit_id":"bdfb2b46f10ddaf53331caad41141c62cd0a8ef1"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1c1c55385588abe619180abfff9af56b2ab031d9","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    existing scheduler filters, i.e. jsonfilter. For example, the"},{"line_number":100,"context_line":"    user may specify the following as the scheduler_hints:"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    \u0027os:scheduler_hints\u0027: {"},{"line_number":103,"context_line":"        \u0027query\u0027: \u0027[\"\u003e\u003d\",\"$metrics.foo\",1024]\u0027,"},{"line_number":104,"context_line":"    }"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAASn%2F%2FiHg%3D","line":102,"updated":"2013-09-03 18:47:28.000000000","message":"Left comment on an earlier revision, but are there use cases besides scheduler hints?  I don\u0027t think we want to add more capabilities to scheduler hints.  The general trend in reviews has been to back away from hints.","commit_id":"7611a9c761db34a7c045f7be8c05276138b957df"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"8eb2da07802aef6b4d151bfc1a064ab9d633556c","unresolved":false,"context_lines":[{"line_number":99,"context_line":"    existing scheduler filters, i.e. jsonfilter. For example, the"},{"line_number":100,"context_line":"    user may specify the following as the scheduler_hints:"},{"line_number":101,"context_line":""},{"line_number":102,"context_line":"    \u0027os:scheduler_hints\u0027: {"},{"line_number":103,"context_line":"        \u0027query\u0027: \u0027[\"\u003e\u003d\",\"$metrics.foo\",1024]\u0027,"},{"line_number":104,"context_line":"    }"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":22,"id":"AAAASn%2F%2FgHs%3D","line":102,"in_reply_to":"AAAASn%2F%2FiHg%3D","updated":"2013-09-04 01:44:01.000000000","message":"Current no. These operators are here because I think it could be leveraged by the existing jsonfilter. I\u0027ll remove these for now.","commit_id":"7611a9c761db34a7c045f7be8c05276138b957df"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fdf086a031b2e7a5996a2f563be4b41e87c11f08","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.service \u003d ReadOnlyDict(service)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _update_metrics_from_compute_node(self, compute):"},{"line_number":169,"context_line":"        metrics \u003d compute.get(\u0027metrics\u0027, []) or []"},{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F7Kk%3D","line":169,"updated":"2013-10-25 06:15:05.000000000","message":"nit: I don\u0027t think the or [] doesn\u0027t do anything here?","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"9d0bf5acf419eb01cde4e423c6a4fa24b06c725a","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.service \u003d ReadOnlyDict(service)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _update_metrics_from_compute_node(self, compute):"},{"line_number":169,"context_line":"        metrics \u003d compute.get(\u0027metrics\u0027, []) or []"},{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F7Ik%3D","line":169,"in_reply_to":"AAAATn%2F%2F7KM%3D","updated":"2013-10-25 06:27:55.000000000","message":"Ah, sorry thanks for the explanation.","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":91,"name":"Alvaro","email":"aloga@ifca.unican.es","username":"aloga"},"change_message_id":"baba50d0406e940082ce9731588dab85e803eaee","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.service \u003d ReadOnlyDict(service)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _update_metrics_from_compute_node(self, compute):"},{"line_number":169,"context_line":"        metrics \u003d compute.get(\u0027metrics\u0027, []) or []"},{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2FPec%3D","line":169,"in_reply_to":"AAAATn%2F%2F7KM%3D","updated":"2013-11-12 11:44:57.000000000","message":"Could you add a NOTE about this situation, so that nobody will remove this in the future?","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"42596b300acf098a2a7988b57ae092eb194e02f2","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.service \u003d ReadOnlyDict(service)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _update_metrics_from_compute_node(self, compute):"},{"line_number":169,"context_line":"        metrics \u003d compute.get(\u0027metrics\u0027, []) or []"},{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F7KM%3D","line":169,"in_reply_to":"AAAATn%2F%2F7Kk%3D","updated":"2013-10-25 06:22:14.000000000","message":"The [] is to avoid the json decode failure caused by the None returned by compute.get(), because the DB schema allow NULL in the metrics column.","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"b916b1c0af9f2e740cecaf0f59abce6b8352bdcd","unresolved":false,"context_lines":[{"line_number":166,"context_line":"        self.service \u003d ReadOnlyDict(service)"},{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def _update_metrics_from_compute_node(self, compute):"},{"line_number":169,"context_line":"        metrics \u003d compute.get(\u0027metrics\u0027, []) or []"},{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2FMjs%3D","line":169,"in_reply_to":"AAAATn%2F%2FPec%3D","updated":"2013-11-13 03:46:39.000000000","message":"Done","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"fdf086a031b2e7a5996a2f563be4b41e87c11f08","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"},{"line_number":173,"context_line":"            name \u003d metric.get(\u0027name\u0027, None)"},{"line_number":174,"context_line":"            if name in self.metrics:"},{"line_number":175,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":176,"context_line":"                                          metric[\u0027timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2F7Kc%3D","line":173,"updated":"2013-10-25 06:15:05.000000000","message":"nit: , None) unneeded","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"b916b1c0af9f2e740cecaf0f59abce6b8352bdcd","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        if metrics:"},{"line_number":171,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":172,"context_line":"        for metric in metrics:"},{"line_number":173,"context_line":"            name \u003d metric.get(\u0027name\u0027, None)"},{"line_number":174,"context_line":"            if name in self.metrics:"},{"line_number":175,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":176,"context_line":"                                          metric[\u0027timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":26,"id":"AAAATn%2F%2FMjk%3D","line":173,"in_reply_to":"AAAATn%2F%2F7Kc%3D","updated":"2013-11-13 03:46:39.000000000","message":"Done","commit_id":"fdf22633b135b9107a6234351a2d4529055db371"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1bac82e4b70fb721cd08f3059177695c0e7db09d","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class MetricItem(object):"},{"line_number":99,"context_line":"    \"\"\"Metric item came from compute node.\"\"\""},{"line_number":100,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":101,"context_line":"        self.update(value, timestamp, source)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FJso%3D","line":99,"updated":"2013-11-13 18:10:20.000000000","message":"A little awkward.  Maybe this instead:\n\n\"\"\"Representation of a single metric value from a compute node.\"\"\"","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":96,"context_line":""},{"line_number":97,"context_line":""},{"line_number":98,"context_line":"class MetricItem(object):"},{"line_number":99,"context_line":"    \"\"\"Metric item came from compute node.\"\"\""},{"line_number":100,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":101,"context_line":"        self.update(value, timestamp, source)"},{"line_number":102,"context_line":""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FISU%3D","line":99,"in_reply_to":"AAAATn%2F%2FJso%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1bac82e4b70fb721cd08f3059177695c0e7db09d","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":101,"context_line":"        self.update(value, timestamp, source)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def update(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":104,"context_line":"        self.value \u003d value"},{"line_number":105,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":106,"context_line":"        self.source \u003d source"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FJs0%3D","line":103,"updated":"2013-11-13 18:10:20.000000000","message":"I\u0027m not sure I would bother to have this setter method, but not a huge deal.","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":100,"context_line":"    def __init__(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":101,"context_line":"        self.update(value, timestamp, source)"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":"    def update(self, value\u003dNone, timestamp\u003dNone, source\u003dNone):"},{"line_number":104,"context_line":"        self.value \u003d value"},{"line_number":105,"context_line":"        self.timestamp \u003d timestamp"},{"line_number":106,"context_line":"        self.source \u003d source"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIR8%3D","line":103,"in_reply_to":"AAAATn%2F%2FJs0%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"11901e7fca903a52dde96d011ab22fbbdd9a6e68","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def __repr__(self):"},{"line_number":109,"context_line":"        return (\"value:%s timestamp:%s source:%s\" %"},{"line_number":110,"context_line":"                (self.value, self.timestamp, self.source)"},{"line_number":111,"context_line":"               )"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class HostState(object):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FK9Y%3D","line":111,"updated":"2013-11-13 12:10:09.000000000","message":"Why not put this \")\" to above line? I think there is no need to create a new line.","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def __repr__(self):"},{"line_number":109,"context_line":"        return (\"value:%s timestamp:%s source:%s\" %"},{"line_number":110,"context_line":"                (self.value, self.timestamp, self.source)"},{"line_number":111,"context_line":"               )"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"class HostState(object):"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FISM%3D","line":111,"in_reply_to":"AAAATn%2F%2FK9Y%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1bac82e4b70fb721cd08f3059177695c0e7db09d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # Resource oversubscription values for the compute host:"},{"line_number":151,"context_line":"        self.limits \u003d {}"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Generic metrics for the compute host"},{"line_number":154,"context_line":"        self.metrics \u003d {}"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        self.updated \u003d None"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FJsU%3D","line":153,"updated":"2013-11-13 18:10:20.000000000","message":"# Generic metrics from compute nodes","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # Resource oversubscription values for the compute host:"},{"line_number":151,"context_line":"        self.limits \u003d {}"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Generic metrics for the compute host"},{"line_number":154,"context_line":"        self.metrics \u003d {}"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        self.updated \u003d None"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIR0%3D","line":153,"in_reply_to":"AAAATn%2F%2FJsU%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1bac82e4b70fb721cd08f3059177695c0e7db09d","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        if metrics:"},{"line_number":174,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":175,"context_line":"        for metric in metrics:"},{"line_number":176,"context_line":"            name \u003d metric.get(\u0027name\u0027)"},{"line_number":177,"context_line":"            if name in self.metrics:"},{"line_number":178,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":179,"context_line":"                                          metric[\u0027timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FJrk%3D","line":176,"updated":"2013-11-13 18:10:20.000000000","message":"Is it possible to have an un-named metric or is this a required field?  If it\u0027s required and missing then it might make sense to log a warning.","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        if metrics:"},{"line_number":174,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":175,"context_line":"        for metric in metrics:"},{"line_number":176,"context_line":"            name \u003d metric.get(\u0027name\u0027)"},{"line_number":177,"context_line":"            if name in self.metrics:"},{"line_number":178,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":179,"context_line":"                                          metric[\u0027timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIRo%3D","line":176,"in_reply_to":"AAAATn%2F%2FJrk%3D","updated":"2013-11-14 04:50:20.000000000","message":"It\u0027s required. We have other pending patches to make sure the plugins get the metric data populate the name field. I\u0027ll add the log warning.","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"1bac82e4b70fb721cd08f3059177695c0e7db09d","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        for metric in metrics:"},{"line_number":176,"context_line":"            name \u003d metric.get(\u0027name\u0027)"},{"line_number":177,"context_line":"            if name in self.metrics:"},{"line_number":178,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":179,"context_line":"                                          metric[\u0027timestamp\u0027],"},{"line_number":180,"context_line":"                                          metric[\u0027source\u0027]"},{"line_number":181,"context_line":"                                         )"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FJr8%3D","line":178,"updated":"2013-11-13 18:10:20.000000000","message":"You could just make MetricItem immutable with read-only properties and always construct a new instance.  Then you don\u0027t need an else clause","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        for metric in metrics:"},{"line_number":176,"context_line":"            name \u003d metric.get(\u0027name\u0027)"},{"line_number":177,"context_line":"            if name in self.metrics:"},{"line_number":178,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":179,"context_line":"                                          metric[\u0027timestamp\u0027],"},{"line_number":180,"context_line":"                                          metric[\u0027source\u0027]"},{"line_number":181,"context_line":"                                         )"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIRM%3D","line":178,"in_reply_to":"AAAATn%2F%2FJr8%3D","updated":"2013-11-14 04:50:20.000000000","message":"Good point. I\u0027ll make the MetricItem as a namedtuple.","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"11901e7fca903a52dde96d011ab22fbbdd9a6e68","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":179,"context_line":"                                          metric[\u0027timestamp\u0027],"},{"line_number":180,"context_line":"                                          metric[\u0027source\u0027]"},{"line_number":181,"context_line":"                                         )"},{"line_number":182,"context_line":"            elif name:"},{"line_number":183,"context_line":"                self.metrics[name] \u003d MetricItem(metric[\u0027value\u0027],"},{"line_number":184,"context_line":"                                                metric[\u0027timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FK9E%3D","line":181,"updated":"2013-11-13 12:10:09.000000000","message":"ditto","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":178,"context_line":"                self.metrics[name].update(metric[\u0027value\u0027],"},{"line_number":179,"context_line":"                                          metric[\u0027timestamp\u0027],"},{"line_number":180,"context_line":"                                          metric[\u0027source\u0027]"},{"line_number":181,"context_line":"                                         )"},{"line_number":182,"context_line":"            elif name:"},{"line_number":183,"context_line":"                self.metrics[name] \u003d MetricItem(metric[\u0027value\u0027],"},{"line_number":184,"context_line":"                                                metric[\u0027timestamp\u0027],"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIRw%3D","line":181,"in_reply_to":"AAAATn%2F%2FK9E%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"11901e7fca903a52dde96d011ab22fbbdd9a6e68","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                self.metrics[name] \u003d MetricItem(metric[\u0027value\u0027],"},{"line_number":184,"context_line":"                                                metric[\u0027timestamp\u0027],"},{"line_number":185,"context_line":"                                                metric[\u0027source\u0027]"},{"line_number":186,"context_line":"                                               )"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def update_from_compute_node(self, compute):"},{"line_number":189,"context_line":"        \"\"\"Update information about a host from its compute_node info.\"\"\""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FK9A%3D","line":186,"updated":"2013-11-13 12:10:09.000000000","message":"ditto","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":183,"context_line":"                self.metrics[name] \u003d MetricItem(metric[\u0027value\u0027],"},{"line_number":184,"context_line":"                                                metric[\u0027timestamp\u0027],"},{"line_number":185,"context_line":"                                                metric[\u0027source\u0027]"},{"line_number":186,"context_line":"                                               )"},{"line_number":187,"context_line":""},{"line_number":188,"context_line":"    def update_from_compute_node(self, compute):"},{"line_number":189,"context_line":"        \"\"\"Update information about a host from its compute_node info.\"\"\""}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIRs%3D","line":186,"in_reply_to":"AAAATn%2F%2FK9A%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"30220d65fbd76b540c07d7f67b3a014e18164d5b","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"\"\"\"Representation of a single metric value from a compute node.\"\"\""},{"line_number":100,"context_line":"MetricItem \u003d collections.namedtuple("},{"line_number":101,"context_line":"             \u0027MetricItem\u0027, [\u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAATn%2F%2FEf8%3D","line":100,"updated":"2013-11-14 20:30:18.000000000","message":"I like this.","commit_id":"d0bdb3ab6918b86e618ffd25ef1940e6fdd80b40"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f7858dc880b04401f20c54c0726cb78add0f98a0","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"\"\"\"Representation of a single metric value from a compute node.\"\"\""},{"line_number":100,"context_line":"MetricItem \u003d collections.namedtuple("},{"line_number":101,"context_line":"             \u0027MetricItem\u0027, [\u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAATn%2F%2BiJQ%3D","line":100,"in_reply_to":"AAAATn%2F%2BlZc%3D","updated":"2013-11-25 02:07:21.000000000","message":"Done","commit_id":"d0bdb3ab6918b86e618ffd25ef1940e6fdd80b40"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"771b674f2cb4c6c2dddc998a2bec55b20121cfb0","unresolved":false,"context_lines":[{"line_number":97,"context_line":""},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"\"\"\"Representation of a single metric value from a compute node.\"\"\""},{"line_number":100,"context_line":"MetricItem \u003d collections.namedtuple("},{"line_number":101,"context_line":"             \u0027MetricItem\u0027, [\u0027value\u0027, \u0027timestamp\u0027, \u0027source\u0027])"},{"line_number":102,"context_line":""},{"line_number":103,"context_line":""}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAATn%2F%2BlZc%3D","line":100,"in_reply_to":"AAAATn%2F%2FEf8%3D","updated":"2013-11-22 19:51:21.000000000","message":"I like the namedtuple also, but the triple-quoted string above it should be converted to a comment…","commit_id":"d0bdb3ab6918b86e618ffd25ef1940e6fdd80b40"},{"author":{"_account_id":2835,"name":"Brian Elliott","email":"bdelliott@gmail.com","username":"belliott"},"change_message_id":"30220d65fbd76b540c07d7f67b3a014e18164d5b","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            if name:"},{"line_number":171,"context_line":"                self.metrics[name] \u003d item"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                LOG.warn(_(\"Metric name unknown of %r\") % item)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def update_from_compute_node(self, compute):"},{"line_number":176,"context_line":"        \"\"\"Update information about a host from its compute_node info.\"\"\""}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAATn%2F%2FEgA%3D","line":173,"updated":"2013-11-14 20:30:18.000000000","message":"You know, I take back my previous comment.  It seems like name, value, timestamp, and source are all required.  It might be simpler to just let a KeyError happen if any are missing. (or validate all 4)","commit_id":"d0bdb3ab6918b86e618ffd25ef1940e6fdd80b40"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"f7858dc880b04401f20c54c0726cb78add0f98a0","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            if name:"},{"line_number":171,"context_line":"                self.metrics[name] \u003d item"},{"line_number":172,"context_line":"            else:"},{"line_number":173,"context_line":"                LOG.warn(_(\"Metric name unknown of %r\") % item)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def update_from_compute_node(self, compute):"},{"line_number":176,"context_line":"        \"\"\"Update information about a host from its compute_node info.\"\"\""}],"source_content_type":"text/x-python","patch_set":30,"id":"AAAATn%2F%2BiHY%3D","line":173,"in_reply_to":"AAAATn%2F%2FEgA%3D","updated":"2013-11-25 02:07:21.000000000","message":"Done","commit_id":"d0bdb3ab6918b86e618ffd25ef1940e6fdd80b40"},{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"0628cda7279a5a3ed39c598d734cef41c4a55062","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":165,"context_line":"        for metric in metrics:"},{"line_number":166,"context_line":"            # \u0027name\u0027, \u0027value\u0027, \u0027timestamp\u0027 and \u0027source\u0027 are all required"},{"line_number":167,"context_line":"            # to be valid keys, just let KeyError happend if any one of"},{"line_number":168,"context_line":"            # them is missing. But we also require \u0027name\u0027 to be True."},{"line_number":169,"context_line":"            name \u003d metric[\u0027name\u0027]"},{"line_number":170,"context_line":"            item \u003d MetricItem(value\u003dmetric[\u0027value\u0027],"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAATn%2F%2BdVY%3D","line":167,"updated":"2013-11-25 20:37:17.000000000","message":"femtonit: s/happend/happen/\n\nMicro English lesson: The verb \"happen\" is the present tense, which tends to be the tense used in comments such as this.  The verb \"happened\" is the past tense of \"happen\".","commit_id":"32da9b2b99c4ada2965774f602f1f0b8e946c09c"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"68ebf74fc303e53e5ad050c0f916c52167a55503","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            metrics \u003d jsonutils.loads(metrics)"},{"line_number":165,"context_line":"        for metric in metrics:"},{"line_number":166,"context_line":"            # \u0027name\u0027, \u0027value\u0027, \u0027timestamp\u0027 and \u0027source\u0027 are all required"},{"line_number":167,"context_line":"            # to be valid keys, just let KeyError happend if any one of"},{"line_number":168,"context_line":"            # them is missing. But we also require \u0027name\u0027 to be True."},{"line_number":169,"context_line":"            name \u003d metric[\u0027name\u0027]"},{"line_number":170,"context_line":"            item \u003d MetricItem(value\u003dmetric[\u0027value\u0027],"}],"source_content_type":"text/x-python","patch_set":31,"id":"AAAATn%2F%2BcPs%3D","line":167,"in_reply_to":"AAAATn%2F%2BdVY%3D","updated":"2013-11-26 02:51:08.000000000","message":"Sorry for the grammar error. I\u0027ll cook another patch which depends on this one to correct it.","commit_id":"32da9b2b99c4ada2965774f602f1f0b8e946c09c"}],"nova/tests/scheduler/test_host_manager.py":[{"author":{"_account_id":679,"name":"Kevin L. Mitchell","email":"klmitch@mit.edu","username":"klmitch"},"change_message_id":"80ae28b91f0225abce1e54189ed3b7a29ed50700","unresolved":false,"context_lines":[{"line_number":510,"context_line":""},{"line_number":511,"context_line":"    def test_resources_consumption_from_compute_node(self):"},{"line_number":512,"context_line":"        metrics \u003d ["},{"line_number":513,"context_line":"            dict(name\u003d\u0027res1\u0027,"},{"line_number":514,"context_line":"                 value\u003d1.0,"},{"line_number":515,"context_line":"                 source\u003d\u0027source1\u0027,"},{"line_number":516,"context_line":"                 timestamp\u003dNone"}],"source_content_type":"text/x-python","patch_set":24,"id":"AAAATH%2F%2FIGY%3D","line":513,"updated":"2013-10-22 19:45:38.000000000","message":"I suggest using a dict literal ({\u0027name\u0027: \u0027res1\u0027, …}) rather than calling the dict constructor (femtonit)","commit_id":"4fc77eab18dbc974010c51f1787b3895f438e7f8"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"11901e7fca903a52dde96d011ab22fbbdd9a6e68","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                 value\u003d1.0,"},{"line_number":521,"context_line":"                 source\u003d\u0027source1\u0027,"},{"line_number":522,"context_line":"                 timestamp\u003dNone"},{"line_number":523,"context_line":"                ),"},{"line_number":524,"context_line":"            dict(name\u003d\u0027res2\u0027,"},{"line_number":525,"context_line":"                 value\u003d\"string2\","},{"line_number":526,"context_line":"                 source\u003d\u0027source2\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FK80%3D","line":523,"updated":"2013-11-13 12:10:09.000000000","message":"ditto","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":520,"context_line":"                 value\u003d1.0,"},{"line_number":521,"context_line":"                 source\u003d\u0027source1\u0027,"},{"line_number":522,"context_line":"                 timestamp\u003dNone"},{"line_number":523,"context_line":"                ),"},{"line_number":524,"context_line":"            dict(name\u003d\u0027res2\u0027,"},{"line_number":525,"context_line":"                 value\u003d\"string2\","},{"line_number":526,"context_line":"                 source\u003d\u0027source2\u0027,"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIMk%3D","line":523,"in_reply_to":"AAAATn%2F%2FK80%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"11901e7fca903a52dde96d011ab22fbbdd9a6e68","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                 value\u003d\"string2\","},{"line_number":526,"context_line":"                 source\u003d\u0027source2\u0027,"},{"line_number":527,"context_line":"                 timestamp\u003dNone"},{"line_number":528,"context_line":"                ),"},{"line_number":529,"context_line":"        ]"},{"line_number":530,"context_line":"        hyper_ver_int \u003d utils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":531,"context_line":"        compute \u003d dict(metrics\u003djsonutils.dumps(metrics),"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FK8w%3D","line":528,"updated":"2013-11-13 12:10:09.000000000","message":"ditto","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":525,"context_line":"                 value\u003d\"string2\","},{"line_number":526,"context_line":"                 source\u003d\u0027source2\u0027,"},{"line_number":527,"context_line":"                 timestamp\u003dNone"},{"line_number":528,"context_line":"                ),"},{"line_number":529,"context_line":"        ]"},{"line_number":530,"context_line":"        hyper_ver_int \u003d utils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":531,"context_line":"        compute \u003d dict(metrics\u003djsonutils.dumps(metrics),"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIMg%3D","line":528,"in_reply_to":"AAAATn%2F%2FK8w%3D","updated":"2013-11-14 04:50:20.000000000","message":"Done","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":7494,"name":"Guangya Liu","email":"gyliu513@gmail.com","username":"JayLau"},"change_message_id":"11901e7fca903a52dde96d011ab22fbbdd9a6e68","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                 source\u003d\u0027source2\u0027,"},{"line_number":527,"context_line":"                 timestamp\u003dNone"},{"line_number":528,"context_line":"                ),"},{"line_number":529,"context_line":"        ]"},{"line_number":530,"context_line":"        hyper_ver_int \u003d utils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":531,"context_line":"        compute \u003d dict(metrics\u003djsonutils.dumps(metrics),"},{"line_number":532,"context_line":"                       memory_mb\u003d0, free_disk_gb\u003d0, local_gb\u003d0,"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FK8o%3D","line":529,"updated":"2013-11-13 12:10:09.000000000","message":"ditto","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"5d0d6517a165445d3409969eeb3ba7222988fff1","unresolved":false,"context_lines":[{"line_number":526,"context_line":"                 source\u003d\u0027source2\u0027,"},{"line_number":527,"context_line":"                 timestamp\u003dNone"},{"line_number":528,"context_line":"                ),"},{"line_number":529,"context_line":"        ]"},{"line_number":530,"context_line":"        hyper_ver_int \u003d utils.convert_version_to_int(\u00276.0.0\u0027)"},{"line_number":531,"context_line":"        compute \u003d dict(metrics\u003djsonutils.dumps(metrics),"},{"line_number":532,"context_line":"                       memory_mb\u003d0, free_disk_gb\u003d0, local_gb\u003d0,"}],"source_content_type":"text/x-python","patch_set":29,"id":"AAAATn%2F%2FIMM%3D","line":529,"in_reply_to":"AAAATn%2F%2FK8o%3D","updated":"2013-11-14 04:50:20.000000000","message":"Here I just followed http://docs.openstack.org/developer/hacking/#dictionaries-lists","commit_id":"a34e39a7f6713608fb272dca6cad447ace97a96f"}]}
