)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f47454081dc7279a49857105f3607688fe9bb1c6","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-09-11 20:41:29 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Skip querying resource request if no qos port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"During revert_resize we can skip collecting port resource requests"},{"line_number":10,"context_line":"from neutron if there is no port with allocation key in the binding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5faad753_d349328b","line":7,"range":{"start_line":7,"start_character":30,"end_line":7,"end_character":31},"updated":"2019-09-11 21:10:27.000000000","message":"in revert_resize","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"12de3873ecb141ae7b7f0d8a46cc8361256c3e38","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Balazs Gibizer \u003cbalazs.gibizer@est.tech\u003e"},{"line_number":5,"context_line":"CommitDate: 2019-09-11 20:41:29 +0200"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Skip querying resource request if no qos port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"During revert_resize we can skip collecting port resource requests"},{"line_number":10,"context_line":"from neutron if there is no port with allocation key in the binding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5faad753_093ea98b","line":7,"range":{"start_line":7,"start_character":30,"end_line":7,"end_character":31},"in_reply_to":"5faad753_d349328b","updated":"2019-09-12 12:38:44.000000000","message":"Done","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"}],"nova/compute/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f47454081dc7279a49857105f3607688fe9bb1c6","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"        # cache does not have ports with allocations in the binding profile"},{"line_number":3446,"context_line":"        # then we can skip reading port resource request from neutron below."},{"line_number":3447,"context_line":"        # If a port has resource request then that would have already caused"},{"line_number":3448,"context_line":"        # that the finish_resize call put allocation in the binding profile."},{"line_number":3449,"context_line":"        if instance.info_cache.network_info.has_port_with_allocation():"},{"line_number":3450,"context_line":"            # TODO(gibi): do not directly overwrite the"},{"line_number":3451,"context_line":"            # RequestSpec.requested_resources as others like cyborg might added"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_13358af7","line":3448,"range":{"start_line":3448,"start_character":75,"end_line":3448,"end_character":76},"updated":"2019-09-11 21:10:27.000000000","message":"during the resize.","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"12de3873ecb141ae7b7f0d8a46cc8361256c3e38","unresolved":false,"context_lines":[{"line_number":3445,"context_line":"        # cache does not have ports with allocations in the binding profile"},{"line_number":3446,"context_line":"        # then we can skip reading port resource request from neutron below."},{"line_number":3447,"context_line":"        # If a port has resource request then that would have already caused"},{"line_number":3448,"context_line":"        # that the finish_resize call put allocation in the binding profile."},{"line_number":3449,"context_line":"        if instance.info_cache.network_info.has_port_with_allocation():"},{"line_number":3450,"context_line":"            # TODO(gibi): do not directly overwrite the"},{"line_number":3451,"context_line":"            # RequestSpec.requested_resources as others like cyborg might added"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_5e2699d0","line":3448,"range":{"start_line":3448,"start_character":75,"end_line":3448,"end_character":76},"in_reply_to":"5faad753_13358af7","updated":"2019-09-12 12:38:44.000000000","message":"Done","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f47454081dc7279a49857105f3607688fe9bb1c6","unresolved":false,"context_lines":[{"line_number":3446,"context_line":"        # then we can skip reading port resource request from neutron below."},{"line_number":3447,"context_line":"        # If a port has resource request then that would have already caused"},{"line_number":3448,"context_line":"        # that the finish_resize call put allocation in the binding profile."},{"line_number":3449,"context_line":"        if instance.info_cache.network_info.has_port_with_allocation():"},{"line_number":3450,"context_line":"            # TODO(gibi): do not directly overwrite the"},{"line_number":3451,"context_line":"            # RequestSpec.requested_resources as others like cyborg might added"},{"line_number":3452,"context_line":"            # to things there already"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_332f66a2","line":3449,"range":{"start_line":3449,"start_character":20,"end_line":3449,"end_character":43},"updated":"2019-09-11 21:10:27.000000000","message":"I think you want to use instance.get_network_info here in case instance.info_cache is None for some reason.","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"12de3873ecb141ae7b7f0d8a46cc8361256c3e38","unresolved":false,"context_lines":[{"line_number":3446,"context_line":"        # then we can skip reading port resource request from neutron below."},{"line_number":3447,"context_line":"        # If a port has resource request then that would have already caused"},{"line_number":3448,"context_line":"        # that the finish_resize call put allocation in the binding profile."},{"line_number":3449,"context_line":"        if instance.info_cache.network_info.has_port_with_allocation():"},{"line_number":3450,"context_line":"            # TODO(gibi): do not directly overwrite the"},{"line_number":3451,"context_line":"            # RequestSpec.requested_resources as others like cyborg might added"},{"line_number":3452,"context_line":"            # to things there already"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_7e2355be","line":3449,"range":{"start_line":3449,"start_character":20,"end_line":3449,"end_character":43},"in_reply_to":"5faad753_332f66a2","updated":"2019-09-12 12:38:44.000000000","message":"Done","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f47454081dc7279a49857105f3607688fe9bb1c6","unresolved":false,"context_lines":[{"line_number":3454,"context_line":"            # is intentionally not persisted in nova. Note that this needs to"},{"line_number":3455,"context_line":"            # be done here as the nova API code directly calls revert on the"},{"line_number":3456,"context_line":"            # dest compute service skipping the conductor."},{"line_number":3457,"context_line":"            network_api \u003d self.network_api"},{"line_number":3458,"context_line":"            port_res_req \u003d network_api.get_requested_resource_for_instance("},{"line_number":3459,"context_line":"                context, instance.uuid)"},{"line_number":3460,"context_line":"            reqspec.requested_resources \u003d port_res_req"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_b314b64f","line":3457,"range":{"start_line":3457,"start_character":12,"end_line":3457,"end_character":42},"updated":"2019-09-11 21:10:27.000000000","message":"I guess this is just because the line was too long. Style nit, but I\u0027d prefer something like this:\n\nport_res_req \u003d (\n    self.network_api.get_requested_resource_for_instance(\n        context, instance.uuid))","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"12de3873ecb141ae7b7f0d8a46cc8361256c3e38","unresolved":false,"context_lines":[{"line_number":3454,"context_line":"            # is intentionally not persisted in nova. Note that this needs to"},{"line_number":3455,"context_line":"            # be done here as the nova API code directly calls revert on the"},{"line_number":3456,"context_line":"            # dest compute service skipping the conductor."},{"line_number":3457,"context_line":"            network_api \u003d self.network_api"},{"line_number":3458,"context_line":"            port_res_req \u003d network_api.get_requested_resource_for_instance("},{"line_number":3459,"context_line":"                context, instance.uuid)"},{"line_number":3460,"context_line":"            reqspec.requested_resources \u003d port_res_req"}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_3e295d9a","line":3457,"range":{"start_line":3457,"start_character":12,"end_line":3457,"end_character":42},"in_reply_to":"5faad753_b314b64f","updated":"2019-09-12 12:38:44.000000000","message":"Good idea. Done.","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"}],"nova/network/model.py":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"2c432ff48847f24b38c58d1b478a92854fe7cb21","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        return vif"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def has_allocation(self):"},{"line_number":491,"context_line":"        return self[\u0027profile\u0027] and bool(self[\u0027profile\u0027].get(\u0027allocation\u0027))"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"def get_netmask(ip, subnet):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_4dfb4446","line":491,"range":{"start_line":491,"start_character":35,"end_line":491,"end_character":39},"updated":"2019-09-12 18:10:32.000000000","message":"nit: is this necessary?\n\nI guess it makes sure you return a bool rather than a dict, which is good method hygiene, even though it\u0027s not relevant for how this is being used.","commit_id":"7da94440db16dc76c91d8c71527491879db48dbc"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"642fa1006f032871165744185534fadd772894a2","unresolved":false,"context_lines":[{"line_number":488,"context_line":"        return vif"},{"line_number":489,"context_line":""},{"line_number":490,"context_line":"    def has_allocation(self):"},{"line_number":491,"context_line":"        return self[\u0027profile\u0027] and bool(self[\u0027profile\u0027].get(\u0027allocation\u0027))"},{"line_number":492,"context_line":""},{"line_number":493,"context_line":""},{"line_number":494,"context_line":"def get_netmask(ip, subnet):"}],"source_content_type":"text/x-python","patch_set":5,"id":"5faad753_58053b13","line":491,"range":{"start_line":491,"start_character":35,"end_line":491,"end_character":39},"in_reply_to":"5faad753_4dfb4446","updated":"2019-09-13 06:08:27.000000000","message":"Yeah, I my intention was to return a bool. But I failed to do it properly as \n\n\u003e\u003e\u003e {} and bool(None)\n{}\n\nWill fup it up","commit_id":"7da94440db16dc76c91d8c71527491879db48dbc"}],"nova/tests/unit/network/test_network_info.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f47454081dc7279a49857105f3607688fe9bb1c6","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        self.assertFalse(network_info.has_port_with_allocation())"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        network_info.append("},{"line_number":899,"context_line":"            model.VIF(id\u003duuids.normal_port, profile\u003d{\u0027allocation\u0027: uuids.rp}))"},{"line_number":900,"context_line":"        self.assertTrue(network_info.has_port_with_allocation())"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_4e183574","line":899,"updated":"2019-09-11 21:10:27.000000000","message":"Could also test this case before the True case:\n\nnetwork_info.append(\n            model.VIF(id\u003duuids.normal_port,\n                      profile\u003d{\u0027foo\u0027: \u0027bar\u0027}))\n\nAnd maybe:\n\nnetwork_info.append(\n            model.VIF(id\u003duuids.normal_port,\n                      profile\u003d{\u0027allocation\u0027: None}))\n\nThe former makes sure we handle when we have a profile but no allocation key and the latter is having a profile with an allocation key but no value.","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"12de3873ecb141ae7b7f0d8a46cc8361256c3e38","unresolved":false,"context_lines":[{"line_number":896,"context_line":"        self.assertFalse(network_info.has_port_with_allocation())"},{"line_number":897,"context_line":""},{"line_number":898,"context_line":"        network_info.append("},{"line_number":899,"context_line":"            model.VIF(id\u003duuids.normal_port, profile\u003d{\u0027allocation\u0027: uuids.rp}))"},{"line_number":900,"context_line":"        self.assertTrue(network_info.has_port_with_allocation())"},{"line_number":901,"context_line":""},{"line_number":902,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"5faad753_69de3d6e","line":899,"in_reply_to":"5faad753_4e183574","updated":"2019-09-12 12:38:44.000000000","message":"Done","commit_id":"8779fb6e10908c4d022a844ae56052c31c5191d7"}]}
