)]}'
{"trove/instance/models.py":[{"author":{"_account_id":28691,"name":"Bo Tran","email":"ministry.96.nd@gmail.com","username":"ministry"},"change_message_id":"2dd3154851e0dda0aaec074c86ee0e43ba8eaca1","unresolved":true,"context_lines":[{"line_number":1108,"context_line":"                    if port[\"network_id\"] not in CONF.management_networks"},{"line_number":1109,"context_line":"                ]"},{"line_number":1110,"context_line":"                if user_ports:"},{"line_number":1111,"context_line":"                    nic_info \u003d self._get_user_nic_info(user_ports[0][\"id\"])"},{"line_number":1112,"context_line":"                    LOG.debug(\"Generate the eth1_config.json file: %s\","},{"line_number":1113,"context_line":"                              nic_info)"},{"line_number":1114,"context_line":"                    files[constants.ETH1_CONFIG_PATH] \u003d json.dumps(nic_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"f5f38df4_7d7fd603","line":1111,"range":{"start_line":1111,"start_character":55,"end_line":1111,"end_character":65},"updated":"2026-07-15 08:04:45.000000000","message":"are you sure this port in position 0 always is user port? if you can\u0027t please pass networks variable to this function to ignore break this logic, don\u0027t need call more API.\n\n\nI had test a simple case: create two ports with same name and IPs: 10.22.96.192(1st), 10.22.96.34(2th) but when list port, the 10.22.96.34 return in 1st position","commit_id":"190d9f57b100f39e95651f87cbfed302ded7fe21"},{"author":{"_account_id":36080,"name":"Erkin Mussurmankulov","display_name":"Eric","email":"mangust404@gmail.com","username":"mongoose404","status":"PS Cloud services employee"},"change_message_id":"4b9d5226c81f3116b8be01d160f830f6cf055159","unresolved":false,"context_lines":[{"line_number":1108,"context_line":"                    if port[\"network_id\"] not in CONF.management_networks"},{"line_number":1109,"context_line":"                ]"},{"line_number":1110,"context_line":"                if user_ports:"},{"line_number":1111,"context_line":"                    nic_info \u003d self._get_user_nic_info(user_ports[0][\"id\"])"},{"line_number":1112,"context_line":"                    LOG.debug(\"Generate the eth1_config.json file: %s\","},{"line_number":1113,"context_line":"                              nic_info)"},{"line_number":1114,"context_line":"                    files[constants.ETH1_CONFIG_PATH] \u003d json.dumps(nic_info)"}],"source_content_type":"text/x-python","patch_set":2,"id":"8c6b2412_e33802ad","line":1111,"range":{"start_line":1111,"start_character":55,"end_line":1111,"end_character":65},"in_reply_to":"f5f38df4_7d7fd603","updated":"2026-07-15 16:50:03.000000000","message":"Hello Bo, that\u0027s a good point. Thanks!\n\nThe order of ports is not necessarily the same as the order of networks.\n\nTo minimize the number of Nova API calls, we can [use](https://review.opendev.org/c/openstack/trove/+/986090/8/trove/instance/models.py#1106) the `networks` parameter when calling `get_injected_files()` during instance creation. However, when `get_injected_files()` is called during a rebuild, we still need an additional Nova API call.\nAlso, in the resulting patchset, we\u0027re using the fact that the order of addresses is the same as the order of networks.\n\nThere is room for improvement here, but we wanted to keep the changes to the codebase as small as possible.\n\nWe decided to merge this change together with [this](https://review.opendev.org/c/openstack/trove/+/986090) patchset because they produce unrecoverable conflicts. More details are available in the corresponding [blueprint](https://blueprints.launchpad.net/trove/+spec/update-user-data-on-rebuild).","commit_id":"190d9f57b100f39e95651f87cbfed302ded7fe21"}]}
