)]}'
{"neutron/services/provider_configuration.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"d87ee9ddaf55819687d0649c706bbaa19de943b7","unresolved":false,"context_lines":[{"line_number":68,"context_line":"                neutron_dirs \u003d [neutron_dir]"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                try:"},{"line_number":71,"context_line":"                    neutron_dirs \u003d cfg.CONF.config_dir"},{"line_number":72,"context_line":"                except cfg.NoSuchOptError:"},{"line_number":73,"context_line":"                    neutron_dirs \u003d [\u0027/etc/neutron\u0027]"},{"line_number":74,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_ffe0b6ce","line":71,"updated":"2016-05-24 09:14:13.000000000","message":"Should we switch to config_dirs here? Is it considered public interface to access the list?","commit_id":"6081ec3679fa368ea2c91f0f8190dc19665babfc"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"254e8bb1e744e89cf6311b1a3892d7eceb96f16f","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            for neutron_dir in neutron_dirs:"},{"line_number":79,"context_line":"                ini_path \u003d os.path.join(neutron_dir,"},{"line_number":80,"context_line":"                                        \u0027%s.conf\u0027 % self.module_name)"},{"line_number":81,"context_line":"                if os.path.exists(ini_path):"},{"line_number":82,"context_line":"                    ini_file([\u0027--config-file\u0027, ini_path])"},{"line_number":83,"context_line":"                    break"},{"line_number":84,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_ec05b614","line":81,"range":{"start_line":81,"start_character":16,"end_line":81,"end_character":18},"updated":"2016-05-24 09:06:08.000000000","message":"Or maybe we should load all of matching files in all directories?","commit_id":"6081ec3679fa368ea2c91f0f8190dc19665babfc"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5c5966a5d396dc3f62ce4ddb0eb1e840d3b3637f","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if neutron_dir is not None:"},{"line_number":68,"context_line":"                neutron_dirs \u003d [neutron_dir]"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                neutron_dirs \u003d cfg.CONF.config_dirs or [\u0027/etc/neutron\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            ini_file \u003d cfg.ConfigOpts()"},{"line_number":73,"context_line":"            ini_file.register_opts(serviceprovider_opts, \u0027service_providers\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_e8cd825e","line":70,"updated":"2016-05-24 16:59:50.000000000","message":"It would be better if this code did not access the attribute directly. Options defined in oslo libraries are not part of their public API. If you need an API to get the value, we can discuss adding that. There are plans under way to expand configuration sources from just files and directories to use URLs. I expect some existing options to be renamed or otherwise deprecated as part of that work, and using the option value here will break neutron when that happens.\n\nThere are several ways we could address the need here. For example, we could provide a method that returns the source info (file names, directories, etc.). We could add a class method that has the effect of making a new ConfigOpts instance with the same source information as an existing object passed to it. Or we could split the config locating logic out of ConfigOpts and make it a separate object that can be shared. We should discuss those options on the ML, so please start a thread.","commit_id":"ee8386aa00481e1dc7fc40608904d39b433765dd"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"1089c50705235b5cf4eade8fd554c569df11290a","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if neutron_dir is not None:"},{"line_number":68,"context_line":"                neutron_dirs \u003d [neutron_dir]"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                neutron_dirs \u003d cfg.CONF.config_dirs or [\u0027/etc/neutron\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            ini_file \u003d cfg.ConfigOpts()"},{"line_number":73,"context_line":"            ini_file.register_opts(serviceprovider_opts, \u0027service_providers\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_d6b0e68d","line":70,"in_reply_to":"bab6814e_da1140b1","updated":"2016-05-25 14:43:17.000000000","message":"Ah, you\u0027re right. I was mixing it up with the option with a similar name. We may end up with a breaking API change in oslo.config when we switch to URLs where the concept of a \"directory\" doesn\u0027t make sense, but this looks OK as a short-term fix.","commit_id":"ee8386aa00481e1dc7fc40608904d39b433765dd"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"80dd31108d2ea97797c394df9195f9ed5539acba","unresolved":false,"context_lines":[{"line_number":67,"context_line":"            if neutron_dir is not None:"},{"line_number":68,"context_line":"                neutron_dirs \u003d [neutron_dir]"},{"line_number":69,"context_line":"            else:"},{"line_number":70,"context_line":"                neutron_dirs \u003d cfg.CONF.config_dirs or [\u0027/etc/neutron\u0027]"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"            ini_file \u003d cfg.ConfigOpts()"},{"line_number":73,"context_line":"            ini_file.register_opts(serviceprovider_opts, \u0027service_providers\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_da1140b1","line":70,"in_reply_to":"bab6814e_e8cd825e","updated":"2016-05-25 09:35:54.000000000","message":"Note that CONF.config_dirs is NOT an option, it\u0027s a property added as part of https://review.openstack.org/#/c/281248/2/oslo_config/cfg.py Since it\u0027s named as a public method, I thought it\u0027s now part of the public API.\n\nAlso note that the issue I am trying to solve right now is not Newton only, where we have time to fix it in some other way, but is already in Mitaka final release of oslo.config + neutron. So we need some short-term solution even if we later go with some alternative approach that would abstract directories out.\n\nMy general take here is that this piece of code should not have been existing in the first place, and long term we should probably just get rid of it.\n\nI will start a thread with more details on how we got here.","commit_id":"ee8386aa00481e1dc7fc40608904d39b433765dd"},{"author":{"_account_id":2472,"name":"Doug Hellmann","email":"dhellmann@redhat.com","username":"doug-hellmann"},"change_message_id":"5c5966a5d396dc3f62ce4ddb0eb1e840d3b3637f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            # (to reflect usual oslo.config behaviour)"},{"line_number":77,"context_line":"            for neutron_dir in reversed(neutron_dirs):"},{"line_number":78,"context_line":"                ini_path \u003d os.path.join(neutron_dir,"},{"line_number":79,"context_line":"                                        \u0027%s.conf\u0027 % self.module_name)"},{"line_number":80,"context_line":"                if os.path.exists(ini_path):"},{"line_number":81,"context_line":"                    ini_file([\u0027--config-file\u0027, ini_path])"},{"line_number":82,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_6899921f","line":79,"updated":"2016-05-24 16:59:50.000000000","message":"I believe if you pass the module_name value to ConfigOpts as the application name, and give it the same directory information, the class will do this search logic for you.","commit_id":"ee8386aa00481e1dc7fc40608904d39b433765dd"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"a8b3792b826026c80f713bf48acd142be18aa24f","unresolved":false,"context_lines":[{"line_number":76,"context_line":"            # (to reflect usual oslo.config behaviour)"},{"line_number":77,"context_line":"            for neutron_dir in reversed(neutron_dirs):"},{"line_number":78,"context_line":"                ini_path \u003d os.path.join(neutron_dir,"},{"line_number":79,"context_line":"                                        \u0027%s.conf\u0027 % self.module_name)"},{"line_number":80,"context_line":"                if os.path.exists(ini_path):"},{"line_number":81,"context_line":"                    ini_file([\u0027--config-file\u0027, ini_path])"},{"line_number":82,"context_line":"                    break"}],"source_content_type":"text/x-python","patch_set":3,"id":"bab6814e_9cb03fdf","line":79,"in_reply_to":"bab6814e_6899921f","updated":"2016-05-25 15:03:35.000000000","message":"Yes. But note that in line 68, we also allow callers of the method to pass their own neutron_dir, in which case relying on oslo.config heuristics would not be enough, because then the library would miss that explicit directory.\n\nNow, if you ask me, that neutron_dir argument is not really needed, and I don\u0027t know of a place where we actually use it (apart from unit tests). So we could deprecate it. Honestly, I would like to deprecate the whole concept of loading config files implicitly, so it would be an unneeded hassle to go with argument deprecation if the whole thing may go away in the near future.","commit_id":"ee8386aa00481e1dc7fc40608904d39b433765dd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"db7c0a50ed2dcb8a9138a8435c4ebf445a6b0357","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            if neutron_dir is not None:"},{"line_number":72,"context_line":"                neutron_dirs \u003d [neutron_dir]"},{"line_number":73,"context_line":"            else:"},{"line_number":74,"context_line":"                neutron_dirs \u003d cfg.CONF.config_dirs or [\u0027/etc/neutron\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            # load configuration from all matching files to reflect oslo.config"},{"line_number":77,"context_line":"            # behaviour"}],"source_content_type":"text/x-python","patch_set":4,"id":"bab6814e_02dbf37c","line":74,"updated":"2016-05-27 02:12:36.000000000","message":"I am assuming that cfg.CONF.config_dirs won\u0027t raise an exception?","commit_id":"7f31ccb7bbe0f78a34d704c59d0562ea10029893"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"21fe6ec34b59bdb1b8484ffe2d9f23e13a14cf62","unresolved":false,"context_lines":[{"line_number":71,"context_line":"            if neutron_dir is not None:"},{"line_number":72,"context_line":"                neutron_dirs \u003d [neutron_dir]"},{"line_number":73,"context_line":"            else:"},{"line_number":74,"context_line":"                neutron_dirs \u003d cfg.CONF.config_dirs or [\u0027/etc/neutron\u0027]"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"            # load configuration from all matching files to reflect oslo.config"},{"line_number":77,"context_line":"            # behaviour"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_2386c2b9","line":74,"in_reply_to":"bab6814e_02dbf37c","updated":"2016-05-27 07:48:45.000000000","message":"It\u0027s not an option, it\u0027s a property: https://github.com/openstack/oslo.config/blob/master/oslo_config/cfg.py#L2482","commit_id":"7f31ccb7bbe0f78a34d704c59d0562ea10029893"}],"neutron/tests/unit/services/test_provider_configuration.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"e6781d8d7af579882fdc767986918b8c75d10665","unresolved":false,"context_lines":[{"line_number":234,"context_line":"            \u0027--config-dir\u0027, base.ETCDIR"},{"line_number":235,"context_line":"        ])"},{"line_number":236,"context_line":""},{"line_number":237,"context_line":"    def test_can_parse_multi_opt_service_provider_from_conf_dir(self):"},{"line_number":238,"context_line":"        mod \u003d provconf.NeutronModule(\u0027neutron_test\u0027)"},{"line_number":239,"context_line":"        mod.ini()"},{"line_number":240,"context_line":"        self.assertEqual([\u0027foo\u0027, \u0027bar\u0027], mod.service_providers())"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_9ff7ea8b","line":237,"updated":"2016-05-24 09:14:45.000000000","message":"the name of the test case should be tweaked.","commit_id":"6081ec3679fa368ea2c91f0f8190dc19665babfc"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"c6fedd79ea92afba840cccbaba96a32a9c762eb5","unresolved":false,"context_lines":[{"line_number":216,"context_line":"                         \u0027Expected two providers, only one read\u0027)"},{"line_number":217,"context_line":""},{"line_number":218,"context_line":""},{"line_number":219,"context_line":"class NeutronModuleConfigDirTestCase(base.BaseTestCase):"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"    def setup_config(self):"},{"line_number":222,"context_line":"        self.config_parse(args\u003d[\u0027--config-dir\u0027, base.ETCDIR])"}],"source_content_type":"text/x-python","patch_set":4,"id":"9abb7d3a_9d553ec8","line":219,"updated":"2016-05-27 11:39:39.000000000","message":"Those tests aren\u0027t more like functional than unit?\n\nIt shall be ok if we want to test it all in one place. The system interactions are just files, nothing blocking or slow.","commit_id":"7f31ccb7bbe0f78a34d704c59d0562ea10029893"}]}
