)]}'
{"ceilometer/agent.py":[{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3d55e27edd5f29a4ca170dca7b0d30135605f535","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    def poll_and_publish(self):"},{"line_number":104,"context_line":"        \"\"\"Polling sample and publish into pipeline.\"\"\""},{"line_number":105,"context_line":"        if self._pipline_cfg_changed():"},{"line_number":106,"context_line":"            return"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        cache \u003d {}"},{"line_number":109,"context_line":"        discovery_cache \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_e8b821ca","line":106,"updated":"2014-12-11 12:02:48.000000000","message":"Is it ok that for changed pipeline config we return None in poll_and_publish. Could you please clarify on what step we get new samples from updated polling task?","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"c33f6cc27f01865c7a6149710e15427256da0c66","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    def poll_and_publish(self):"},{"line_number":104,"context_line":"        \"\"\"Polling sample and publish into pipeline.\"\"\""},{"line_number":105,"context_line":"        if self._pipline_cfg_changed():"},{"line_number":106,"context_line":"            return"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        cache \u003d {}"},{"line_number":109,"context_line":"        discovery_cache \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_c4c69099","line":106,"in_reply_to":"3a961159_55e709ac","updated":"2014-12-15 12:44:46.000000000","message":"Thank you for answer, seems I got it. :))","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"8930046c98a61d6d6f14634699acf5ee187cb4eb","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    def poll_and_publish(self):"},{"line_number":104,"context_line":"        \"\"\"Polling sample and publish into pipeline.\"\"\""},{"line_number":105,"context_line":"        if self._pipline_cfg_changed():"},{"line_number":106,"context_line":"            return"},{"line_number":107,"context_line":""},{"line_number":108,"context_line":"        cache \u003d {}"},{"line_number":109,"context_line":"        discovery_cache \u003d {}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_55e709ac","line":106,"in_reply_to":"3a961159_e8b821ca","updated":"2014-12-11 13:20:28.000000000","message":"thanks for your review, good question :), firstly, if the pipeline has been changed, in _pipeline_cfg_changed(), will reset the mtime of pipeline configuration file, and then, will reset the manager\u0027s(manager of compute-agent or manager of central-agent) polling tasks, here returning means aborting continuing tasks because the pipeline configuration has been changed.\n\nIn _reset_polling_tasks() method, the all \"tg.timers\" of manager will be stop, that means the all polling tasks in polling tasks queue will be stopped and then setup pipeline and polling tasks base new pipeline configuration (in _start_polling_tasks() method). Meanwhile, the partition_coordinator\u0027s heartbeat timer will be stopped also and init new partition_coordinator with new resources set defined by new pipeline configuration.","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3d55e27edd5f29a4ca170dca7b0d30135605f535","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                if discovery_group_id else None)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def start(self):"},{"line_number":210,"context_line":"        self._start_polling_tasks()"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def _start_polling_tasks(self):"},{"line_number":213,"context_line":"        self.pipeline_manager \u003d publish_pipeline.setup_pipeline()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_2825c95b","line":210,"updated":"2014-12-11 12:02:48.000000000","message":"Could you please explain why do we need that change? It seems that 210-212 lines are redundant.","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"8930046c98a61d6d6f14634699acf5ee187cb4eb","unresolved":false,"context_lines":[{"line_number":207,"context_line":"                if discovery_group_id else None)"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"    def start(self):"},{"line_number":210,"context_line":"        self._start_polling_tasks()"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def _start_polling_tasks(self):"},{"line_number":213,"context_line":"        self.pipeline_manager \u003d publish_pipeline.setup_pipeline()"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_7824fcae","line":210,"in_reply_to":"3a961159_2825c95b","updated":"2014-12-11 13:20:28.000000000","message":"Here, the _start_polling_tasks() will be reused in reset_polling_tasks, so I prefer to encapsulate to a inner method.","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3d55e27edd5f29a4ca170dca7b0d30135605f535","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _reset_polling_tasks(self):"},{"line_number":230,"context_line":"        self.tg.stop_timers()"},{"line_number":231,"context_line":"        self._start_polling_tasks()"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @staticmethod"},{"line_number":234,"context_line":"    def interval_task(task):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_08a9ed90","line":231,"updated":"2014-12-11 12:02:48.000000000","message":"why we cannot use self.start() method here?","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"8930046c98a61d6d6f14634699acf5ee187cb4eb","unresolved":false,"context_lines":[{"line_number":228,"context_line":""},{"line_number":229,"context_line":"    def _reset_polling_tasks(self):"},{"line_number":230,"context_line":"        self.tg.stop_timers()"},{"line_number":231,"context_line":"        self._start_polling_tasks()"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    @staticmethod"},{"line_number":234,"context_line":"    def interval_task(task):"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_580e60e6","line":231,"in_reply_to":"3a961159_08a9ed90","updated":"2014-12-11 13:20:28.000000000","message":"the start() method is inherit from the os_service.Service class, and will be invoke automatically when service starting. \nSo I think the start() is a special method, but I will change this according to what you suggested if reviewers thins so :)","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"}],"ceilometer/tests/compute/pollsters/test_location_metadata.py":[{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3d55e27edd5f29a4ca170dca7b0d30135605f535","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @mock.patch(\u0027ceilometer.pipeline.setup_pipeline\u0027, mock.MagicMock())"},{"line_number":49,"context_line":"    def setUp(self):"},{"line_number":50,"context_line":"        super(TestLocationMetadata, self).setUp()"},{"line_number":51,"context_line":"        self.manager \u003d manager.AgentManager()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Mimics an instance returned from nova api call"},{"line_number":54,"context_line":"        self.INSTANCE_PROPERTIES \u003d {\u0027name\u0027: \u0027display name\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_6828b1e2","line":51,"updated":"2014-12-11 12:02:48.000000000","message":"What is changed with that displacement?","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"8930046c98a61d6d6f14634699acf5ee187cb4eb","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @mock.patch(\u0027ceilometer.pipeline.setup_pipeline\u0027, mock.MagicMock())"},{"line_number":49,"context_line":"    def setUp(self):"},{"line_number":50,"context_line":"        super(TestLocationMetadata, self).setUp()"},{"line_number":51,"context_line":"        self.manager \u003d manager.AgentManager()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Mimics an instance returned from nova api call"},{"line_number":54,"context_line":"        self.INSTANCE_PROPERTIES \u003d {\u0027name\u0027: \u0027display name\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_98fa8873","line":51,"in_reply_to":"3a961159_6828b1e2","updated":"2014-12-11 13:20:28.000000000","message":"There is a hidden problem that in setUp method of ceilometer/tests/base.py, I have set \"pipeline_cfg_file\" option to fixture CONF because when unit tests use \"manager.AgentManager()\" that will call the __init__() method of ceilometer.agent.AgentManager, the tests will fail because the \"cfg.CONF\" haven\u0027t been initialized. So here the setUp method should be called before the manager.AgentManager().\nAnd also, that is why I changed the \"from oslotest import base\" to \"from ceilometer.tests import base\" in others test files.","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"c33f6cc27f01865c7a6149710e15427256da0c66","unresolved":false,"context_lines":[{"line_number":48,"context_line":"    @mock.patch(\u0027ceilometer.pipeline.setup_pipeline\u0027, mock.MagicMock())"},{"line_number":49,"context_line":"    def setUp(self):"},{"line_number":50,"context_line":"        super(TestLocationMetadata, self).setUp()"},{"line_number":51,"context_line":"        self.manager \u003d manager.AgentManager()"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"        # Mimics an instance returned from nova api call"},{"line_number":54,"context_line":"        self.INSTANCE_PROPERTIES \u003d {\u0027name\u0027: \u0027display name\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_44ec602a","line":51,"in_reply_to":"3a961159_98fa8873","updated":"2014-12-15 12:44:46.000000000","message":"Got it, thank you.","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"}],"ceilometer/tests/ipmi/test_manager.py":[{"author":{"_account_id":10987,"name":"Igor Degtiarov","username":"tovstun","inactive":true},"change_message_id":"3d55e27edd5f29a4ca170dca7b0d30135605f535","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ceilometer.ipmi import manager"},{"line_number":20,"context_line":"from ceilometer.tests import agentbase"},{"line_number":21,"context_line":"from ceilometer.tests import base"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import mock"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_08cf2d2b","line":21,"updated":"2014-12-11 12:02:48.000000000","message":"modules from ceilometer project should be in last import block. import mock is need to be move upper.","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"},{"author":{"_account_id":8290,"name":"liusheng","email":"liusheng2048@gmail.com","username":"LiuSheng"},"change_message_id":"8930046c98a61d6d6f14634699acf5ee187cb4eb","unresolved":false,"context_lines":[{"line_number":18,"context_line":""},{"line_number":19,"context_line":"from ceilometer.ipmi import manager"},{"line_number":20,"context_line":"from ceilometer.tests import agentbase"},{"line_number":21,"context_line":"from ceilometer.tests import base"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"import mock"},{"line_number":24,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_d8189020","line":21,"in_reply_to":"3a961159_08cf2d2b","updated":"2014-12-11 13:20:28.000000000","message":"thanks for reminding me of this, Done","commit_id":"f30417f54b08a5b88f8ca1ebf111c67bc75a7760"}]}
