)]}'
{"designate/manage/tlds.py":[{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"0ffe0bb3da10b95e5ea60288c277ef329281d926","unresolved":false,"context_lines":[{"line_number":65,"context_line":"    def get_admin_context(self):"},{"line_number":66,"context_line":"        return DesignateContext.get_admin_context("},{"line_number":67,"context_line":"            tenant\u003duuidutils.generate_uuid(),"},{"line_number":68,"context_line":"            user\u003duuidutils.generate_uuid())"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    def createTLD(self, fields):"},{"line_number":71,"context_line":"        values \u003d dict()"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2F5xg%3D","line":68,"updated":"2014-02-10 03:18:04.000000000","message":"Humm - I\u0027m not sure I like the idea of \"generating\" a user/tenant_id, as these get recorded in the logs etc.\n\nAt HP, we use the context\u0027s user and tenant ID fields heavily for auditing.\n\nThis should just work without specifying either - That said, we already have a context built and ready for us to use in self.context (see [1])\n\n[1]: https://github.com/stackforge/designate/blob/master/designate/manage/base.py#L25","commit_id":"7d69b309c2286d25e994853daa207d4c73e8b35a"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"0ffe0bb3da10b95e5ea60288c277ef329281d926","unresolved":false,"context_lines":[{"line_number":78,"context_line":"    # validates and returns the number of tlds added - either 0 in case of"},{"line_number":79,"context_line":"    # any errors or 1 if everything is successful"},{"line_number":80,"context_line":"    # In case of errors, the error message is appended to the list error_lines"},{"line_number":81,"context_line":"    def validate_and_create_tld(self, line, error_lines):"},{"line_number":82,"context_line":"        fields \u003d line.split()"},{"line_number":83,"context_line":"        fields_length \u003d len(fields)"},{"line_number":84,"context_line":"        if fields_length \u003e 2:"}],"source_content_type":"text/x-python","patch_set":1,"id":"AAAAUX%2F%2F5wY%3D","line":81,"updated":"2014-02-10 03:18:04.000000000","message":"Lots of the code in here suggests we need to reconsider how we do our validation, today, we do it almost entirely in the API layer.\n\nThis suggests we need to reconsider that, as we\u0027re duplicating some of the work here.\n\nThis is just something we need to think about, rather than something that needs to be fixed for this patchset to merge.","commit_id":"7d69b309c2286d25e994853daa207d4c73e8b35a"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"b43dce253cc93e618b1a121c5f02180a54819fcb","unresolved":false,"context_lines":[{"line_number":33,"context_line":"    By default the delimiter character is \",\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    If any lines in the input file result in an error, the program"},{"line_number":36,"context_line":"    continues to the next line."},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"    On completion the output is reported (LOG.info) in the format:"},{"line_number":39,"context_line":"    Number of tlds added: \u003cnumber\u003e"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FoSk%3D","line":36,"updated":"2014-02-11 22:34:42.000000000","message":"I figure you\u0027ll put it in there when you\u0027re done, but you could take some of the explanation out of here and put it in the documentation, keep this a little cleaner. I don\u0027t really have an objection to these sorts of long comments, but either way it should be in the docs at some point. Just an observation.","commit_id":"69d8490d7ca2ea1ef175cda5017f4165d0acdede"},{"author":{"_account_id":8174,"name":"Tim Simmons","email":"tim.r.simmons@gmail.com","username":"TimSimmons"},"change_message_id":"b43dce253cc93e618b1a121c5f02180a54819fcb","unresolved":false,"context_lines":[{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    # validates and returns the number of tlds added - either 0 in case of"},{"line_number":83,"context_line":"    # any errors or 1 if everything is successful"},{"line_number":84,"context_line":"    # In case of errors, the error message is appended to the list error_lines"},{"line_number":85,"context_line":"    def validate_and_create_tld(self, line, error_lines):"},{"line_number":86,"context_line":"        # validate the tld name"},{"line_number":87,"context_line":"        if not format.is_tldname(line[\u0027name\u0027]):"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fn7Q%3D","line":84,"updated":"2014-02-11 22:34:42.000000000","message":"While we\u0027re microscopically picking nits. These comments could go into comments in the function. Like these: https://github.com/stackforge/designate/blob/master/designate/central/service.py#L175\nIt\u0027d make things more readable.","commit_id":"69d8490d7ca2ea1ef175cda5017f4165d0acdede"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"eaa9bc3f32bc40099b106dba947853bbb1bf8cee","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        # validate the description if there is one"},{"line_number":92,"context_line":"        elif (line[\u0027description\u0027]) and (len(line[\u0027description\u0027]) \u003e 160):"},{"line_number":93,"context_line":"            error_lines.append(\"InvalidDescription --\u003e \" +"},{"line_number":94,"context_line":"                               self.convert_tld_dict_to_str(line))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            return 0"},{"line_number":97,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FoYI%3D","line":94,"updated":"2014-02-11 21:27:32.000000000","message":"Is it at all possible do to the validation using the same code as the API? [1] If we\u0027re going to validate in different places, we should at least validate in the same way ;)\n\n[1]https://github.com/stackforge/designate/blob/8666dde1acd8c7b18a0baf3a8522e561b42d45c5/designate/api/v2/controllers/tlds.py#L70","commit_id":"69d8490d7ca2ea1ef175cda5017f4165d0acdede"},{"author":{"_account_id":741,"name":"Kiall Mac Innes","email":"kiall@macinnes.ie","username":"kiall"},"change_message_id":"81a1aed9341a7fc16a957e83e9d0f1fa34743c4e","unresolved":false,"context_lines":[{"line_number":91,"context_line":"        # validate the description if there is one"},{"line_number":92,"context_line":"        elif (line[\u0027description\u0027]) and (len(line[\u0027description\u0027]) \u003e 160):"},{"line_number":93,"context_line":"            error_lines.append(\"InvalidDescription --\u003e \" +"},{"line_number":94,"context_line":"                               self.convert_tld_dict_to_str(line))"},{"line_number":95,"context_line":""},{"line_number":96,"context_line":"            return 0"},{"line_number":97,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2FoW4%3D","line":94,"in_reply_to":"AAAAUX%2F%2FoYI%3D","updated":"2014-02-11 21:32:17.000000000","message":"Yep Agreed, bit it\u0027s a bigger change that we\u0027ll be getting to in the future..","commit_id":"69d8490d7ca2ea1ef175cda5017f4165d0acdede"},{"author":{"_account_id":8864,"name":"Artom Lifshitz","email":"notartom@gmail.com","username":"artom"},"change_message_id":"eaa9bc3f32bc40099b106dba947853bbb1bf8cee","unresolved":false,"context_lines":[{"line_number":134,"context_line":"        LOG.info(\"Number of tlds added: %d\", tlds_added)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        errors \u003d len(error_lines)"},{"line_number":137,"context_line":"        if errors \u003e 0:"},{"line_number":138,"context_line":"            LOG.error(\"Number of errors: %d\", errors)"},{"line_number":139,"context_line":"            # Sorting the errors and printing them so that it is easier to"},{"line_number":140,"context_line":"            # read the errors"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUX%2F%2Fof4%3D","line":137,"updated":"2014-02-11 21:27:32.000000000","message":"Picking microscopic nits here: wouldn\u0027t just \u0027if errors:\u0027 be more Pythonic here?","commit_id":"69d8490d7ca2ea1ef175cda5017f4165d0acdede"}]}
