)]}'
{".pylintrc":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":48,"context_line":" unused-argument,"},{"line_number":49,"context_line":" unused-import,"},{"line_number":50,"context_line":" unused-variable,"},{"line_number":51,"context_line":" pointless-string-statement,"},{"line_number":52,"context_line":"# TODO(dougwig) - disable nonstandard-exception while we have neutron_lib shims"},{"line_number":53,"context_line":" nonstandard-exception,"},{"line_number":54,"context_line":"# \"C\" Coding convention violations"}],"source_content_type":"application/octet-stream","patch_set":12,"id":"bae84128_d3e9efb8","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":28},"updated":"2016-02-23 14:06:13.000000000","message":"I\u0027d rather remove the pointless string from test_agents_db. We use testscenarios in all other modules without such explanation. In separate patch.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":48,"context_line":" unused-argument,"},{"line_number":49,"context_line":" unused-import,"},{"line_number":50,"context_line":" unused-variable,"},{"line_number":51,"context_line":" pointless-string-statement,"},{"line_number":52,"context_line":"# TODO(dougwig) - disable nonstandard-exception while we have neutron_lib shims"},{"line_number":53,"context_line":" nonstandard-exception,"},{"line_number":54,"context_line":"# \"C\" Coding convention violations"}],"source_content_type":"application/octet-stream","patch_set":12,"id":"bae84128_cd4ca3ca","line":51,"range":{"start_line":51,"start_character":0,"end_line":51,"end_character":28},"in_reply_to":"bae84128_d3e9efb8","updated":"2016-02-23 18:05:02.000000000","message":"At least, it should not be disabled globally. There is a way to disable a check for a specific line: https://docs.pylint.org/faq.html#is-it-possible-to-locally-disable-a-particular-message","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"}],"doc/source/devref/rpc_callbacks.rst":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":163,"context_line":"Cached subset will be re-evaluated (to cut down the version sets as agents"},{"line_number":164,"context_line":"upgrade) after configured TTL."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"As a fast path to update this cache on all neutron-servers when upgraded agents"},{"line_number":167,"context_line":"come up (or old agents revive after a long timeout or even a downgrade) we use"},{"line_number":168,"context_line":"a fanout queue consumed by servers in the PLUGIN_FANOUT topic, to additionally"},{"line_number":169,"context_line":"notify from one agent to all neutron-servers about the \"versions of interest\""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bae84128_4856bece","line":166,"updated":"2016-02-23 18:05:02.000000000","message":"Hm. I actually thought that we planned the neutron-server that writes the agent report into the database to update other neutron-servers. I need to think about implications of the agent side implementation of the quick path messaging.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":163,"context_line":"Cached subset will be re-evaluated (to cut down the version sets as agents"},{"line_number":164,"context_line":"upgrade) after configured TTL."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"As a fast path to update this cache on all neutron-servers when upgraded agents"},{"line_number":167,"context_line":"come up (or old agents revive after a long timeout or even a downgrade) we use"},{"line_number":168,"context_line":"a fanout queue consumed by servers in the PLUGIN_FANOUT topic, to additionally"},{"line_number":169,"context_line":"notify from one agent to all neutron-servers about the \"versions of interest\""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bae84128_e38d1ad4","line":166,"in_reply_to":"bae84128_4856bece","updated":"2016-02-24 06:31:05.000000000","message":"I must think of what you\u0027re proposing to see if there are advantages, it\u0027s easy to change now. At first glance I\u0027d say: \"the result would be the same I guess, it would update all servers including itself because he\u0027s a consumer of the same fanout he\u0027d b producing.\"\n\nThe advantages of doing it on the server side: (first glance)\n* less agent logic: is a cleaner agent, but not much.\n\nThe disadvantages:\n* the server side code is longer, but not much.\n* you introduce an extra delay T_1 to process the first status update (including the messages queued before the specific status update) + T_2 to process the fast path update.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9933325876d101df9107cb08a753f3ed9fbb1142","unresolved":false,"context_lines":[{"line_number":163,"context_line":"Cached subset will be re-evaluated (to cut down the version sets as agents"},{"line_number":164,"context_line":"upgrade) after configured TTL."},{"line_number":165,"context_line":""},{"line_number":166,"context_line":"As a fast path to update this cache on all neutron-servers when upgraded agents"},{"line_number":167,"context_line":"come up (or old agents revive after a long timeout or even a downgrade) we use"},{"line_number":168,"context_line":"a fanout queue consumed by servers in the PLUGIN_FANOUT topic, to additionally"},{"line_number":169,"context_line":"notify from one agent to all neutron-servers about the \"versions of interest\""}],"source_content_type":"text/x-rst","patch_set":12,"id":"bae84128_790e84e6","line":166,"in_reply_to":"bae84128_e38d1ad4","updated":"2016-02-25 10:02:12.000000000","message":"After spending some time thinking of the differences, I believe that it\u0027s better doing it at server side.\n\nWe have marginal gains by doing it on the agent side. Since agent blocks on the agent status update call, and T_1 is also included in the delay.\n\nAnd we also pollute every agent implementation with those details. So I will move it to server side.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9933325876d101df9107cb08a753f3ed9fbb1142","unresolved":false,"context_lines":[{"line_number":167,"context_line":"come up (or old agents revive after a long timeout or even a downgrade) we use"},{"line_number":168,"context_line":"a fanout queue consumed by servers in the PLUGIN_FANOUT topic, to additionally"},{"line_number":169,"context_line":"notify from one agent to all neutron-servers about the \"versions of interest\""},{"line_number":170,"context_line":"in the agent just comming up."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"All notifications for all calculated version sets must be sent, as non-upgraded"},{"line_number":173,"context_line":"agents would otherwise not receive them."}],"source_content_type":"text/x-rst","patch_set":12,"id":"bae84128_4630ff07","line":170,"range":{"start_line":170,"start_character":18,"end_line":170,"end_character":25},"updated":"2016-02-25 10:02:12.000000000","message":"Done.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"come up (or old agents revive after a long timeout or even a downgrade) we use"},{"line_number":168,"context_line":"a fanout queue consumed by servers in the PLUGIN_FANOUT topic, to additionally"},{"line_number":169,"context_line":"notify from one agent to all neutron-servers about the \"versions of interest\""},{"line_number":170,"context_line":"in the agent just comming up."},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"All notifications for all calculated version sets must be sent, as non-upgraded"},{"line_number":173,"context_line":"agents would otherwise not receive them."}],"source_content_type":"text/x-rst","patch_set":12,"id":"bae84128_083956a4","line":170,"updated":"2016-02-23 18:05:02.000000000","message":"coming","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"}],"neutron/api/rpc/callbacks/version_manager.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_local_resource_versions(self):"},{"line_number":64,"context_line":"        # NOTE(mangelajo): if we import this globally we end up with a (very"},{"line_number":65,"context_line":"        #                  long) circular dependency"},{"line_number":66,"context_line":"        resources \u003d importutils.import_module("},{"line_number":67,"context_line":"            \u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":68,"context_line":"        local_resource_versions \u003d collections.defaultdict(set)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_616f722b","line":65,"range":{"start_line":65,"start_character":27,"end_line":65,"end_character":31},"updated":"2016-02-17 15:52:21.000000000","message":"this could also be fixed if we stop importing all exposed OVO classes from neutron.api.rpc.callback.resources, and provide a decorator to expose such classes more dynamically.\n\nSo the dependency would change direction \n\nresources -\u003e OVO1 -\u003e db layers -\u003e etc..\n                   -\u003e OVO2\n\nto \n\nOVO1 -\u003e resources\nOVO2 -\u003e resources","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4478712c79077dab49201cb99c12172b53cf9e74","unresolved":false,"context_lines":[{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    def _get_local_resource_versions(self):"},{"line_number":64,"context_line":"        # NOTE(mangelajo): if we import this globally we end up with a (very"},{"line_number":65,"context_line":"        #                  long) circular dependency"},{"line_number":66,"context_line":"        resources \u003d importutils.import_module("},{"line_number":67,"context_line":"            \u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":68,"context_line":"        local_resource_versions \u003d collections.defaultdict(set)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_b4f7c3d1","line":65,"range":{"start_line":65,"start_character":27,"end_line":65,"end_character":31},"in_reply_to":"dae33548_616f722b","updated":"2016-02-18 15:14:53.000000000","message":"Done","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self._consumer_versions_callback \u003d None"},{"line_number":141,"context_line":"        # This is TTL expiration time, 0 means it will be expired at start"},{"line_number":142,"context_line":"        self._expires_at \u003d 0"},{"line_number":143,"context_line":"        # NOTE(mangelajo): avoid forcing the circular import at start"},{"line_number":144,"context_line":"        self._versions \u003d None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _update_consumer_versions(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_219d6a0a","line":143,"range":{"start_line":143,"start_character":33,"end_line":143,"end_character":40},"updated":"2016-02-17 15:52:21.000000000","message":"actually that is more correct if we start with an empty cache and we force a DB lookup on any update/request, do not necessarily an artifact of removing the circular dependency issue.","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4478712c79077dab49201cb99c12172b53cf9e74","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        self._consumer_versions_callback \u003d None"},{"line_number":141,"context_line":"        # This is TTL expiration time, 0 means it will be expired at start"},{"line_number":142,"context_line":"        self._expires_at \u003d 0"},{"line_number":143,"context_line":"        # NOTE(mangelajo): avoid forcing the circular import at start"},{"line_number":144,"context_line":"        self._versions \u003d None"},{"line_number":145,"context_line":""},{"line_number":146,"context_line":"    def _update_consumer_versions(self):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_14f2ef99","line":143,"range":{"start_line":143,"start_character":33,"end_line":143,"end_character":40},"in_reply_to":"dae33548_219d6a0a","updated":"2016-02-18 15:14:53.000000000","message":"Done","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":13995,"name":"Nate Johnston","email":"nate.johnston@redhat.com","username":"natejohnston"},"change_message_id":"16692ac33c5de47fc93275abab5db36828e1b4c7","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import collections"},{"line_number":14,"context_line":"import copy"},{"line_number":15,"context_line":"import pprint"},{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_92527311","line":15,"updated":"2016-02-18 20:46:01.000000000","message":"Looks like this can be removed now.","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9ff378996d98c5b20b386d55b20d3855ce7cd7ea","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import collections"},{"line_number":14,"context_line":"import copy"},{"line_number":15,"context_line":"import pprint"},{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_f2a5a6b5","line":15,"in_reply_to":"bae84128_a0346fde","updated":"2016-02-19 17:56:35.000000000","message":"Hmm, no, sorry it\u0027s used (check L116-119)","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"2241f5038cc4da820f106e4829ac3942583132c3","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"import collections"},{"line_number":14,"context_line":"import copy"},{"line_number":15,"context_line":"import pprint"},{"line_number":16,"context_line":"import time"},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"from oslo_log import log as logging"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_a0346fde","line":15,"in_reply_to":"dae33548_92527311","updated":"2016-02-19 12:02:10.000000000","message":"woops, right!","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        #                  stop importing all exposed classes in"},{"line_number":67,"context_line":"        #                  neutron.api.rpc.callbacks.resources and provide"},{"line_number":68,"context_line":"        #                  a decorator to expose classes"},{"line_number":69,"context_line":"        resources \u003d importutils.import_module("},{"line_number":70,"context_line":"            \u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":71,"context_line":"        local_resource_versions \u003d collections.defaultdict(set)"},{"line_number":72,"context_line":"        for resource_type, version in ("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_1807e7ca","line":69,"updated":"2016-02-23 18:05:02.000000000","message":"Just wondering, why do we need oslo.utils here. Isn\u0027t direct import statement enough?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        #                  stop importing all exposed classes in"},{"line_number":67,"context_line":"        #                  neutron.api.rpc.callbacks.resources and provide"},{"line_number":68,"context_line":"        #                  a decorator to expose classes"},{"line_number":69,"context_line":"        resources \u003d importutils.import_module("},{"line_number":70,"context_line":"            \u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":71,"context_line":"        local_resource_versions \u003d collections.defaultdict(set)"},{"line_number":72,"context_line":"        for resource_type, version in ("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_83436e6b","line":69,"in_reply_to":"bae84128_1807e7ca","updated":"2016-02-24 06:31:05.000000000","message":"Until PS6 I was using direct import, and that was working fine. But somebody suggested me to go via importutils or some reason, which seemed convincing, although I can\u0027t remember.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return copy.copy(self._versions[resource_type])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_f86963fa","line":115,"updated":"2016-02-23 18:05:02.000000000","message":"indentation is wrong here.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"7637658a8451f87416655a67dbc0d61b17699626","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return copy.copy(self._versions[resource_type])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_b76493e5","line":115,"in_reply_to":"bae84128_a30af223","updated":"2016-02-25 10:29:57.000000000","message":"pep8 doesn\u0027t count whitespaces. on L115 you have 8 instead of 4 :) The whole block is shifted to the right","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return copy.copy(self._versions[resource_type])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_1493b6a4","line":115,"in_reply_to":"bae84128_b76493e5","updated":"2016-02-25 15:12:55.000000000","message":"Ohh, general block, I thought he was talking about the dict. Right.\nDone!.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":112,"context_line":"        return copy.copy(self._versions[resource_type])"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_a30af223","line":115,"in_reply_to":"bae84128_f86963fa","updated":"2016-02-24 06:31:05.000000000","message":"Hmm, why is it wrong?, don\u0027t ( and { have equal treatment related to indentation?, and pep8 does not complain either :)\n\n/me confused , I\u0027m for sure missing something.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("},{"line_number":119,"context_line":"                    dict(self._versions_by_consumer), indent\u003d4)}"},{"line_number":120,"context_line":"            LOG.debug(\u0027Tracked resource versions report:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_184c079d","line":117,"range":{"start_line":116,"start_character":35,"end_line":117,"end_character":51},"updated":"2016-02-23 18:05:02.000000000","message":"(No action required) nitty nit: you could capture the common indent\u003d4 argument with functools.partial and reuse it :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("},{"line_number":119,"context_line":"                    dict(self._versions_by_consumer), indent\u003d4)}"},{"line_number":120,"context_line":"            LOG.debug(\u0027Tracked resource versions report:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_34db5aef","line":117,"range":{"start_line":116,"start_character":35,"end_line":117,"end_character":51},"in_reply_to":"bae84128_0e05c50f","updated":"2016-02-25 15:12:55.000000000","message":"Done","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def report(self):"},{"line_number":115,"context_line":"            debug_dict \u003d {"},{"line_number":116,"context_line":"                \u0027pushed_versions\u0027: pprint.pformat("},{"line_number":117,"context_line":"                    dict(self._versions), indent\u003d4),"},{"line_number":118,"context_line":"                \u0027consumer_versions\u0027: pprint.pformat("},{"line_number":119,"context_line":"                    dict(self._versions_by_consumer), indent\u003d4)}"},{"line_number":120,"context_line":"            LOG.debug(\u0027Tracked resource versions report:\\n\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_0e05c50f","line":117,"range":{"start_line":116,"start_character":35,"end_line":117,"end_character":51},"in_reply_to":"bae84128_184c079d","updated":"2016-02-24 06:31:05.000000000","message":"Haha, you love functools :)\n+1\n\nor even an old fashion function including the dict( part, I will see what looks best.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    dict(self._versions_by_consumer), indent\u003d4)}"},{"line_number":120,"context_line":"            LOG.debug(\u0027Tracked resource versions report:\\n\u0027"},{"line_number":121,"context_line":"                      \u0027    pushed versions \u003d %(pushed_versions)s\\n\u0027"},{"line_number":122,"context_line":"                      \u0027  consumer_versions \u003d %(consumer_versions)s\u0027,"},{"line_number":123,"context_line":"                      debug_dict)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # TODO(mangelajo): Add locking if we ever move out of greenthreads."}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_d82d7fa9","line":122,"range":{"start_line":122,"start_character":33,"end_line":122,"end_character":34},"updated":"2016-02-23 18:05:02.000000000","message":"replace with space","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    dict(self._versions_by_consumer), indent\u003d4)}"},{"line_number":120,"context_line":"            LOG.debug(\u0027Tracked resource versions report:\\n\u0027"},{"line_number":121,"context_line":"                      \u0027    pushed versions \u003d %(pushed_versions)s\\n\u0027"},{"line_number":122,"context_line":"                      \u0027  consumer_versions \u003d %(consumer_versions)s\u0027,"},{"line_number":123,"context_line":"                      debug_dict)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # TODO(mangelajo): Add locking if we ever move out of greenthreads."}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_ee4a2154","line":122,"range":{"start_line":122,"start_character":33,"end_line":122,"end_character":34},"in_reply_to":"bae84128_d82d7fa9","updated":"2016-02-24 06:31:05.000000000","message":"ack.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                    dict(self._versions_by_consumer), indent\u003d4)}"},{"line_number":120,"context_line":"            LOG.debug(\u0027Tracked resource versions report:\\n\u0027"},{"line_number":121,"context_line":"                      \u0027    pushed versions \u003d %(pushed_versions)s\\n\u0027"},{"line_number":122,"context_line":"                      \u0027  consumer_versions \u003d %(consumer_versions)s\u0027,"},{"line_number":123,"context_line":"                      debug_dict)"},{"line_number":124,"context_line":""},{"line_number":125,"context_line":"    # TODO(mangelajo): Add locking if we ever move out of greenthreads."}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_5746e0bf","line":122,"range":{"start_line":122,"start_character":33,"end_line":122,"end_character":34},"in_reply_to":"bae84128_ee4a2154","updated":"2016-02-25 15:12:55.000000000","message":"Done","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_93747868","line":170,"updated":"2016-02-23 18:05:02.000000000","message":"why would you want to proactively update the list now and not postpone it till get_ is triggered?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_8e94358b","line":170,"in_reply_to":"bae84128_93747868","updated":"2016-02-24 06:31:05.000000000","message":"Because\n\nFor two reasons:\n\n1) If I get an update at boot, it\u0027s worth taking the DB details, and then squash the update in, so when the get happens \"we already now\"\n\nand more important\n\n2)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_aec77994","line":170,"in_reply_to":"bae84128_93747868","updated":"2016-02-24 06:31:05.000000000","message":"To keep L166 None, and fill it on first use. Otherwise, I trigger the circular dependency at module load because of  L174, another option would be returning CacheResourceConsumerTracker to a singleton :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":167,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_77804b47","line":170,"in_reply_to":"bae84128_aec77994","updated":"2016-02-25 15:12:55.000000000","message":"I will remove this, as, on an initial update all servers could sync and hit the database at the same time very quickly.\n\nDone.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_731f3408","line":171,"updated":"2016-02-23 18:05:02.000000000","message":"Do we maybe want to report on every change to the tracked versions?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_5736e7b4","line":171,"in_reply_to":"bae84128_4e434d13","updated":"2016-02-25 15:12:55.000000000","message":"Done","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":170,"context_line":"        self._check_expiration()"},{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_4e434d13","line":171,"in_reply_to":"bae84128_731f3408","updated":"2016-02-24 06:31:05.000000000","message":"+1\nThat makes sense, debug is always helpful.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def set_consumer_versions_callback(callback):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_d6a1dd47","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":56},"updated":"2016-02-23 14:06:13.000000000","message":"yucky!","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def set_consumer_versions_callback(callback):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_ee8fc172","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":56},"in_reply_to":"bae84128_385d8b79","updated":"2016-02-24 06:31:05.000000000","message":"Come\u0027on I had a singleton!, and you asked me to unravel it to global!! :P ;)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def set_consumer_versions_callback(callback):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_0e64a5b6","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":56},"in_reply_to":"bae84128_385d8b79","updated":"2016-02-24 06:31:05.000000000","message":"Hi, this was a singleton before :), you asked me to unravel it to a global because there was just one single \"user\" of it :)\n\nGiven this and L170, what do you think of moving back to a singleton, I see benefits now :) (no more yucks, and less circularities)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def set_consumer_versions_callback(callback):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_385d8b79","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":56},"in_reply_to":"bae84128_d6a1dd47","updated":"2016-02-23 18:05:02.000000000","message":"You are lucky you haven\u0027t seen previous versions..","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"cached_version_tracker \u003d CachedResourceConsumerTracker()"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"def set_consumer_versions_callback(callback):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_dc2b3e93","line":174,"range":{"start_line":174,"start_character":0,"end_line":174,"end_character":56},"in_reply_to":"bae84128_ee8fc172","updated":"2016-02-25 15:12:55.000000000","message":"unyucked :P in a different way :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"def update_versions(consumer_id, resource_versions):"},{"line_number":198,"context_line":"    \"\"\"Update the resources\u0027 versions for a consumer id.\"\"\""},{"line_number":199,"context_line":"    cached_version_tracker.update_versions(consumer_id, resource_versions)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def get_agent_consumer_id(agent_type, agent_host):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_98ddb7e2","line":199,"updated":"2016-02-23 18:05:02.000000000","message":"(No action required) Sigh. :-X","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":196,"context_line":""},{"line_number":197,"context_line":"def update_versions(consumer_id, resource_versions):"},{"line_number":198,"context_line":"    \"\"\"Update the resources\u0027 versions for a consumer id.\"\"\""},{"line_number":199,"context_line":"    cached_version_tracker.update_versions(consumer_id, resource_versions)"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"def get_agent_consumer_id(agent_type, agent_host):"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_8e1ef509","line":199,"in_reply_to":"bae84128_98ddb7e2","updated":"2016-02-24 06:31:05.000000000","message":"Yeah, that method was not updated. It had no testing, but, well, writing a \"change detector\" detector unit test makes me sick too. What other option would we have to?:\n\n   def test_update_versions(self):\n      with mock.patch(\u0027.....cached_versions_tracker\u0027): as cvt:\n         version_manager.update_versions(a, b)\n         cvt.update_versions.assert_called_once_with(a,b) \n\n\n?\n\nMay be I should just write it, but then I\u0027ll have nightmares with [1].\n\nThoughts?\n\n[1] http://googletesting.blogspot.com.es/2015/01/testing-on-toilet-change-detector-tests.html","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            self._set_version(consumer_id, resource_type,"},{"line_number":104,"context_line":"                             resource_version)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # include an empty set, just for reporting purposes"},{"line_number":107,"context_line":"        if not versions:"},{"line_number":108,"context_line":"            self._versions_by_consumer[consumer_id] \u003d {}"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_6d1ebb64","line":106,"updated":"2016-02-26 11:00:36.000000000","message":"It\u0027s not just for reporting purposes, you also allow to unset registered resource versions that way.\n\nbtw what do we do when the new versions list has less resource types requested than the previous one? shouldn\u0027t we unregister those types for the consumer?","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":103,"context_line":"            self._set_version(consumer_id, resource_type,"},{"line_number":104,"context_line":"                             resource_version)"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # include an empty set, just for reporting purposes"},{"line_number":107,"context_line":"        if not versions:"},{"line_number":108,"context_line":"            self._versions_by_consumer[consumer_id] \u003d {}"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_07a1c894","line":106,"in_reply_to":"9aed3d3a_6d1ebb64","updated":"2016-02-26 12:50:45.000000000","message":"hmmm, makes sense, you\u0027re right. That\u0027s a bug (important if they roll back an agent for any reason).\n\nI should not only iterate over the existing versions.items() but also over the resource_types in self._versions_by_consumer[consumer_id] and clear those via _set_version(consumer_id, resource_type, None) (as they are not reported).","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":173,"context_line":"        self._check_expiration()"},{"line_number":174,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def report(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_2de833e2","line":173,"updated":"2016-02-26 11:00:36.000000000","message":"previously, you sad we wanted to remove the line, but it probably never happened. So repeating the question: why do we care about potentially resyncing with the database if it may be not needed to extract the versions with get_resource_versions for a while, and maybe the next time you hit get_resource_versions() you will still need to refetch again. So the first fetch is just redundant.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3a4b4b2baf15a60adcdb9c648bf74adb683f05a8","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":173,"context_line":"        self._check_expiration()"},{"line_number":174,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def report(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_b7f2c0d0","line":173,"in_reply_to":"9aed3d3a_17ce0cb4","updated":"2016-02-26 14:31:19.000000000","message":"And what I mean by reporting is... that the initial reports are half empty (until agents heartbeat or push happens) , while we surely have agents in DB.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":173,"context_line":"        self._check_expiration()"},{"line_number":174,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def report(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_a24d6a74","line":173,"in_reply_to":"9aed3d3a_2de833e2","updated":"2016-02-26 12:50:45.000000000","message":"I added it for the shake of reporting. It\u0027s redundant, but helps debug:\n\nthe initial reports you get in debug are a bit incomplete otherwise.  Until they fill up with agent notifications, or a push happens. (They will regenerate anyway at the first push....)\n\nI can remove it,  but that\u0027s the reason so far. debuggability sounds fair? :) I shall probably ad a note here of the reasoning.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9791e0d9e188a24889e5eed96bff205a4bd152d9","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":173,"context_line":"        self._check_expiration()"},{"line_number":174,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def report(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_17ce0cb4","line":173,"in_reply_to":"9aed3d3a_99ba58e0","updated":"2016-02-26 14:29:05.000000000","message":"The periodicity will be X regardless of this line being here of not. \nIgnoring reporting, let\u0027s think more carefully here...\n\n\n1) It will increase the DB pressure regardless of the pushes, because we will keep asking for agents almost in the period X (because agent updates will trigger it).\n\n2) It will decrease the likelihood of DB request happening on push (less delayed push..)\n\n\nBut, well, I don\u0027t like \"1\"\n\nMay be I can force a reload when I get the callback initially, so initial reporting is solved (sucked from database once at boot).","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"20e6a0c3a16813d132707dcac0c8f6e8295eb9f8","unresolved":false,"context_lines":[{"line_number":170,"context_line":"        return self._versions.get_resource_versions(resource_type)"},{"line_number":171,"context_line":""},{"line_number":172,"context_line":"    def update_versions(self, consumer_id, resource_versions):"},{"line_number":173,"context_line":"        self._check_expiration()"},{"line_number":174,"context_line":"        self._versions.set_versions(consumer_id, resource_versions)"},{"line_number":175,"context_line":""},{"line_number":176,"context_line":"    def report(self):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_99ba58e0","line":173,"in_reply_to":"9aed3d3a_a24d6a74","updated":"2016-02-26 12:55:32.000000000","message":"If that\u0027s about reporting, just report after you update the versions.\n\nThe point is, if you say that the versions are recalculated from the db every X secs, you should stick to X.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"# This is the list of agents that started using this rpc push/pull mechanism"},{"line_number":29,"context_line":"# for versioned objects, but at that time stable/liberty, they were not"},{"line_number":30,"context_line":"# reporting versions, so we need to assume they need QosPolicy 1.0"},{"line_number":31,"context_line":"NON_REPORTING_AGENT_TYPES \u003d [constants.AGENT_TYPE_OVS,"},{"line_number":32,"context_line":"                             constants.AGENT_TYPE_NIC_SWITCH]"},{"line_number":33,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_50e4c8df","line":30,"updated":"2016-02-29 12:40:37.000000000","message":"Please add TODO for Newton to remove special case. We don\u0027t need to support that for longer than one rolling cycle.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":38,"context_line":"#                  neutron.api.rpc.callbacks.resources and provide"},{"line_number":39,"context_line":"#                  a decorator to expose classes"},{"line_number":40,"context_line":"def _import_resources():"},{"line_number":41,"context_line":"    return importutils.import_module(\u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"AgentConsumer \u003d collections.namedtuple(\u0027AgentConsumer\u0027, [\u0027agent_type\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_50516835","line":41,"range":{"start_line":41,"start_character":11,"end_line":41,"end_character":75},"updated":"2016-02-29 12:40:37.000000000","message":"still wondering why we need importutils where a simple import would probably do the job, like:\n\n    from neutron.api.rpc.callbacks import resources\n    return resources","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d1d183ed5a366ee85b2b45e7980c41e15244ac11","unresolved":false,"context_lines":[{"line_number":38,"context_line":"#                  neutron.api.rpc.callbacks.resources and provide"},{"line_number":39,"context_line":"#                  a decorator to expose classes"},{"line_number":40,"context_line":"def _import_resources():"},{"line_number":41,"context_line":"    return importutils.import_module(\u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"AgentConsumer \u003d collections.namedtuple(\u0027AgentConsumer\u0027, [\u0027agent_type\u0027,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_f63cf4c9","line":41,"range":{"start_line":41,"start_character":11,"end_line":41,"end_character":75},"in_reply_to":"9aed3d3a_50516835","updated":"2016-02-29 12:58:44.000000000","message":"Ok, let\u0027s switch to that. I remember somebody suggested it, but I can\u0027t remember the reasoning, and it doesn\u0027t seem to be in gerrit.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    return importutils.import_module(\u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"AgentConsumer \u003d collections.namedtuple(\u0027AgentConsumer\u0027, [\u0027agent_type\u0027,"},{"line_number":45,"context_line":"                                                         \u0027host\u0027])"},{"line_number":46,"context_line":"AgentConsumer.__repr__ \u003d lambda self: \u0027%s@%s\u0027 % self"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_707bccf5","line":44,"updated":"2016-02-29 12:40:37.000000000","message":"Meh. I wonder why not a simple class.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d1d183ed5a366ee85b2b45e7980c41e15244ac11","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    return importutils.import_module(\u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"AgentConsumer \u003d collections.namedtuple(\u0027AgentConsumer\u0027, [\u0027agent_type\u0027,"},{"line_number":45,"context_line":"                                                         \u0027host\u0027])"},{"line_number":46,"context_line":"AgentConsumer.__repr__ \u003d lambda self: \u0027%s@%s\u0027 % self"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_d640d036","line":44,"in_reply_to":"9aed3d3a_707bccf5","updated":"2016-02-29 12:58:44.000000000","message":"This is less lines of code, we can change to a class if we need. In the end named tuples are classes from a template.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"ec23dd95a6f2803c23aa7c41564ffa54ed3d4d9d","unresolved":false,"context_lines":[{"line_number":41,"context_line":"    return importutils.import_module(\u0027neutron.api.rpc.callbacks.resources\u0027)"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"AgentConsumer \u003d collections.namedtuple(\u0027AgentConsumer\u0027, [\u0027agent_type\u0027,"},{"line_number":45,"context_line":"                                                         \u0027host\u0027])"},{"line_number":46,"context_line":"AgentConsumer.__repr__ \u003d lambda self: \u0027%s@%s\u0027 % self"},{"line_number":47,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_9629283a","line":44,"in_reply_to":"9aed3d3a_707bccf5","updated":"2016-02-29 12:47:33.000000000","message":"i actually like the named tuple. Its cleaner","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        if versions:"},{"line_number":126,"context_line":"            self._cleanup_removed_versions(consumer, versions)"},{"line_number":127,"context_line":"        else:"},{"line_number":128,"context_line":"            self._handle_no_set_versions(consumer)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _cleanup_removed_versions(self, consumer, versions):"},{"line_number":131,"context_line":"        \"\"\"Check if any version report has been removed, and cleanup.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_d00bb828","line":128,"updated":"2016-02-29 12:40:37.000000000","message":"And what if a NEW (Mitaka) agent reported an empty list of versions (because it does not enable qos extension)? You enable QoS reports for that, but it\u0027s not needed.\n\nOverall, the question stands on its own: why do we report an agent cares about all known objects without filtering them out based on what is actually used by the agent?\n\nI guess you are not going to tackle that question in this patch or generally in Mitaka. I believe the question is worth looking at later. So a TODO for that could help.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"43da015e97d25ccef42f92c486d27dbe9f7457ff","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        if versions:"},{"line_number":126,"context_line":"            self._cleanup_removed_versions(consumer, versions)"},{"line_number":127,"context_line":"        else:"},{"line_number":128,"context_line":"            self._handle_no_set_versions(consumer)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _cleanup_removed_versions(self, consumer, versions):"},{"line_number":131,"context_line":"        \"\"\"Check if any version report has been removed, and cleanup.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_0aaface2","line":128,"in_reply_to":"9aed3d3a_563320ab","updated":"2016-02-29 13:01:00.000000000","message":"Yes, follow up for sure.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d1d183ed5a366ee85b2b45e7980c41e15244ac11","unresolved":false,"context_lines":[{"line_number":125,"context_line":"        if versions:"},{"line_number":126,"context_line":"            self._cleanup_removed_versions(consumer, versions)"},{"line_number":127,"context_line":"        else:"},{"line_number":128,"context_line":"            self._handle_no_set_versions(consumer)"},{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _cleanup_removed_versions(self, consumer, versions):"},{"line_number":131,"context_line":"        \"\"\"Check if any version report has been removed, and cleanup.\"\"\""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_563320ab","line":128,"in_reply_to":"9aed3d3a_d00bb828","updated":"2016-02-29 12:58:44.000000000","message":"If QoS is not being used, server won\u0027t push any QoSPolicy.\n\nIn the current implementation it doesn\u0027t make much sense to have agents with qos, and agents without qos. May be with availability zones it will..\n\nThis is optimization, and we could filter it on a follow up patch, but I\u0027ll probably add a note on the agent side, to filter the reported objects.\n\nDoes that sound good?","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"76024fa95371ea0b2b1167fe3dc385922f93fa75","unresolved":false,"context_lines":[{"line_number":140,"context_line":"        \"\"\"Handle consumers reporting no versions.\"\"\""},{"line_number":141,"context_line":"        if isinstance(consumer, AgentConsumer):"},{"line_number":142,"context_line":"            for agent_type in NON_REPORTING_AGENT_TYPES:"},{"line_number":143,"context_line":"                if consumer.agent_type \u003d\u003d agent_type:"},{"line_number":144,"context_line":"                    resources \u003d _import_resources()"},{"line_number":145,"context_line":"                    self._versions_by_consumer[consumer] \u003d {"},{"line_number":146,"context_line":"                        resources.QOS_POLICY: \u00271.0\u0027}"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_f047051b","line":143,"updated":"2016-02-27 14:06:50.000000000","message":"if consumer.agent_type in NON_REPORTING_AGENT_TYPES ...","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":139,"context_line":"    def _handle_no_set_versions(self, consumer):"},{"line_number":140,"context_line":"        \"\"\"Handle consumers reporting no versions.\"\"\""},{"line_number":141,"context_line":"        if isinstance(consumer, AgentConsumer):"},{"line_number":142,"context_line":"            for agent_type in NON_REPORTING_AGENT_TYPES:"},{"line_number":143,"context_line":"                if consumer.agent_type \u003d\u003d agent_type:"},{"line_number":144,"context_line":"                    resources \u003d _import_resources()"},{"line_number":145,"context_line":"                    self._versions_by_consumer[consumer] \u003d {"},{"line_number":146,"context_line":"                        resources.QOS_POLICY: \u00271.0\u0027}"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_b0b43482","line":143,"range":{"start_line":142,"start_character":12,"end_line":143,"end_character":53},"updated":"2016-02-29 12:40:37.000000000","message":"if consumer.agent_type in NON_REPORTING_AGENT_TYPES:","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":217,"context_line":"        self._versions.set_versions(consumer, resource_versions)"},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"    def report(self):"},{"line_number":220,"context_line":"        self._check_expiration()"},{"line_number":221,"context_line":"        self._versions.report()"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"_cached_version_tracker \u003d None"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_bb07f516","line":220,"updated":"2016-02-29 12:40:37.000000000","message":"(No action required) that\u0027s a better place for version update","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"}],"neutron/api/rpc/handlers/resources_rpc.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d30140875262dce6b899e74044821b6aa4f67f8b","unresolved":false,"context_lines":[{"line_number":103,"context_line":"    @log_helpers.log_method_call"},{"line_number":104,"context_line":"    def report_versions(self, context, agent_type, agent_host):"},{"line_number":105,"context_line":"        \"\"\"Fans out the local resource versions to all neutron servers.\"\"\""},{"line_number":106,"context_line":"        versions \u003d resources.local_resource_versions()"},{"line_number":107,"context_line":"        cctxt \u003d self.client.prepare()"},{"line_number":108,"context_line":"        cctxt.cast(context, \u0027report_versions\u0027,"},{"line_number":109,"context_line":"                   agent_type\u003dagent_type,"}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_89e7b8e3","line":106,"range":{"start_line":106,"start_character":29,"end_line":106,"end_character":52},"updated":"2016-02-15 14:45:03.000000000","message":"LOCAL_RESOURCE_VERSIONS","commit_id":"0c4fbf8eb5975af4f3b030c46ffd808278dc42f7"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"75f24f6194eeb7052972b9d9df6a61e4a03214e0","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                            \u0027version\u0027: version or cls.VERSION}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"#NOTE(mangelajo): Consider renaming this to just \"ResourcesRpcApi\""},{"line_number":66,"context_line":"class ResourcesPullRpcApi(object):"},{"line_number":67,"context_line":"    \"\"\"Agent-side RPC (stub) for agent-to-plugin interaction."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_276b6c1f","line":65,"updated":"2016-02-18 18:20:25.000000000","message":"+1 :)","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                            \u0027version\u0027: version or cls.VERSION}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"#NOTE(mangelajo): Consider renaming this to just \"ResourcesRpcApi\""},{"line_number":66,"context_line":"class ResourcesPullRpcApi(object):"},{"line_number":67,"context_line":"    \"\"\"Agent-side RPC (stub) for agent-to-plugin interaction."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_73e61416","line":65,"updated":"2016-02-23 18:05:02.000000000","message":"O maybe you want a separate API object?..","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":62,"context_line":"                                            \u0027version\u0027: version or cls.VERSION}"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"#NOTE(mangelajo): Consider renaming this to just \"ResourcesRpcApi\""},{"line_number":66,"context_line":"class ResourcesPullRpcApi(object):"},{"line_number":67,"context_line":"    \"\"\"Agent-side RPC (stub) for agent-to-plugin interaction."},{"line_number":68,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_6eaa9186","line":65,"in_reply_to":"bae84128_73e61416","updated":"2016-02-24 06:31:05.000000000","message":"It seems messy to have lots of API endpoints for a single functionality. \n\nBut you\u0027re right this is \"Push\" detail method, and not \"Pull\"\n\nMay be we should unify the API to a single one, now that we\u0027re still in-time.\n\nI will think about it.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        versions \u003d resources.LOCAL_RESOURCE_VERSIONS"},{"line_number":107,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopics.PLUGIN_FANOUT, fanout\u003dTrue)"},{"line_number":108,"context_line":"        cctxt.cast(context, \u0027report_versions\u0027,"},{"line_number":109,"context_line":"                   agent_type\u003dagent_type,"},{"line_number":110,"context_line":"                   agent_host\u003dagent_host,"},{"line_number":111,"context_line":"                   version_map\u003dversions)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_33ae4c98","line":109,"updated":"2016-02-23 18:05:02.000000000","message":"How about making the report itself versioned? For now, it\u0027s probably not that important since we assume that all neutron-server run the same version of the code; but later when we get to the point where we can run mixed versions, it may be of help.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":106,"context_line":"        versions \u003d resources.LOCAL_RESOURCE_VERSIONS"},{"line_number":107,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopics.PLUGIN_FANOUT, fanout\u003dTrue)"},{"line_number":108,"context_line":"        cctxt.cast(context, \u0027report_versions\u0027,"},{"line_number":109,"context_line":"                   agent_type\u003dagent_type,"},{"line_number":110,"context_line":"                   agent_host\u003dagent_host,"},{"line_number":111,"context_line":"                   version_map\u003dversions)"},{"line_number":112,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_aea659ab","line":109,"in_reply_to":"bae84128_33ae4c98","updated":"2016-02-24 06:31:05.000000000","message":"Do you mean OVO?\n\nHow would that work?, if sender sends a newer version than receiver is able to swallow, the receiver of the cast won\u0027t be able to downgrade it. That\u0027s the thing we\u0027re still trying to solve with this API, or am I missing something?\n\nBtw, I think I should bump the version of the api in oslo messaging if I stick to this endpoint.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            return obj.obj_to_primitive(target_version\u003dversion)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class ResourcesPullRpcFanoutCallback(object):"},{"line_number":135,"context_line":"    \"\"\"Plugin-side RPC (implementation) for agent-to-plugin interaction."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    This class implements the server side, fanout part of an rpc interface."}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_b67a59ef","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":36},"updated":"2016-02-23 14:06:13.000000000","message":"Just out of curiosity: Does it have any benefits for having separate class for fanout topic? Would it be too dirty to have registered pull() in fanout topic and respectively report_version in the other topic with call()? Why do we care here?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            return obj.obj_to_primitive(target_version\u003dversion)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class ResourcesPullRpcFanoutCallback(object):"},{"line_number":135,"context_line":"    \"\"\"Plugin-side RPC (implementation) for agent-to-plugin interaction."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    This class implements the server side, fanout part of an rpc interface."}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_ae577956","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":36},"in_reply_to":"bae84128_93d3d803","updated":"2016-02-24 06:31:05.000000000","message":"As I said in L65, after Ihar comments, this should be PushRpcFanoutCallback,  but still , we need a separate class. Let my explain why:\n\nhttps://review.openstack.org/#/c/268040/12/neutron/plugins/ml2/plugin.py@214\n\nIf I add the cast/fanout call with the other methods, and put them together on the point, then when I set fanout\u003dTrue there, they all become (together) fanout consumers.\n\nAlso, I discovered, that even if I do that, and I reuse the general \"PLUGIN\" topic, the first consumer for self.topic stops receiving messages.\n\nMay be we can consume fanout and not fanout on the same consumer/endpoint and I didn\u0027t look deep enough?, I will recheck that.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":131,"context_line":"            return obj.obj_to_primitive(target_version\u003dversion)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"class ResourcesPullRpcFanoutCallback(object):"},{"line_number":135,"context_line":"    \"\"\"Plugin-side RPC (implementation) for agent-to-plugin interaction."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    This class implements the server side, fanout part of an rpc interface."}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_93d3d803","line":134,"range":{"start_line":134,"start_character":0,"end_line":134,"end_character":36},"in_reply_to":"bae84128_b67a59ef","updated":"2016-02-23 18:05:02.000000000","message":"Well, Miguel seems to try to decouple the pull-push mechanism from the way we calculate versions. In this regard, I think both sides (listeners as well as publishers) should have separate classes.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":134,"context_line":"class ResourcesPullRpcFanoutCallback(object):"},{"line_number":135,"context_line":"    \"\"\"Plugin-side RPC (implementation) for agent-to-plugin interaction."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    This class implements the server side, fanout part of an rpc interface."},{"line_number":138,"context_line":"    The client side can be found above: ResourcesPullRpcApi.  For more"},{"line_number":139,"context_line":"    information on this RPC interface, see doc/source/devref/rpc_callbacks.rst."},{"line_number":140,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_b3ed3cb9","line":137,"range":{"start_line":137,"start_character":30,"end_line":137,"end_character":41},"updated":"2016-02-23 18:05:02.000000000","message":"Again, I hate how we tend to use the \u0027server\u0027 term here since it is mixed with neutron-server concept. I suggest you use publisher/listener terms to avoid ambiguity.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":134,"context_line":"class ResourcesPullRpcFanoutCallback(object):"},{"line_number":135,"context_line":"    \"\"\"Plugin-side RPC (implementation) for agent-to-plugin interaction."},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"    This class implements the server side, fanout part of an rpc interface."},{"line_number":138,"context_line":"    The client side can be found above: ResourcesPullRpcApi.  For more"},{"line_number":139,"context_line":"    information on this RPC interface, see doc/source/devref/rpc_callbacks.rst."},{"line_number":140,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_6ed0d1c9","line":137,"range":{"start_line":137,"start_character":30,"end_line":137,"end_character":41},"in_reply_to":"bae84128_b3ed3cb9","updated":"2016-02-24 06:31:05.000000000","message":"That makes sense. Ack.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"88061ac81c2c6e53d8352704c43bba68e49c1e2c","unresolved":false,"context_lines":[{"line_number":146,"context_line":""},{"line_number":147,"context_line":""},{"line_number":148,"context_line":"class ResourcesPushToServerRpcCallback(object):"},{"line_number":149,"context_line":"    \"\"\"Plugin-side RPC (implementation) for agent-to-plugin interaction."},{"line_number":150,"context_line":""},{"line_number":151,"context_line":"    This class implements the receiver side of an rpc interface."},{"line_number":152,"context_line":"    The client side can be found above: ResourcePushToServerRpcApi.  For more"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_ba1f485a","line":149,"range":{"start_line":149,"start_character":50,"end_line":149,"end_character":52},"updated":"2016-02-25 15:31:01.000000000","message":"wrong, not agent-to-plugin, plugin-to-plugin.","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"class ResourcesPushToServersRpcApi(object):"},{"line_number":124,"context_line":"    \"\"\"Publisher-side RPC (stub) for plugin-to-plugin fanout interaction."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    This class implements the client side of an rpc interface.  The receiver"},{"line_number":127,"context_line":"    side can be found below: ResourcesPushToServerRpcCallback.  For more"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_8d17bfa2","line":124,"range":{"start_line":124,"start_character":26,"end_line":124,"end_character":32},"updated":"2016-02-26 11:00:36.000000000","message":"what does that \u0027stub\u0027 mean?","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":121,"context_line":""},{"line_number":122,"context_line":""},{"line_number":123,"context_line":"class ResourcesPushToServersRpcApi(object):"},{"line_number":124,"context_line":"    \"\"\"Publisher-side RPC (stub) for plugin-to-plugin fanout interaction."},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    This class implements the client side of an rpc interface.  The receiver"},{"line_number":127,"context_line":"    side can be found below: ResourcesPushToServerRpcCallback.  For more"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_c2e22e03","line":124,"range":{"start_line":124,"start_character":26,"end_line":124,"end_character":32},"in_reply_to":"9aed3d3a_8d17bfa2","updated":"2016-02-26 12:50:45.000000000","message":"We use this other RpcApi classes, a programming stub or rpc stub, is the chunk of code you have at caller side to translate local call, and convert it to transport.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    @log_helpers.log_method_call"},{"line_number":138,"context_line":"    def report_agent_resource_versions(self, context, agent_type, agent_host,"},{"line_number":139,"context_line":"                                       version_map):"},{"line_number":140,"context_line":"        \"\"\"Fan out the all the agent resource versions to other servers.\"\"\""},{"line_number":141,"context_line":"        cctxt \u003d self.client.prepare(fanout\u003dTrue)"},{"line_number":142,"context_line":"        cctxt.cast(context, \u0027report_agent_resource_versions\u0027,"},{"line_number":143,"context_line":"                   agent_type\u003dagent_type,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_ed5acb82","line":140,"range":{"start_line":140,"start_character":19,"end_line":140,"end_character":26},"updated":"2016-02-26 11:00:36.000000000","message":"all","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":137,"context_line":"    @log_helpers.log_method_call"},{"line_number":138,"context_line":"    def report_agent_resource_versions(self, context, agent_type, agent_host,"},{"line_number":139,"context_line":"                                       version_map):"},{"line_number":140,"context_line":"        \"\"\"Fan out the all the agent resource versions to other servers.\"\"\""},{"line_number":141,"context_line":"        cctxt \u003d self.client.prepare(fanout\u003dTrue)"},{"line_number":142,"context_line":"        cctxt.cast(context, \u0027report_agent_resource_versions\u0027,"},{"line_number":143,"context_line":"                   agent_type\u003dagent_type,"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_02e53608","line":140,"range":{"start_line":140,"start_character":19,"end_line":140,"end_character":26},"in_reply_to":"9aed3d3a_ed5acb82","updated":"2016-02-26 12:50:45.000000000","message":"yikes, thanks.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"}],"neutron/common/topics.py":[{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"75f24f6194eeb7052972b9d9df6a61e4a03214e0","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_27752cca","line":30,"updated":"2016-02-18 18:20:25.000000000","message":"perhaps a more meaningful topic name ? e.g. PLUGIN_VERSIONS \u003d \u0027q-plugin-versions\u0027, since IMHO fanout is the messaging pattern","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"2241f5038cc4da820f106e4829ac3942583132c3","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_60af07e4","line":30,"in_reply_to":"dae33548_27752cca","updated":"2016-02-19 12:02:10.000000000","message":"Yeah, probably it\u0027s better to have separate topics in fact, having a single topic for all the endpoints I believe is just a legacy for backwards compatibility. I\u0027d like to see @amotoki chime in here :)","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"676701d07154cd4a2ef8bd9e777d0307b0059e8b","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_595a472b","line":30,"updated":"2016-02-22 20:27:27.000000000","message":"I thought you wanted to change the topic\u0027s name ?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_8db29b92","line":30,"in_reply_to":"bae84128_3f280386","updated":"2016-02-23 18:05:02.000000000","message":"The current name sounds a bit vague. How about \u0027q-server-resource-version\u0027?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8df64f89074ed8910ea0639ab7df0484aa3e99d0","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_3f280386","line":30,"in_reply_to":"bae84128_595a472b","updated":"2016-02-22 21:10:26.000000000","message":"Yeah, let\u0027s discuss over review what\u0027s the right topic name, it\u0027s hard to change later (when merged) and I didn\u0027t want to trip the name too many times during review.\n\nI have pinged amotoki to have a look at this. :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_8e00b535","line":30,"in_reply_to":"bae84128_8db29b92","updated":"2016-02-24 06:31:05.000000000","message":"Well, the other resource requests (pull) go to q-plugin topic, it seems :/, hard to change now [1]\n\nSo, I asked Akihiro for his opinion on this, shall we have a separate topic, or keep a common one.\n\nMay be, it\u0027s correct (and a very good thing) to have a separate one for this as you are proposing, because we could have a variety of listeners that not necessarily have to be q-plugin, may be at some point in time we could have other message producers, and they need to be aware of the versions of others too.\n\n[1] https://review.openstack.org/#/c/268040/12/neutron/plugins/ml2/plugin.py\n\nSo I\u0027d say +1!  ? :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"AGENT \u003d \u0027q-agent-notifier\u0027"},{"line_number":29,"context_line":"PLUGIN \u003d \u0027q-plugin\u0027"},{"line_number":30,"context_line":"PLUGIN_FANOUT \u003d \u0027q-plugin-fanout\u0027"},{"line_number":31,"context_line":"L3PLUGIN \u003d \u0027q-l3-plugin\u0027"},{"line_number":32,"context_line":"REPORTS \u003d \u0027q-reports-plugin\u0027"},{"line_number":33,"context_line":"DHCP \u003d \u0027q-dhcp-notifer\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_a8dc2d19","line":30,"in_reply_to":"bae84128_8e00b535","updated":"2016-02-25 15:12:55.000000000","message":"Done","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"}],"neutron/db/agents_db.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d30140875262dce6b899e74044821b6aa4f67f8b","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            return self._create_or_update_agent(context, agent)"},{"line_number":369,"context_line":""},{"line_number":370,"context_line":"    @staticmethod"},{"line_number":371,"context_line":"    def get_agents_resource_versions():"},{"line_number":372,"context_line":"        # TODO(mangelajo) implement!"},{"line_number":373,"context_line":"        pass"},{"line_number":374,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_a93c3c30","line":371,"range":{"start_line":371,"start_character":36,"end_line":371,"end_character":39},"updated":"2016-02-15 14:45:03.000000000","message":"accept parameter for ResourceConsumerTracker","commit_id":"0c4fbf8eb5975af4f3b030c46ffd808278dc42f7"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"e4a2f2fa175bd1226ab58dff64baeb1e92e3b964","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    @staticmethod"},{"line_number":398,"context_line":"    def get_agents_resource_versions(tracker):"},{"line_number":399,"context_line":"        \"\"\"Gets the known agent resource versions and updates the tracker."},{"line_number":400,"context_line":""},{"line_number":401,"context_line":"        Receives a version_manager.ResourceConsumerTracker instance and it\u0027s"},{"line_number":402,"context_line":"        expected to look up in to the database and update every agent resource"}],"source_content_type":"text/x-python","patch_set":6,"id":"dae33548_d340e636","line":399,"range":{"start_line":399,"start_character":11,"end_line":399,"end_character":15},"updated":"2016-02-17 10:53:05.000000000","message":"nit: As per pep257 it should be \"Get \" (like if you\u0027re giving a command to the method)","commit_id":"8a649b6806ae264e5d20701d1b4cc2e244c3554d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":169,"context_line":"        version_manager.set_consumer_versions_callback("},{"line_number":170,"context_line":"            AgentDbMixin.get_agents_resource_versions)"},{"line_number":171,"context_line":"        super(AgentDbMixin, self).__init__(*args, **kwargs)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _get_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_c232bca6","line":170,"updated":"2016-02-17 15:52:21.000000000","message":"consider making get_agents_resource_versions not static, and registering self.get_agents_resource_version as callback, to avoid the call to manager.","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4478712c79077dab49201cb99c12172b53cf9e74","unresolved":false,"context_lines":[{"line_number":167,"context_line":""},{"line_number":168,"context_line":"    def __init__(self, *args, **kwargs):"},{"line_number":169,"context_line":"        version_manager.set_consumer_versions_callback("},{"line_number":170,"context_line":"            AgentDbMixin.get_agents_resource_versions)"},{"line_number":171,"context_line":"        super(AgentDbMixin, self).__init__(*args, **kwargs)"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"    def _get_agent(self, context, id):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_1aa4cdb7","line":170,"in_reply_to":"dae33548_c232bca6","updated":"2016-02-18 15:14:53.000000000","message":"Done","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":200,"context_line":"                                       cfg.CONF.agent_down_time)"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    @classmethod"},{"line_number":203,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":204,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":205,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":206,"context_line":"                                       cfg.CONF.agent_down_time * 2)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_a2f05892","line":203,"updated":"2016-02-17 15:52:21.000000000","message":"test","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":204,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":205,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":206,"context_line":"                                       cfg.CONF.agent_down_time * 2)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def get_configuration_dict(self, agent_db):"},{"line_number":209,"context_line":"        return self._get_dict(agent_db, \u0027configurations\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_c28e3c2d","line":206,"updated":"2016-02-17 15:52:21.000000000","message":"should we make this * 2 configurable?\n\nhttp://docs.openstack.org/developer/neutron/devref/rpc_callbacks.html#version-discovery","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4478712c79077dab49201cb99c12172b53cf9e74","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":204,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":205,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":206,"context_line":"                                       cfg.CONF.agent_down_time * 2)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    def get_configuration_dict(self, agent_db):"},{"line_number":209,"context_line":"        return self._get_dict(agent_db, \u0027configurations\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_8fdc2647","line":206,"in_reply_to":"dae33548_c28e3c2d","updated":"2016-02-18 15:14:53.000000000","message":"I converted it to a ratio constant to avoid cluttering the config file with more options.","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":208,"context_line":"    def get_configuration_dict(self, agent_db):"},{"line_number":209,"context_line":"        return self._get_dict(agent_db, \u0027configurations\u0027)"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"    def _get_dict(self, agent_db, dict_name):"},{"line_number":212,"context_line":"        try:"},{"line_number":213,"context_line":"            conf \u003d jsonutils.loads(getattr(agent_db, dict_name))"},{"line_number":214,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_c218fcd5","line":211,"updated":"2016-02-17 15:52:21.000000000","message":"test","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":230,"context_line":"            load \u003d int(configs.get(load_type, 0))"},{"line_number":231,"context_line":"        return load"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def _make_agent_dict(self, agent, fields\u003dNone):"},{"line_number":234,"context_line":"        attr \u003d ext_agent.RESOURCE_ATTRIBUTE_MAP.get("},{"line_number":235,"context_line":"            ext_agent.RESOURCE_NAME + \u0027s\u0027)"},{"line_number":236,"context_line":"        res \u003d dict((k, agent[k]) for k in attr"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_e205407a","line":233,"updated":"2016-02-17 15:52:21.000000000","message":"test new behavior","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":261,"context_line":"        query \u003d self._get_collection_query(context, Agent, filters\u003dfilters)"},{"line_number":262,"context_line":"        return query.all()"},{"line_number":263,"context_line":""},{"line_number":264,"context_line":"    def get_agents(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":265,"context_line":"        agents \u003d self._get_collection(context, Agent,"},{"line_number":266,"context_line":"                                      self._make_agent_dict,"},{"line_number":267,"context_line":"                                      filters\u003dfilters, fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_62d3f004","line":264,"updated":"2016-02-17 15:52:21.000000000","message":"test new behavior","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":324,"context_line":"                      \u0027uuid\u0027: state.get(\u0027uuid\u0027),"},{"line_number":325,"context_line":"                      \u0027delta\u0027: delta})"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"    def _create_or_update_agent(self, context, agent_state):"},{"line_number":328,"context_line":"        \"\"\"Registers new agent in the database or updates existing."},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        Returns agent status from server point of view: alive, new or revived."}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_c2e3dcd7","line":327,"updated":"2016-02-17 15:52:21.000000000","message":"test new behavior","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9ff378996d98c5b20b386d55b20d3855ce7cd7ea","unresolved":false,"context_lines":[{"line_number":416,"context_line":"            LOG.debug(\"Update consumer %(consumer_id)s versions to: \""},{"line_number":417,"context_line":"                      \"%(versions)s\", {\u0027consumer_id\u0027: consumer_id,"},{"line_number":418,"context_line":"                                       \u0027versions\u0027: resource_versions})"},{"line_number":419,"context_line":"            if resource_versions:"},{"line_number":420,"context_line":"                tracker.set_versions(consumer_id, resource_versions)"},{"line_number":421,"context_line":""},{"line_number":422,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_dce7c910","line":419,"updated":"2016-02-19 17:56:35.000000000","message":"This check is not necessary.","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":106,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":107,"context_line":"    # resource_versions: a json dict string"},{"line_number":108,"context_line":"    resource_versions \u003d sa.Column(sa.String(4095))"},{"line_number":109,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":110,"context_line":"    load \u003d sa.Column(sa.Integer, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_53cf9028","line":108,"updated":"2016-02-23 18:05:02.000000000","message":"(No action required) I wonder whether the size will always be enough...","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":106,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":107,"context_line":"    # resource_versions: a json dict string"},{"line_number":108,"context_line":"    resource_versions \u003d sa.Column(sa.String(4095))"},{"line_number":109,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":110,"context_line":"    load \u003d sa.Column(sa.Integer, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_cea47d4c","line":108,"in_reply_to":"bae84128_53cf9028","updated":"2016-02-24 06:31:05.000000000","message":"Yeah, me too, may be we should dump it now, as long as the VARCHAR cost in the database for 4095 or 16k ? (while the real payload is X\u003c4095\u003c16k)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":106,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":107,"context_line":"    # resource_versions: a json dict string"},{"line_number":108,"context_line":"    resource_versions \u003d sa.Column(sa.String(4095))"},{"line_number":109,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":110,"context_line":"    load \u003d sa.Column(sa.Integer, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_489001ed","line":108,"in_reply_to":"bae84128_cea47d4c","updated":"2016-02-25 15:12:55.000000000","message":"Ok, looking at the mysql documentation, at least for mysql, we find that it doesn\u0027t matter too much once you get past the 255 limit:\n\nhttp://dev.mysql.com/doc/refman/5.0/en/char.html\n\nThe limit is 65k, note when we introduced L106 we forced mysql to be \u003e5.0.3\n\npostgresql is limited to 1GB it seems.\n\nhttp://www.postgresql.org/docs/9.2/static/datatype-character.html\n\nI\u0027d say, let\u0027s stick to the maximum 65k of mysql\n\n\nPlease note we also have JSON types now in postgres, mysql and sqlalchemy: \n\nhttp://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.JSON","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":205,"context_line":"                                       cfg.CONF.agent_down_time)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @classmethod"},{"line_number":208,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":209,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":210,"context_line":"        return timeutils.is_older_than(heart_beat_time,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_2570c3db","line":207,"updated":"2016-02-23 18:05:02.000000000","message":"Could even be a staticmethod.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":204,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":205,"context_line":"                                       cfg.CONF.agent_down_time)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @classmethod"},{"line_number":208,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":209,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":210,"context_line":"        return timeutils.is_older_than(heart_beat_time,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_03f6dad6","line":207,"in_reply_to":"bae84128_2570c3db","updated":"2016-02-25 15:12:55.000000000","message":"Fixed","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                                       cfg.CONF.agent_down_time)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @classmethod"},{"line_number":208,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":209,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":210,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":211,"context_line":"                                       cfg.CONF.agent_down_time *"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_654acb27","line":208,"range":{"start_line":208,"start_character":8,"end_line":208,"end_character":40},"updated":"2016-02-23 18:05:02.000000000","message":"The name suggests it will return True when the heart_beat_time is new enough, but  it seems vice versa? [/me looks at line 246 where you have \u0027not\u0027 applied]","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":205,"context_line":"                                       cfg.CONF.agent_down_time)"},{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @classmethod"},{"line_number":208,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":209,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":210,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":211,"context_line":"                                       cfg.CONF.agent_down_time *"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_c313520c","line":208,"range":{"start_line":208,"start_character":8,"end_line":208,"end_character":40},"in_reply_to":"bae84128_654acb27","updated":"2016-02-25 15:12:55.000000000","message":"oh, true. \u0027\u0027:)\nDone.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @classmethod"},{"line_number":208,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":209,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":210,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":211,"context_line":"                                       cfg.CONF.agent_down_time *"},{"line_number":212,"context_line":"                                       DOWNTIME_VERSIONS_RATIO)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_761bb173","line":209,"range":{"start_line":209,"start_character":8,"end_line":209,"end_character":76},"updated":"2016-02-23 14:06:13.000000000","message":"Nit: I don\u0027t think it adds additional information to the method\u0027s name :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"657c438a0397bcd4d92f6d9fea8246e83867b6ed","unresolved":false,"context_lines":[{"line_number":206,"context_line":""},{"line_number":207,"context_line":"    @classmethod"},{"line_number":208,"context_line":"    def is_agent_considered_for_versions(cls, heart_beat_time):"},{"line_number":209,"context_line":"        \"\"\"Determines whether an agent is considered for versions or not.\"\"\""},{"line_number":210,"context_line":"        return timeutils.is_older_than(heart_beat_time,"},{"line_number":211,"context_line":"                                       cfg.CONF.agent_down_time *"},{"line_number":212,"context_line":"                                       DOWNTIME_VERSIONS_RATIO)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_3788d570","line":209,"range":{"start_line":209,"start_character":8,"end_line":209,"end_character":76},"in_reply_to":"bae84128_761bb173","updated":"2016-02-24 08:54:48.000000000","message":"Lol, you\u0027re right :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":244,"context_line":"        res[\u0027alive\u0027] \u003d not AgentDbMixin.is_agent_down("},{"line_number":245,"context_line":"            res[\u0027heartbeat_timestamp\u0027])"},{"line_number":246,"context_line":"        res[\u0027considered_for_versions\u0027] \u003d (not"},{"line_number":247,"context_line":"            AgentDbMixin.is_agent_considered_for_versions("},{"line_number":248,"context_line":"                res[\u0027heartbeat_timestamp\u0027]))"},{"line_number":249,"context_line":"        res[\u0027configurations\u0027] \u003d self._get_dict(agent, \u0027configurations\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_c5491762","line":246,"updated":"2016-02-23 18:05:02.000000000","message":"My understanding is we can avoid polluting the agent dict here and move the calculation of the value to where it\u0027s used: get_agents_resource_versions","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":243,"context_line":"                   if k not in [\u0027alive\u0027, \u0027configurations\u0027])"},{"line_number":244,"context_line":"        res[\u0027alive\u0027] \u003d not AgentDbMixin.is_agent_down("},{"line_number":245,"context_line":"            res[\u0027heartbeat_timestamp\u0027])"},{"line_number":246,"context_line":"        res[\u0027considered_for_versions\u0027] \u003d (not"},{"line_number":247,"context_line":"            AgentDbMixin.is_agent_considered_for_versions("},{"line_number":248,"context_line":"                res[\u0027heartbeat_timestamp\u0027]))"},{"line_number":249,"context_line":"        res[\u0027configurations\u0027] \u003d self._get_dict(agent, \u0027configurations\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_6376c63f","line":246,"in_reply_to":"bae84128_c5491762","updated":"2016-02-25 15:12:55.000000000","message":"It makes filtering easier. We yeah, let\u0027s simplify that, now that I will unexpose it from the api, it\u0027s not necessary anymore.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        res[\u0027alive\u0027] \u003d not AgentDbMixin.is_agent_down("},{"line_number":245,"context_line":"            res[\u0027heartbeat_timestamp\u0027])"},{"line_number":246,"context_line":"        res[\u0027considered_for_versions\u0027] \u003d (not"},{"line_number":247,"context_line":"            AgentDbMixin.is_agent_considered_for_versions("},{"line_number":248,"context_line":"                res[\u0027heartbeat_timestamp\u0027]))"},{"line_number":249,"context_line":"        res[\u0027configurations\u0027] \u003d self._get_dict(agent, \u0027configurations\u0027)"},{"line_number":250,"context_line":"        res[\u0027resource_versions\u0027] \u003d self._get_dict(agent, \u0027resource_versions\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_e50b7bd4","line":247,"range":{"start_line":247,"start_character":12,"end_line":247,"end_character":24},"updated":"2016-02-23 18:05:02.000000000","message":"not clear why you call it this way here instead of using \u0027self.\u0027","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        res[\u0027alive\u0027] \u003d not AgentDbMixin.is_agent_down("},{"line_number":245,"context_line":"            res[\u0027heartbeat_timestamp\u0027])"},{"line_number":246,"context_line":"        res[\u0027considered_for_versions\u0027] \u003d (not"},{"line_number":247,"context_line":"            AgentDbMixin.is_agent_considered_for_versions("},{"line_number":248,"context_line":"                res[\u0027heartbeat_timestamp\u0027]))"},{"line_number":249,"context_line":"        res[\u0027configurations\u0027] \u003d self._get_dict(agent, \u0027configurations\u0027)"},{"line_number":250,"context_line":"        res[\u0027resource_versions\u0027] \u003d self._get_dict(agent, \u0027resource_versions\u0027)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_63ad2688","line":247,"range":{"start_line":247,"start_character":12,"end_line":247,"end_character":24},"in_reply_to":"bae84128_e50b7bd4","updated":"2016-02-25 15:12:55.000000000","message":"copy\u0026paste from L244, fixing both.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        query \u003d self._get_collection_query(context, Agent, filters\u003dfilters)"},{"line_number":268,"context_line":"        return query.all()"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def get_agents(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":271,"context_line":"        agents \u003d self._get_collection(context, Agent,"},{"line_number":272,"context_line":"                                      self._make_agent_dict,"},{"line_number":273,"context_line":"                                      filters\u003dfilters, fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_4524e75e","line":270,"updated":"2016-02-23 18:05:02.000000000","message":"I suggest we don\u0027t touch the method and just leave get_agents_resource_versions the heart beat check.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        query \u003d self._get_collection_query(context, Agent, filters\u003dfilters)"},{"line_number":268,"context_line":"        return query.all()"},{"line_number":269,"context_line":""},{"line_number":270,"context_line":"    def get_agents(self, context, filters\u003dNone, fields\u003dNone):"},{"line_number":271,"context_line":"        agents \u003d self._get_collection(context, Agent,"},{"line_number":272,"context_line":"                                      self._make_agent_dict,"},{"line_number":273,"context_line":"                                      filters\u003dfilters, fields\u003dfields)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_437462fc","line":270,"in_reply_to":"bae84128_4524e75e","updated":"2016-02-25 15:12:55.000000000","message":"Ok, ok, I will cleanup this back","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            return agents"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        for extra_filter in [\u0027alive\u0027, \u0027considered_for_versions\u0027]:"},{"line_number":278,"context_line":"            filter_values \u003d filters.get(extra_filter, None)"},{"line_number":279,"context_line":"            if filter_values:"},{"line_number":280,"context_line":"                filter_value \u003d attributes.convert_to_boolean(filter_values[0])"},{"line_number":281,"context_line":"                agents \u003d [agent for agent in agents if agent[extra_filter] \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_7618d11e","line":278,"range":{"start_line":278,"start_character":12,"end_line":278,"end_character":59},"updated":"2016-02-23 14:06:13.000000000","message":"Nit: I always like to point out that correct Python way is: https://docs.python.org/2/glossary.html#term-eafp :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"657c438a0397bcd4d92f6d9fea8246e83867b6ed","unresolved":false,"context_lines":[{"line_number":275,"context_line":"            return agents"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"        for extra_filter in [\u0027alive\u0027, \u0027considered_for_versions\u0027]:"},{"line_number":278,"context_line":"            filter_values \u003d filters.get(extra_filter, None)"},{"line_number":279,"context_line":"            if filter_values:"},{"line_number":280,"context_line":"                filter_value \u003d attributes.convert_to_boolean(filter_values[0])"},{"line_number":281,"context_line":"                agents \u003d [agent for agent in agents if agent[extra_filter] \u003d\u003d"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_b7db457b","line":278,"range":{"start_line":278,"start_character":12,"end_line":278,"end_character":59},"in_reply_to":"bae84128_7618d11e","updated":"2016-02-24 08:54:48.000000000","message":"Yeah, but I prefer shorter functions, than catching exceptions. When I know that it\u0027s quite likely the key won\u0027t be there in most cases. :-) . Instead of the python guides (who knows about python!!) ;) , I recommend this book: http://www.amazon.es/The-Clean-Coder-Professional-Programmers/dp/0137081073","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            filter_values \u003d filters.get(extra_filter, None)"},{"line_number":279,"context_line":"            if filter_values:"},{"line_number":280,"context_line":"                filter_value \u003d attributes.convert_to_boolean(filter_values[0])"},{"line_number":281,"context_line":"                agents \u003d [agent for agent in agents if agent[extra_filter] \u003d\u003d"},{"line_number":282,"context_line":"                          filter_value]"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        return agents"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_d6b6fdf7","line":282,"range":{"start_line":281,"start_character":16,"end_line":282,"end_character":39},"updated":"2016-02-23 14:06:13.000000000","message":"You\u0027re shadowing the agents from previous extra_filter. That means \u0027alive\u0027 will be have never any effect on the result.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            filter_values \u003d filters.get(extra_filter, None)"},{"line_number":279,"context_line":"            if filter_values:"},{"line_number":280,"context_line":"                filter_value \u003d attributes.convert_to_boolean(filter_values[0])"},{"line_number":281,"context_line":"                agents \u003d [agent for agent in agents if agent[extra_filter] \u003d\u003d"},{"line_number":282,"context_line":"                          filter_value]"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        return agents"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_25b723f6","line":282,"range":{"start_line":281,"start_character":16,"end_line":282,"end_character":39},"in_reply_to":"bae84128_d6b6fdf7","updated":"2016-02-23 18:05:02.000000000","message":"(replying to Jakub\u0027s comment) time to write some regression tests for the piece of code?..","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"657c438a0397bcd4d92f6d9fea8246e83867b6ed","unresolved":false,"context_lines":[{"line_number":278,"context_line":"            filter_values \u003d filters.get(extra_filter, None)"},{"line_number":279,"context_line":"            if filter_values:"},{"line_number":280,"context_line":"                filter_value \u003d attributes.convert_to_boolean(filter_values[0])"},{"line_number":281,"context_line":"                agents \u003d [agent for agent in agents if agent[extra_filter] \u003d\u003d"},{"line_number":282,"context_line":"                          filter_value]"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        return agents"},{"line_number":285,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_b724e50c","line":282,"range":{"start_line":281,"start_character":16,"end_line":282,"end_character":39},"in_reply_to":"bae84128_d6b6fdf7","updated":"2016-02-24 08:54:48.000000000","message":"Hmm, it has effect, this is tested.\n\nI agree about shadowing, but it\u0027s intended, as I wanted to accumulatively filter on the extra filters. \n\nAm I missing something? :? :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                context.session.add(agent_db)"},{"line_number":371,"context_line":"                self._log_heartbeat(agent_state, agent_db, configurations_dict)"},{"line_number":372,"context_line":"                status \u003d constants.AGENT_NEW"},{"line_number":373,"context_line":"            greenthread.sleep(0)"},{"line_number":374,"context_line":"            # Update the RPC callbacks version manager about the agent"},{"line_number":375,"context_line":"            # known resource versions"},{"line_number":376,"context_line":"            version_manager.update_versions("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_c5abd773","line":373,"range":{"start_line":373,"start_character":12,"end_line":373,"end_character":32},"updated":"2016-02-23 18:05:02.000000000","message":"(No action required) pretty amazed we have explicit yields from under transactions.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":370,"context_line":"                context.session.add(agent_db)"},{"line_number":371,"context_line":"                self._log_heartbeat(agent_state, agent_db, configurations_dict)"},{"line_number":372,"context_line":"                status \u003d constants.AGENT_NEW"},{"line_number":373,"context_line":"            greenthread.sleep(0)"},{"line_number":374,"context_line":"            # Update the RPC callbacks version manager about the agent"},{"line_number":375,"context_line":"            # known resource versions"},{"line_number":376,"context_line":"            version_manager.update_versions("}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_15256dc1","line":373,"range":{"start_line":373,"start_character":12,"end_line":373,"end_character":32},"in_reply_to":"bae84128_c5abd773","updated":"2016-02-25 15:12:55.000000000","message":"I guess it\u0027s a result of previous .cast for agent initial heartbeat, when race conditions were tried to be cleaned up somehow?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            greenthread.sleep(0)"},{"line_number":374,"context_line":"            # Update the RPC callbacks version manager about the agent"},{"line_number":375,"context_line":"            # known resource versions"},{"line_number":376,"context_line":"            version_manager.update_versions("},{"line_number":377,"context_line":"                version_manager.get_agent_consumer_id("},{"line_number":378,"context_line":"                    agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":379,"context_line":"                resource_versions_dict)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_65f76b8b","line":376,"updated":"2016-02-23 18:05:02.000000000","message":"Shouldn\u0027t you update only after the current transaction commits?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":373,"context_line":"            greenthread.sleep(0)"},{"line_number":374,"context_line":"            # Update the RPC callbacks version manager about the agent"},{"line_number":375,"context_line":"            # known resource versions"},{"line_number":376,"context_line":"            version_manager.update_versions("},{"line_number":377,"context_line":"                version_manager.get_agent_consumer_id("},{"line_number":378,"context_line":"                    agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":379,"context_line":"                resource_versions_dict)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_589f2c5f","line":376,"in_reply_to":"bae84128_65f76b8b","updated":"2016-02-25 15:12:55.000000000","message":"I see no difference, the version on the agent is know to us at this point and we can update our internal cache.\n\nIf transaction fails, we well get it retried again by agent.\n\nBut I\u0027ll move it out, but before transaction, as well as the cast to other servers, to make sure that happens with no DB delay, and that we separate the concerns.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"d58bdbaba56adedb789b8fdb31460c3f33eb63d6","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                                 filters\u003d{\u0027admin_state_up\u0027: [True],"},{"line_number":411,"context_line":"                                          \u0027considered_for_versions\u0027: [True]})"},{"line_number":412,"context_line":"        for agent in agents:"},{"line_number":413,"context_line":"            resource_versions \u003d agent.get(\u0027resource_versions\u0027, {})"},{"line_number":414,"context_line":"            consumer_id \u003d version_manager.get_agent_consumer_id("},{"line_number":415,"context_line":"                agent[\u0027agent_type\u0027], agent[\u0027host\u0027])"},{"line_number":416,"context_line":"            LOG.debug(\"Update consumer %(consumer_id)s versions to: \""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_29154e3f","line":413,"range":{"start_line":413,"start_character":32,"end_line":413,"end_character":66},"updated":"2016-02-23 14:06:13.000000000","message":"Nit: Can it ever happen that resource_version won\u0027t be here?","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                                 filters\u003d{\u0027admin_state_up\u0027: [True],"},{"line_number":411,"context_line":"                                          \u0027considered_for_versions\u0027: [True]})"},{"line_number":412,"context_line":"        for agent in agents:"},{"line_number":413,"context_line":"            resource_versions \u003d agent.get(\u0027resource_versions\u0027, {})"},{"line_number":414,"context_line":"            consumer_id \u003d version_manager.get_agent_consumer_id("},{"line_number":415,"context_line":"                agent[\u0027agent_type\u0027], agent[\u0027host\u0027])"},{"line_number":416,"context_line":"            LOG.debug(\"Update consumer %(consumer_id)s versions to: \""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_c59117f3","line":413,"range":{"start_line":413,"start_character":32,"end_line":413,"end_character":66},"in_reply_to":"bae84128_29154e3f","updated":"2016-02-23 18:05:02.000000000","message":"Right, _make_agent_dict takes care of setting {} if it\u0027s not stored in db yet.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":410,"context_line":"                                 filters\u003d{\u0027admin_state_up\u0027: [True],"},{"line_number":411,"context_line":"                                          \u0027considered_for_versions\u0027: [True]})"},{"line_number":412,"context_line":"        for agent in agents:"},{"line_number":413,"context_line":"            resource_versions \u003d agent.get(\u0027resource_versions\u0027, {})"},{"line_number":414,"context_line":"            consumer_id \u003d version_manager.get_agent_consumer_id("},{"line_number":415,"context_line":"                agent[\u0027agent_type\u0027], agent[\u0027host\u0027])"},{"line_number":416,"context_line":"            LOG.debug(\"Update consumer %(consumer_id)s versions to: \""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_2b8db47b","line":413,"range":{"start_line":413,"start_character":32,"end_line":413,"end_character":66},"in_reply_to":"bae84128_c59117f3","updated":"2016-02-25 15:12:55.000000000","message":"Right, but slammed now :)","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            resource_versions \u003d agent.get(\u0027resource_versions\u0027, {})"},{"line_number":414,"context_line":"            consumer_id \u003d version_manager.get_agent_consumer_id("},{"line_number":415,"context_line":"                agent[\u0027agent_type\u0027], agent[\u0027host\u0027])"},{"line_number":416,"context_line":"            LOG.debug(\"Update consumer %(consumer_id)s versions to: \""},{"line_number":417,"context_line":"                      \"%(versions)s\", {\u0027consumer_id\u0027: consumer_id,"},{"line_number":418,"context_line":"                                       \u0027versions\u0027: resource_versions})"},{"line_number":419,"context_line":"            tracker.set_versions(consumer_id, resource_versions)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_650beb2a","line":416,"updated":"2016-02-23 18:05:02.000000000","message":"I would think the log message belongs to tracker, but meh.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":413,"context_line":"            resource_versions \u003d agent.get(\u0027resource_versions\u0027, {})"},{"line_number":414,"context_line":"            consumer_id \u003d version_manager.get_agent_consumer_id("},{"line_number":415,"context_line":"                agent[\u0027agent_type\u0027], agent[\u0027host\u0027])"},{"line_number":416,"context_line":"            LOG.debug(\"Update consumer %(consumer_id)s versions to: \""},{"line_number":417,"context_line":"                      \"%(versions)s\", {\u0027consumer_id\u0027: consumer_id,"},{"line_number":418,"context_line":"                                       \u0027versions\u0027: resource_versions})"},{"line_number":419,"context_line":"            tracker.set_versions(consumer_id, resource_versions)"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_2bbbf40f","line":416,"in_reply_to":"bae84128_650beb2a","updated":"2016-02-25 15:12:55.000000000","message":"It\u0027s debug, we can remove a bit of it later.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"88061ac81c2c6e53d8352704c43bba68e49c1e2c","unresolved":false,"context_lines":[{"line_number":361,"context_line":"                self._log_heartbeat(agent_state, agent_db, configurations_dict)"},{"line_number":362,"context_line":"                status \u003d constants.AGENT_NEW"},{"line_number":363,"context_line":"            greenthread.sleep(0)"},{"line_number":364,"context_line":"            # Update the RPC callbacks version manager about the agent"},{"line_number":365,"context_line":"            # known resource versions"},{"line_number":366,"context_line":"        return status"},{"line_number":367,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_7ae82017","line":364,"range":{"start_line":364,"start_character":13,"end_line":364,"end_character":14},"updated":"2016-02-25 15:31:01.000000000","message":"this must go out now","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"87b68c679f5344fad2b14327e5cc349fcc4f8ce2","unresolved":false,"context_lines":[{"line_number":372,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":373,"context_line":"            resource_versions_dict)"},{"line_number":374,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":375,"context_line":"        self.server_versions_rpc.report_agent_resource_versions("},{"line_number":376,"context_line":"            context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"},{"line_number":377,"context_line":"            resource_versions_dict)"},{"line_number":378,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_8ca32f9e","line":375,"updated":"2016-02-25 16:33:34.000000000","message":"not only core plugin inherits the AgentDbMixin, and therefore this server_versions_rpc won\u0027t always be there until they implement it push/pull of OVOs.\n\nhttp://paste.openstack.org/show/488219/\n\nWe need to fail softly about this, or create the RPC end dynamically (and probably making it a singleton to avoid resource waste).","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"14000cfd673dbdbb3ca3339e4bdffec451c36031","unresolved":false,"context_lines":[{"line_number":245,"context_line":"                                      filters\u003dfilters, fields\u003dfields)"},{"line_number":246,"context_line":"        alive \u003d filters and filters.get(\u0027alive\u0027, None)"},{"line_number":247,"context_line":"        if alive:"},{"line_number":248,"context_line":"            # alive filter will be a list"},{"line_number":249,"context_line":"            alive \u003d attributes.convert_to_boolean(alive[0])"},{"line_number":250,"context_line":"            agents \u003d [agent for agent in agents if agent[\u0027alive\u0027] \u003d\u003d alive]"},{"line_number":251,"context_line":"        return agents"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aed3d3a_17b91fea","side":"PARENT","line":248,"updated":"2016-02-25 20:38:57.000000000","message":"unrelated, removal","commit_id":"d51a18c4d09b541443f8ed3d504c586a685d3d66"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"14000cfd673dbdbb3ca3339e4bdffec451c36031","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"},{"line_number":375,"context_line":"                resource_versions_dict)"}],"source_content_type":"text/x-python","patch_set":14,"id":"9aed3d3a_d7ba17c0","line":372,"updated":"2016-02-25 20:38:57.000000000","message":"I\u0027m considering to add the server_versions_rpc to \n\nhttps://review.openstack.org/#/c/268040/14/neutron/db/agents_db.py@425  and move all this logic down there.\n\nThis way, any plugin importing that method would automatically start propagating the versions he receives without the need to provide that rpc stub manually.","commit_id":"f3250e2f12061b29dbf8c20d9b464fc52dfc7aa2"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    description \u003d sa.Column(sa.String(attributes.DESCRIPTION_MAX_LEN))"},{"line_number":106,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":107,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":108,"context_line":"    resource_versions \u003d sa.Column(sa.String(8191))"},{"line_number":109,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":110,"context_line":"    load \u003d sa.Column(sa.Integer, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_b04db874","line":108,"range":{"start_line":108,"start_character":44,"end_line":108,"end_character":48},"updated":"2016-02-26 11:00:36.000000000","message":"You probably want to explain why the magic value here. Are other values failing somehow? Or if we are not really sure how it will behave on all backends, maybe it\u0027s wise to stick to what\u0027s known to work (as in line 107).","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":105,"context_line":"    description \u003d sa.Column(sa.String(attributes.DESCRIPTION_MAX_LEN))"},{"line_number":106,"context_line":"    # configurations: a json dict string, I think 4095 is enough"},{"line_number":107,"context_line":"    configurations \u003d sa.Column(sa.String(4095), nullable\u003dFalse)"},{"line_number":108,"context_line":"    resource_versions \u003d sa.Column(sa.String(8191))"},{"line_number":109,"context_line":"    # load - number of resources hosted by the agent"},{"line_number":110,"context_line":"    load \u003d sa.Column(sa.Integer, server_default\u003d\u00270\u0027, nullable\u003dFalse)"},{"line_number":111,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_22967a4c","line":108,"range":{"start_line":108,"start_character":44,"end_line":108,"end_character":48},"in_reply_to":"9aed3d3a_b04db874","updated":"2016-02-26 12:50:45.000000000","message":"I will explain the reasoning.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        version_manager.update_versions("},{"line_number":368,"context_line":"            version_manager.get_agent_consumer_id("},{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_3027e813","line":370,"updated":"2016-02-26 11:00:36.000000000","message":"Agreed that it would better be implemented in report_state callback handler itself, so that other plugins relying on the method get the functionality automatically.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":367,"context_line":"        version_manager.update_versions("},{"line_number":368,"context_line":"            version_manager.get_agent_consumer_id("},{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_82bb06c4","line":370,"in_reply_to":"9aed3d3a_3027e813","updated":"2016-02-26 12:50:45.000000000","message":"thanks for the feedback Ihar.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            version_manager.get_agent_consumer_id("},{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_5001ccad","line":371,"range":{"start_line":371,"start_character":23,"end_line":371,"end_character":39},"updated":"2016-02-26 11:00:36.000000000","message":"neutron-servers","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":368,"context_line":"            version_manager.get_agent_consumer_id("},{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_e2b012e0","line":371,"range":{"start_line":371,"start_character":23,"end_line":371,"end_character":39},"in_reply_to":"9aed3d3a_5001ccad","updated":"2016-02-26 12:50:45.000000000","message":"ack,","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"},{"line_number":375,"context_line":"                resource_versions_dict)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_d0ecbcc9","line":372,"range":{"start_line":372,"start_character":11,"end_line":372,"end_character":53},"updated":"2016-02-26 11:00:36.000000000","message":"hasattr(self, \u0027...\u0027)","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":369,"context_line":"                agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027]),"},{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"},{"line_number":375,"context_line":"                resource_versions_dict)"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_62dc0213","line":372,"range":{"start_line":372,"start_character":11,"end_line":372,"end_character":53},"in_reply_to":"9aed3d3a_d0ecbcc9","updated":"2016-02-26 12:50:45.000000000","message":"yikes, true... ;) it\u0027s a function I don\u0027t use very often :)","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"},{"line_number":375,"context_line":"                resource_versions_dict)"},{"line_number":376,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_70f210d4","line":373,"range":{"start_line":373,"start_character":17,"end_line":373,"end_character":36},"updated":"2016-02-26 11:00:36.000000000","message":"I believe it should be something better than an attribute. Plugin should expose the RPC entry point thru some public documented method that is probably defined as abstract on the base plugin class.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":370,"context_line":"            resource_versions_dict)"},{"line_number":371,"context_line":"        # report other neutron-server\u0027s about this quickly"},{"line_number":372,"context_line":"        if getattr(self, \u0027server_versions_rpc\u0027, None):"},{"line_number":373,"context_line":"            self.server_versions_rpc.report_agent_resource_versions("},{"line_number":374,"context_line":"                context, agent_state[\u0027agent_type\u0027], agent_state[\u0027host\u0027],"},{"line_number":375,"context_line":"                resource_versions_dict)"},{"line_number":376,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_42757ef7","line":373,"range":{"start_line":373,"start_character":17,"end_line":373,"end_character":36},"in_reply_to":"9aed3d3a_70f210d4","updated":"2016-02-26 12:50:45.000000000","message":"Yes, I agree with that, but I\u0027ll move it to the callback, I agree it will be much better that way.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                resource_versions_dict)"},{"line_number":376,"context_line":"        else:"},{"line_number":377,"context_line":"            LOG.debug(\"server_versions_rpc not provided in class %s, \""},{"line_number":378,"context_line":"                      \"skipping, this rpc stub is necessary to handle \""},{"line_number":379,"context_line":"                      \"rpc_callbacks push/pull versioning, please see \""},{"line_number":380,"context_line":"                      \"devref/rpc_callbacks.rst\","},{"line_number":381,"context_line":"                      reflection.get_class_name(self))"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_3096c84c","line":378,"range":{"start_line":378,"start_character":38,"end_line":378,"end_character":46},"updated":"2016-02-26 11:00:36.000000000","message":"Why is it really a stub? I always thought stub is something that does not do anything, like a noop driver or smth.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":375,"context_line":"                resource_versions_dict)"},{"line_number":376,"context_line":"        else:"},{"line_number":377,"context_line":"            LOG.debug(\"server_versions_rpc not provided in class %s, \""},{"line_number":378,"context_line":"                      \"skipping, this rpc stub is necessary to handle \""},{"line_number":379,"context_line":"                      \"rpc_callbacks push/pull versioning, please see \""},{"line_number":380,"context_line":"                      \"devref/rpc_callbacks.rst\","},{"line_number":381,"context_line":"                      reflection.get_class_name(self))"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_e2e8127f","line":378,"range":{"start_line":378,"start_character":38,"end_line":378,"end_character":46},"in_reply_to":"9aed3d3a_3096c84c","updated":"2016-02-26 12:50:45.000000000","message":"https://en.wikipedia.org/wiki/Stub_(distributed_computing)\n\n:-) I knew it from here http://linux.die.net/man/1/rpcgen","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        else:"},{"line_number":377,"context_line":"            LOG.debug(\"server_versions_rpc not provided in class %s, \""},{"line_number":378,"context_line":"                      \"skipping, this rpc stub is necessary to handle \""},{"line_number":379,"context_line":"                      \"rpc_callbacks push/pull versioning, please see \""},{"line_number":380,"context_line":"                      \"devref/rpc_callbacks.rst\","},{"line_number":381,"context_line":"                      reflection.get_class_name(self))"},{"line_number":382,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_70a050a0","line":379,"range":{"start_line":379,"start_character":23,"end_line":379,"end_character":36},"updated":"2016-02-26 11:00:36.000000000","message":"RPC callbacks","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":376,"context_line":"        else:"},{"line_number":377,"context_line":"            LOG.debug(\"server_versions_rpc not provided in class %s, \""},{"line_number":378,"context_line":"                      \"skipping, this rpc stub is necessary to handle \""},{"line_number":379,"context_line":"                      \"rpc_callbacks push/pull versioning, please see \""},{"line_number":380,"context_line":"                      \"devref/rpc_callbacks.rst\","},{"line_number":381,"context_line":"                      reflection.get_class_name(self))"},{"line_number":382,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_82c146e7","line":379,"range":{"start_line":379,"start_character":23,"end_line":379,"end_character":36},"in_reply_to":"9aed3d3a_70a050a0","updated":"2016-02-26 12:50:45.000000000","message":"right.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":377,"context_line":"            LOG.debug(\"server_versions_rpc not provided in class %s, \""},{"line_number":378,"context_line":"                      \"skipping, this rpc stub is necessary to handle \""},{"line_number":379,"context_line":"                      \"rpc_callbacks push/pull versioning, please see \""},{"line_number":380,"context_line":"                      \"devref/rpc_callbacks.rst\","},{"line_number":381,"context_line":"                      reflection.get_class_name(self))"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def create_or_update_agent(self, context, agent):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_307d281d","line":380,"range":{"start_line":380,"start_character":23,"end_line":380,"end_character":47},"updated":"2016-02-26 11:00:36.000000000","message":"I prefer we skip referring to devref in logs.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":377,"context_line":"            LOG.debug(\"server_versions_rpc not provided in class %s, \""},{"line_number":378,"context_line":"                      \"skipping, this rpc stub is necessary to handle \""},{"line_number":379,"context_line":"                      \"rpc_callbacks push/pull versioning, please see \""},{"line_number":380,"context_line":"                      \"devref/rpc_callbacks.rst\","},{"line_number":381,"context_line":"                      reflection.get_class_name(self))"},{"line_number":382,"context_line":""},{"line_number":383,"context_line":"    def create_or_update_agent(self, context, agent):"}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_a263aa19","line":380,"range":{"start_line":380,"start_character":23,"end_line":380,"end_character":47},"in_reply_to":"9aed3d3a_307d281d","updated":"2016-02-26 12:50:45.000000000","message":"Makes sense. Anyway it\u0027s a warning for plugin developers. May be if we ever need that, an url to the http version would be more correct.","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":429,"context_line":"        self.plugin \u003d plugin"},{"line_number":430,"context_line":"        #TODO(ajo): fix the resources circular dependency issue by dynamically"},{"line_number":431,"context_line":"        #           registering object types in the RPC callbacks api"},{"line_number":432,"context_line":"        resources_rpc \u003d importutils.import_module("},{"line_number":433,"context_line":"            \u0027neutron.api.rpc.handlers.resources_rpc\u0027)"},{"line_number":434,"context_line":"        # Initialize RPC api directed to other neutron-servers"},{"line_number":435,"context_line":"        self.server_versions_rpc \u003d resources_rpc.ResourcesPushToServersRpcApi()"},{"line_number":436,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_5ba229fe","line":433,"range":{"start_line":432,"start_character":8,"end_line":433,"end_character":53},"updated":"2016-02-29 12:40:37.000000000","message":"Same question on using importutils as in another file.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":453,"context_line":"            return"},{"line_number":454,"context_line":"        if not self.plugin:"},{"line_number":455,"context_line":"            self.plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":456,"context_line":"        self._update_local_agent_resource_versions(context, agent_state)"},{"line_number":457,"context_line":"        return self.plugin.create_or_update_agent(context, agent_state)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def _update_local_agent_resource_versions(self, context, agent_state):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_dbae39e5","line":456,"updated":"2016-02-29 12:40:37.000000000","message":"I believe it\u0027s more safe to first update database, then fanout. Otherwise there is a slight chance neutron-servers are updated with new version; though db does not get updated; so updated servers later recalculate the version and fall back to updates that do not consider the agent. I would be glad to avoid that going back and forth.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c6522e567a041ad364ebedffd4059ccf55e7d098","unresolved":false,"context_lines":[{"line_number":453,"context_line":"            return"},{"line_number":454,"context_line":"        if not self.plugin:"},{"line_number":455,"context_line":"            self.plugin \u003d manager.NeutronManager.get_plugin()"},{"line_number":456,"context_line":"        self._update_local_agent_resource_versions(context, agent_state)"},{"line_number":457,"context_line":"        return self.plugin.create_or_update_agent(context, agent_state)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def _update_local_agent_resource_versions(self, context, agent_state):"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_0a968c92","line":456,"in_reply_to":"9aed3d3a_dbae39e5","updated":"2016-02-29 13:00:28.000000000","message":"Good point, it seems like I was introducing a race condition.\n\nWill fix in next hour.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"}],"neutron/db/migration/alembic_migrations/versions/mitaka/expand/31ed664953e6_add_resource_versions_row_to_agent_table.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"88061ac81c2c6e53d8352704c43bba68e49c1e2c","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"def upgrade():"},{"line_number":33,"context_line":"    op.add_column(\u0027agents\u0027,"},{"line_number":34,"context_line":"                  sa.Column(\u0027resource_versions\u0027, sa.String(length\u003d4095)))"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_7a2b0034","line":34,"range":{"start_line":34,"start_character":66,"end_line":34,"end_character":70},"updated":"2016-02-25 15:31:01.000000000","message":"this has to be 65535 now.","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"}],"neutron/extensions/agent.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                  \u0027is_visible\u0027: True},"},{"line_number":52,"context_line":"        \u0027configurations\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                           \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        \u0027resource_versions\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":55,"context_line":"                              \u0027is_visible\u0027: True},"},{"line_number":56,"context_line":"        \u0027description\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: True,"},{"line_number":57,"context_line":"                        \u0027is_visible\u0027: True,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_8556ef59","line":54,"updated":"2016-02-23 18:05:02.000000000","message":"Why exactly do we want to expose it? I don\u0027t think it\u0027s very useful and usable as is now. It could help to users if we would consolidate the version numbers into some symbolic release representation. [Knowing that an agent is running Liberty code and not Mitaka would be useful sometimes but that\u0027s not what you do here.]","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                  \u0027is_visible\u0027: True},"},{"line_number":52,"context_line":"        \u0027configurations\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                           \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        \u0027resource_versions\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":55,"context_line":"                              \u0027is_visible\u0027: True},"},{"line_number":56,"context_line":"        \u0027description\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: True,"},{"line_number":57,"context_line":"                        \u0027is_visible\u0027: True,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_499f605f","line":54,"in_reply_to":"bae84128_4e14ed4b","updated":"2016-02-25 15:12:55.000000000","message":"Done","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":51,"context_line":"                  \u0027is_visible\u0027: True},"},{"line_number":52,"context_line":"        \u0027configurations\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":53,"context_line":"                           \u0027is_visible\u0027: True},"},{"line_number":54,"context_line":"        \u0027resource_versions\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":55,"context_line":"                              \u0027is_visible\u0027: True},"},{"line_number":56,"context_line":"        \u0027description\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: True,"},{"line_number":57,"context_line":"                        \u0027is_visible\u0027: True,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_4e14ed4b","line":54,"in_reply_to":"bae84128_8556ef59","updated":"2016-02-24 06:31:05.000000000","message":"Yeah, I agree, our version numbers would be implementation detail, and the useful bit here is the \"release\", but what about master chasers?\n\nI thought it would be a good mechanism for operator introspection during an upgrade. But it\u0027s too much implementation detail I guess.\n\nIf nobody say anything for it, I will remove it.","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_neutron_agent.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d30140875262dce6b899e74044821b6aa4f67f8b","unresolved":false,"context_lines":[{"line_number":253,"context_line":"                               \u0027ovs_capabilities\u0027: self.ovs.capabilities,"},{"line_number":254,"context_line":"                               \u0027vhostuser_socket_dir\u0027:"},{"line_number":255,"context_line":"                               ovs_conf.vhostuser_socket_dir},"},{"line_number":256,"context_line":"            \u0027resource_versions\u0027: resources.local_resource_versions(),"},{"line_number":257,"context_line":"            \u0027agent_type\u0027: agent_conf.agent_type,"},{"line_number":258,"context_line":"            \u0027start_flag\u0027: True}"},{"line_number":259,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"dae33548_1c948835","line":256,"range":{"start_line":256,"start_character":66,"end_line":256,"end_character":69},"updated":"2016-02-15 14:45:03.000000000","message":"LOCAL_RESOURCE_VERSIONS","commit_id":"0c4fbf8eb5975af4f3b030c46ffd808278dc42f7"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":300,"context_line":"        except ValueError as e:"},{"line_number":301,"context_line":"            raise ValueError(_(\"Parsing bridge_mappings failed: %s.\") % e)"},{"line_number":302,"context_line":""},{"line_number":303,"context_line":"    def _report_state(self):"},{"line_number":304,"context_line":"        # How many devices are likely used by a VM"},{"line_number":305,"context_line":"        self.agent_state.get(\u0027configurations\u0027)[\u0027devices\u0027] \u003d ("},{"line_number":306,"context_line":"            self.int_br_device_count)"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_070f9688","line":303,"updated":"2016-02-17 15:52:21.000000000","message":"unit-test new behavior","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            agent_status \u003d self.state_rpc.report_state(self.context,"},{"line_number":312,"context_line":"                                                       self.agent_state,"},{"line_number":313,"context_line":"                                                       True)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"            if agent_status \u003d\u003d n_const.AGENT_REVIVED:"},{"line_number":316,"context_line":"                LOG.info(_LI(\u0027Agent has just been revived. \u0027"},{"line_number":317,"context_line":"                             \u0027Doing a full sync.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_47d07ef6","line":314,"updated":"2016-02-17 15:52:21.000000000","message":"unrelated, remove","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4478712c79077dab49201cb99c12172b53cf9e74","unresolved":false,"context_lines":[{"line_number":311,"context_line":"            agent_status \u003d self.state_rpc.report_state(self.context,"},{"line_number":312,"context_line":"                                                       self.agent_state,"},{"line_number":313,"context_line":"                                                       True)"},{"line_number":314,"context_line":""},{"line_number":315,"context_line":"            if agent_status \u003d\u003d n_const.AGENT_REVIVED:"},{"line_number":316,"context_line":"                LOG.info(_LI(\u0027Agent has just been revived. \u0027"},{"line_number":317,"context_line":"                             \u0027Doing a full sync.\u0027))"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_b4521a33","line":314,"in_reply_to":"dae33548_47d07ef6","updated":"2016-02-18 15:14:53.000000000","message":"Done","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                    self.context,"},{"line_number":329,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"},{"line_number":330,"context_line":"                    self.agent_state[\u0027host\u0027])"},{"line_number":331,"context_line":"            if self.agent_state.pop(\u0027start_flag\u0027, None):"},{"line_number":332,"context_line":"                # On initial start, we notify systemd after initialization"},{"line_number":333,"context_line":"                # is complete."},{"line_number":334,"context_line":"                systemd.notify_once()"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_e7c8b224","line":331,"updated":"2016-02-17 15:52:21.000000000","message":"may be we can join this to the above statement, and do a final pop at the end of the if block","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"4478712c79077dab49201cb99c12172b53cf9e74","unresolved":false,"context_lines":[{"line_number":328,"context_line":"                    self.context,"},{"line_number":329,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"},{"line_number":330,"context_line":"                    self.agent_state[\u0027host\u0027])"},{"line_number":331,"context_line":"            if self.agent_state.pop(\u0027start_flag\u0027, None):"},{"line_number":332,"context_line":"                # On initial start, we notify systemd after initialization"},{"line_number":333,"context_line":"                # is complete."},{"line_number":334,"context_line":"                systemd.notify_once()"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_1abdedd7","line":331,"in_reply_to":"dae33548_e7c8b224","updated":"2016-02-18 15:14:53.000000000","message":"Done","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"75f24f6194eeb7052972b9d9df6a61e4a03214e0","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                             \u0027Doing a full sync.\u0027))"},{"line_number":317,"context_line":"                self.fullsync \u003d True"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"            if \u0027start_flag\u0027 in self.agent_state:"},{"line_number":320,"context_line":"                self.resource_rpc.report_versions("},{"line_number":321,"context_line":"                    self.context,"},{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_075748ca","line":319,"updated":"2016-02-18 18:20:25.000000000","message":"not sure I understand what is the reason for changing that line and adding L325 ?","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"2241f5038cc4da820f106e4829ac3942583132c3","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                             \u0027Doing a full sync.\u0027))"},{"line_number":317,"context_line":"                self.fullsync \u003d True"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"            if \u0027start_flag\u0027 in self.agent_state:"},{"line_number":320,"context_line":"                self.resource_rpc.report_versions("},{"line_number":321,"context_line":"                    self.context,"},{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_80e4cb3b","line":319,"in_reply_to":"dae33548_075748ca","updated":"2016-02-19 12:02:10.000000000","message":"Basically, I don\u0027t want the flag to be popped until L320 succeeds (it could fail and throw an exception due to AMQP connectivity issues).","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"75f24f6194eeb7052972b9d9df6a61e4a03214e0","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"},{"line_number":323,"context_line":"                    self.agent_state[\u0027host\u0027])"},{"line_number":324,"context_line":"                systemd.notify_once()"},{"line_number":325,"context_line":"                self.agent_state.pop(\u0027start_flag\u0027, None)"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        except Exception:"},{"line_number":328,"context_line":"            LOG.exception(_LE(\"Failed reporting state!\"))"}],"source_content_type":"text/x-python","patch_set":10,"id":"dae33548_5c7ac7bd","line":325,"updated":"2016-02-18 18:20:25.000000000","message":"if start_flag in agent_state, IMO - you don\u0027t need the default None return value","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9ff378996d98c5b20b386d55b20d3855ce7cd7ea","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"},{"line_number":323,"context_line":"                    self.agent_state[\u0027host\u0027])"},{"line_number":324,"context_line":"                systemd.notify_once()"},{"line_number":325,"context_line":"                self.agent_state.pop(\u0027start_flag\u0027, None)"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        except Exception:"},{"line_number":328,"context_line":"            LOG.exception(_LE(\"Failed reporting state!\"))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_72235606","line":325,"in_reply_to":"bae84128_20ca1fa2","updated":"2016-02-19 17:56:35.000000000","message":"Done","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"2241f5038cc4da820f106e4829ac3942583132c3","unresolved":false,"context_lines":[{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"},{"line_number":323,"context_line":"                    self.agent_state[\u0027host\u0027])"},{"line_number":324,"context_line":"                systemd.notify_once()"},{"line_number":325,"context_line":"                self.agent_state.pop(\u0027start_flag\u0027, None)"},{"line_number":326,"context_line":""},{"line_number":327,"context_line":"        except Exception:"},{"line_number":328,"context_line":"            LOG.exception(_LE(\"Failed reporting state!\"))"}],"source_content_type":"text/x-python","patch_set":10,"id":"bae84128_20ca1fa2","line":325,"in_reply_to":"dae33548_5c7ac7bd","updated":"2016-02-19 12:02:10.000000000","message":"Right, will fix.No concurrent pops could happen here.","commit_id":"ab2ede281047e86d16618679b98e8531479a1644"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ff7f7787ca1c75abcbf26eebac51d9ab3a0c00f","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                             \u0027Doing a full sync.\u0027))"},{"line_number":317,"context_line":"                self.fullsync \u003d True"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"            if \u0027start_flag\u0027 in self.agent_state:"},{"line_number":320,"context_line":"                self.resource_rpc.report_versions("},{"line_number":321,"context_line":"                    self.context,"},{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_e8887273","line":319,"updated":"2016-02-23 18:05:02.000000000","message":"Oh. I thought that\u0027s the server dumping the new state in the database that will update other servers?..","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c19ea12657e489e02132a95e16bf0a06e02072db","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                             \u0027Doing a full sync.\u0027))"},{"line_number":317,"context_line":"                self.fullsync \u003d True"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"            if \u0027start_flag\u0027 in self.agent_state:"},{"line_number":320,"context_line":"                self.resource_rpc.report_versions("},{"line_number":321,"context_line":"                    self.context,"},{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_ee050114","line":319,"in_reply_to":"bae84128_e8887273","updated":"2016-02-24 06:31:05.000000000","message":"Hehe, and I understood it the other way around, I guess my devref was confusing. Ok, let\u0027s settle the thought and decide who does it, it\u0027s easy to change now (and even later).","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"9db37d06676523fec4839c158f1a5363ddec5aa5","unresolved":false,"context_lines":[{"line_number":316,"context_line":"                             \u0027Doing a full sync.\u0027))"},{"line_number":317,"context_line":"                self.fullsync \u003d True"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"            if \u0027start_flag\u0027 in self.agent_state:"},{"line_number":320,"context_line":"                self.resource_rpc.report_versions("},{"line_number":321,"context_line":"                    self.context,"},{"line_number":322,"context_line":"                    self.agent_state[\u0027agent_type\u0027],"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_698ce435","line":319,"in_reply_to":"bae84128_ee050114","updated":"2016-02-25 15:12:55.000000000","message":"Done","commit_id":"cfae4ff506344fb4ee5d5bf5c90824fc4e751e92"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"88061ac81c2c6e53d8352704c43bba68e49c1e2c","unresolved":false,"context_lines":[{"line_number":317,"context_line":""},{"line_number":318,"context_line":"            if self.agent_state.pop(\u0027start_flag\u0027, None):"},{"line_number":319,"context_line":"                # On initial start, we notify systemd after initialization"},{"line_number":320,"context_line":"                # is complete"},{"line_number":321,"context_line":"                systemd.notify_once()"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_1a1754ee","line":320,"range":{"start_line":320,"start_character":21,"end_line":320,"end_character":29},"updated":"2016-02-25 15:31:01.000000000","message":"unrelated change","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"88061ac81c2c6e53d8352704c43bba68e49c1e2c","unresolved":false,"context_lines":[{"line_number":319,"context_line":"                # On initial start, we notify systemd after initialization"},{"line_number":320,"context_line":"                # is complete"},{"line_number":321,"context_line":"                systemd.notify_once()"},{"line_number":322,"context_line":""},{"line_number":323,"context_line":"        except Exception:"},{"line_number":324,"context_line":"            LOG.exception(_LE(\"Failed reporting state!\"))"},{"line_number":325,"context_line":""}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_badc6847","line":322,"updated":"2016-02-25 15:31:01.000000000","message":"unrelated change.","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"32c33d99748744d9871873f447d1be4c4ec33841","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                               \u0027ovs_capabilities\u0027: self.ovs.capabilities,"},{"line_number":253,"context_line":"                               \u0027vhostuser_socket_dir\u0027:"},{"line_number":254,"context_line":"                               ovs_conf.vhostuser_socket_dir},"},{"line_number":255,"context_line":"            \u0027resource_versions\u0027: resources.LOCAL_RESOURCE_VERSIONS,"},{"line_number":256,"context_line":"            \u0027agent_type\u0027: agent_conf.agent_type,"},{"line_number":257,"context_line":"            \u0027start_flag\u0027: True}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_f03bc0e9","line":255,"updated":"2016-02-26 11:00:36.000000000","message":"Shouldn\u0027t other agents be updated?","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"68bc5b47e7e997285655887f424d214c04e44eaf","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                               \u0027ovs_capabilities\u0027: self.ovs.capabilities,"},{"line_number":253,"context_line":"                               \u0027vhostuser_socket_dir\u0027:"},{"line_number":254,"context_line":"                               ovs_conf.vhostuser_socket_dir},"},{"line_number":255,"context_line":"            \u0027resource_versions\u0027: resources.LOCAL_RESOURCE_VERSIONS,"},{"line_number":256,"context_line":"            \u0027agent_type\u0027: agent_conf.agent_type,"},{"line_number":257,"context_line":"            \u0027start_flag\u0027: True}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"9aed3d3a_361b5b74","line":255,"in_reply_to":"9aed3d3a_f03bc0e9","updated":"2016-02-26 12:50:45.000000000","message":"True, sr-iov and after that LB (with their new support, once this and LB is merged).\n\nThis remind me that I should handle the exceptions!!! (OVS \u0026 SR-IOV of non reporting resource_versions should be defaulted to QoSPolicy:1.0)","commit_id":"8e898b916b44353792af46a069fa0b95f926aa0e"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                               \u0027ovs_capabilities\u0027: self.ovs.capabilities,"},{"line_number":253,"context_line":"                               \u0027vhostuser_socket_dir\u0027:"},{"line_number":254,"context_line":"                               ovs_conf.vhostuser_socket_dir},"},{"line_number":255,"context_line":"            \u0027resource_versions\u0027: resources.LOCAL_RESOURCE_VERSIONS,"},{"line_number":256,"context_line":"            \u0027agent_type\u0027: agent_conf.agent_type,"},{"line_number":257,"context_line":"            \u0027start_flag\u0027: True}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_3bc3e539","line":255,"updated":"2016-02-29 12:40:37.000000000","message":"I don\u0027t see you updating other agents anywhere.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"0c7a1d24d3e50567853b060dabea5e2a0e2fd7bf","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                               \u0027ovs_capabilities\u0027: self.ovs.capabilities,"},{"line_number":253,"context_line":"                               \u0027vhostuser_socket_dir\u0027:"},{"line_number":254,"context_line":"                               ovs_conf.vhostuser_socket_dir},"},{"line_number":255,"context_line":"            \u0027resource_versions\u0027: resources.LOCAL_RESOURCE_VERSIONS,"},{"line_number":256,"context_line":"            \u0027agent_type\u0027: agent_conf.agent_type,"},{"line_number":257,"context_line":"            \u0027start_flag\u0027: True}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_76be2466","line":255,"in_reply_to":"9aed3d3a_3bc3e539","updated":"2016-02-29 12:56:48.000000000","message":"Note to self: agent should probably request a list of interesting objects from extensions manager. Probably implementable thru l2 agent API we introduce in a parallel patch.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d1d183ed5a366ee85b2b45e7980c41e15244ac11","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                               \u0027ovs_capabilities\u0027: self.ovs.capabilities,"},{"line_number":253,"context_line":"                               \u0027vhostuser_socket_dir\u0027:"},{"line_number":254,"context_line":"                               ovs_conf.vhostuser_socket_dir},"},{"line_number":255,"context_line":"            \u0027resource_versions\u0027: resources.LOCAL_RESOURCE_VERSIONS,"},{"line_number":256,"context_line":"            \u0027agent_type\u0027: agent_conf.agent_type,"},{"line_number":257,"context_line":"            \u0027start_flag\u0027: True}"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_f68b54c1","line":255,"in_reply_to":"9aed3d3a_3bc3e539","updated":"2016-02-29 12:58:44.000000000","message":"oh true!, btw, I think filtering can be done here. (follow up patch) depending on what extensions are enabled and what extensions subscribed to.\n\nI will add a TODO to optimize that.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        self.topic \u003d topics.PLUGIN"},{"line_number":214,"context_line":"        self.conn \u003d n_rpc.create_connection()"},{"line_number":215,"context_line":"        self.conn.create_consumer(self.topic, self.endpoints, fanout\u003dFalse)"},{"line_number":216,"context_line":"        self.conn.create_consumer(topics.RESOURCES,"},{"line_number":217,"context_line":"                                  self.fanout_endpoints,"},{"line_number":218,"context_line":"                                  fanout\u003dTrue)"},{"line_number":219,"context_line":"        # process state reports despite dedicated rpc workers"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_8218b476","line":216,"updated":"2016-02-17 15:52:21.000000000","message":"probably I shall be using a more general topic for this, like  PLUGIN_FANOUT ?","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"88061ac81c2c6e53d8352704c43bba68e49c1e2c","unresolved":false,"context_lines":[{"line_number":213,"context_line":"        \"\"\"Start the RPC loop to let the plugin communicate with agents.\"\"\""},{"line_number":214,"context_line":"        self._setup_rpc()"},{"line_number":215,"context_line":"        self.topic \u003d topics.PLUGIN"},{"line_number":216,"context_line":"        self.fanout_topic \u003d topics.PLUGIN_FANOUT"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":"        self.conn \u003d n_rpc.create_connection()"},{"line_number":219,"context_line":"        self.conn.create_consumer(self.topic, self.endpoints, fanout\u003dFalse)"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_1a9c7468","line":216,"range":{"start_line":216,"start_character":28,"end_line":216,"end_character":34},"updated":"2016-02-25 15:31:01.000000000","message":"this must go out now. In fact I thought I had removed it :-?","commit_id":"caf4fa853e041e4a91b199230722ad9b4ca764f1"}],"neutron/tests/unit/db/test_agents_db.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":80,"context_line":"class TestAgentsDbMixin(TestAgentsDbBase):"},{"line_number":81,"context_line":"    def setUp(self):"},{"line_number":82,"context_line":"        super(TestAgentsDbMixin, self).setUp()"},{"line_number":83,"context_line":"        mock.patch(\u0027neutron.manager.NeutronManager.get_plugin\u0027).start()"},{"line_number":84,"context_line":"        self.agent_status \u003d {"},{"line_number":85,"context_line":"            \u0027agent_type\u0027: \u0027Open vSwitch agent\u0027,"},{"line_number":86,"context_line":"            \u0027binary\u0027: \u0027neutron-openvswitch-agent\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_a2bcd806","line":83,"updated":"2016-02-17 15:52:21.000000000","message":"This is to make sure any tests won\u0027t fail when trying to get the plugin (no plugin registered during tests on manager) while trying to update an agent.)\n\nI\u0027m starting to thing, that another option is converting the get_agents_resource_versions to a non static function, and creating a partial function that includes \"self\" or registering self.get_agents_resource_versions if that is possible...","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"44943bde6c082ee88d123958615477ddd0f0f599","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            filters[\u0027considered_for_versions\u0027] \u003d ["},{"line_number":284,"context_line":"                self.filter_version_considered]"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if filters:"},{"line_number":287,"context_line":"            return filters"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def test_get_agents(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_d3f82b4c","line":286,"updated":"2016-02-21 10:34:12.000000000","message":"you can avoid that, since get_agents() validates empty dict","commit_id":"89a8e7875cac2b76507b133d5f6bdc9155b74ab9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bdaca3d9fc70ab1be52c969b01454194067f2318","unresolved":false,"context_lines":[{"line_number":283,"context_line":"            filters[\u0027considered_for_versions\u0027] \u003d ["},{"line_number":284,"context_line":"                self.filter_version_considered]"},{"line_number":285,"context_line":""},{"line_number":286,"context_line":"        if filters:"},{"line_number":287,"context_line":"            return filters"},{"line_number":288,"context_line":""},{"line_number":289,"context_line":"    def test_get_agents(self):"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_5da1b3a2","line":286,"in_reply_to":"bae84128_d3f82b4c","updated":"2016-02-22 10:21:03.000000000","message":"Hmm, I was keeping the same original behaviour, and it seems that if I remove those two lines, filtering actually fails (please try it) :)","commit_id":"89a8e7875cac2b76507b133d5f6bdc9155b74ab9"},{"author":{"_account_id":18485,"name":"Haim Daniel","email":"hdaniel@redhat.com","username":"hdaniel"},"change_message_id":"44943bde6c082ee88d123958615477ddd0f0f599","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                                                     filters\u003dself._filters())"},{"line_number":302,"context_line":"            self.assertEqual(self.expected_agents, len(returned_agents))"},{"line_number":303,"context_line":"            if self.filter_alive:"},{"line_number":304,"context_line":"                alive \u003d (self.filter_alive \u003d\u003d \u0027True\u0027 or"},{"line_number":305,"context_line":"                         self.filter_alive \u003d\u003d \u0027true\u0027)"},{"line_number":306,"context_line":"                for agent in returned_agents:"},{"line_number":307,"context_line":"                    self.assertEqual(alive, agent[\u0027alive\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_b38ac7bd","line":304,"updated":"2016-02-21 10:34:12.000000000","message":"maybe it\u0027s worth replacing it with one-liner:\nalive \u003d (self.filter_alive.lower() \u003d\u003d \u0027true\u0027) ?","commit_id":"89a8e7875cac2b76507b133d5f6bdc9155b74ab9"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bdaca3d9fc70ab1be52c969b01454194067f2318","unresolved":false,"context_lines":[{"line_number":301,"context_line":"                                                     filters\u003dself._filters())"},{"line_number":302,"context_line":"            self.assertEqual(self.expected_agents, len(returned_agents))"},{"line_number":303,"context_line":"            if self.filter_alive:"},{"line_number":304,"context_line":"                alive \u003d (self.filter_alive \u003d\u003d \u0027True\u0027 or"},{"line_number":305,"context_line":"                         self.filter_alive \u003d\u003d \u0027true\u0027)"},{"line_number":306,"context_line":"                for agent in returned_agents:"},{"line_number":307,"context_line":"                    self.assertEqual(alive, agent[\u0027alive\u0027])"}],"source_content_type":"text/x-python","patch_set":11,"id":"bae84128_23d3f005","line":304,"in_reply_to":"bae84128_b38ac7bd","updated":"2016-02-22 10:21:03.000000000","message":"Done. Let\u0027s cleanup as we go :)","commit_id":"89a8e7875cac2b76507b133d5f6bdc9155b74ab9"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class FakePlugin(base_plugin.NeutronDbPluginV2, agents_db.AgentDbMixin):"},{"line_number":53,"context_line":"    \"\"\"A fake plugin class containing all DB methods.\"\"\""},{"line_number":54,"context_line":"    def __init__(self):"},{"line_number":55,"context_line":"        super(FakePlugin, self).__init__()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_5b0b498e","line":54,"updated":"2016-02-29 12:40:37.000000000","message":"Redundant __init__. Remove.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d1d183ed5a366ee85b2b45e7980c41e15244ac11","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":"class FakePlugin(base_plugin.NeutronDbPluginV2, agents_db.AgentDbMixin):"},{"line_number":53,"context_line":"    \"\"\"A fake plugin class containing all DB methods.\"\"\""},{"line_number":54,"context_line":"    def __init__(self):"},{"line_number":55,"context_line":"        super(FakePlugin, self).__init__()"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_d6af3028","line":54,"in_reply_to":"9aed3d3a_5b0b498e","updated":"2016-02-29 12:58:44.000000000","message":"Thanks, will do.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"}],"neutron/tests/unit/extensions/test_bgp_dragentscheduler.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":37,"context_line":"        self.bgp_speaker \u003d {\u0027id\u0027: \u0027foo_bgp_speaker_id\u0027}"},{"line_number":38,"context_line":"        self.bgp_speaker_id \u003d \u0027foo_bgp_speaker_id\u0027"},{"line_number":39,"context_line":"        self._save_bgp_speaker(self.bgp_speaker_id)"},{"line_number":40,"context_line":"        mock.patch(\u0027neutron.manager.NeutronManager.get_plugin\u0027).start()"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    def _create_and_set_agents_down(self, hosts, down_agent_count\u003d0,"},{"line_number":43,"context_line":"                                    admin_state_up\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_624db03d","line":40,"updated":"2016-02-17 15:52:21.000000000","message":"read note here:\nhttps://review.openstack.org/#/c/268040/9/neutron/tests/unit/db/test_agents_db.py","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"}],"neutron/tests/unit/plugins/ml2/drivers/l2pop/test_db.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":28,"context_line":"    def setUp(self):"},{"line_number":29,"context_line":"        super(TestL2PopulationDBTestCase, self).setUp()"},{"line_number":30,"context_line":"        self.ctx \u003d context.get_admin_context()"},{"line_number":31,"context_line":"        mock.patch(\u0027neutron.manager.NeutronManager.get_plugin\u0027).start()"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"    def test_get_agent_by_host(self):"},{"line_number":34,"context_line":"        # Register a L2 agent + A bunch of other agents on the same host"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_8250b4d5","line":31,"updated":"2016-02-17 15:52:21.000000000","message":"read note here:\nhttps://review.openstack.org/#/c/268040/9/neutron/tests/unit/db/test_agents_db.py","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"}],"neutron/tests/unit/scheduler/test_dhcp_agent_scheduler.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"20b19ada5c79d585aec62bb60db66e0bcb394ed7","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.network \u003d {\u0027id\u0027: \u0027foo_network_id\u0027}"},{"line_number":44,"context_line":"        self.network_id \u003d \u0027foo_network_id\u0027"},{"line_number":45,"context_line":"        self._save_networks([self.network_id])"},{"line_number":46,"context_line":"        mock.patch(\u0027neutron.manager.NeutronManager.get_plugin\u0027).start()"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _create_and_set_agents_down(self, hosts, down_agent_count\u003d0,"},{"line_number":49,"context_line":"                                    admin_state_up\u003dTrue,"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_e25f00e3","line":46,"updated":"2016-02-17 15:52:21.000000000","message":"read note here:\nhttps://review.openstack.org/#/c/268040/9/neutron/tests/unit/db/test_agents_db.py","commit_id":"f96137857fafb9edfefc79926f5a40e234d8baee"}],"neutron/tests/unit/services/metering/test_metering_plugin.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"f85d86ba3f7cef605f7bbb6b1f53d70faa325800","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"class TestMeteringPluginL3AgentScheduler("},{"line_number":279,"context_line":"        common_db_mixin.CommonDbMixin,"},{"line_number":280,"context_line":"        l3_agentschedulers_db.L3AgentSchedulerDbMixin,"},{"line_number":281,"context_line":"        test_db_base_plugin_v2.NeutronDbPluginV2TestCase,"},{"line_number":282,"context_line":"        test_l3.L3NatTestCaseMixin,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_5be4e9df","line":279,"updated":"2016-02-29 12:40:37.000000000","message":"Just wondering, why we need the change.","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d1d183ed5a366ee85b2b45e7980c41e15244ac11","unresolved":false,"context_lines":[{"line_number":276,"context_line":""},{"line_number":277,"context_line":""},{"line_number":278,"context_line":"class TestMeteringPluginL3AgentScheduler("},{"line_number":279,"context_line":"        common_db_mixin.CommonDbMixin,"},{"line_number":280,"context_line":"        l3_agentschedulers_db.L3AgentSchedulerDbMixin,"},{"line_number":281,"context_line":"        test_db_base_plugin_v2.NeutronDbPluginV2TestCase,"},{"line_number":282,"context_line":"        test_l3.L3NatTestCaseMixin,"}],"source_content_type":"text/x-python","patch_set":16,"id":"9aed3d3a_aa016007","line":279,"in_reply_to":"9aed3d3a_5be4e9df","updated":"2016-02-29 12:58:44.000000000","message":"May be now it\u0027s not needed after moving some parts to the RPC callback, will try to remove it, thanks for pointing it out.\n\nIt was necessary to provide all the methods that were triggered during an update agents...","commit_id":"1a310129b391df7e906eda8a6b5f968468fb81df"}]}
