)]}'
{"playbooks/inventory/dynamic_inventory.py":[{"author":{"_account_id":19592,"name":"Ala Raddaoui","email":"raddaoui.ala@intel.com","username":"ala_raddaoui"},"change_message_id":"090d172b689b2d56b45e95245f124ee932379ee1","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            networks[old_address][\u0027static_routes\u0027] \u003d []"},{"line_number":641,"context_line":"            for s in static_routes:"},{"line_number":642,"context_line":"                # only add static routes if they are specified correctly"},{"line_number":643,"context_line":"                # TODO(palendae): raise a warning or error here,"},{"line_number":644,"context_line":"                # don\u0027t fail silently."},{"line_number":645,"context_line":"                if \u0027cidr\u0027 in s and \u0027gateway\u0027 in s:"},{"line_number":646,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(s)"},{"line_number":647,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_e74a8bc4","line":644,"range":{"start_line":643,"start_character":0,"end_line":644,"end_character":38},"updated":"2016-05-19 22:02:05.000000000","message":"Nolan, why you added a Note and not the warning itself here, then you can include it in your tests.","commit_id":"e0f467221d012dc520751931630c23de1b5afa5a"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"08d674fbb4fc9f0307f9e6a66310074a822b410d","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            networks[old_address][\u0027static_routes\u0027] \u003d []"},{"line_number":641,"context_line":"            for s in static_routes:"},{"line_number":642,"context_line":"                # only add static routes if they are specified correctly"},{"line_number":643,"context_line":"                # TODO(palendae): raise a warning or error here,"},{"line_number":644,"context_line":"                # don\u0027t fail silently."},{"line_number":645,"context_line":"                if \u0027cidr\u0027 in s and \u0027gateway\u0027 in s:"},{"line_number":646,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(s)"},{"line_number":647,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_05254fc1","line":644,"range":{"start_line":643,"start_character":0,"end_line":644,"end_character":38},"in_reply_to":"bab6814e_e74a8bc4","updated":"2016-05-24 16:44:29.000000000","message":"I was taking a more conservative approach than we have in the past, but you\u0027re right in the sense that we have already started adding errors with tests in, so I\u0027ll revise.","commit_id":"e0f467221d012dc520751931630c23de1b5afa5a"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"142d7def744b0f33c8a956065f904d9cf24ccedb","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            networks[old_address][\u0027static_routes\u0027] \u003d []"},{"line_number":641,"context_line":"            for s in static_routes:"},{"line_number":642,"context_line":"                # only add static routes if they are specified correctly"},{"line_number":643,"context_line":"                # TODO(palendae): raise a warning or error here,"},{"line_number":644,"context_line":"                # don\u0027t fail silently."},{"line_number":645,"context_line":"                if \u0027cidr\u0027 in s and \u0027gateway\u0027 in s:"},{"line_number":646,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_689fd2b4","line":643,"updated":"2016-05-24 16:48:38.000000000","message":"So I\u0027m conflicted on raising an error (which will halt the inventory process altogether) or a warning (which will send a message to stderr but continue) here.\n\nHalting execution makes sense in that it fully surfaces an error and requires it to be fixed before the deployer can proceed. Raising a warning gives more information than silently failing, but allows execution, Also, it could easily be lost if the deployer\u0027s not actively looking at stderr specifically/their scroll history is short.\n\nI\u0027d like other people\u0027s opinions. After writing out the options, I\u0027m leaning towards an error simply because it\u0027s more in line with other configuration mistakes we\u0027re catching now.","commit_id":"6bb65c6ec766b3b2736b0bebdd14ae1377abf338"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"92e4c7563ea2935448e1175491170676e0e2ff86","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            networks[old_address][\u0027static_routes\u0027] \u003d []"},{"line_number":641,"context_line":"            for s in static_routes:"},{"line_number":642,"context_line":"                # only add static routes if they are specified correctly"},{"line_number":643,"context_line":"                # TODO(palendae): raise a warning or error here,"},{"line_number":644,"context_line":"                # don\u0027t fail silently."},{"line_number":645,"context_line":"                if \u0027cidr\u0027 in s and \u0027gateway\u0027 in s:"},{"line_number":646,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_4a163ea8","line":643,"in_reply_to":"bab6814e_1473bb4e","updated":"2016-05-24 19:36:26.000000000","message":"Ok, given 2 others are leaning towards error, I\u0027ll do that.","commit_id":"6bb65c6ec766b3b2736b0bebdd14ae1377abf338"},{"author":{"_account_id":19814,"name":"Travis Truman (automagically)","email":"travis_truman@cable.comcast.com","username":"trumant"},"change_message_id":"01f30fb43a2af944b7617eead8f684a91532f6d5","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            networks[old_address][\u0027static_routes\u0027] \u003d []"},{"line_number":641,"context_line":"            for s in static_routes:"},{"line_number":642,"context_line":"                # only add static routes if they are specified correctly"},{"line_number":643,"context_line":"                # TODO(palendae): raise a warning or error here,"},{"line_number":644,"context_line":"                # don\u0027t fail silently."},{"line_number":645,"context_line":"                if \u0027cidr\u0027 in s and \u0027gateway\u0027 in s:"},{"line_number":646,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_5e3564f5","line":643,"in_reply_to":"bab6814e_689fd2b4","updated":"2016-05-24 17:45:22.000000000","message":"I\u0027d rather halt execution with the error.","commit_id":"6bb65c6ec766b3b2736b0bebdd14ae1377abf338"},{"author":{"_account_id":7353,"name":"Kevin Carter","email":"kevin@cloudnull.com","username":"cloudnull"},"change_message_id":"8f6b07fbc82f75a3afa19b641df9e7208044cc4d","unresolved":false,"context_lines":[{"line_number":640,"context_line":"            networks[old_address][\u0027static_routes\u0027] \u003d []"},{"line_number":641,"context_line":"            for s in static_routes:"},{"line_number":642,"context_line":"                # only add static routes if they are specified correctly"},{"line_number":643,"context_line":"                # TODO(palendae): raise a warning or error here,"},{"line_number":644,"context_line":"                # don\u0027t fail silently."},{"line_number":645,"context_line":"                if \u0027cidr\u0027 in s and \u0027gateway\u0027 in s:"},{"line_number":646,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(s)"}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_1473bb4e","line":643,"in_reply_to":"bab6814e_689fd2b4","updated":"2016-05-24 18:31:14.000000000","message":"So initially I had thought raising a warning was better than an error however having pondered the question a bit, and reading this, I think an with a halt makes the most sense. If there\u0027s missing data in a static route its going to cause issues in the deployment which will be hard to debug especially if the warning message was missed in the playbook run.","commit_id":"6bb65c6ec766b3b2736b0bebdd14ae1377abf338"},{"author":{"_account_id":18784,"name":"Michael Carden","email":"mike.carden@gmail.com","username":"mcarden"},"change_message_id":"ef2fddab3ff6e36edb1c456525ef18dfe71d1f1b","unresolved":false,"context_lines":[{"line_number":647,"context_line":""},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"def _net_address_search(provider_networks, main_network, key):"},{"line_number":650,"context_line":"    \"\"\"Set the key netwokr type to the main network if not specified."},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    :param provider_networks: ``list`` Network list of ``dict``s"},{"line_number":653,"context_line":"    :param main_network: ``str`` The name of the main network bridge."}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_4b3aefe8","line":650,"updated":"2016-05-24 06:51:19.000000000","message":"nit: network","commit_id":"6bb65c6ec766b3b2736b0bebdd14ae1377abf338"},{"author":{"_account_id":12892,"name":"Nolan Brubaker","email":"nolan.brubaker@rackspace.com","username":"nrb"},"change_message_id":"92e4c7563ea2935448e1175491170676e0e2ff86","unresolved":false,"context_lines":[{"line_number":647,"context_line":""},{"line_number":648,"context_line":""},{"line_number":649,"context_line":"def _net_address_search(provider_networks, main_network, key):"},{"line_number":650,"context_line":"    \"\"\"Set the key netwokr type to the main network if not specified."},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"    :param provider_networks: ``list`` Network list of ``dict``s"},{"line_number":653,"context_line":"    :param main_network: ``str`` The name of the main network bridge."}],"source_content_type":"text/x-python","patch_set":2,"id":"bab6814e_8a8786d6","line":650,"in_reply_to":"bab6814e_4b3aefe8","updated":"2016-05-24 19:36:26.000000000","message":"Would you mind if this gets corrected in https://review.openstack.org/#/c/318939/, since that review is targetted at that function specifically?","commit_id":"6bb65c6ec766b3b2736b0bebdd14ae1377abf338"},{"author":{"_account_id":12807,"name":"Steve Lewis (stevelle)","email":"stevelle@gmail.com","username":"stevelle"},"change_message_id":"a4e5c5481e1f38ff42b34f2cecbab55fc6830741","unresolved":false,"context_lines":[{"line_number":663,"context_line":"                    networks[old_address][\u0027static_routes\u0027].append(route)"},{"line_number":664,"context_line":""},{"line_number":665,"context_line":"                elif not cidr_present or not gateway_present:"},{"line_number":666,"context_line":"                    raise MissingStaticRouteInfo(q_name)"},{"line_number":667,"context_line":""},{"line_number":668,"context_line":""},{"line_number":669,"context_line":"def _net_address_search(provider_networks, main_network, key):"}],"source_content_type":"text/x-python","patch_set":5,"id":"bab6814e_743da0dc","line":666,"updated":"2016-05-25 21:47:48.000000000","message":"This construction looks a little strange to me, but it\u0027s a style point.\n\nThis is logically equivalent to: \n\nif not cidr_present or not gateway_present:\n  raise MissingStaticRouteInfo(q_name)\nnetworks[old_address][\u0027static_routs\u0027].append(route)\n\nIt would be reasonable to apply an \u0027else\u0027 for the append case (I prefer it without). Either way the use of elif makes this read a bit oddly when the logic really isn\u0027t that complex.","commit_id":"894e0c4dc9bc56279e104a0bd0de68108aebb058"}]}
