)]}'
{"nova/network/neutronv2/api.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"63331b60e603404760a90e6de769913e0675391a","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"        neutron \u003d get_client(context)"},{"line_number":1165,"context_line":"        data \u003d neutron.list_ports(**search_opts)"},{"line_number":1166,"context_line":"        ports \u003d [port[\u0027id\u0027] for port in data.get(\u0027ports\u0027, [])"},{"line_number":1167,"context_line":"                 if (port.get(\u0027device_owner\u0027) or \u0027\u0027).startswith(\u0027compute\u0027)]"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"        requested_networks \u003d kwargs.get(\u0027requested_networks\u0027) or []"},{"line_number":1170,"context_line":"        # NOTE(danms): Temporary and transitional"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_cd7bea78","line":1167,"updated":"2017-06-14 16:57:25.000000000","message":"Are you sure that all ports need to be deleted have correct device owner? How can we check this?\nProbably an option is to remove baremetal ports only?\n\nnit: port.get(\u0027device_owner\u0027, \u0027\u0027).startswith(\u0027compute\u0027)?","commit_id":"21c2a3727acea87d633f78d633b8f56d6f55a387"},{"author":{"_account_id":12356,"name":"Vladyslav Drok","email":"vdrok@mirantis.com","username":"vdrok"},"change_message_id":"f51604591899140629a0bd2e5a1127c0430c03d5","unresolved":false,"context_lines":[{"line_number":1164,"context_line":"        neutron \u003d get_client(context)"},{"line_number":1165,"context_line":"        data \u003d neutron.list_ports(**search_opts)"},{"line_number":1166,"context_line":"        ports \u003d [port[\u0027id\u0027] for port in data.get(\u0027ports\u0027, [])"},{"line_number":1167,"context_line":"                 if (port.get(\u0027device_owner\u0027) or \u0027\u0027).startswith(\u0027compute\u0027)]"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"        requested_networks \u003d kwargs.get(\u0027requested_networks\u0027) or []"},{"line_number":1170,"context_line":"        # NOTE(danms): Temporary and transitional"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f231b9d_0d07a2cc","line":1167,"in_reply_to":"7f231b9d_cd7bea78","updated":"2017-06-14 17:01:33.000000000","message":"Yeah, it is an option, though all ports that get used for the instance that nova creates, or the ones that are pre-created should have this -- https://github.com/openstack/nova/blob/stable/ocata/nova/network/neutronv2/api.py#L938-L940\n\ndidn\u0027t want to do port.get(\u0027device_owner\u0027, \u0027\u0027) if for some reason it\u0027s possible to have None in there (maybe it is not possible though :))","commit_id":"21c2a3727acea87d633f78d633b8f56d6f55a387"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"9dd2ebadbd12c42c8257f1ee1852bc76cc178011","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"        search_opts \u003d {\u0027device_id\u0027: instance.uuid}"},{"line_number":1164,"context_line":"        neutron \u003d get_client(context)"},{"line_number":1165,"context_line":"        data \u003d neutron.list_ports(**search_opts)"},{"line_number":1166,"context_line":"        ports \u003d [port[\u0027id\u0027] for port in data.get(\u0027ports\u0027, []) if"},{"line_number":1167,"context_line":"                 not (port.get(\u0027device_owner\u0027) or \u0027\u0027).startswith(\u0027baremetal\u0027)]"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"        requested_networks \u003d kwargs.get(\u0027requested_networks\u0027) or []"},{"line_number":1170,"context_line":"        # NOTE(danms): Temporary and transitional"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_0187e95c","line":1167,"range":{"start_line":1166,"start_character":0,"end_line":1167,"end_character":78},"updated":"2018-10-03 22:59:32.000000000","message":"It is better to put some NOTE here to explain why we need to skip the \u0027baremetal\u0027 port because this is generic code not only for ironic.","commit_id":"01e472d173c94da1e830deceb45b144130be7b52"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"fe125e80c3db1a644a1c1baceb69e9a61f646707","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"        # NOTE(vdrok): Do not remove baremetal ports which were created by"},{"line_number":1167,"context_line":"        # ironic, it will clean them up when they are not needed anymore"},{"line_number":1168,"context_line":"        ports \u003d [port[\u0027id\u0027] for port in data.get(\u0027ports\u0027, []) if"},{"line_number":1169,"context_line":"                 not (port.get(\u0027device_owner\u0027) or \u0027\u0027).startswith(\u0027baremetal\u0027)]"},{"line_number":1170,"context_line":""},{"line_number":1171,"context_line":"        requested_networks \u003d kwargs.get(\u0027requested_networks\u0027) or []"},{"line_number":1172,"context_line":"        # NOTE(danms): Temporary and transitional"}],"source_content_type":"text/x-python","patch_set":3,"id":"5fc1f717_babcda6c","line":1169,"range":{"start_line":1169,"start_character":21,"end_line":1169,"end_character":53},"updated":"2019-03-19 23:10:45.000000000","message":"Here can be just\n\n port.get(\u0027device_owner\u0027, \u0027\u0027).startwith(\u0027baremetal\u0027)\n\nBTW according to http://git.openstack.org/cgit/openstack/ironic/tree/ironic/common/neutron.py#n233 the device_owner is always \u0027baretal:none\u0027 in Ironic, right?","commit_id":"8a7b2fb4b8db59ab001955e596d136f1a6628f70"}],"releasenotes/notes/cleanup-only-compute-ports-690c0656afb0718f.yaml":[{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"9dd2ebadbd12c42c8257f1ee1852bc76cc178011","unresolved":false,"context_lines":[{"line_number":2,"context_line":"fixes:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Nova does not remove ports belonging to the baremetal service during"},{"line_number":5,"context_line":"    instance network deallocation."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"3f79a3b5_41bf21fb","line":5,"range":{"start_line":5,"start_character":33,"end_line":5,"end_character":34},"updated":"2018-10-03 22:59:32.000000000","message":"It is necessary to explain the reason like\n\"because Ironic cleans the ports up by itself\" or something.","commit_id":"01e472d173c94da1e830deceb45b144130be7b52"}]}
