)]}'
{"ironic/common/utils.py":[{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c3d3dcf51918d3feaa601ccac63c73798949d7ad","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    :returns: True if valid. False if not."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    \"\"\""},{"line_number":193,"context_line":"    if hostname is None or len(hostname) \u003e 255:"},{"line_number":194,"context_line":"        return False"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    # Periods on the end of a hostname are ok, but complicates the"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_2b186ad2","line":193,"updated":"2015-03-19 11:44:05.000000000","message":"You can check length of hostname in regexp, but it will become more comlicated, so if you want it this way it may be better to move isinstance(hostname, six.string_types) here instead of hostname is None check.","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2a7ac81b4bf40bc4ad562be0ba698275b33793ee","unresolved":false,"context_lines":[{"line_number":190,"context_line":"    :returns: True if valid. False if not."},{"line_number":191,"context_line":""},{"line_number":192,"context_line":"    \"\"\""},{"line_number":193,"context_line":"    if hostname is None or len(hostname) \u003e 255:"},{"line_number":194,"context_line":"        return False"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    # Periods on the end of a hostname are ok, but complicates the"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_ce27b3c5","line":193,"in_reply_to":"9a80dd14_2b186ad2","updated":"2015-03-20 05:50:13.000000000","message":"Thanks Vladyslav - fixed","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c3d3dcf51918d3feaa601ccac63c73798949d7ad","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    # Periods on the end of a hostname are ok, but complicates the"},{"line_number":197,"context_line":"    # regex so we\u0027ll do this manually"},{"line_number":198,"context_line":"    if hostname.endswith(\u0027.\u0027):"},{"line_number":199,"context_line":"        hostname \u003d hostname[:-1]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    host \u003d \u0027[a-z0-9]([a-z0-9\\-]{0,61}[a-z0-9])?\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_660b7924","line":198,"updated":"2015-03-19 11:44:05.000000000","message":"RFC 952 says: The last character must not be a minus sign or period.","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2a7ac81b4bf40bc4ad562be0ba698275b33793ee","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    # Periods on the end of a hostname are ok, but complicates the"},{"line_number":197,"context_line":"    # regex so we\u0027ll do this manually"},{"line_number":198,"context_line":"    if hostname.endswith(\u0027.\u0027):"},{"line_number":199,"context_line":"        hostname \u003d hostname[:-1]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    host \u003d \u0027[a-z0-9]([a-z0-9\\-]{0,61}[a-z0-9])?\u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_99ab43d5","line":198,"in_reply_to":"9a80dd14_660b7924","updated":"2015-03-20 05:50:13.000000000","message":"I think that has been superceeded Vladyslav.  If you see here (http://en.wikipedia.org/wiki/Fully_qualified_domain_name or the RFCs mentioned, but more obscurely) the ending dot implies the domain is fully qualified back to a root DNS server.\n\nIt\u0027s not common, but it is allowed.  I just wanted to cover that case as well.","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"c3d3dcf51918d3feaa601ccac63c73798949d7ad","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        hostname \u003d hostname[:-1]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    host \u003d \u0027[a-z0-9]([a-z0-9\\-]{0,61}[a-z0-9])?\u0027"},{"line_number":202,"context_line":"    domain \u003d \u0027[a-z0-9\\-_]{0,62}[a-z0-9]\u0027"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    m \u003d \u0027^\u0027 + host + \u0027(\\.\u0027 + domain + \u0027)*$\u0027"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_a66f3191","line":202,"updated":"2015-03-19 11:44:05.000000000","message":"Also I don\u0027t see anything in these RFCs about allowing _. Maybe instead of sticking to those just introduce some rules in docstring?","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2a7ac81b4bf40bc4ad562be0ba698275b33793ee","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        hostname \u003d hostname[:-1]"},{"line_number":200,"context_line":""},{"line_number":201,"context_line":"    host \u003d \u0027[a-z0-9]([a-z0-9\\-]{0,61}[a-z0-9])?\u0027"},{"line_number":202,"context_line":"    domain \u003d \u0027[a-z0-9\\-_]{0,62}[a-z0-9]\u0027"},{"line_number":203,"context_line":""},{"line_number":204,"context_line":"    m \u003d \u0027^\u0027 + host + \u0027(\\.\u0027 + domain + \u0027)*$\u0027"},{"line_number":205,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_5942ab0f","line":202,"in_reply_to":"9a80dd14_a66f3191","updated":"2015-03-20 05:50:13.000000000","message":"Well, the approved spec proposed allowing internet hosts to be specified as  logical names.\n\nIf you see here http://domainkeys.sourceforge.net/underscore.html , it tells us that RFC2872 allows it.  I\u0027m going to leave it as is.","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"}],"ironic/tests/test_utils.py":[{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9d79ecf1ae856c69bf748a99e85b9d339a49b0dd","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027-spam\u0027))"},{"line_number":343,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam-\u0027))"},{"line_number":344,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027spam-eggs\u0027))"},{"line_number":345,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam_eggs\u0027))"},{"line_number":346,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam eggs\u0027))"},{"line_number":347,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027spam.eggs\u0027))"},{"line_number":348,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u00279spam\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_487f6417","line":345,"updated":"2015-03-19 11:41:47.000000000","message":"I understand it tries to comply with hostnames, FQDN etc... But I just find it all very bad for UX.\n\nWhy wouldn\u0027t we allow a node to have a name that uses \u0027_\u0027 as a delimiter? \"spam_eggs\" sounds a completed valid and reasonable way to name a node.\n\nImagine someone trying to name their node node_1 and *boom* it fails.","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2a7ac81b4bf40bc4ad562be0ba698275b33793ee","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027-spam\u0027))"},{"line_number":343,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam-\u0027))"},{"line_number":344,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027spam-eggs\u0027))"},{"line_number":345,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam_eggs\u0027))"},{"line_number":346,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam eggs\u0027))"},{"line_number":347,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027spam.eggs\u0027))"},{"line_number":348,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u00279spam\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_795f6f41","line":345,"in_reply_to":"9a80dd14_487f6417","updated":"2015-03-20 05:50:13.000000000","message":"I think that should be handled by another bug/update to the spec.\n\nThe approved spec is what I\u0027m working to.  I will raise a bug suggesting that we might loosen the requirements and just make it a plain text field - we can then approve/not approve that bug.\n\nActually, here it is: https://bugs.launchpad.net/ironic/+bug/1434376","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9b2682d3992c38480b6d1d19acfb2edfb1ff638b","unresolved":false,"context_lines":[{"line_number":342,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027-spam\u0027))"},{"line_number":343,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam-\u0027))"},{"line_number":344,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027spam-eggs\u0027))"},{"line_number":345,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam_eggs\u0027))"},{"line_number":346,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam eggs\u0027))"},{"line_number":347,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027spam.eggs\u0027))"},{"line_number":348,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u00279spam\u0027))"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_120725cb","line":345,"in_reply_to":"9a80dd14_795f6f41","updated":"2015-03-20 09:42:28.000000000","message":"fair enough! +1","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"9d79ecf1ae856c69bf748a99e85b9d339a49b0dd","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam \u0027))"},{"line_number":356,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027s\u0027))"},{"line_number":357,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027s\u0027 * 63))"},{"line_number":358,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027s\u0027 * 64))"},{"line_number":359,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027\u0027))"},{"line_number":360,"context_line":"        self.assertFalse(utils.is_hostname_safe(None))"},{"line_number":361,"context_line":"        # Need to ensure a binary response for success or fail"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_e8ebb8a1","line":358,"updated":"2015-03-19 11:41:47.000000000","message":"See how over complicated its going? We expect 63 characters, and then we expect a \u0027.\u0027, then you can have more 63 characters and then another \u0027.\u0027... and so on.","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"},{"author":{"_account_id":8125,"name":"Michael Davies","email":"michael@the-davies.net","username":"mrda"},"change_message_id":"2a7ac81b4bf40bc4ad562be0ba698275b33793ee","unresolved":false,"context_lines":[{"line_number":355,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027spam \u0027))"},{"line_number":356,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027s\u0027))"},{"line_number":357,"context_line":"        self.assertTrue(utils.is_hostname_safe(\u0027s\u0027 * 63))"},{"line_number":358,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027s\u0027 * 64))"},{"line_number":359,"context_line":"        self.assertFalse(utils.is_hostname_safe(\u0027\u0027))"},{"line_number":360,"context_line":"        self.assertFalse(utils.is_hostname_safe(None))"},{"line_number":361,"context_line":"        # Need to ensure a binary response for success or fail"}],"source_content_type":"text/x-python","patch_set":3,"id":"9a80dd14_995a634e","line":358,"in_reply_to":"9a80dd14_e8ebb8a1","updated":"2015-03-20 05:50:13.000000000","message":"\"as above\"","commit_id":"178fd30ea38c264279e28f6b694bc6d6dfdce7ec"}]}
