)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6316,"name":"Anita Kuno","email":"anteaya@anteaya.info","username":"anteaya"},"change_message_id":"1853f172f4a45baf5ed4810dec2db69758c7f8f5","unresolved":false,"context_lines":[{"line_number":9,"context_line":"neutron_available_floating_ips:"},{"line_number":10,"context_line":"* old behavior ignores network parameter and guesses external net"},{"line_number":11,"context_line":"* new behavior takes name or id and searches for external net"},{"line_number":12,"context_line":"Given a of a list of multiple networks, it takes the first existing one."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I0b27b50b2a6a8e5199bbeed5786b71851bb3ad3e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"dae33548_6a479d4b","line":12,"updated":"2016-02-16 10:27:35.000000000","message":"Your commit message would benefit from having a title.\n\nYou might enjoy reading this wikipage on commit messages: https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"4fea2bd790918fe191f7efa59131f42a3fcfa8c6"},{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"8828389b39cd27f6a9f49b85fba8c39b69d8717e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"neutron_available_floating_ips:"},{"line_number":10,"context_line":"* old behavior ignores network parameter and guesses external net"},{"line_number":11,"context_line":"* new behavior takes name or id and searches for external net"},{"line_number":12,"context_line":"Given a of a list of multiple networks, it takes the first existing one."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I0b27b50b2a6a8e5199bbeed5786b71851bb3ad3e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"dae33548_aa3405fb","line":12,"in_reply_to":"dae33548_6a479d4b","updated":"2016-02-16 10:42:58.000000000","message":"yes please","commit_id":"4fea2bd790918fe191f7efa59131f42a3fcfa8c6"}],"shade/openstackcloud.py":[{"author":{"_account_id":2,"name":"Monty Taylor","email":"mordred@inaugust.com","username":"mordred"},"change_message_id":"8828389b39cd27f6a9f49b85fba8c39b69d8717e","unresolved":false,"context_lines":[{"line_number":2628,"context_line":"            project_id \u003d self.keystone_session.get_project_id()"},{"line_number":2629,"context_line":""},{"line_number":2630,"context_line":"        with _utils.neutron_exceptions(\"unable to get available floating IPs\"):"},{"line_number":2631,"context_line":"            networks \u003d self.get_external_networks()"},{"line_number":2632,"context_line":"            if not networks:"},{"line_number":2633,"context_line":"                raise OpenStackCloudResourceNotFound("},{"line_number":2634,"context_line":"                    \"unable to find an external network\")"}],"source_content_type":"text/x-python","patch_set":5,"id":"dae33548_ea472d75","side":"PARENT","line":2631,"updated":"2016-02-16 10:42:58.000000000","message":"How about we move this to the else block - there\u0027s no need to have shade do the work of looking for a network if you\u0027ve already told it which network to use.","commit_id":"57e23b5898804417684ad4256f5386dfffee2040"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e4416d938cc172c7535ac1bd666d710b4b8afa9d","unresolved":false,"context_lines":[{"line_number":2615,"context_line":"        return it in a list of 1 element."},{"line_number":2616,"context_line":""},{"line_number":2617,"context_line":"        :param network: List of Nova pools name or Neutron network names or"},{"line_number":2618,"context_line":"                        ids."},{"line_number":2619,"context_line":"        :param server: (server) Server the Floating IP is for"},{"line_number":2620,"context_line":""},{"line_number":2621,"context_line":"        :returns: a list of floating IP addresses."}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_b24d9874","line":2618,"updated":"2016-03-08 15:27:33.000000000","message":"The \"nova pools\" concept does not apply to neutron. Just document this as a network name/id.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e4416d938cc172c7535ac1bd666d710b4b8afa9d","unresolved":false,"context_lines":[{"line_number":2631,"context_line":"        with _utils.neutron_exceptions(\"unable to get available floating IPs\"):"},{"line_number":2632,"context_line":"            if network:"},{"line_number":2633,"context_line":"                # Use given list to get first matching external network"},{"line_number":2634,"context_line":"                if type(network) is str:"},{"line_number":2635,"context_line":"                    network \u003d [network]"},{"line_number":2636,"context_line":""},{"line_number":2637,"context_line":"                filter_network \u003d False"}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_77dca212","line":2634,"updated":"2016-03-08 15:27:33.000000000","message":"We should use six.string_types for this comparison to catch possible unicode strings.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":11049,"name":"Josh Conant","email":"deathbeforedishes@gmail.com","username":"insequent"},"change_message_id":"d6f2ec451e1779e5d44e1096aefc607e887e7083","unresolved":false,"context_lines":[{"line_number":2636,"context_line":""},{"line_number":2637,"context_line":"                filter_network \u003d False"},{"line_number":2638,"context_line":"                for x in network:"},{"line_number":2639,"context_line":"                    _filter_network \u003d self.search_networks(x)"},{"line_number":2640,"context_line":"                    if _filter_network:"},{"line_number":2641,"context_line":"                        filter_network \u003d _filter_network[0]"},{"line_number":2642,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":11,"id":"7af24918_9f38293f","line":2639,"updated":"2016-03-03 04:31:16.000000000","message":"I don\u0027t think switching to search_networks() is a good idea, because you don\u0027t know if the returned network is an external network. It may be better off sticking with get_external_networks() and simply checking if x is in those networks.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e4416d938cc172c7535ac1bd666d710b4b8afa9d","unresolved":false,"context_lines":[{"line_number":2636,"context_line":""},{"line_number":2637,"context_line":"                filter_network \u003d False"},{"line_number":2638,"context_line":"                for x in network:"},{"line_number":2639,"context_line":"                    _filter_network \u003d self.search_networks(x)"},{"line_number":2640,"context_line":"                    if _filter_network:"},{"line_number":2641,"context_line":"                        filter_network \u003d _filter_network[0]"},{"line_number":2642,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_f2e8c07e","line":2639,"in_reply_to":"7af24918_9f38293f","updated":"2016-03-08 15:27:33.000000000","message":"Using get_external_networks() does seem like what we want here.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":11049,"name":"Josh Conant","email":"deathbeforedishes@gmail.com","username":"insequent"},"change_message_id":"d6f2ec451e1779e5d44e1096aefc607e887e7083","unresolved":false,"context_lines":[{"line_number":2646,"context_line":"                        \"Unable to find any of %s external networks\""},{"line_number":2647,"context_line":"                        % str(network))"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"                if \u0027id\u0027 in filter_network:"},{"line_number":2650,"context_line":"                    floating_network_id \u003d filter_network[\u0027id\u0027]"},{"line_number":2651,"context_line":"                else:"},{"line_number":2652,"context_line":"                    raise OpenStackCloudResourceNotFound("}],"source_content_type":"text/x-python","patch_set":11,"id":"7af24918_1f737916","line":2649,"updated":"2016-03-03 04:31:16.000000000","message":"This might actually be superfluous. I believe in neutron the ID is the primary key, and if you somehow get a network without an ID, something is seriously wrong. However, that wrongness is not likely in this method.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":11049,"name":"Josh Conant","email":"deathbeforedishes@gmail.com","username":"insequent"},"change_message_id":"3a46edc00820b1e9938f5f4d7e10aa1c5111957f","unresolved":false,"context_lines":[{"line_number":2646,"context_line":"                        \"Unable to find any of %s external networks\""},{"line_number":2647,"context_line":"                        % str(network))"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"                if \u0027id\u0027 in filter_network:"},{"line_number":2650,"context_line":"                    floating_network_id \u003d filter_network[\u0027id\u0027]"},{"line_number":2651,"context_line":"                else:"},{"line_number":2652,"context_line":"                    raise OpenStackCloudResourceNotFound("}],"source_content_type":"text/x-python","patch_set":11,"id":"7af24918_f3ae5d7f","line":2649,"in_reply_to":"7af24918_1f737916","updated":"2016-03-04 16:12:09.000000000","message":"Also, don\u0027t forget about {}.get(). You could skip filter_network and just use `filter_network_id \u003d _filter_network[0].get(\"id\")`. Then here, have `if filter_network_id`.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e4416d938cc172c7535ac1bd666d710b4b8afa9d","unresolved":false,"context_lines":[{"line_number":2646,"context_line":"                        \"Unable to find any of %s external networks\""},{"line_number":2647,"context_line":"                        % str(network))"},{"line_number":2648,"context_line":""},{"line_number":2649,"context_line":"                if \u0027id\u0027 in filter_network:"},{"line_number":2650,"context_line":"                    floating_network_id \u003d filter_network[\u0027id\u0027]"},{"line_number":2651,"context_line":"                else:"},{"line_number":2652,"context_line":"                    raise OpenStackCloudResourceNotFound("}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_b2c75811","line":2649,"in_reply_to":"7af24918_f3ae5d7f","updated":"2016-03-08 15:27:33.000000000","message":"Yes, \u0027id\u0027 should always be available. If not, we have bigger problems.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":21196,"name":"Tobias Strauß","email":"tac@gmx.li"},"change_message_id":"e17dbdfd38158d3179534dc68a54c29657ae8623","unresolved":false,"context_lines":[{"line_number":2631,"context_line":"            if network:"},{"line_number":2632,"context_line":"                # Use given list to get first matching external network"},{"line_number":2633,"context_line":"                floating_network_id \u003d None"},{"line_number":2634,"context_line":"                for ext_net in self.get_external_networks():"},{"line_number":2635,"context_line":"                    if network in (ext_net[\u0027name\u0027], ext_net[\u0027id\u0027]):"},{"line_number":2636,"context_line":"                        floating_network_id \u003d ext_net[\u0027id\u0027]"},{"line_number":2637,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba0121b8_60ab541e","line":2634,"range":{"start_line":2634,"start_character":36,"end_line":2634,"end_character":57},"updated":"2016-03-29 14:26:34.000000000","message":"Why do you mix floating IPs with external Network? I am confused.","commit_id":"8fda803d170623a0ce91f2f7c3aea2490351a821"},{"author":{"_account_id":21196,"name":"Tobias Strauß","email":"tac@gmx.li"},"change_message_id":"ec5761c453f997a6a2cabe78f947d251ca035cef","unresolved":false,"context_lines":[{"line_number":2631,"context_line":"            if network:"},{"line_number":2632,"context_line":"                # Use given list to get first matching external network"},{"line_number":2633,"context_line":"                floating_network_id \u003d None"},{"line_number":2634,"context_line":"                for ext_net in self.get_external_networks():"},{"line_number":2635,"context_line":"                    if network in (ext_net[\u0027name\u0027], ext_net[\u0027id\u0027]):"},{"line_number":2636,"context_line":"                        floating_network_id \u003d ext_net[\u0027id\u0027]"},{"line_number":2637,"context_line":"                        break"}],"source_content_type":"text/x-python","patch_set":13,"id":"ba0121b8_9ba1b9ac","line":2634,"range":{"start_line":2634,"start_character":36,"end_line":2634,"end_character":57},"in_reply_to":"ba0121b8_60ab541e","updated":"2016-03-29 14:32:09.000000000","message":"solved. ok.","commit_id":"8fda803d170623a0ce91f2f7c3aea2490351a821"}],"shade/tests/unit/test_floating_ip_neutron.py":[{"author":{"_account_id":6488,"name":"Clint Byrum","email":"clint@fewbar.com","username":"clint-fewbar"},"change_message_id":"45299c7cf96f06db1f4a267f0342856c2b47a6d6","unresolved":false,"context_lines":[{"line_number":271,"context_line":"        mock_search_networks.return_value \u003d \\"},{"line_number":272,"context_line":"            self.mock_get_network_rep_allocate_other"},{"line_number":273,"context_line":"        ip \u003d self.client.available_floating_ip(network\u003d[\u0027my-other-network\u0027])"},{"line_number":274,"context_line":"        # pep8 workaround :-("},{"line_number":275,"context_line":"        mock_fip \u003d self.mock_floating_ip_new_rep"},{"line_number":276,"context_line":"        mock_fip \u003d mock_fip[\u0027otherfloatingip\u0027][\u0027floating_ip_address\u0027]"},{"line_number":277,"context_line":"        self.assertEqual("}],"source_content_type":"text/x-python","patch_set":7,"id":"dae33548_d391aa48","line":274,"updated":"2016-02-18 17:00:02.000000000","message":"I don\u0027t understand this comment, and it doesn\u0027t help me understand the code or what to do to fix it if something changes. However, staring at the code does help me understand that the variable name and the keys are really long. Anyway, it\u0027s a total nit pick, but generally comments are for helping add understanding, so please do try to make sure they do that. :)","commit_id":"d24c48ac20ecb05086ca7fb650139b8cf4f43cd4"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e4416d938cc172c7535ac1bd666d710b4b8afa9d","unresolved":false,"context_lines":[{"line_number":78,"context_line":"            \u0027router_id\u0027: None,"},{"line_number":79,"context_line":"            \u0027status\u0027: \u0027ACTIVE\u0027,"},{"line_number":80,"context_line":"            \u0027tenant_id\u0027: \u00274969c491a3c74ee4af974e6d800c62df\u0027"},{"line_number":81,"context_line":"        },"},{"line_number":82,"context_line":"    }"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    mock_get_network_rep \u003d ["}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_9da4edb9","line":81,"updated":"2016-03-08 15:27:33.000000000","message":"This is wrong. mock_floating_ip_new_rep is used as a return value from neutron client.create_floating_ip(), which returns a single FIP. I\u0027m very surprised you adding this second FIP doesn\u0027t break things.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"},{"author":{"_account_id":3099,"name":"David Shrewsbury","email":"dshrewsb@redhat.com","username":"dshrews"},"change_message_id":"e4416d938cc172c7535ac1bd666d710b4b8afa9d","unresolved":false,"context_lines":[{"line_number":228,"context_line":"    def test_create_floating_ip("},{"line_number":229,"context_line":"            self, mock_has_service, mock_search_networks, mock_neutron_client):"},{"line_number":230,"context_line":"        mock_has_service.return_value \u003d True"},{"line_number":231,"context_line":"        mock_search_networks.return_value \u003d self.mock_get_network_rep"},{"line_number":232,"context_line":"        mock_neutron_client.create_floatingip.return_value \u003d \\"},{"line_number":233,"context_line":"            self.mock_floating_ip_new_rep"},{"line_number":234,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"5aef4532_12ca8c6e","line":231,"updated":"2016-03-08 15:27:33.000000000","message":"This is a curious change... moving the list from here to the mock definition. I think it\u0027s more obvious to keep the list brackets here.","commit_id":"45aa354c6d29d68cba0b4f2f95c277a2348a1e0e"}]}
