)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8124,"name":"cbrandily","email":"zzelle@gmail.com","username":"cbrandily"},"change_message_id":"fd0e57012b4b9ff2ebb032d1857a0e4e29ad8885","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ensure config directory created before updating leases"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Under high load conditions dhcp-agent could try to start the"},{"line_number":10,"context_line":"dhcp agent via reload_allocations. But it will fail since"},{"line_number":11,"context_line":"the dhcp config directory for the specific network is not"},{"line_number":12,"context_line":"created yet."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_61b8eb2a","line":10,"updated":"2015-01-05 13:29:03.000000000","message":"\"to start dhcp agent\" seems invalid as dhcp-agent is already started as it\u0027s the one running reload_allocations :)","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cd1d8d227253bfe8c806aed79a9cd1c323c385d3","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ensure config directory created before updating leases"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Under high load conditions dhcp-agent could try to start the"},{"line_number":10,"context_line":"dhcp agent via reload_allocations. But it will fail since"},{"line_number":11,"context_line":"the dhcp config directory for the specific network is not"},{"line_number":12,"context_line":"created yet."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_e434e94b","line":10,"in_reply_to":"3a961159_61b8eb2a","updated":"2015-01-05 14:29:15.000000000","message":"ahh, correct :-), I must say, the dhcp server for a tenant.","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"99f9c52904c4504ec2a8dac9491e0a4b0debf471","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ensure config directory created before updating leases"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Under high load conditions dhcp-agent could try to start the"},{"line_number":10,"context_line":"dhcp agent via reload_allocations. But it will fail since"},{"line_number":11,"context_line":"the dhcp config directory for the specific network is not"},{"line_number":12,"context_line":"created yet."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_e443096a","line":10,"in_reply_to":"3a961159_e434e94b","updated":"2015-01-05 14:35:22.000000000","message":"I thought you mean dnsmasq process.","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"688f12ffb05123a2e9c2d32c896d9af7bf120e88","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Ensure config directory created before updating leases"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Under high load conditions dhcp-agent could try to start the"},{"line_number":10,"context_line":"dhcp agent via reload_allocations. But it will fail since"},{"line_number":11,"context_line":"the dhcp config directory for the specific network is not"},{"line_number":12,"context_line":"created yet."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_574acd55","line":10,"in_reply_to":"3a961159_e443096a","updated":"2015-01-05 14:38:34.000000000","message":"Yes, in this case is dnsmasq, because is the only\ndriver we have U/S\n\nbut I\u0027m fixing at the  DhcpLocalProcess level, which could\neventually be used with other dhcp servers.\n\nDhcpBase \u003c- DhcpLocalProcess \u003c- Dnsmasq\n\nTo be correct may be I should say:\n\ncould try to start the dhcp local process via reload_allocations..  ?","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3ef14471e5db6f6cfcc57d03a7dad90007984ea6","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the dhcp config directory for the specific network is not"},{"line_number":12,"context_line":"created yet."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We ensure it\u0027s creation with this patch."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: 1407618"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_41c4cf40","line":14,"updated":"2015-01-05 14:00:27.000000000","message":"nit: its","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cd1d8d227253bfe8c806aed79a9cd1c323c385d3","unresolved":false,"context_lines":[{"line_number":11,"context_line":"the dhcp config directory for the specific network is not"},{"line_number":12,"context_line":"created yet."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"We ensure it\u0027s creation with this patch."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"Closes-Bug: 1407618"},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_c42d2dff","line":14,"in_reply_to":"3a961159_41c4cf40","updated":"2015-01-05 14:29:15.000000000","message":"woops, correct","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"}],"neutron/agent/linux/dhcp.py":[{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3ef14471e5db6f6cfcc57d03a7dad90007984ea6","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        conf_dir \u003d os.path.join(confs_dir, self.network.id)"},{"line_number":244,"context_line":"        shutil.rmtree(conf_dir, ignore_errors\u003dTrue)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def _get_conf_dir(self):"},{"line_number":247,"context_line":"        confs_dir \u003d os.path.abspath(os.path.normpath(self.conf.dhcp_confs))"},{"line_number":248,"context_line":"        return os.path.join(confs_dir, self.network.id)"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_c1143fa1","line":246,"updated":"2015-01-05 14:00:27.000000000","message":"Maybe it\u0027s out of scope of this patch, but would it be better to isolate this method out of this class and then reuse it also on L242?\n\n def get_network_dir(path, network_id):\n     confs_dir \u003d os.path.abspath(os.path.normpath(path))\n     return os.path.join(confs_dir, network_id)\n\nAlso as dhcp_confs is taken from config file and network is assigned only it constructor, it might be better to set conf_dir as a property of this class and be evaluated only once.","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cd1d8d227253bfe8c806aed79a9cd1c323c385d3","unresolved":false,"context_lines":[{"line_number":243,"context_line":"        conf_dir \u003d os.path.join(confs_dir, self.network.id)"},{"line_number":244,"context_line":"        shutil.rmtree(conf_dir, ignore_errors\u003dTrue)"},{"line_number":245,"context_line":""},{"line_number":246,"context_line":"    def _get_conf_dir(self):"},{"line_number":247,"context_line":"        confs_dir \u003d os.path.abspath(os.path.normpath(self.conf.dhcp_confs))"},{"line_number":248,"context_line":"        return os.path.join(confs_dir, self.network.id)"},{"line_number":249,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_a4a021a6","line":246,"in_reply_to":"3a961159_c1143fa1","updated":"2015-01-05 14:29:15.000000000","message":"Since I\u0027m abstracting out the function, it makes sense to remove the replication IMHO.\n\nI\u0027ll make a second pass on this trying to avoid going too much out of scope.","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8655,"name":"Jakub Libosvar","email":"libosvar@redhat.com","username":"jlibosva"},"change_message_id":"3ef14471e5db6f6cfcc57d03a7dad90007984ea6","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        \"\"\"Returns the file name for a given kind of config file.\"\"\""},{"line_number":252,"context_line":"        return os.path.join(self._get_conf_dir(), kind)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _ensure_conf_dir(self):"},{"line_number":255,"context_line":"        \"\"\"Ensures the directory for configuration files is created.\"\"\""},{"line_number":256,"context_line":"        conf_dir \u003d self._get_conf_dir()"},{"line_number":257,"context_line":"        if not os.path.isdir(conf_dir):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_8171570e","line":254,"updated":"2015-01-05 14:00:27.000000000","message":"nit: _ensure_conf_dir_exists would be more descriptive.","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"cd1d8d227253bfe8c806aed79a9cd1c323c385d3","unresolved":false,"context_lines":[{"line_number":251,"context_line":"        \"\"\"Returns the file name for a given kind of config file.\"\"\""},{"line_number":252,"context_line":"        return os.path.join(self._get_conf_dir(), kind)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"    def _ensure_conf_dir(self):"},{"line_number":255,"context_line":"        \"\"\"Ensures the directory for configuration files is created.\"\"\""},{"line_number":256,"context_line":"        conf_dir \u003d self._get_conf_dir()"},{"line_number":257,"context_line":"        if not os.path.isdir(conf_dir):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_c4060d85","line":254,"in_reply_to":"3a961159_8171570e","updated":"2015-01-05 14:29:15.000000000","message":"You can use the \"ensure\" verb with an object without more, but may be I\u0027m wrong and I\u0027m miss leaded by my spanish :)","commit_id":"b369f97964c76dcca518aa0f686a8961d59b213d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"767fd9a36a37b8bc3754a486985a8a21b705278c","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def get_confs_dir(conf):"},{"line_number":204,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @staticmethod"},{"line_number":207,"context_line":"    def get_conf_dir(confs_dir, network_id):"},{"line_number":208,"context_line":"        return os.path.join(confs_dir, network_id)"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e5b05cff","line":206,"updated":"2015-01-05 20:10:19.000000000","message":"What about \u0027get_conf_dir_for_network\u0027?\n\nHaving both get_confs_dir and get_conf_dir (Even though they have different parameters) is just confusing.","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5b85c65d8fc0a812e0f7de973a1a34127c90638e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def get_confs_dir(conf):"},{"line_number":204,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @staticmethod"},{"line_number":207,"context_line":"    def get_conf_dir(confs_dir, network_id):"},{"line_number":208,"context_line":"        return os.path.join(confs_dir, network_id)"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_7b222455","line":206,"in_reply_to":"3a961159_1143e613","updated":"2015-01-06 21:59:14.000000000","message":"+1, I like @salvatore\u0027s suggested name.","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5b85c65d8fc0a812e0f7de973a1a34127c90638e","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def get_confs_dir(conf):"},{"line_number":204,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @staticmethod"},{"line_number":207,"context_line":"    def get_conf_dir(confs_dir, network_id):"},{"line_number":208,"context_line":"        return os.path.join(confs_dir, network_id)"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1bfcc0b4","line":206,"in_reply_to":"3a961159_e5b05cff","updated":"2015-01-06 21:59:14.000000000","message":"Yes I know it sounds confusing, I will try to think of better naming, but suggestions are also accepted ;)","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"89fdc89acf0d7b6f2838b8a946e939e2be6f9019","unresolved":false,"context_lines":[{"line_number":203,"context_line":"    def get_confs_dir(conf):"},{"line_number":204,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":205,"context_line":""},{"line_number":206,"context_line":"    @staticmethod"},{"line_number":207,"context_line":"    def get_conf_dir(confs_dir, network_id):"},{"line_number":208,"context_line":"        return os.path.join(confs_dir, network_id)"},{"line_number":209,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1143e613","line":206,"in_reply_to":"3a961159_e5b05cff","updated":"2015-01-05 22:20:08.000000000","message":"or get_network_conf_dir, as you prefer","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"767fd9a36a37b8bc3754a486985a8a21b705278c","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                except RuntimeError:"},{"line_number":253,"context_line":"                    LOG.exception(_LE(\u0027Failed trying to delete namespace: %s\u0027),"},{"line_number":254,"context_line":"                                  self.network.namespace)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _remove_config_files(self):"},{"line_number":257,"context_line":"        shutil.rmtree(self.conf_dir, ignore_errors\u003dTrue)"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_e5d93c57","line":255,"updated":"2015-01-05 20:10:19.000000000","message":"I think that these 3 functions should be located right next to get_confs_dir and get_conf_dir.","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5b85c65d8fc0a812e0f7de973a1a34127c90638e","unresolved":false,"context_lines":[{"line_number":252,"context_line":"                except RuntimeError:"},{"line_number":253,"context_line":"                    LOG.exception(_LE(\u0027Failed trying to delete namespace: %s\u0027),"},{"line_number":254,"context_line":"                                  self.network.namespace)"},{"line_number":255,"context_line":""},{"line_number":256,"context_line":"    def _remove_config_files(self):"},{"line_number":257,"context_line":"        shutil.rmtree(self.conf_dir, ignore_errors\u003dTrue)"},{"line_number":258,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_3be97c1a","line":255,"in_reply_to":"3a961159_e5d93c57","updated":"2015-01-06 21:59:14.000000000","message":"I tend to agree with that kind of comment (it\u0027s generally my preference), but, then there are reviewers who don\u0027t like too much  function shuffling into the patches for easier review.\n\nSince I agree with you I will do ;)","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":261,"name":"Salvatore Orlando","email":"salv.orlando@gmail.com","username":"salvatore-orlando"},"change_message_id":"89fdc89acf0d7b6f2838b8a946e939e2be6f9019","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @classmethod"},{"line_number":354,"context_line":"    def existing_dhcp_networks(cls, conf, root_helper):"},{"line_number":355,"context_line":"        \"\"\"Return a list of existing networks ids that we have configs for.\"\"\""},{"line_number":356,"context_line":"        confs_dir \u003d cls.get_confs_dir(conf)"},{"line_number":357,"context_line":"        return ["},{"line_number":358,"context_line":"            c for c in os.listdir(confs_dir)"},{"line_number":359,"context_line":"            if uuidutils.is_uuid_like(c)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d1179ea1","line":356,"updated":"2015-01-05 22:20:08.000000000","message":"maybe unrelated to your bug, but if confs_dir does not exist the subsequent listdir call will fail","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"3029053ac49154dd93a0aae6ae907d960a9caf4b","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @classmethod"},{"line_number":354,"context_line":"    def existing_dhcp_networks(cls, conf, root_helper):"},{"line_number":355,"context_line":"        \"\"\"Return a list of existing networks ids that we have configs for.\"\"\""},{"line_number":356,"context_line":"        confs_dir \u003d cls.get_confs_dir(conf)"},{"line_number":357,"context_line":"        return ["},{"line_number":358,"context_line":"            c for c in os.listdir(confs_dir)"},{"line_number":359,"context_line":"            if uuidutils.is_uuid_like(c)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_d984f6d4","line":356,"in_reply_to":"3a961159_1b65a0ae","updated":"2015-01-07 10:53:10.000000000","message":"Per of IRC conversation:\n\n\u003csalv-orlando\u003e\t ajo: if the directory has not been \"ensured\" then when you try and list it, os.listdir raises","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5b85c65d8fc0a812e0f7de973a1a34127c90638e","unresolved":false,"context_lines":[{"line_number":353,"context_line":"    @classmethod"},{"line_number":354,"context_line":"    def existing_dhcp_networks(cls, conf, root_helper):"},{"line_number":355,"context_line":"        \"\"\"Return a list of existing networks ids that we have configs for.\"\"\""},{"line_number":356,"context_line":"        confs_dir \u003d cls.get_confs_dir(conf)"},{"line_number":357,"context_line":"        return ["},{"line_number":358,"context_line":"            c for c in os.listdir(confs_dir)"},{"line_number":359,"context_line":"            if uuidutils.is_uuid_like(c)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3a961159_1b65a0ae","line":356,"in_reply_to":"3a961159_d1179ea1","updated":"2015-01-06 21:59:14.000000000","message":"Could you clarify when wouldn\u0027t get_confs_dir exist?\n\nWe don\u0027t depend on self.confs_dir or self.conf_dir existence as this is a classmethod.","commit_id":"86d84153016feda2de7aa1404fa56ef51e668843"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"fa951ce0b89367afd4a385ed90a87b4d30f4ec92","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            self.get_network_conf_dir(self.confs_dir, network.id))"},{"line_number":202,"context_line":"        self._ensure_network_conf_dir()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @staticmethod"},{"line_number":205,"context_line":"    def get_confs_dir(conf):"},{"line_number":206,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_b996e63c","line":204,"updated":"2015-01-11 23:17:03.000000000","message":"why are these static?  These should be in the init method.","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cb6275f771ccb907f1725b815d6569895df03de3","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            self.get_network_conf_dir(self.confs_dir, network.id))"},{"line_number":202,"context_line":"        self._ensure_network_conf_dir()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @staticmethod"},{"line_number":205,"context_line":"    def get_confs_dir(conf):"},{"line_number":206,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_b8ff9965","line":204,"in_reply_to":"3a961159_59d7bb4f","updated":"2015-01-13 02:16:02.000000000","message":"I am also not a fan of static methods just for the sake of it. In the end if these do not define any class behavior, you might be better off defining them at a module level. But I have seen this abused so much in the codebase that I lost the will to scold :)","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fb8517a9f1b16c4a38c76455d6d9b423a25113a6","unresolved":false,"context_lines":[{"line_number":201,"context_line":"            self.get_network_conf_dir(self.confs_dir, network.id))"},{"line_number":202,"context_line":"        self._ensure_network_conf_dir()"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    @staticmethod"},{"line_number":205,"context_line":"    def get_confs_dir(conf):"},{"line_number":206,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":207,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_59d7bb4f","line":204,"in_reply_to":"3a961159_b996e63c","updated":"2015-01-12 09:52:42.000000000","message":"in get_network_conf_dir:\nnot because we need it called outside, just for the fact that they don\u0027t reference \"self\", and otherwise \"self\" is an unused argument.\n\nI have no preference on using @staticmethod or not, but I\u0027ve been targetted with nitpicks when not marking the method a static and not referencing self.\n\nWhat\u0027s your opinion about this?\n\nI will move the os.path.abspath directly to the init method for get_network_conf_dir (see henry request) \n\n\n\n\nOn the other hand, for get_confs_dir, see line 357. I was requested on previous patchset to remove that duplication now that we had a function for it, and it makes sense to me.","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"27886641e0ec455eb787d1c75a3193da693502f0","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @staticmethod"},{"line_number":209,"context_line":"    def get_network_conf_dir(confs_dir, network_id):"},{"line_number":210,"context_line":"        return os.path.join(confs_dir, network_id)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_conf_file_name(self, kind):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_3ed81c1e","line":209,"updated":"2015-01-11 20:19:47.000000000","message":"Why create a separate method for this one line used only in __init__?","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fb8517a9f1b16c4a38c76455d6d9b423a25113a6","unresolved":false,"context_lines":[{"line_number":206,"context_line":"        return os.path.abspath(os.path.normpath(conf.dhcp_confs))"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @staticmethod"},{"line_number":209,"context_line":"    def get_network_conf_dir(confs_dir, network_id):"},{"line_number":210,"context_line":"        return os.path.join(confs_dir, network_id)"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    def get_conf_file_name(self, kind):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_591a5b19","line":209,"in_reply_to":"3a961159_3ed81c1e","updated":"2015-01-12 09:52:42.000000000","message":"I was trying to make it more clear to the reviewers (compared to the patched code).\n\nBut, frankly speaking, it\u0027s equally idiomatic to just write\n\n    self.network_conf_dir \u003d os.path.join(confs_dir, network_id)\n\n  at __init__\n\n+1 for moving this up.","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"27886641e0ec455eb787d1c75a3193da693502f0","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    return converter(f.read()) if converter else f.read()"},{"line_number":279,"context_line":"                except ValueError:"},{"line_number":280,"context_line":"                    msg \u003d _(\u0027Unable to convert value in %s\u0027)"},{"line_number":281,"context_line":"        except IOError:"},{"line_number":282,"context_line":"            msg \u003d _(\u0027Unable to access %s\u0027)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        LOG.debug(msg, file_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_de37184c","line":281,"updated":"2015-01-11 20:19:47.000000000","message":"Are you going to follow up with a patch to return here without a debug log?","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"fb8517a9f1b16c4a38c76455d6d9b423a25113a6","unresolved":false,"context_lines":[{"line_number":278,"context_line":"                    return converter(f.read()) if converter else f.read()"},{"line_number":279,"context_line":"                except ValueError:"},{"line_number":280,"context_line":"                    msg \u003d _(\u0027Unable to convert value in %s\u0027)"},{"line_number":281,"context_line":"        except IOError:"},{"line_number":282,"context_line":"            msg \u003d _(\u0027Unable to access %s\u0027)"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"        LOG.debug(msg, file_name)"}],"source_content_type":"text/x-python","patch_set":5,"id":"3a961159_d9a3abaf","line":281,"in_reply_to":"3a961159_de37184c","updated":"2015-01-12 09:52:42.000000000","message":"I can certainly do that, but it\u0027s unrelated to the bug. I\u0027m a bit tight on time for lower priority stuff until the end of the month. But I can look at it afterwards.  \n\nDoes it sound reasonable? :)","commit_id":"94b0679fe2335921d9ef364b3aa3e467b43eb618"}],"neutron/tests/unit/test_linux_dhcp.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bc4c93ec71a910dc73f37146e49a418fd39c713f","unresolved":false,"context_lines":[{"line_number":808,"context_line":"        attrs_to_mock \u003d dict("},{"line_number":809,"context_line":"            [(a, mock.DEFAULT) for a in"},{"line_number":810,"context_line":"                [\u0027_output_opts_file\u0027, \u0027get_conf_file_name\u0027, \u0027interface_name\u0027,"},{"line_number":811,"context_line":"                 \u0027_ensure_network_conf_dir\u0027]]"},{"line_number":812,"context_line":"        )"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"        with mock.patch.multiple(dhcp.Dnsmasq, **attrs_to_mock) as mocks:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_724dd771","line":811,"updated":"2015-01-07 10:57:41.000000000","message":"hmm, this addition is not required anymore as we\u0027re capturing makedirs as our system boundary up in the TestBase.","commit_id":"cb8e19be2913e319c7c2b63d3c680d95fa93f71b"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bc4c93ec71a910dc73f37146e49a418fd39c713f","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"        exp_args \u003d [\u0027kill\u0027, \u0027-HUP\u0027, 5]"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"        fake_net \u003d FakeDualNetwork()"},{"line_number":1140,"context_line":""},{"line_number":1141,"context_line":"        dm \u003d dhcp.Dnsmasq(self.conf, fake_net,"},{"line_number":1142,"context_line":"                          version\u003ddhcp.Dnsmasq.MINIMUM_VERSION)"},{"line_number":1143,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_f240e736","line":1140,"updated":"2015-01-07 10:57:41.000000000","message":"unnecesary blank line","commit_id":"cb8e19be2913e319c7c2b63d3c680d95fa93f71b"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"bc4c93ec71a910dc73f37146e49a418fd39c713f","unresolved":false,"context_lines":[{"line_number":1146,"context_line":"            mock.patch.object(dhcp.Dnsmasq, \u0027pid\u0027),"},{"line_number":1147,"context_line":"            mock.patch.object(dhcp.Dnsmasq, \u0027interface_name\u0027),"},{"line_number":1148,"context_line":"            mock.patch.object(dhcp.Dnsmasq, \u0027_make_subnet_interface_ip_map\u0027),"},{"line_number":1149,"context_line":"            mock.patch.object(dm, \u0027device_manager\u0027),"},{"line_number":1150,"context_line":"        ) as (active, pid, interface_name, ip_map, device_manager):"},{"line_number":1151,"context_line":"            active.__get__ \u003d mock.Mock(return_value\u003dTrue)"},{"line_number":1152,"context_line":"            pid.__get__ \u003d mock.Mock(return_value\u003d5)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_52445b46","line":1149,"updated":"2015-01-07 10:57:41.000000000","message":"unnecessary comma added.","commit_id":"cb8e19be2913e319c7c2b63d3c680d95fa93f71b"}]}
