)]}'
{"neutron_lib/constants.py":[{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"295bc2ae7da6a71e6be8bdf9535eda94ee07ab2a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"fa6399be_27f5d682","updated":"2016-10-18 14:05:36.000000000","message":"Question for all: Do we really want to lump plugin constants into our generic constants.py file vs. perhaps something like neutron_lib/plugins/constants.py or something? We did this for db constants: https://github.com/openstack/neutron-lib/blob/master/neutron_lib/db/constants.py","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8e164b9138ae2c0b5fafe5787768463b4a043cc3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"fa6399be_7e8e7728","in_reply_to":"fa6399be_27f5d682","updated":"2016-10-18 15:38:47.000000000","message":"I thought about having a dedicated file for plugin constants, but here I intend to put just the aliases of the well known plugins (a handful). A new module makes imports longer for no good reason, IMO","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"}],"neutron_lib/directory.py":[{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7c3fc04e4fe19f2dc711fc0e5fef91e5d24680b8","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @property"},{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_2835bef6","line":46,"updated":"2016-10-18 03:25:22.000000000","message":"Remind me why we need to return a weakref?","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"aa9099f40177775872518036c55590725db61951","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @property"},{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_83da2be8","line":46,"in_reply_to":"fa6399be_2835bef6","updated":"2016-10-18 03:34:59.000000000","message":"to make sure garbage collection doesn\u0027t go nuts and nothing gets cleaned.","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5249613c23a600cff486b7faf16890920c036092","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    @property"},{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_1948352d","line":46,"in_reply_to":"fa6399be_83da2be8","updated":"2016-10-18 15:51:51.000000000","message":"Thanks. This was done a long time ago with Python 2.6 (or even earlier?), so I wonder if it\u0027s still a problem? Anyway, not relevant to this patch.","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7c3fc04e4fe19f2dc711fc0e5fef91e5d24680b8","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    @property"},{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @property"},{"line_number":51,"context_line":"    def unique_plugins(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_a83b8e37","line":48,"range":{"start_line":47,"start_character":15,"end_line":48,"end_character":61},"updated":"2016-10-18 03:25:22.000000000","message":"Modern python is:\n\n  {x: weakref.proxy(y)\n   for x, y in self._plugins.items()}\n\nThe use of iteritems is not needed for such small dicts.","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"5249613c23a600cff486b7faf16890920c036092","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    @property"},{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @property"},{"line_number":51,"context_line":"    def unique_plugins(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_396c199c","line":48,"range":{"start_line":47,"start_character":15,"end_line":48,"end_character":61},"in_reply_to":"fa6399be_03c61b16","updated":"2016-10-18 15:51:51.000000000","message":"Sorry, I momentarily forgot the \"move over without changing\" guideline.","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"aa9099f40177775872518036c55590725db61951","unresolved":false,"context_lines":[{"line_number":44,"context_line":"    @property"},{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @property"},{"line_number":51,"context_line":"    def unique_plugins(self):"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_03c61b16","line":48,"range":{"start_line":47,"start_character":15,"end_line":48,"end_character":61},"in_reply_to":"fa6399be_a83b8e37","updated":"2016-10-18 03:34:59.000000000","message":"Are you ok with me changing this rather than plainly moving stuff over?","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"7c3fc04e4fe19f2dc711fc0e5fef91e5d24680b8","unresolved":false,"context_lines":[{"line_number":63,"context_line":"# to load the environment may result in callers handling an empty directory."},{"line_number":64,"context_line":"PLUGIN_DIRECTORY \u003d None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"@synchronized(\"plugin-directory\")"},{"line_number":68,"context_line":"def _create_plugin_directory():"},{"line_number":69,"context_line":"    global PLUGIN_DIRECTORY"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_c3c34337","line":66,"updated":"2016-10-18 03:25:22.000000000","message":"There are no unit tests for the functions below.","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"aa9099f40177775872518036c55590725db61951","unresolved":false,"context_lines":[{"line_number":63,"context_line":"# to load the environment may result in callers handling an empty directory."},{"line_number":64,"context_line":"PLUGIN_DIRECTORY \u003d None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"@synchronized(\"plugin-directory\")"},{"line_number":68,"context_line":"def _create_plugin_directory():"},{"line_number":69,"context_line":"    global PLUGIN_DIRECTORY"}],"source_content_type":"text/x-python","patch_set":5,"id":"fa6399be_63ec3790","line":66,"in_reply_to":"fa6399be_c3c34337","updated":"2016-10-18 03:34:59.000000000","message":"There are not, but these would be heavily exercised throughout the codebase and other tests (see follow-up patches), so I found the tests for these syntactic sugar a bit redundant.","commit_id":"89695a0902f25bdf36e0bb00c129084dab670577"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"295bc2ae7da6a71e6be8bdf9535eda94ee07ab2a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"fa6399be_e75e7e75","updated":"2016-10-18 14:05:36.000000000","message":"Personally, I\u0027m not crazy about the naming directory.py in our top-level neutron_lib package as I initially think of a file directory. If we want to keep this top-level maybe consider a new name, or perhaps we can consider a plugins subpackage (e.g. neutron_lib.plugins.directory.py).","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8e164b9138ae2c0b5fafe5787768463b4a043cc3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"fa6399be_5eaa9371","in_reply_to":"fa6399be_e75e7e75","updated":"2016-10-18 15:38:47.000000000","message":"sure, that\u0027ll work","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"295bc2ae7da6a71e6be8bdf9535eda94ee07ab2a","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron_lib import constants"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(\"neutron-\")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class _PluginDirectory(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_87c6a214","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":12},"updated":"2016-10-18 14:05:36.000000000","message":"Does this need to be public?","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8e164b9138ae2c0b5fafe5787768463b4a043cc3","unresolved":false,"context_lines":[{"line_number":20,"context_line":"from neutron_lib import constants"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(\"neutron-\")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class _PluginDirectory(object):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_9eba6bbf","line":23,"range":{"start_line":23,"start_character":0,"end_line":23,"end_character":12},"in_reply_to":"fa6399be_87c6a214","updated":"2016-10-18 15:38:47.000000000","message":"no, I\u0027ll make it private.","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"295bc2ae7da6a71e6be8bdf9535eda94ee07ab2a","unresolved":false,"context_lines":[{"line_number":23,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(\"neutron-\")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class _PluginDirectory(object):"},{"line_number":27,"context_line":"    \"\"\"A directory of activated plugins in a Neutron Deployment."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    The directory is bootstrapped by a Neutron Manager running in"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_87bb0275","line":26,"range":{"start_line":26,"start_character":6,"end_line":26,"end_character":22},"updated":"2016-10-18 14:05:36.000000000","message":"So we don\u0027t see this as a generic reusable class? I didn\u0027t look, but are any other neutron-based projects maintaining a group of plugins?","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8e164b9138ae2c0b5fafe5787768463b4a043cc3","unresolved":false,"context_lines":[{"line_number":23,"context_line":"synchronized \u003d lockutils.synchronized_with_prefix(\"neutron-\")"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class _PluginDirectory(object):"},{"line_number":27,"context_line":"    \"\"\"A directory of activated plugins in a Neutron Deployment."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    The directory is bootstrapped by a Neutron Manager running in"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_fed0c7f9","line":26,"range":{"start_line":26,"start_character":6,"end_line":26,"end_character":22},"in_reply_to":"fa6399be_87bb0275","updated":"2016-10-18 15:38:47.000000000","message":"I don\u0027t think this should be reused directly, but via the directory module, hence being explicit about its accessibility.","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1fa5375e0ab49829a6715afac17fba5546a64c00","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @property"},{"line_number":51,"context_line":"    def unique_plugins(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_d9023d6f","line":48,"range":{"start_line":48,"start_character":32,"end_line":48,"end_character":35},"updated":"2016-10-18 16:00:56.000000000","message":"I would like to avoid bringing in a six dependency. What do you think?","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"5e928eadd8af2ec251b2f0388026e2d23be0b110","unresolved":false,"context_lines":[{"line_number":45,"context_line":"    def plugins(self):"},{"line_number":46,"context_line":"        \"\"\"The mapping alias -\u003e weak reference to the plugin.\"\"\""},{"line_number":47,"context_line":"        return dict((x, weakref.proxy(y))"},{"line_number":48,"context_line":"                    for x, y in six.iteritems(self._plugins))"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    @property"},{"line_number":51,"context_line":"    def unique_plugins(self):"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_d95ebd75","line":48,"range":{"start_line":48,"start_character":32,"end_line":48,"end_character":35},"in_reply_to":"fa6399be_d9023d6f","updated":"2016-10-18 16:03:56.000000000","message":"anything for you sir.","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"295bc2ae7da6a71e6be8bdf9535eda94ee07ab2a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"# Create a singleton plugins directory for the Neutron server instance."},{"line_number":62,"context_line":"# Accessing these methods before a Neutron Manager has had the chance"},{"line_number":63,"context_line":"# to load the environment may result in callers handling an empty directory."},{"line_number":64,"context_line":"PLUGIN_DIRECTORY \u003d None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"@synchronized(\"plugin-directory\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_a7f2c66d","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":16},"updated":"2016-10-18 14:05:36.000000000","message":"Why do we need to expose this as public if we have the public accessor functions below?","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8e164b9138ae2c0b5fafe5787768463b4a043cc3","unresolved":false,"context_lines":[{"line_number":61,"context_line":"# Create a singleton plugins directory for the Neutron server instance."},{"line_number":62,"context_line":"# Accessing these methods before a Neutron Manager has had the chance"},{"line_number":63,"context_line":"# to load the environment may result in callers handling an empty directory."},{"line_number":64,"context_line":"PLUGIN_DIRECTORY \u003d None"},{"line_number":65,"context_line":""},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"@synchronized(\"plugin-directory\")"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_5ed8d31d","line":64,"range":{"start_line":64,"start_character":0,"end_line":64,"end_character":16},"in_reply_to":"fa6399be_a7f2c66d","updated":"2016-10-18 15:38:47.000000000","message":"you\u0027re right, my bad.","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"295bc2ae7da6a71e6be8bdf9535eda94ee07ab2a","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    return PLUGIN_DIRECTORY"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def add_plugin(alias, plugin):"},{"line_number":81,"context_line":"    _get_plugin_directory().add_plugin(alias, plugin)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_e7167e54","line":80,"updated":"2016-10-18 14:05:36.000000000","message":"Missing some UT coverage in this file as per: http://logs.openstack.org/51/386751/6/check/neutron-lib-coverage-ubuntu-xenial/f1c4a17/cover/neutron_lib_directory_py.html","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"1ddd53345ee88297408668e50c88bf3861f94129","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    return PLUGIN_DIRECTORY"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def add_plugin(alias, plugin):"},{"line_number":81,"context_line":"    _get_plugin_directory().add_plugin(alias, plugin)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_595f0d0e","line":80,"in_reply_to":"fa6399be_5eeff3af","updated":"2016-10-18 15:52:16.000000000","message":"While they may look trivial and almost pointless, unit tests are still the cheapest place to find issues.","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8e164b9138ae2c0b5fafe5787768463b4a043cc3","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    return PLUGIN_DIRECTORY"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"def add_plugin(alias, plugin):"},{"line_number":81,"context_line":"    _get_plugin_directory().add_plugin(alias, plugin)"},{"line_number":82,"context_line":""},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_5eeff3af","line":80,"in_reply_to":"fa6399be_e7167e54","updated":"2016-10-18 15:38:47.000000000","message":"yes, HenryG pointed out the same. I\u0027ll make up for it.","commit_id":"64bec5e286bc95d2ce54a453a2cc530c6cddec31"}],"neutron_lib/plugins/directory.py":[{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"5133320d14dc69e216588d2ae2947a67f710a3da","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return tuple(weakref.proxy(x) for x in set(self._plugins.values()))"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @property"},{"line_number":55,"context_line":"    def is_loaded(self):"},{"line_number":56,"context_line":"        \"\"\"True if the directory is non empty.\"\"\""},{"line_number":57,"context_line":"        return len(self._plugins) \u003e 0"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_bb72a17a","line":55,"updated":"2016-10-19 20:01:47.000000000","message":"This function is just tested, but not used anywhere. Is this just to verify, if PluginDirectory is prepared?","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4b0bcf68c449633a5700c451b1dce1c2a4aa39cf","unresolved":false,"context_lines":[{"line_number":52,"context_line":"        return tuple(weakref.proxy(x) for x in set(self._plugins.values()))"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"    @property"},{"line_number":55,"context_line":"    def is_loaded(self):"},{"line_number":56,"context_line":"        \"\"\"True if the directory is non empty.\"\"\""},{"line_number":57,"context_line":"        return len(self._plugins) \u003e 0"},{"line_number":58,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_01915a99","line":55,"in_reply_to":"fa6399be_bb72a17a","updated":"2016-10-19 21:03:30.000000000","message":"I am making an educated guess that this might turn out to be used at some point, and I just don\u0027t want to re-release neutron-lib just for it.","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":14611,"name":"dasm","display_name":"dasm","email":"dsmigiel@redhat.com","username":"dasm"},"change_message_id":"5133320d14dc69e216588d2ae2947a67f710a3da","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    @property"},{"line_number":55,"context_line":"    def is_loaded(self):"},{"line_number":56,"context_line":"        \"\"\"True if the directory is non empty.\"\"\""},{"line_number":57,"context_line":"        return len(self._plugins) \u003e 0"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# Create a singleton plugins directory for the Neutron server instance."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_7ba56902","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":37},"updated":"2016-10-19 20:01:47.000000000","message":"What\u0027s when we do not have any plugins? Is it even possible? Technically, code can be run, but load 0 plugins, because there is nothing.","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4b0bcf68c449633a5700c451b1dce1c2a4aa39cf","unresolved":false,"context_lines":[{"line_number":54,"context_line":"    @property"},{"line_number":55,"context_line":"    def is_loaded(self):"},{"line_number":56,"context_line":"        \"\"\"True if the directory is non empty.\"\"\""},{"line_number":57,"context_line":"        return len(self._plugins) \u003e 0"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":""},{"line_number":60,"context_line":"# Create a singleton plugins directory for the Neutron server instance."}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_a1f6eef6","line":57,"range":{"start_line":57,"start_character":8,"end_line":57,"end_character":37},"in_reply_to":"fa6399be_7ba56902","updated":"2016-10-19 21:03:30.000000000","message":"This can happen if something access the directory very, very, very early in the bootstrapping process of neutron server.","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"7c230b13ecbc6ec5130b4a4e6d19b0a284f0492b","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _get_plugin_directory():"},{"line_number":74,"context_line":"    if _PLUGIN_DIRECTORY is None:"},{"line_number":75,"context_line":"        return _create_plugin_directory()"},{"line_number":76,"context_line":"    return _PLUGIN_DIRECTORY"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"fa6399be_3be03596","line":74,"updated":"2016-10-20 13:53:38.000000000","message":"Looks like we\u0027re still missing some UT coverage: http://logs.openstack.org/51/386751/8/check/neutron-lib-coverage-ubuntu-xenial/cc26053/cover/neutron_lib_plugins_directory_py.html","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":5367,"name":"boden","email":"bodenvmw@gmail.com","username":"boden"},"change_message_id":"44e9e20ace12a1d9d65868427692bd7a17c9c6fc","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _get_plugin_directory():"},{"line_number":74,"context_line":"    if _PLUGIN_DIRECTORY is None:"},{"line_number":75,"context_line":"        return _create_plugin_directory()"},{"line_number":76,"context_line":"    return _PLUGIN_DIRECTORY"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_f8a51f04","line":74,"in_reply_to":"da6895a0_d91fd359","updated":"2016-10-24 14:48:16.000000000","message":"IMO it\u0027s arguable if 100% is or is not useful, but since you already updated our review requirements [1], c\u0027est la vie.\n\n[1] https://github.com/openstack/neutron-lib/commit/e1bda4ea85e9534f61795a02a876ea40abbd5fc0","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b255c172a4b44e18bf34be1a151ff25e71fa5381","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"def _get_plugin_directory():"},{"line_number":74,"context_line":"    if _PLUGIN_DIRECTORY is None:"},{"line_number":75,"context_line":"        return _create_plugin_directory()"},{"line_number":76,"context_line":"    return _PLUGIN_DIRECTORY"},{"line_number":77,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_d91fd359","line":74,"in_reply_to":"fa6399be_3be03596","updated":"2016-10-20 18:19:47.000000000","message":"The tests are provided, I\u0027ll dig into it. That said, I think that a blind per-module 100% coverage as a goal is neither realistic nor helpful. We should aim for keep global coverage high. Anything above 80% on a per module basis and \u003e90% globally sounds good to me.\n\nhttps://review.openstack.org/#/c/386751/8/neutron_lib/tests/unit/plugins/test_directory.py@27\n\nhttps://review.openstack.org/#/c/386751/8/neutron_lib/tests/unit/plugins/test_directory.py@60","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":6854,"name":"YAMAMOTO Takashi","email":"yamamoto@midokura.com","username":"yamamoto"},"change_message_id":"ac40ca55483d2ce785bb9b499dae9ab4daf78358","unresolved":false,"context_lines":[{"line_number":63,"context_line":"_PLUGIN_DIRECTORY \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@_synchronized(\"plugin-directory\")"},{"line_number":67,"context_line":"def _create_plugin_directory():"},{"line_number":68,"context_line":"    global _PLUGIN_DIRECTORY"},{"line_number":69,"context_line":"    _PLUGIN_DIRECTORY \u003d _PluginDirectory()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6895a0_8905d7c3","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":34},"updated":"2016-10-22 01:17:27.000000000","message":"why this needs a lock?\nunlike NeutronManager, this doesn\u0027t seem to involve context switches.","commit_id":"d0abcfe5855e986ea3d7b4fbe84c296caeeb5069"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"261a1839c21e0795f9e7a0be0b725f853335e656","unresolved":false,"context_lines":[{"line_number":63,"context_line":"_PLUGIN_DIRECTORY \u003d None"},{"line_number":64,"context_line":""},{"line_number":65,"context_line":""},{"line_number":66,"context_line":"@_synchronized(\"plugin-directory\")"},{"line_number":67,"context_line":"def _create_plugin_directory():"},{"line_number":68,"context_line":"    global _PLUGIN_DIRECTORY"},{"line_number":69,"context_line":"    _PLUGIN_DIRECTORY \u003d _PluginDirectory()"}],"source_content_type":"text/x-python","patch_set":10,"id":"da6895a0_89c79711","line":66,"range":{"start_line":66,"start_character":0,"end_line":66,"end_character":34},"in_reply_to":"da6895a0_8905d7c3","updated":"2016-10-22 01:25:07.000000000","message":"I think it may or it may not. Since the contention window is tiny, I figure it wouldn\u0027t hurt.","commit_id":"d0abcfe5855e986ea3d7b4fbe84c296caeeb5069"}],"neutron_lib/tests/unit/plugins/test_directory.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"33d049ef6455a496489a2bceb3cba2ff94e96aae","unresolved":false,"context_lines":[{"line_number":47,"context_line":"    def test_get_plugins_none(self):"},{"line_number":48,"context_line":"        self.assertFalse(directory.get_plugins())"},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_unique_plugins_none(self):"},{"line_number":51,"context_line":"        self.assertIsNone(directory.get_unique_plugins())"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    def test_get_plugins(self):"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_9962bb15","line":50,"updated":"2016-10-20 18:31:46.000000000","message":"oops","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"33d049ef6455a496489a2bceb3cba2ff94e96aae","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        directory.add_plugin(\u0027CORE\u0027, fake_plugin)"},{"line_number":55,"context_line":"        self.assertIsNotNone(directory.get_plugins())"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"    def get_unique_plugins(self):"},{"line_number":58,"context_line":"        directory.add_plugin(\u0027foo1\u0027, fake_plugin)"},{"line_number":59,"context_line":"        directory.add_plugin(\u0027foo2\u0027, fake_plugin)"},{"line_number":60,"context_line":"        self.assertEqual(1, len(directory.get_unique_plugins()))"}],"source_content_type":"text/x-python","patch_set":8,"id":"da6895a0_79a7a74f","line":57,"updated":"2016-10-20 18:31:46.000000000","message":"oops","commit_id":"7e3f0da4e9536ba124417176c38eebadc2f30ac5"}]}
