)]}'
{"ceilometer/pipeline.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdc053c1e3bb93dfef90f46a51f46d6442b794f6","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return default"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def check_sinks(self, sinks):"},{"line_number":175,"context_line":"        for sink in self.sinks:"},{"line_number":176,"context_line":"            if sink not in sinks:"},{"line_number":177,"context_line":"                raise PipelineException(\"Unknown sink %s specified\" % sink,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FhUg%3D","line":174,"updated":"2014-02-26 06:21:59.000000000","message":"maybe we should raise exception if there is no sinks defined in the source? Because I don\u0027t thinks there is any necessary to define a source without any sink.","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f64fe6d3c05133fb5fca4078910f3c05585263cd","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return default"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def check_sinks(self, sinks):"},{"line_number":175,"context_line":"        for sink in self.sinks:"},{"line_number":176,"context_line":"            if sink not in sinks:"},{"line_number":177,"context_line":"                raise PipelineException(\"Unknown sink %s specified\" % sink,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F8zI%3D","line":174,"in_reply_to":"AAAAU3%2F%2FhUg%3D","updated":"2014-02-27 07:22:01.000000000","message":"Yep, good point, I\u0027ll achieve that by changing line 99 from:\n\n  self.sinks \u003d cfg.get(\u0027sinks\u0027)\n\nto:\n\n  self.sinks \u003d cfg[\u0027sinks\u0027]\n\nand then use the generic KeyError catching logic.","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"506f87b8344deae4cc684fe389dc847fbb59de67","unresolved":false,"context_lines":[{"line_number":171,"context_line":""},{"line_number":172,"context_line":"        return default"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"    def check_sinks(self, sinks):"},{"line_number":175,"context_line":"        for sink in self.sinks:"},{"line_number":176,"context_line":"            if sink not in sinks:"},{"line_number":177,"context_line":"                raise PipelineException(\"Unknown sink %s specified\" % sink,"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F7NA%3D","line":174,"in_reply_to":"AAAAVX%2F%2F8zI%3D","updated":"2014-02-27 10:38:22.000000000","message":"Actually scratch the above point, it doesn\u0027t make sense to require that \u0027sinks\u0027 be present in the Source.__init__() in the deprecated case.","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdc053c1e3bb93dfef90f46a51f46d6442b794f6","unresolved":false,"context_lines":[{"line_number":489,"context_line":"            for source in sources:"},{"line_number":490,"context_line":"                source.check_sinks(sinks)"},{"line_number":491,"context_line":"                for target in source.sinks:"},{"line_number":492,"context_line":"                    if target not in sinks:"},{"line_number":493,"context_line":"                        raise PipelineException("},{"line_number":494,"context_line":"                            \"Dangling sink %s from source %s\" %"},{"line_number":495,"context_line":"                            (target, source),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FhQs%3D","line":492,"updated":"2014-02-26 06:21:59.000000000","message":"Is this doing the same thing as the line 490?","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f64fe6d3c05133fb5fca4078910f3c05585263cd","unresolved":false,"context_lines":[{"line_number":489,"context_line":"            for source in sources:"},{"line_number":490,"context_line":"                source.check_sinks(sinks)"},{"line_number":491,"context_line":"                for target in source.sinks:"},{"line_number":492,"context_line":"                    if target not in sinks:"},{"line_number":493,"context_line":"                        raise PipelineException("},{"line_number":494,"context_line":"                            \"Dangling sink %s from source %s\" %"},{"line_number":495,"context_line":"                            (target, source),"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F8yQ%3D","line":492,"in_reply_to":"AAAAU3%2F%2FhQs%3D","updated":"2014-02-27 07:22:01.000000000","message":"Yep, I factored out that logic to check_sinks but left a remnant of the original in place.\n\nWell spotted! I\u0027ll remove.","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"78fb1a10f20e8a8e786e51ff0237ae8e2d5341b7","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    # (yjiang5) To support meters like instance:m1.tiny,"},{"line_number":141,"context_line":"    # which include variable part at the end starting with \u0027:\u0027."},{"line_number":142,"context_line":"    # Hope we will not add such meters in future."},{"line_number":143,"context_line":"    def _variable_meter_name(self, name):"},{"line_number":144,"context_line":"        m \u003d name.partition(\u0027:\u0027)"},{"line_number":145,"context_line":"        if m[1] \u003d\u003d \u0027:\u0027:"},{"line_number":146,"context_line":"            return m[1].join((m[0], \u0027*\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FvvA%3D","line":143,"updated":"2014-03-03 16:43:56.000000000","message":"add @staticmethod while you\u0027re at it.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":140,"context_line":"    # (yjiang5) To support meters like instance:m1.tiny,"},{"line_number":141,"context_line":"    # which include variable part at the end starting with \u0027:\u0027."},{"line_number":142,"context_line":"    # Hope we will not add such meters in future."},{"line_number":143,"context_line":"    def _variable_meter_name(self, name):"},{"line_number":144,"context_line":"        m \u003d name.partition(\u0027:\u0027)"},{"line_number":145,"context_line":"        if m[1] \u003d\u003d \u0027:\u0027:"},{"line_number":146,"context_line":"            return m[1].join((m[0], \u0027*\u0027))"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1YA%3D","line":143,"in_reply_to":"AAAAVX%2F%2FvvA%3D","updated":"2014-03-03 22:01:20.000000000","message":"Pre-existing code that I simply moved around, but yeah, fair enough.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"78fb1a10f20e8a8e786e51ff0237ae8e2d5341b7","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def support_meter(self, meter_name):"},{"line_number":151,"context_line":"        meter_name \u003d self._variable_meter_name(meter_name)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Special case: if we only have negation, we suppose the default it"},{"line_number":154,"context_line":"        # allow"},{"line_number":155,"context_line":"        if all(meter.startswith(\u0027!\u0027) for meter in self.meters):"},{"line_number":156,"context_line":"            default \u003d True"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2Fvs4%3D","line":153,"updated":"2014-03-03 16:43:56.000000000","message":"s/it/is/","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":150,"context_line":"    def support_meter(self, meter_name):"},{"line_number":151,"context_line":"        meter_name \u003d self._variable_meter_name(meter_name)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Special case: if we only have negation, we suppose the default it"},{"line_number":154,"context_line":"        # allow"},{"line_number":155,"context_line":"        if all(meter.startswith(\u0027!\u0027) for meter in self.meters):"},{"line_number":156,"context_line":"            default \u003d True"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1YE%3D","line":153,"in_reply_to":"AAAAVX%2F%2Fvs4%3D","updated":"2014-03-03 22:01:20.000000000","message":"Pre-existing comment that I simply moved around, but yeah, fair enough.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"78fb1a10f20e8a8e786e51ff0237ae8e2d5341b7","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Special case: if we only have negation, we suppose the default it"},{"line_number":154,"context_line":"        # allow"},{"line_number":155,"context_line":"        if all(meter.startswith(\u0027!\u0027) for meter in self.meters):"},{"line_number":156,"context_line":"            default \u003d True"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            default \u003d False"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2Fvsw%3D","line":155,"updated":"2014-03-03 16:43:56.000000000","message":"default \u003d all(...)\n\nAlso not sure why you compute default before needing it.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        # Special case: if we only have negation, we suppose the default it"},{"line_number":154,"context_line":"        # allow"},{"line_number":155,"context_line":"        if all(meter.startswith(\u0027!\u0027) for meter in self.meters):"},{"line_number":156,"context_line":"            default \u003d True"},{"line_number":157,"context_line":"        else:"},{"line_number":158,"context_line":"            default \u003d False"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1X4%3D","line":155,"in_reply_to":"AAAAVX%2F%2Fvsw%3D","updated":"2014-03-03 22:01:20.000000000","message":"Pre-existing code that I simply moved around, but yeah, fair enough.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def check_sinks(self, sinks):"},{"line_number":175,"context_line":"        if not self.sinks:"},{"line_number":176,"context_line":"            raise PipelineException("},{"line_number":177,"context_line":"                \"No sink definied in source %s\" % self,"},{"line_number":178,"context_line":"                self.cfg)"},{"line_number":179,"context_line":"        for sink in self.sinks:"},{"line_number":180,"context_line":"            if sink not in sinks:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FtWs%3D","line":177,"updated":"2014-02-28 21:41:23.000000000","message":"s/definied/defined/","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":174,"context_line":"    def check_sinks(self, sinks):"},{"line_number":175,"context_line":"        if not self.sinks:"},{"line_number":176,"context_line":"            raise PipelineException("},{"line_number":177,"context_line":"                \"No sink definied in source %s\" % self,"},{"line_number":178,"context_line":"                self.cfg)"},{"line_number":179,"context_line":"        for sink in self.sinks:"},{"line_number":180,"context_line":"            if sink not in sinks:"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1fo%3D","line":177,"in_reply_to":"AAAAVX%2F%2FtWs%3D","updated":"2014-03-03 22:01:20.000000000","message":"Done","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":1669,"name":"Julien Danjou","display_name":"jd","email":"julien@danjou.info","username":"jdanjou"},"change_message_id":"78fb1a10f20e8a8e786e51ff0237ae8e2d5341b7","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        try:"},{"line_number":217,"context_line":"            self.name \u003d cfg[\u0027name\u0027]"},{"line_number":218,"context_line":"            # It\u0027s legal to have no transformer specified"},{"line_number":219,"context_line":"            self.transformer_cfg \u003d cfg[\u0027transformers\u0027] or []"},{"line_number":220,"context_line":"        except KeyError as err:"},{"line_number":221,"context_line":"            raise PipelineException("},{"line_number":222,"context_line":"                \"Required field %s not specified\" % err.args[0], cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FvsM%3D","line":219,"updated":"2014-03-03 16:43:56.000000000","message":"Then it\u0027s more cfg.get(\u0027transformers\u0027, []) no?","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        try:"},{"line_number":217,"context_line":"            self.name \u003d cfg[\u0027name\u0027]"},{"line_number":218,"context_line":"            # It\u0027s legal to have no transformer specified"},{"line_number":219,"context_line":"            self.transformer_cfg \u003d cfg[\u0027transformers\u0027] or []"},{"line_number":220,"context_line":"        except KeyError as err:"},{"line_number":221,"context_line":"            raise PipelineException("},{"line_number":222,"context_line":"                \"Required field %s not specified\" % err.args[0], cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FtUM%3D","line":219,"updated":"2014-02-28 21:41:23.000000000","message":"use .get() or it\u0027ll throw a keyerror instead of defaulting to []","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":216,"context_line":"        try:"},{"line_number":217,"context_line":"            self.name \u003d cfg[\u0027name\u0027]"},{"line_number":218,"context_line":"            # It\u0027s legal to have no transformer specified"},{"line_number":219,"context_line":"            self.transformer_cfg \u003d cfg[\u0027transformers\u0027] or []"},{"line_number":220,"context_line":"        except KeyError as err:"},{"line_number":221,"context_line":"            raise PipelineException("},{"line_number":222,"context_line":"                \"Required field %s not specified\" % err.args[0], cfg)"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1XA%3D","line":219,"in_reply_to":"AAAAVX%2F%2FvsM%3D","updated":"2014-03-03 22:01:20.000000000","message":"Pre-existing code that I simply moved around - in this case it seemed deliberate to require the transformers element be present, even if empty.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                                      \u0027pub\u0027: p}))"},{"line_number":313,"context_line":"            LOG.audit(_(\"Pipeline %s: Published samples\") % self)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def publish_sample(self, ctxt, sample):"},{"line_number":316,"context_line":"        self.publish_samples(ctxt, [sample])"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def publish_samples(self, ctxt, samples):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FtU0%3D","line":315,"updated":"2014-02-28 21:41:23.000000000","message":"we can drop this.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":312,"context_line":"                                                      \u0027pub\u0027: p}))"},{"line_number":313,"context_line":"            LOG.audit(_(\"Pipeline %s: Published samples\") % self)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"    def publish_sample(self, ctxt, sample):"},{"line_number":316,"context_line":"        self.publish_samples(ctxt, [sample])"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    def publish_samples(self, ctxt, samples):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1W4%3D","line":315,"in_reply_to":"AAAAVX%2F%2FtU0%3D","updated":"2014-03-03 22:01:20.000000000","message":"Done","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"class Pipeline(object):"},{"line_number":340,"context_line":"    \"\"\"Respresents a coupling between a sink and a corresponding source."},{"line_number":341,"context_line":"    \"\"\""},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def __init__(self, source, sink):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2Ftbg%3D","line":340,"updated":"2014-02-28 21:41:23.000000000","message":"represents","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":337,"context_line":""},{"line_number":338,"context_line":""},{"line_number":339,"context_line":"class Pipeline(object):"},{"line_number":340,"context_line":"    \"\"\"Respresents a coupling between a sink and a corresponding source."},{"line_number":341,"context_line":"    \"\"\""},{"line_number":342,"context_line":""},{"line_number":343,"context_line":"    def __init__(self, source, sink):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1Ww%3D","line":340,"in_reply_to":"AAAAVX%2F%2Ftbg%3D","updated":"2014-03-03 22:01:20.000000000","message":"Done","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        self.publish_samples(ctxt, [sample])"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def publish_samples(self, ctxt, samples):"},{"line_number":370,"context_line":"        supported \u003d [s for s in samples if self.source.support_meter(s.name)]"},{"line_number":371,"context_line":"        self.sink.publish_samples(ctxt, supported)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def flush(self, ctxt):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FtRs%3D","line":370,"updated":"2014-02-28 21:41:23.000000000","message":"is there a reason we move this check here? seems like now we for O(2n). loop through samples here and loop through samples in sink.publish_samples()","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        self.publish_samples(ctxt, [sample])"},{"line_number":368,"context_line":""},{"line_number":369,"context_line":"    def publish_samples(self, ctxt, samples):"},{"line_number":370,"context_line":"        supported \u003d [s for s in samples if self.source.support_meter(s.name)]"},{"line_number":371,"context_line":"        self.sink.publish_samples(ctxt, supported)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def flush(self, ctxt):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1SI%3D","line":370,"in_reply_to":"AAAAVX%2F%2FtRs%3D","updated":"2014-03-03 22:01:20.000000000","message":"The reason I did it here was to avoid polluting the Sink with knowledge of support_meter as this was intended to be a concern of the Source only.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":510,"context_line":"        return PublishContext(context, self.pipelines)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"def setup_pipeline(transformer_manager\u003dNone):"},{"line_number":514,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":515,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":516,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FtYQ%3D","line":513,"updated":"2014-02-28 21:41:23.000000000","message":"out of curiosity, what\u0027s this transformer_manager parameter for? seems like we\u0027ve pull it out of every reference to setup_pipeline.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":510,"context_line":"        return PublishContext(context, self.pipelines)"},{"line_number":511,"context_line":""},{"line_number":512,"context_line":""},{"line_number":513,"context_line":"def setup_pipeline(transformer_manager\u003dNone):"},{"line_number":514,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":515,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":516,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1PE%3D","line":513,"in_reply_to":"AAAAVX%2F%2FtYQ%3D","updated":"2014-03-03 22:01:20.000000000","message":"As far as I can tell from the fossil record it was just intended to facilitate testing.\n\nI just factored out the repetitive explicit loading of the TransformerExtensionManager into this method as opposed to it being done half a dozen times throughout the code.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"e11858d073dfa068790bffcb60c583f9608e5708","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            LOG.audit(_(\"Pipeline %s: Published samples\") % self)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    #def publish_sample(self, ctxt, sample):"},{"line_number":314,"context_line":"    #    self.publish_samples(ctxt, [sample])"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def publish_samples(self, ctxt, samples):"},{"line_number":317,"context_line":"        for meter_name, samples in itertools.groupby("}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2FzG0%3D","line":314,"updated":"2014-03-04 02:57:30.000000000","message":"Why only comment this out?","commit_id":"80a0443dad5b5829f9a8017eb811ef7d65140923"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"e00eb4ade7a9bbc2606f5d7c5e31fe3d8962830c","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            LOG.audit(_(\"Pipeline %s: Published samples\") % self)"},{"line_number":312,"context_line":""},{"line_number":313,"context_line":"    #def publish_sample(self, ctxt, sample):"},{"line_number":314,"context_line":"    #    self.publish_samples(ctxt, [sample])"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def publish_samples(self, ctxt, samples):"},{"line_number":317,"context_line":"        for meter_name, samples in itertools.groupby("}],"source_content_type":"text/x-python","patch_set":15,"id":"AAAAVn%2F%2FxV4%3D","line":314,"in_reply_to":"AAAAVn%2F%2FzG0%3D","updated":"2014-03-04 07:34:58.000000000","message":"Done","commit_id":"80a0443dad5b5829f9a8017eb811ef7d65140923"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"960dd65708a484df476fbba3aa9f244519d2a4d1","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            return name"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def support_meter(self, meter_name):"},{"line_number":152,"context_line":"        meter_name \u003d self._variable_meter_name(meter_name)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # Special case: if we only have negation, we suppose the default is"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2FstY%3D","line":151,"updated":"2014-03-04 16:08:17.000000000","message":"how do you feel about moving this to sink as this is really only used by sink? that way we can get rid of the double loop through (in publish_samples in pipeline an sink?)","commit_id":"9114e135b6b2a9a2c190cca5f9ccf4f185c6471a"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"0b2f977583b225f3472c8ba1c5953e84b3c291c5","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            return name"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def support_meter(self, meter_name):"},{"line_number":152,"context_line":"        meter_name \u003d self._variable_meter_name(meter_name)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # Special case: if we only have negation, we suppose the default is"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2FsOY%3D","line":151,"in_reply_to":"AAAAVn%2F%2FsWw%3D","updated":"2014-03-04 16:46:21.000000000","message":"ah, wasn\u0027t even aware there was a support_meter check in pollster.\n\ni think my preference for having it function in Sink is because it\u0027s only ever called by Sink (not Source). that said, i agree, conceptually i would think we should be calling this in Source. (similar to how pollsters check before publish_samples.)\n\ni guess this can be refactored at a later point.","commit_id":"9114e135b6b2a9a2c190cca5f9ccf4f185c6471a"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"96e4993eaa8859c8aa96985ee90f686013ffa866","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            return name"},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    def support_meter(self, meter_name):"},{"line_number":152,"context_line":"        meter_name \u003d self._variable_meter_name(meter_name)"},{"line_number":153,"context_line":""},{"line_number":154,"context_line":"        # Special case: if we only have negation, we suppose the default is"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2FsWw%3D","line":151,"in_reply_to":"AAAAVn%2F%2FstY%3D","updated":"2014-03-04 16:35:06.000000000","message":"Well, that would seem to break the separation of concerns between Sources and Sinks.\n\nActually I\u0027m wondering if we even need to maintain that check within publish_samples() going forward.\n\nIIUC in the case of pollsters, that check within publish_samples() is not even required, as the agent will have already checked this when setting up the polling tasks:\n\n  https://github.com/openstack/ceilometer/blob/master/ceilometer/agent.py#L107\n\nso for pollster-originated samples, the check within publish_samples is unnecessary if we assume pollsters are all well-behaved, i.e. the name of samples emitted always matches the pollster name.\n\nFor notification-derived samples on the other hand, I think the check is only required because the notification agent attempts to publish to *all* pipelines known to the pipeline manager, relying on each individual pipeline checking if the sample names are supported:\n\n  https://github.com/openstack/ceilometer/blob/master/ceilometer/notification.py#L168\n\nSeems to me that it would be better to resolve this asymmetry between the polling and notification models (so that in the latter case, the notification agent produces a list of matching pipelines per notification extension, and wraps these in a per-handler pipeline.PublishContext, so that only matching pipelines are ever published to).\n\nIf that makes sense, it would be something for a subsequent patch.","commit_id":"9114e135b6b2a9a2c190cca5f9ccf4f185c6471a"},{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"960dd65708a484df476fbba3aa9f244519d2a4d1","unresolved":false,"context_lines":[{"line_number":505,"context_line":"        return PublishContext(context, self.pipelines)"},{"line_number":506,"context_line":""},{"line_number":507,"context_line":""},{"line_number":508,"context_line":"def setup_pipeline(transformer_manager\u003dNone):"},{"line_number":509,"context_line":"    \"\"\"Setup pipeline manager according to yaml config file.\"\"\""},{"line_number":510,"context_line":"    cfg_file \u003d cfg.CONF.pipeline_cfg_file"},{"line_number":511,"context_line":"    if not os.path.exists(cfg_file):"}],"source_content_type":"text/x-python","patch_set":16,"id":"AAAAVn%2F%2FstI%3D","line":508,"updated":"2014-03-04 16:08:17.000000000","message":"we can drop this param later... i haven\u0027t tried it but i feel like it isn\u0027t necessary anymore","commit_id":"9114e135b6b2a9a2c190cca5f9ccf4f185c6471a"}],"ceilometer/tests/pipeline_base.py":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"fdc053c1e3bb93dfef90f46a51f46d6442b794f6","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":39,"context_line":"class BasePipelineTestCase(test.BaseTestCase):"},{"line_number":40,"context_line":"    def fake_tem_init(self):"},{"line_number":41,"context_line":"        \"\"\"Fake a transformerManager for pipeline"},{"line_number":42,"context_line":"           The faked entry point setting is below:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAU3%2F%2FhOY%3D","line":39,"updated":"2014-02-26 06:21:59.000000000","message":"Just some nitpicking, maybe define abstract method of _setup_pipeline_cfg, _unset_pipeline_cfg, _set_pipeline_cfg to make it more readable?","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"f64fe6d3c05133fb5fca4078910f3c05585263cd","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"@six.add_metaclass(abc.ABCMeta)"},{"line_number":39,"context_line":"class BasePipelineTestCase(test.BaseTestCase):"},{"line_number":40,"context_line":"    def fake_tem_init(self):"},{"line_number":41,"context_line":"        \"\"\"Fake a transformerManager for pipeline"},{"line_number":42,"context_line":"           The faked entry point setting is below:"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAVX%2F%2F8x0%3D","line":39,"in_reply_to":"AAAAU3%2F%2FhOY%3D","updated":"2014-02-27 07:22:01.000000000","message":"Fair point, will do!","commit_id":"f1778ad349c21c702a4ed309d2e4f058a85c98d2"}],"ceilometer/tests/test_decoupled_pipeline.py":[{"author":{"_account_id":6537,"name":"gordon chung","email":"gord@live.ca","username":"chungg"},"change_message_id":"b7157a66044312f1489b9abb1e2bbca18d1157ed","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        self.assertEqual([getattr(s, \u0027name\u0027) for s in transformed_samples],"},{"line_number":209,"context_line":"                         [\u0027a\u0027, \u0027b\u0027])"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _do_test_rate_of_change_in_boilerplate_pipeline_cfg(self, index,"},{"line_number":212,"context_line":"                                                            meters, units):"},{"line_number":213,"context_line":"        with open(\u0027etc/ceilometer/pipeline.yaml\u0027) as fap:"},{"line_number":214,"context_line":"            data \u003d fap.read()"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVX%2F%2FtOM%3D","line":211,"updated":"2014-02-28 21:41:23.000000000","message":"how come these tests are only run against new pipeline.yaml?","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"4de8e92e52896b1bfb9b7822977739565389269d","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        self.assertEqual([getattr(s, \u0027name\u0027) for s in transformed_samples],"},{"line_number":209,"context_line":"                         [\u0027a\u0027, \u0027b\u0027])"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _do_test_rate_of_change_in_boilerplate_pipeline_cfg(self, index,"},{"line_number":212,"context_line":"                                                            meters, units):"},{"line_number":213,"context_line":"        with open(\u0027etc/ceilometer/pipeline.yaml\u0027) as fap:"},{"line_number":214,"context_line":"            data \u003d fap.read()"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAVn%2F%2F1fA%3D","line":211,"in_reply_to":"AAAAVX%2F%2FtOM%3D","updated":"2014-03-03 22:01:20.000000000","message":"Good point, I suppose because I didn\u0027t want to keep around an etc/ceilometer/deprecated_pipeline.yaml with the bolierplate in the old format.\n\nI could do so, but obviously it\u0027ll be a maintenance over-head going forward.","commit_id":"64060dda71fcd4c9f87fd38a6f4826a88d86016b"}],"doc/source/configuration.rst":[{"author":{"_account_id":4491,"name":"Lianhao Lu","email":"llh_misc@outlook.com","username":"lianhao-lu"},"change_message_id":"e11858d073dfa068790bffcb60c583f9608e5708","unresolved":false,"context_lines":[{"line_number":358,"context_line":"    pipeline definition section."},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"The optional *resources* section of a pipeline source allows a static"},{"line_number":361,"context_line":"list of resource URLs to be to be configured. An amalgated list of all"},{"line_number":362,"context_line":"statically configured resources for a set of pipeline sources with a"},{"line_number":363,"context_line":"common interval is passed to individual pollsters matching those pipelines."},{"line_number":364,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"AAAAVn%2F%2FzJc%3D","line":361,"updated":"2014-03-04 02:57:30.000000000","message":"s/amalgated/amalgamated/","commit_id":"80a0443dad5b5829f9a8017eb811ef7d65140923"},{"author":{"_account_id":2284,"name":"Eoghan Glynn","email":"eglynn@redhat.com","username":"eglynn"},"change_message_id":"e00eb4ade7a9bbc2606f5d7c5e31fe3d8962830c","unresolved":false,"context_lines":[{"line_number":358,"context_line":"    pipeline definition section."},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"The optional *resources* section of a pipeline source allows a static"},{"line_number":361,"context_line":"list of resource URLs to be to be configured. An amalgated list of all"},{"line_number":362,"context_line":"statically configured resources for a set of pipeline sources with a"},{"line_number":363,"context_line":"common interval is passed to individual pollsters matching those pipelines."},{"line_number":364,"context_line":""}],"source_content_type":"text/x-rst","patch_set":15,"id":"AAAAVn%2F%2FxVw%3D","line":361,"in_reply_to":"AAAAVn%2F%2FzJc%3D","updated":"2014-03-04 07:34:58.000000000","message":"Done","commit_id":"80a0443dad5b5829f9a8017eb811ef7d65140923"}]}
