)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Initial processing of network port events"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a network port event is recived node and port"},{"line_number":10,"context_line":"lookup is done by MAC address. RPC call is made to"},{"line_number":11,"context_line":"conductor manager process_event()."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9fdfeff1_d846a123","line":9,"updated":"2019-03-02 00:16:05.000000000","message":"nit s/recived/received,/","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Initial processing of network port events"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"When a network port event is recived node and port"},{"line_number":10,"context_line":"lookup is done by MAC address. RPC call is made to"},{"line_number":11,"context_line":"conductor manager process_event()."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9fdfeff1_accc918a","line":9,"in_reply_to":"9fdfeff1_d846a123","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":10,"context_line":"lookup is done by MAC address. RPC call is made to"},{"line_number":11,"context_line":"conductor manager process_event()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Conducto process_event() does a lookup in it\u0027s event"},{"line_number":14,"context_line":"processors. Only process_network_port_event is"},{"line_number":15,"context_line":"implemented."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9fdfeff1_18c8a9a6","line":13,"updated":"2019-03-02 00:16:05.000000000","message":"nit s/Conducto/Conductor/\n\ns/it\u0027s/its/","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":10,"context_line":"lookup is done by MAC address. RPC call is made to"},{"line_number":11,"context_line":"conductor manager process_event()."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Conducto process_event() does a lookup in it\u0027s event"},{"line_number":14,"context_line":"processors. Only process_network_port_event is"},{"line_number":15,"context_line":"implemented."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"9fdfeff1_ccc9d579","line":13,"in_reply_to":"9fdfeff1_18c8a9a6","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":5890,"name":"Doug Goldstein","email":"cardoe@cardoe.com","username":"cardoe"},"change_message_id":"d9a398d78b9defc231bd3f40686fbb0c07aaacbd","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":16,"id":"c6054f10_dc2de75a","updated":"2025-10-12 00:13:34.000000000","message":"given trait scheduling for ports, do you want to revisit this at all?","commit_id":"9eb3b691439500907da60786f03e640ab7bde98b"}],"ironic/api/controllers/v1/event.py":[{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"4c542500b14bf11d48214965eb5a20aa67e1b851","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        try:"},{"line_number":57,"context_line":"            port \u003d objects.Port.get_by_address(context, event[\u0027mac_address\u0027])"},{"line_number":58,"context_line":"            internal_info \u003d port.internal_info"},{"line_number":59,"context_line":"            internal_info[\u0027network_status\u0027] \u003d event[\u0027status\u0027]"},{"line_number":60,"context_line":"            port.internal_info \u003d internal_info"},{"line_number":61,"context_line":"            port.save()"},{"line_number":62,"context_line":"        except exception.PortNotFound:"},{"line_number":63,"context_line":"            port \u003d None"},{"line_number":64,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"9fdfeff1_ae6ace7d","line":61,"range":{"start_line":58,"start_character":12,"end_line":61,"end_character":23},"updated":"2019-01-29 19:54:48.000000000","message":"this races with the operations in network drivers, such as ironic/drivers/modules/network/neutron.py:130\n\ni.e I can see port DELETE events in the log. I get \u0027network_status\u0027: \u0027DELETED\u0027, but as the \u0027cleaning_vif_port_id\u0027 or \u0027provisioning_vif_port_id\u0027 is removed the status switches back to \u0027ACTIVE\u0027 but there is no events with status \u0027ACTIVE\u0027 in the logs.","commit_id":"81d4d60e6f33745a77add07423fbd7369cd5fe2c"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b11bfdfdbd08ca1e99543512d80c1670775af3fe","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if port is not None and rpc_node is not None:"},{"line_number":66,"context_line":"            topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":67,"context_line":"            pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":68,"context_line":"                                               topic)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    event_processors \u003d {"},{"line_number":71,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_e65aba4e","line":68,"updated":"2019-02-20 15:11:07.000000000","message":"else LOG.warning?","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"fe421fefbd45cfb1096d5613de93d8c6cd1263c9","unresolved":false,"context_lines":[{"line_number":65,"context_line":"        if port is not None and rpc_node is not None:"},{"line_number":66,"context_line":"            topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":67,"context_line":"            pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":68,"context_line":"                                               topic)"},{"line_number":69,"context_line":""},{"line_number":70,"context_line":"    event_processors \u003d {"},{"line_number":71,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_05c46f91","line":68,"in_reply_to":"9fdfeff1_e65aba4e","updated":"2019-02-22 04:39:38.000000000","message":"Done","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a99680e9c510a29e85b9e59953b162c0202f7e1f","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :param context: an admin context."},{"line_number":48,"context_line":"        :param event: A event dict"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            rpc_node \u003d objects.Node.get_by_port_addresses("},{"line_number":52,"context_line":"                context, [event[\u0027mac_address\u0027]])"},{"line_number":53,"context_line":"        except exception.NodeNotFound:"},{"line_number":54,"context_line":"            rpc_node \u003d None"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        try:"},{"line_number":57,"context_line":"            port \u003d objects.Port.get_by_address(context, event[\u0027mac_address\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_c2b634fa","line":54,"range":{"start_line":50,"start_character":0,"end_line":54,"end_character":27},"updated":"2019-02-25 10:57:13.000000000","message":"This presumably requires a node/port join. It might be slightly more efficient to look up the port first, then use the port\u0027s node_id field to lookup the port.","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"565bc81de02fb6142f1f4ca85e47d481d0aa632c","unresolved":false,"context_lines":[{"line_number":47,"context_line":"        :param context: an admin context."},{"line_number":48,"context_line":"        :param event: A event dict"},{"line_number":49,"context_line":"        \"\"\""},{"line_number":50,"context_line":"        try:"},{"line_number":51,"context_line":"            rpc_node \u003d objects.Node.get_by_port_addresses("},{"line_number":52,"context_line":"                context, [event[\u0027mac_address\u0027]])"},{"line_number":53,"context_line":"        except exception.NodeNotFound:"},{"line_number":54,"context_line":"            rpc_node \u003d None"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        try:"},{"line_number":57,"context_line":"            port \u003d objects.Port.get_by_address(context, event[\u0027mac_address\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_100b0bd5","line":54,"range":{"start_line":50,"start_character":0,"end_line":54,"end_character":27},"in_reply_to":"9fdfeff1_c2b634fa","updated":"2019-02-26 08:55:29.000000000","message":"If we move the setting of network_status to the conductor, we don\u0027t need to get a Port object, so this node query should be sufficient.","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a99680e9c510a29e85b9e59953b162c0202f7e1f","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        try:"},{"line_number":57,"context_line":"            port \u003d objects.Port.get_by_address(context, event[\u0027mac_address\u0027])"},{"line_number":58,"context_line":"            port.network_status \u003d event[\u0027status\u0027]"},{"line_number":59,"context_line":"            port.save()"},{"line_number":60,"context_line":"        except exception.PortNotFound:"},{"line_number":61,"context_line":"            port \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_6221884d","line":58,"range":{"start_line":58,"start_character":12,"end_line":58,"end_character":49},"updated":"2019-02-25 10:57:13.000000000","message":"Should we be making a change like this without the node\u0027s lock held? IMO we should do this on the conductor side.","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3290be23a4b62d13edc9a9193b5b0028ae8e09a9","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"        try:"},{"line_number":57,"context_line":"            port \u003d objects.Port.get_by_address(context, event[\u0027mac_address\u0027])"},{"line_number":58,"context_line":"            port.network_status \u003d event[\u0027status\u0027]"},{"line_number":59,"context_line":"            port.save()"},{"line_number":60,"context_line":"        except exception.PortNotFound:"},{"line_number":61,"context_line":"            port \u003d None"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_d2e275d4","line":58,"range":{"start_line":58,"start_character":12,"end_line":58,"end_character":49},"in_reply_to":"9fdfeff1_6221884d","updated":"2019-02-25 20:01:51.000000000","message":"++ We shouldn\u0027t be modifying the port w/o a lock on it.","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"3290be23a4b62d13edc9a9193b5b0028ae8e09a9","unresolved":false,"context_lines":[{"line_number":63,"context_line":"        if port is not None and rpc_node is not None:"},{"line_number":64,"context_line":"            topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":65,"context_line":"            pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":66,"context_line":"                                               topic)"},{"line_number":67,"context_line":"        else:"},{"line_number":68,"context_line":"            LOG.warning(\u0027Node and port lookup was unsuccessful for event with \u0027"},{"line_number":69,"context_line":"                        \u0027MAC address %s.\u0027, event[\u0027mac_address\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_72d38902","line":66,"updated":"2019-02-25 20:01:51.000000000","message":"what I don\u0027t understand (I skimmed the spec), is why we don\u0027t pass the network status in the process_event RPC. I mean, I see that event is being passed, and that has the status, so I\u0027m not sure why we\u0027re storing it at L58 above.","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a99680e9c510a29e85b9e59953b162c0202f7e1f","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        policy.authorize(\u0027baremetal:events:post\u0027, cdict, cdict)"},{"line_number":90,"context_line":"        for e in evts.events:"},{"line_number":91,"context_line":"            LOG.debug(\"Received external event: %s\", e)"},{"line_number":92,"context_line":"            if e[\u0027event\u0027] in self.event_processors:"},{"line_number":93,"context_line":"                self.event_processors[e[\u0027event\u0027]]("},{"line_number":94,"context_line":"                    self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_42700441","line":92,"range":{"start_line":92,"start_character":12,"end_line":92,"end_character":51},"updated":"2019-02-25 10:57:13.000000000","message":"This should always be true. How about something like:\n\ntry:\n    event_processor \u003d self.event_processors[e[\u0027event\u0027]]\nexcept KeyError:\n    # handle\n\nevent_processor(...)","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EvtCollection(collection.Collection):"},{"line_number":33,"context_line":"    \"\"\"API representation of a collection of events.\"\"\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    events \u003d [types.eventtype]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_d89ea154","line":32,"updated":"2019-03-02 00:16:05.000000000","message":"I know this was already merged, but why did we decide to save on two characters, seems like EventCollection would have been easier to read :)","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EvtCollection(collection.Collection):"},{"line_number":33,"context_line":"    \"\"\"API representation of a collection of events.\"\"\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    events \u003d [types.eventtype]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_7a70a974","line":32,"in_reply_to":"9fdfeff1_0dfff6ab","updated":"2019-03-04 23:18:39.000000000","message":"Yes, I think we can update it in another patch.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":29,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class EvtCollection(collection.Collection):"},{"line_number":33,"context_line":"    \"\"\"API representation of a collection of events.\"\"\""},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"    events \u003d [types.eventtype]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_0dfff6ab","line":32,"in_reply_to":"9fdfeff1_d89ea154","updated":"2019-03-04 12:20:25.000000000","message":"I see what you mean. I think I picked up EvtCollection from one of Vdrok\u0027s WiP patches that I referenced when writing that patch. We can always push a patch to change it?","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ab638a23def020893a2a7c09aa16f1d635b8d265","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        Do node and port lookup by MAC address, get the topic and call"},{"line_number":46,"context_line":"        conductor to process the network port event."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param context: an admin context."},{"line_number":49,"context_line":"        :param event: A event dict"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_9dc1f031","line":48,"updated":"2019-03-01 18:09:56.000000000","message":"nit: extra trailing period","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        Do node and port lookup by MAC address, get the topic and call"},{"line_number":46,"context_line":"        conductor to process the network port event."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param context: an admin context."},{"line_number":49,"context_line":"        :param event: A event dict"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_aae57540","line":48,"in_reply_to":"9fdfeff1_9dc1f031","updated":"2019-03-04 12:20:25.000000000","message":"Done\n\nI opted not to use period on any of these. But we don\u0027t seem to be consistantly not use a period elsewhere in this repo.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        Do node and port lookup by MAC address, get the topic and call"},{"line_number":46,"context_line":"        conductor to process the network port event."},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param context: an admin context."},{"line_number":49,"context_line":"        :param event: A event dict"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_fa01f9b6","line":48,"in_reply_to":"9fdfeff1_aae57540","updated":"2019-03-04 23:18:39.000000000","message":"I believe we started off not adding a period unless there was another sentence. However, we are only human and my guess is that we don\u0027t always remember this convention and people add periods...","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"        :param context: an admin context."},{"line_number":49,"context_line":"        :param event: A event dict"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"},{"line_number":52,"context_line":"            rpc_node \u003d objects.Node.get_by_port_addresses("},{"line_number":53,"context_line":"                context, [event[\u0027mac_address\u0027]])"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_3e71d5a9","line":50,"updated":"2019-03-02 00:16:05.000000000","message":":raises: ...","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                context, [event[\u0027mac_address\u0027]])"},{"line_number":54,"context_line":"        except exception.NodeNotFound:"},{"line_number":55,"context_line":"            LOG.warning(_(\u0027Node lookup was unsuccessful for event with MAC \u0027"},{"line_number":56,"context_line":"                          \u0027address %s.\u0027), event[\u0027mac_address\u0027])"},{"line_number":57,"context_line":"            raise"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_e35bba52","line":56,"updated":"2019-03-02 00:16:05.000000000","message":"wonder if it might be useful to emit all the event info, not just mac address.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":53,"context_line":"                context, [event[\u0027mac_address\u0027]])"},{"line_number":54,"context_line":"        except exception.NodeNotFound:"},{"line_number":55,"context_line":"            LOG.warning(_(\u0027Node lookup was unsuccessful for event with MAC \u0027"},{"line_number":56,"context_line":"                          \u0027address %s.\u0027), event[\u0027mac_address\u0027])"},{"line_number":57,"context_line":"            raise"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_ea693d8c","line":56,"in_reply_to":"9fdfeff1_e35bba52","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":60,"context_line":"        pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":61,"context_line":"                                           topic)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_03827ea6","line":61,"updated":"2019-03-02 00:16:05.000000000","message":"nit s/topic/topic\u003dtopic/","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":58,"context_line":""},{"line_number":59,"context_line":"        topic \u003d pecan.request.rpcapi.get_topic_for(rpc_node)"},{"line_number":60,"context_line":"        pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":61,"context_line":"                                           topic)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_aa01f5b7","line":61,"in_reply_to":"9fdfeff1_03827ea6","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":61,"context_line":"                                           topic)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"},{"line_number":65,"context_line":"        \u0027network.unbind_port\u0027: process_network_port_event,"},{"line_number":66,"context_line":"        \u0027network.delete_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_83642e23","line":63,"updated":"2019-03-02 00:16:05.000000000","message":"Please put this before any methods; it\u0027ll make it easier to find. So before L42.\n\nAlso, would be good to add a comment about this. Something about\nkey -- the event\nvalue -- function to call to handle the event. The function must have two parameters, context and event. It should return None? if successful, otherwise raise an exception?","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":61,"context_line":"                                           topic)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"},{"line_number":65,"context_line":"        \u0027network.unbind_port\u0027: process_network_port_event,"},{"line_number":66,"context_line":"        \u0027network.delete_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_fab819e9","line":63,"in_reply_to":"9fdfeff1_0d5136da","updated":"2019-03-04 23:18:39.000000000","message":"OH. UGH. OK.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":60,"context_line":"        pecan.request.rpcapi.process_event(context, rpc_node.uuid, event,"},{"line_number":61,"context_line":"                                           topic)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"},{"line_number":65,"context_line":"        \u0027network.unbind_port\u0027: process_network_port_event,"},{"line_number":66,"context_line":"        \u0027network.delete_port\u0027: process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_0d5136da","line":63,"in_reply_to":"9fdfeff1_83642e23","updated":"2019-03-04 12:20:25.000000000","message":"Moving this above the method causes:\n NameError: name \u0027process_network_port_event\u0027 is not defined\n\nComment added.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"},{"line_number":65,"context_line":"        \u0027network.unbind_port\u0027: process_network_port_event,"},{"line_number":66,"context_line":"        \u0027network.delete_port\u0027: process_network_port_event,"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @pecan.expose()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_bec2a552","line":66,"updated":"2019-03-02 00:16:05.000000000","message":"Hmm, what are we going to do when we handle more events in another release of ironic. Wondering how we are going to version it to know if new events will work. Was it mentioned in the spec? Well, an exception is raised and maybe that is sufficient.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":63,"context_line":"    event_processors \u003d {"},{"line_number":64,"context_line":"        \u0027network.bind_port\u0027: process_network_port_event,"},{"line_number":65,"context_line":"        \u0027network.unbind_port\u0027: process_network_port_event,"},{"line_number":66,"context_line":"        \u0027network.delete_port\u0027: process_network_port_event,"},{"line_number":67,"context_line":"    }"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    @pecan.expose()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_4a664958","line":66,"in_reply_to":"9fdfeff1_bec2a552","updated":"2019-03-04 12:20:25.000000000","message":"The spec is lacking this detail.\n\nThe spec talks about implementing generic events support, allowing third-party drivers to add things they are waiting for. There is however no mention about changes to the API for this to work for third-party drivers, yet we need to do specific network port event processing (i.e the node lookup via MAC address) in the API to get the topic of the conductor managing the node. A different driver would have to do a similar lookup, but likely using a different method to do the lookup.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    @METRICS.timer(\u0027EventsController.post\u0027)"},{"line_number":75,"context_line":"    @expose.expose(None, body\u003dEvtCollection,"},{"line_number":76,"context_line":"                   status_code\u003dhttp_client.NO_CONTENT)"},{"line_number":77,"context_line":"    def post(self, evts):"},{"line_number":78,"context_line":"        if not api_utils.allow_expose_events():"},{"line_number":79,"context_line":"            raise exception.NotFound()"},{"line_number":80,"context_line":"        cdict \u003d pecan.request.context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_fe626dd9","line":77,"updated":"2019-03-02 00:16:05.000000000","message":"please add a docstring","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":74,"context_line":"    @METRICS.timer(\u0027EventsController.post\u0027)"},{"line_number":75,"context_line":"    @expose.expose(None, body\u003dEvtCollection,"},{"line_number":76,"context_line":"                   status_code\u003dhttp_client.NO_CONTENT)"},{"line_number":77,"context_line":"    def post(self, evts):"},{"line_number":78,"context_line":"        if not api_utils.allow_expose_events():"},{"line_number":79,"context_line":"            raise exception.NotFound()"},{"line_number":80,"context_line":"        cdict \u003d pecan.request.context.to_policy_values()"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_955c52f1","line":77,"in_reply_to":"9fdfeff1_fe626dd9","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        cdict \u003d pecan.request.context.to_policy_values()"},{"line_number":81,"context_line":"        policy.authorize(\u0027baremetal:events:post\u0027, cdict, cdict)"},{"line_number":82,"context_line":"        for e in evts.events:"},{"line_number":83,"context_line":"            LOG.debug(_(\"Received external event: %s\"), e)"},{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":86,"context_line":"            except KeyError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_f837e54a","line":83,"updated":"2019-03-02 00:16:05.000000000","message":"we don\u0027t i18n LOG strings, so no _(xxx).","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":80,"context_line":"        cdict \u003d pecan.request.context.to_policy_values()"},{"line_number":81,"context_line":"        policy.authorize(\u0027baremetal:events:post\u0027, cdict, cdict)"},{"line_number":82,"context_line":"        for e in evts.events:"},{"line_number":83,"context_line":"            LOG.debug(_(\"Received external event: %s\"), e)"},{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":86,"context_line":"            except KeyError:"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_aa86d515","line":83,"in_reply_to":"9fdfeff1_f837e54a","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ab638a23def020893a2a7c09aa16f1d635b8d265","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                raise exception.EventProcessorNotImplemtented(event\u003de[\u0027event\u0027])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            event_processor(self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_bdd154fa","line":87,"updated":"2019-03-01 18:09:56.000000000","message":"Does it make sense to try to safely get the event key here to reduce chance of second exception?","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":84,"context_line":"            try:"},{"line_number":85,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                raise exception.EventProcessorNotImplemtented(event\u003de[\u0027event\u0027])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            event_processor(self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_4aaba91d","line":87,"in_reply_to":"9fdfeff1_bdd154fa","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                raise exception.EventProcessorNotImplemtented(event\u003de[\u0027event\u0027])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            event_processor(self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_7e9c3dbf","line":88,"updated":"2019-03-02 00:16:05.000000000","message":"I have to refresh my memory on how this is supposed to work. If there is more than one event and there is a problem with one of them, do you want to stop, revert everything that was done, or continue trying to process the rest of the events?","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":85,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":86,"context_line":"            except KeyError:"},{"line_number":87,"context_line":"                raise exception.EventProcessorNotImplemtented(event\u003de[\u0027event\u0027])"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"            event_processor(self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_4a82c9a7","line":88,"in_reply_to":"9fdfeff1_7e9c3dbf","updated":"2019-03-04 12:20:25.000000000","message":"We do validations on the event before getting here:\nhttps://github.com/openstack/ironic/blob/master/ironic/api/controllers/v1/types.py#L461-L491\n\nSo we should\u0027nt get here unless the events are valid. One option would be to add a check that the event_processor is implemented when doing the validations? That would result in non-of the events being processed. Or we could remove the raise here and log an error instead, to continue processing the other events? (We probably should\u0027nt raise NodeNotFound above either in this case, or capture/handle it below.)","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        conductor to process the network port event."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        :param context: an admin context"},{"line_number":48,"context_line":"        :param event: a event dict"},{"line_number":49,"context_line":"        :raises NodeNotFound if the node cannot be found"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_7a1e690e","line":48,"updated":"2019-03-04 23:18:39.000000000","message":"nit s/a/an/\n\nIt would be worthwhile to document what is expected in this dict. I know it is encoded in the types.py file though. Wonder if we should subclass types.EventType and have eg types.NetworkPortEventType. but we can do that in the future if we want.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":45,"context_line":"        conductor to process the network port event."},{"line_number":46,"context_line":""},{"line_number":47,"context_line":"        :param context: an admin context"},{"line_number":48,"context_line":"        :param event: a event dict"},{"line_number":49,"context_line":"        :raises NodeNotFound if the node cannot be found"},{"line_number":50,"context_line":"        \"\"\""},{"line_number":51,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_c60a1626","line":48,"in_reply_to":"9fdfeff1_7a1e690e","updated":"2019-03-05 13:00:16.000000000","message":"Done\n\nAdded documentation in the doc string.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                                           topic\u003dtopic)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    event_processors \u003d {"},{"line_number":63,"context_line":"        # Event Processesors:"},{"line_number":64,"context_line":"        #   key: event (\u0027event\u0027 field of an event)"},{"line_number":65,"context_line":"        #   value: function to call to handle the event. The function must"},{"line_number":66,"context_line":"        #          have two parameters, context and event dict. It should"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_5ac36558","line":63,"updated":"2019-03-04 23:18:39.000000000","message":"s/Processesors/Processors/","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                                           topic\u003dtopic)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    event_processors \u003d {"},{"line_number":63,"context_line":"        # Event Processesors:"},{"line_number":64,"context_line":"        #   key: event (\u0027event\u0027 field of an event)"},{"line_number":65,"context_line":"        #   value: function to call to handle the event. The function must"},{"line_number":66,"context_line":"        #          have two parameters, context and event dict. It should"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_1124d6ae","line":63,"in_reply_to":"9fdfeff1_5ac36558","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    @expose.expose(None, body\u003dEvtCollection,"},{"line_number":80,"context_line":"                   status_code\u003dhttp_client.NO_CONTENT)"},{"line_number":81,"context_line":"    def post(self, evts):"},{"line_number":82,"context_line":"        \"\"\"Create a new events"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        :param evts: events within the request body."},{"line_number":85,"context_line":"        :raises EventProcessorNotImplemented"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_9a778d3c","line":82,"updated":"2019-03-04 23:18:39.000000000","message":"nit s/a//\n\nOr maybe \u0027Create one or more events\u0027. Not sure \u0027new\u0027 is needed.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":79,"context_line":"    @expose.expose(None, body\u003dEvtCollection,"},{"line_number":80,"context_line":"                   status_code\u003dhttp_client.NO_CONTENT)"},{"line_number":81,"context_line":"    def post(self, evts):"},{"line_number":82,"context_line":"        \"\"\"Create a new events"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        :param evts: events within the request body."},{"line_number":85,"context_line":"        :raises EventProcessorNotImplemented"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_514fbe69","line":82,"in_reply_to":"9fdfeff1_9a778d3c","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    def post(self, evts):"},{"line_number":82,"context_line":"        \"\"\"Create a new events"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        :param evts: events within the request body."},{"line_number":85,"context_line":"        :raises EventProcessorNotImplemented"},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        if not api_utils.allow_expose_events():"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_da9af560","line":84,"updated":"2019-03-04 23:18:39.000000000","message":"nit: what about s/evts/events/ ?\n\nIt is a list of events, right? EvtCollection.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":81,"context_line":"    def post(self, evts):"},{"line_number":82,"context_line":"        \"\"\"Create a new events"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        :param evts: events within the request body."},{"line_number":85,"context_line":"        :raises EventProcessorNotImplemented"},{"line_number":86,"context_line":"        \"\"\""},{"line_number":87,"context_line":"        if not api_utils.allow_expose_events():"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_117296ae","line":84,"in_reply_to":"9fdfeff1_da9af560","updated":"2019-03-05 13:00:16.000000000","message":"Done\n\nYes, it is a list of events","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            LOG.debug(\"Received external event: %s\", e)"},{"line_number":93,"context_line":"            try:"},{"line_number":94,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":95,"context_line":"            except KeyError:"},{"line_number":96,"context_line":"                raise exception.EventProcessorNotImplemented("},{"line_number":97,"context_line":"                    event\u003de.get(\u0027event\u0027))"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_7a52e96a","line":95,"updated":"2019-03-04 23:18:39.000000000","message":"To continue the discussion in PS10, I think ideally, we should have one events dictionary, where the key is the event, and the value is a tuple or something that had a validator method and a processor method. Make it easier not to mess up and the validator code makes sure the event exists and is validated, this would just invoke the event processor w/o having to deal with this error handling.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            LOG.debug(\"Received external event: %s\", e)"},{"line_number":93,"context_line":"            try:"},{"line_number":94,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":95,"context_line":"            except KeyError:"},{"line_number":96,"context_line":"                raise exception.EventProcessorNotImplemented("},{"line_number":97,"context_line":"                    event\u003de.get(\u0027event\u0027))"},{"line_number":98,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_3128faec","line":95,"in_reply_to":"9fdfeff1_7a52e96a","updated":"2019-03-05 13:00:16.000000000","message":"hmm, we could start a new file? event_utils.py? \nStick process_network_port_event and validate_network_port_event in there? And a constant, for example:\n\n  EVENT_UTILS \u003d {\n    # Event Processors and Validators:\n    #   key: event (\u0027event\u0027 field of an event)\n    #   value: Tuple. first element is function to call to process the\n    #          event, second element is function to validate the event.\n    \u0027network.bind_port\u0027: (process_network_port_event,\n                          validate_network_port_event),\n    \u0027network.unbind_port\u0027: (process_network_port_event,\n                            validate_network_port_event),\n    \u0027network.delete_port\u0027: (process_network_port_event,\n                            validate_network_port_event)}\n\nWe then import event_utils in types and events?\n\n\nAnother option, the one I went for, to avoid mistakes is a unit test ensuring that any valid event also have an event_processor. (see ironic.tests.unit.api.controllers.v1.test_event.TestProcessNetworkPortEvent#test_event_processors_implemented_for_valid_events)\n\nThis would allow adding event_processors that would never be called, because the validation would fail until both the validator and event_processor is implemented. Ensuring we don\u0027t merge anything that would pass the validator without also haveing an event_processor.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":95,"context_line":"            except KeyError:"},{"line_number":96,"context_line":"                raise exception.EventProcessorNotImplemented("},{"line_number":97,"context_line":"                    event\u003de.get(\u0027event\u0027))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            event_processor(self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_c5a77abc","line":97,"updated":"2019-03-04 23:18:39.000000000","message":"after reviewing the code, I think this should be e[\u0027event\u0027] since validation code already checked that e[\u0027event\u0027] exists.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":94,"context_line":"                event_processor \u003d self.event_processors[e[\u0027event\u0027]]"},{"line_number":95,"context_line":"            except KeyError:"},{"line_number":96,"context_line":"                raise exception.EventProcessorNotImplemented("},{"line_number":97,"context_line":"                    event\u003de.get(\u0027event\u0027))"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"            event_processor(self, pecan.request.context, e)"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_71b52232","line":97,"in_reply_to":"9fdfeff1_c5a77abc","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"}],"ironic/common/exception.py":[{"author":{"_account_id":29745,"name":"Dustin Cowles","email":"cowlesd@gmail.com","username":"dustinc","status":"inactive"},"change_message_id":"ab638a23def020893a2a7c09aa16f1d635b8d265","unresolved":false,"context_lines":[{"line_number":821,"context_line":"    _msg_fmt \u003d _(\"Deploy template %(template)s could not be found.\")"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"class EventProcessorNotImplemtented(Invalid):"},{"line_number":825,"context_line":"    _msg_fmt \u003d _(\"Event processor for event %(event)s not implemented.\")"},{"line_number":826,"context_line":""},{"line_number":827,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_d87d461c","line":824,"updated":"2019-03-01 18:09:56.000000000","message":"Typo in class name, should be\nEventProcessorNotImplemented","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":821,"context_line":"    _msg_fmt \u003d _(\"Deploy template %(template)s could not be found.\")"},{"line_number":822,"context_line":""},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"class EventProcessorNotImplemtented(Invalid):"},{"line_number":825,"context_line":"    _msg_fmt \u003d _(\"Event processor for event %(event)s not implemented.\")"},{"line_number":826,"context_line":""},{"line_number":827,"context_line":""}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_ca85595b","line":824,"in_reply_to":"9fdfeff1_d87d461c","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":822,"context_line":""},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"class EventProcessorNotImplemtented(Invalid):"},{"line_number":825,"context_line":"    _msg_fmt \u003d _(\"Event processor for event %(event)s not implemented.\")"},{"line_number":826,"context_line":""},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"class PortNotAssociatedWithNode(IronicException):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_4315e648","line":825,"updated":"2019-03-02 00:16:05.000000000","message":"nit s/not/is not/\n\nor maybe\n\n...for event... does not exist.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":822,"context_line":""},{"line_number":823,"context_line":""},{"line_number":824,"context_line":"class EventProcessorNotImplemtented(Invalid):"},{"line_number":825,"context_line":"    _msg_fmt \u003d _(\"Event processor for event %(event)s not implemented.\")"},{"line_number":826,"context_line":""},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"class PortNotAssociatedWithNode(IronicException):"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_ea8dbd7c","line":825,"in_reply_to":"9fdfeff1_4315e648","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":826,"context_line":""},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"class PortNotAssociatedWithNode(IronicException):"},{"line_number":829,"context_line":"    _msg_fmt \u003d _(\"Port %(port)s not associated with task node %(node)s\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_7e00bd01","line":829,"updated":"2019-03-02 00:16:05.000000000","message":"nit s/not/is not/\n\nNot sure we need the word \u0027task\u0027?","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"e7f4c7f6e3521987b76fab3891b1bcbc847f4582","unresolved":false,"context_lines":[{"line_number":826,"context_line":""},{"line_number":827,"context_line":""},{"line_number":828,"context_line":"class PortNotAssociatedWithNode(IronicException):"},{"line_number":829,"context_line":"    _msg_fmt \u003d _(\"Port %(port)s not associated with task node %(node)s\")"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_2a94258c","line":829,"in_reply_to":"9fdfeff1_7e00bd01","updated":"2019-03-04 12:20:25.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"}],"ironic/conductor/events.py":[{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"db35d2ca1d36c0a68e52a34e327f7d2ea5973d2e","unresolved":false,"context_lines":[{"line_number":29,"context_line":"# NOTE(hjensas): It is possible we get an event that we are waiting for before"},{"line_number":30,"context_line":"# the node is in wait status. If we are expecting an event the lock should be"},{"line_number":31,"context_line":"# released soon after the call to create/update ports return."},{"line_number":32,"context_line":"@retrying.retry("},{"line_number":33,"context_line":"    retry_on_exception\u003dlambda e: isinstance(e, exception.NodeLocked),"},{"line_number":34,"context_line":"    stop_max_attempt_number\u003dCONF.conductor.node_locked_retry_attempts * 10,"},{"line_number":35,"context_line":"    wait_exponential_multiplier\u003d(CONF.conductor.node_locked_retry_interval *"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_dc831a02","line":32,"updated":"2019-02-28 15:36:20.000000000","message":"The timeing\u0027s here likely can be tuned down once we actually put nodes in wait state after network operations.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":26,"context_line":"METRICS \u003d metrics_utils.get_metrics_logger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# NOTE(hjensas): It is possible we get an event that we are waiting for before"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_65532e3b","line":26,"updated":"2019-03-04 23:18:39.000000000","message":"is this used? guess you might want to add the metrics decorator if we want timings on the method.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":"CONF \u003d cfg.CONF"},{"line_number":25,"context_line":"LOG \u003d log.getLogger(__name__)"},{"line_number":26,"context_line":"METRICS \u003d metrics_utils.get_metrics_logger(__name__)"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"# NOTE(hjensas): It is possible we get an event that we are waiting for before"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_3176ba0e","line":26,"in_reply_to":"9fdfeff1_65532e3b","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    wait_exponential_max\u003dCONF.conductor.node_locked_retry_interval * 10000)"},{"line_number":38,"context_line":"def process_network_port_event(context, node_id, event):"},{"line_number":39,"context_line":"    \"\"\"Process network port event\"\"\""},{"line_number":40,"context_line":"    LOG.debug(\"Processing network port event, node: %(node)s event: \""},{"line_number":41,"context_line":"              \"%(event)s.\", {\u0027node\u0027: node_id, \u0027event\u0027: event})"},{"line_number":42,"context_line":"    with task_manager.acquire(context, node_id, shared\u003dFalse,"},{"line_number":43,"context_line":"                              purpose\u003d\u0027processing network port event\u0027) as task:"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_e0238ca6","line":40,"updated":"2019-03-04 23:18:39.000000000","message":"nit s/%(node)s/%(node)s;/\n\nOr I guess you could do something like\n\nFor node %(node)s, processing network port event %(event)s","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        except StopIteration:"},{"line_number":51,"context_line":"            LOG.warning(\u0027The port %(port)s is not associated to this node \u0027"},{"line_number":52,"context_line":"                        \u0027%(node)s. Ignoring network port event.\u0027,"},{"line_number":53,"context_line":"                        {\u0027port\u0027: port.uuid, \u0027node\u0027: node.uuid})"},{"line_number":54,"context_line":"            raise exception.PortNotAssociatedWithNode(port\u003dport.uuid,"},{"line_number":55,"context_line":"                                                      node\u003dnode.uuid)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_c06c48d2","line":53,"updated":"2019-03-04 23:18:39.000000000","message":"I don\u0027t think this is what you want. the port will be the last port in the list, which does NOT have the desired mac address. I suspect we want to output event[\u0027mac_address\u0027].\n\nI guess this could happen if something changed wrt the ports, between the time the API call was processed, and here.\n\nMaybe we should log the entire event info. I\u0027m sure we will be using this to debug :-(","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":50,"context_line":"        except StopIteration:"},{"line_number":51,"context_line":"            LOG.warning(\u0027The port %(port)s is not associated to this node \u0027"},{"line_number":52,"context_line":"                        \u0027%(node)s. Ignoring network port event.\u0027,"},{"line_number":53,"context_line":"                        {\u0027port\u0027: port.uuid, \u0027node\u0027: node.uuid})"},{"line_number":54,"context_line":"            raise exception.PortNotAssociatedWithNode(port\u003dport.uuid,"},{"line_number":55,"context_line":"                                                      node\u003dnode.uuid)"},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_51649e49","line":53,"in_reply_to":"9fdfeff1_c06c48d2","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            LOG.warning(\u0027The port %(port)s is not associated to this node \u0027"},{"line_number":52,"context_line":"                        \u0027%(node)s. Ignoring network port event.\u0027,"},{"line_number":53,"context_line":"                        {\u0027port\u0027: port.uuid, \u0027node\u0027: node.uuid})"},{"line_number":54,"context_line":"            raise exception.PortNotAssociatedWithNode(port\u003dport.uuid,"},{"line_number":55,"context_line":"                                                      node\u003dnode.uuid)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        info \u003d port.internal_info"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_e0714caa","line":54,"updated":"2019-03-04 23:18:39.000000000","message":"ditto here about port.uuid, mac address is probably what we should output.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":51,"context_line":"            LOG.warning(\u0027The port %(port)s is not associated to this node \u0027"},{"line_number":52,"context_line":"                        \u0027%(node)s. Ignoring network port event.\u0027,"},{"line_number":53,"context_line":"                        {\u0027port\u0027: port.uuid, \u0027node\u0027: node.uuid})"},{"line_number":54,"context_line":"            raise exception.PortNotAssociatedWithNode(port\u003dport.uuid,"},{"line_number":55,"context_line":"                                                      node\u003dnode.uuid)"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"        info \u003d port.internal_info"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_f158328b","line":54,"in_reply_to":"9fdfeff1_e0714caa","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        info \u003d port.internal_info"},{"line_number":58,"context_line":"        info.update({\u0027network_status\u0027: event[\u0027status\u0027]})"},{"line_number":59,"context_line":"        port.internal_info \u003d info"},{"line_number":60,"context_line":"        port.save()"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_a0a824d9","line":60,"updated":"2019-03-04 23:18:39.000000000","message":"I was wondering why we needed to spawn a thread for this. It is because of the retrying to get the lock, right?","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        info \u003d port.internal_info"},{"line_number":58,"context_line":"        info.update({\u0027network_status\u0027: event[\u0027status\u0027]})"},{"line_number":59,"context_line":"        port.internal_info \u003d info"},{"line_number":60,"context_line":"        port.save()"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_71fa0244","line":60,"in_reply_to":"9fdfeff1_a0a824d9","updated":"2019-03-05 13:00:16.000000000","message":"If I get it right, ironic.conductor.manager.ConductorManager#process_event would block the API when multiple events are recieved. So doing this asynchronously so that we do not block the API.\n\nhmm, is raising PortNotAssociatedWithNode not useful since this is spawned as a new thread? Maby we only want to log?","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"}],"ironic/conductor/manager.py":[{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"a99680e9c510a29e85b9e59953b162c0202f7e1f","unresolved":false,"context_lines":[{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3530,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3531,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dTrue,"},{"line_number":3532,"context_line":"                                  purpose\u003d\u0027processing event\u0027) as task:"},{"line_number":3533,"context_line":"            LOG.debug(\"Received external event, node: %(node)s event: \""},{"line_number":3534,"context_line":"                      \"%(event)s \", {\u0027node\u0027: task.node.uuid, \u0027event\u0027: event})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_42a5649e","line":3531,"range":{"start_line":3531,"start_character":52,"end_line":3531,"end_character":63},"updated":"2019-02-25 10:57:13.000000000","message":"Will we want an exclusive lock to process events?","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":14826,"name":"Mark Goddard","email":"markgoddard86@gmail.com","username":"mgoddard"},"change_message_id":"8f2285004aabe02721d219bc308c7c6a3a500f6e","unresolved":false,"context_lines":[{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3530,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3531,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dTrue,"},{"line_number":3532,"context_line":"                                  purpose\u003d\u0027processing event\u0027) as task:"},{"line_number":3533,"context_line":"            LOG.debug(\"Received external event, node: %(node)s event: \""},{"line_number":3534,"context_line":"                      \"%(event)s \", {\u0027node\u0027: task.node.uuid, \u0027event\u0027: event})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_73271814","line":3531,"range":{"start_line":3531,"start_character":52,"end_line":3531,"end_character":63},"in_reply_to":"9fdfeff1_282a7f90","updated":"2019-02-25 13:36:50.000000000","message":"I think we\u0027re going to need to handle nodes being locked. We probably don\u0027t want to cause the client in networking-baremetal to back up, so I guess we should do it here.\n\nSaying that, are we going to need to make this call asynchronous, so as not to block the API caller?","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"a94c012b10710aa4ff100b1834e1be0a13a96e03","unresolved":false,"context_lines":[{"line_number":3528,"context_line":""},{"line_number":3529,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3530,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3531,"context_line":"        with task_manager.acquire(context, node_id, shared\u003dTrue,"},{"line_number":3532,"context_line":"                                  purpose\u003d\u0027processing event\u0027) as task:"},{"line_number":3533,"context_line":"            LOG.debug(\"Received external event, node: %(node)s event: \""},{"line_number":3534,"context_line":"                      \"%(event)s \", {\u0027node\u0027: task.node.uuid, \u0027event\u0027: event})"}],"source_content_type":"text/x-python","patch_set":9,"id":"9fdfeff1_282a7f90","line":3531,"range":{"start_line":3531,"start_character":52,"end_line":3531,"end_character":63},"in_reply_to":"9fdfeff1_42a5649e","updated":"2019-02-25 13:20:51.000000000","message":"If we are plugging multiple ports, we will receive the event for the first port before the call\u0027s to add_***_network is done. If we use an exclusive lock here would we not end up with NodeLocked issues?\n\nOn the other hand, if we decorated this with a retry, we would effectively block here until the node is actually in \u0027wait\u0027 state and the NodeLocked because the callback is done before the node is in wait state would be resolved.","commit_id":"185ab9abf8025e5fea99ca357e1400e547218fda"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":3561,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3562,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3563,"context_line":"        \"\"\"Process event\"\"\""},{"line_number":3564,"context_line":"        LOG.debug(\"Processing event, node: %(node)s event: %(event)s.\","},{"line_number":3565,"context_line":"                  {\u0027node\u0027: node_id, \u0027event\u0027: event})"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_fe6cad9e","line":3564,"updated":"2019-03-02 00:16:05.000000000","message":"to be consistent (I hope it is still consistent) with other log msgs\n\n\"RPC process_event called for node: %(node)s, event: %(event)s\".","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":3561,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3562,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3563,"context_line":"        \"\"\"Process event\"\"\""},{"line_number":3564,"context_line":"        LOG.debug(\"Processing event, node: %(node)s event: %(event)s.\","},{"line_number":3565,"context_line":"                  {\u0027node\u0027: node_id, \u0027event\u0027: event})"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_7f665bf1","line":3564,"in_reply_to":"9fdfeff1_fe6cad9e","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        event_processors \u003d {"},{"line_number":3570,"context_line":"            \u0027network.bind_port\u0027: events.process_network_port_event,"},{"line_number":3571,"context_line":"            \u0027network.unbind_port\u0027: events.process_network_port_event,"},{"line_number":3572,"context_line":"            \u0027network.delete_port\u0027: events.process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_5e861919","line":3569,"updated":"2019-03-02 00:16:05.000000000","message":"please add a comment here, similar to what I asked for in the api file. \n\nI wonder if all future events will involve a node, but I guess we can deal with that later. I am asking because part of me wonders if it might make more sense to have process_event(self, context, event, node\u003dNone). So we can extend this in the future to take more optional arguments. Now I am wondering if we even want to get the node at the api level; maybe get it here. Not sure.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        event_processors \u003d {"},{"line_number":3570,"context_line":"            \u0027network.bind_port\u0027: events.process_network_port_event,"},{"line_number":3571,"context_line":"            \u0027network.unbind_port\u0027: events.process_network_port_event,"},{"line_number":3572,"context_line":"            \u0027network.delete_port\u0027: events.process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_dfde673d","line":3569,"in_reply_to":"9fdfeff1_5e861919","updated":"2019-03-05 13:00:16.000000000","message":"We need to get the node in the API to pass the event to the conductor which is relevant for the node?\n\nSince we will have to re-arrange the arguments to use node\u003dNone we better do it now.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":3559,"context_line":"                                  \u0027allocation %s\u0027, allocation.uuid)"},{"line_number":3560,"context_line":""},{"line_number":3561,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3562,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3563,"context_line":"        \"\"\"Process event\"\"\""},{"line_number":3564,"context_line":"        LOG.debug(\"Processing event, node: %(node)s event: %(event)s.\","},{"line_number":3565,"context_line":"                  {\u0027node\u0027: node_id, \u0027event\u0027: event})"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_2565261e","line":3562,"updated":"2019-03-04 23:18:39.000000000","message":"The more I think about it, the more I think that we want to make this more generic. Ie, that it is an event with info/data.\n\nTake a look at how we coded the vendor_passthru:\n- api: https://github.com/openstack/ironic/blob/ec2f7f992e1cca141df26441bdbf9cd9c682541c/ironic/api/controllers/v1/node.py#L1417-L1418\nand \nhttps://github.com/openstack/ironic/blob/ec2f7f992e1cca141df26441bdbf9cd9c682541c/ironic/api/controllers/v1/utils.py#L396\n- rpc: https://github.com/openstack/ironic/blob/ec2f7f992e1cca141df26441bdbf9cd9c682541c/ironic/conductor/rpcapi.py#L308-L311\n- conductor: https://github.com/openstack/ironic/blob/ec2f7f992e1cca141df26441bdbf9cd9c682541c/ironic/conductor/manager.py#L341","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":3559,"context_line":"                                  \u0027allocation %s\u0027, allocation.uuid)"},{"line_number":3560,"context_line":""},{"line_number":3561,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3562,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3563,"context_line":"        \"\"\"Process event\"\"\""},{"line_number":3564,"context_line":"        LOG.debug(\"Processing event, node: %(node)s event: %(event)s.\","},{"line_number":3565,"context_line":"                  {\u0027node\u0027: node_id, \u0027event\u0027: event})"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_f137d2fd","line":3562,"in_reply_to":"9fdfeff1_2565261e","updated":"2019-03-05 13:00:16.000000000","message":"I made node_id optional (node_id\u003dNone).","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":3561,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3562,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3563,"context_line":"        \"\"\"Process event\"\"\""},{"line_number":3564,"context_line":"        LOG.debug(\"Processing event, node: %(node)s event: %(event)s.\","},{"line_number":3565,"context_line":"                  {\u0027node\u0027: node_id, \u0027event\u0027: event})"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_45d70af0","line":3564,"updated":"2019-03-04 23:18:39.000000000","message":"I had a comment in PS 10 that I think you may have missed.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":3561,"context_line":"    @METRICS.timer(\u0027ConductorManager.process_event\u0027)"},{"line_number":3562,"context_line":"    def process_event(self, context, node_id, event):"},{"line_number":3563,"context_line":"        \"\"\"Process event\"\"\""},{"line_number":3564,"context_line":"        LOG.debug(\"Processing event, node: %(node)s event: %(event)s.\","},{"line_number":3565,"context_line":"                  {\u0027node\u0027: node_id, \u0027event\u0027: event})"},{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_11ba966d","line":3564,"in_reply_to":"9fdfeff1_45d70af0","updated":"2019-03-05 13:00:16.000000000","message":"indeed, sorry. I missed those. Done now.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"4efee84246ba56ed19e9e27ea7bef40a323a751e","unresolved":false,"context_lines":[{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        event_processors \u003d {"},{"line_number":3570,"context_line":"            \u0027network.bind_port\u0027: events.process_network_port_event,"},{"line_number":3571,"context_line":"            \u0027network.unbind_port\u0027: events.process_network_port_event,"},{"line_number":3572,"context_line":"            \u0027network.delete_port\u0027: events.process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_85f65290","line":3569,"updated":"2019-03-04 23:18:39.000000000","message":"ditto about comment in PS 10.","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"b23867e46bca6b9f48ffdedecc67fc1827f38daa","unresolved":false,"context_lines":[{"line_number":3566,"context_line":""},{"line_number":3567,"context_line":"        e \u003d event[\u0027event\u0027]"},{"line_number":3568,"context_line":""},{"line_number":3569,"context_line":"        event_processors \u003d {"},{"line_number":3570,"context_line":"            \u0027network.bind_port\u0027: events.process_network_port_event,"},{"line_number":3571,"context_line":"            \u0027network.unbind_port\u0027: events.process_network_port_event,"},{"line_number":3572,"context_line":"            \u0027network.delete_port\u0027: events.process_network_port_event,"}],"source_content_type":"text/x-python","patch_set":11,"id":"9fdfeff1_f1b4b284","line":3569,"in_reply_to":"9fdfeff1_85f65290","updated":"2019-03-05 13:00:16.000000000","message":"Done","commit_id":"64e9c36cd1f0f3570c7124d2ec5aa90b8d416469"}],"ironic/conductor/rpcapi.py":[{"author":{"_account_id":6618,"name":"Ruby Loo","email":"opensrloo@gmail.com","username":"rloo"},"change_message_id":"bf0e4ba4004b4f280dc9e0b8c2c178a8f91e504f","unresolved":false,"context_lines":[{"line_number":1136,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.48\u0027)"},{"line_number":1137,"context_line":"        return cctxt.call(context, \u0027destroy_allocation\u0027, allocation\u003dallocation)"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"    def process_event(self, context, node_id, event, topic\u003dNone):"},{"line_number":1140,"context_line":"        cctxt \u003d self.client.prepare(topic\u003dtopic or self.topic, version\u003d\u00271.49\u0027)"},{"line_number":1141,"context_line":"        return cctxt.call(context, \u0027process_event\u0027, node_id\u003dnode_id,"},{"line_number":1142,"context_line":"                          event\u003devent)"}],"source_content_type":"text/x-python","patch_set":10,"id":"9fdfeff1_239b0218","line":1139,"updated":"2019-03-02 00:16:05.000000000","message":"please add a docstring like the other methods have.","commit_id":"7ca5a3ad4d4c3850f00a35526d556429c85e9dc2"}],"ironic/drivers/modules/network/neutron.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b11bfdfdbd08ca1e99543512d80c1670775af3fe","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        for port in task.ports:"},{"line_number":90,"context_line":"            if port.uuid in vifs:"},{"line_number":91,"context_line":"                # NOTE(hjensas): Refresh the port before updating to try to"},{"line_number":92,"context_line":"                # avoid saving retired data."},{"line_number":93,"context_line":"                port.refresh()"},{"line_number":94,"context_line":"                internal_info \u003d port.internal_info"},{"line_number":95,"context_line":"                internal_info[\u0027provisioning_vif_port_id\u0027] \u003d vifs[port.uuid]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_86572e27","line":92,"updated":"2019-02-20 15:11:07.000000000","message":"Race conditions \\o/ One of the numerous reasons I don\u0027t like our JSON fields. Is it too late to introduce a network_status field to Port?","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"fe421fefbd45cfb1096d5613de93d8c6cd1263c9","unresolved":false,"context_lines":[{"line_number":89,"context_line":"        for port in task.ports:"},{"line_number":90,"context_line":"            if port.uuid in vifs:"},{"line_number":91,"context_line":"                # NOTE(hjensas): Refresh the port before updating to try to"},{"line_number":92,"context_line":"                # avoid saving retired data."},{"line_number":93,"context_line":"                port.refresh()"},{"line_number":94,"context_line":"                internal_info \u003d port.internal_info"},{"line_number":95,"context_line":"                internal_info[\u0027provisioning_vif_port_id\u0027] \u003d vifs[port.uuid]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_25441319","line":92,"in_reply_to":"9fdfeff1_86572e27","updated":"2019-02-22 04:39:38.000000000","message":"No, I think a network_status field is a good idea.\nChange: Ieb912829d1e7329471cd6c7a6ceda80c93f910ee","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"}],"ironic/tests/unit/api/controllers/v1/test_event.py":[{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b11bfdfdbd08ca1e99543512d80c1670775af3fe","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        gtf \u003d mock.patch.object("},{"line_number":200,"context_line":"            rpcapi.ConductorAPI, \u0027get_topic_for\u0027, return_value\u003d\u0027test-topic\u0027)"},{"line_number":201,"context_line":"        self.mock_gtf \u003d gtf.start()"},{"line_number":202,"context_line":"        self.addCleanup(gtf.stop)"},{"line_number":203,"context_line":"        self.mock_gnba \u003d mock.patch.object("},{"line_number":204,"context_line":"            objects.Node, \u0027get_by_port_addresses\u0027, return_value\u003dself.node)"},{"line_number":205,"context_line":"        self.mock_gpba \u003d mock.patch.object("}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_2649a28a","line":202,"updated":"2019-02-20 15:11:07.000000000","message":"please use useFixture instead","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"fe421fefbd45cfb1096d5613de93d8c6cd1263c9","unresolved":false,"context_lines":[{"line_number":199,"context_line":"        gtf \u003d mock.patch.object("},{"line_number":200,"context_line":"            rpcapi.ConductorAPI, \u0027get_topic_for\u0027, return_value\u003d\u0027test-topic\u0027)"},{"line_number":201,"context_line":"        self.mock_gtf \u003d gtf.start()"},{"line_number":202,"context_line":"        self.addCleanup(gtf.stop)"},{"line_number":203,"context_line":"        self.mock_gnba \u003d mock.patch.object("},{"line_number":204,"context_line":"            objects.Node, \u0027get_by_port_addresses\u0027, return_value\u003dself.node)"},{"line_number":205,"context_line":"        self.mock_gpba \u003d mock.patch.object("}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_e5412ba8","line":202,"in_reply_to":"9fdfeff1_2649a28a","updated":"2019-02-22 04:39:38.000000000","message":"Done","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"},{"author":{"_account_id":10239,"name":"Dmitry Tantsur","email":"dtantsur@protonmail.com","username":"dtantsur"},"change_message_id":"b11bfdfdbd08ca1e99543512d80c1670775af3fe","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        self.mock_gnba \u003d mock.patch.object("},{"line_number":204,"context_line":"            objects.Node, \u0027get_by_port_addresses\u0027, return_value\u003dself.node)"},{"line_number":205,"context_line":"        self.mock_gpba \u003d mock.patch.object("},{"line_number":206,"context_line":"            objects.Port, \u0027get_by_address\u0027, return_value\u003dself.port)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(rpcapi.ConductorAPI, \u0027process_event\u0027, autospec\u003dTrue)"},{"line_number":209,"context_line":"    def test_network_process_bind_port(self, mock_process_event):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_c65d3649","line":206,"updated":"2019-02-20 15:11:07.000000000","message":"I don\u0027t think this approach will cause the patches to be reverted on tear down. Please use mock.patch{.object} as a decorator or switch to useFixture","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"},{"author":{"_account_id":24245,"name":"Harald Jensås","email":"hjensas@redhat.com","username":"harald.jensas"},"change_message_id":"fe421fefbd45cfb1096d5613de93d8c6cd1263c9","unresolved":false,"context_lines":[{"line_number":203,"context_line":"        self.mock_gnba \u003d mock.patch.object("},{"line_number":204,"context_line":"            objects.Node, \u0027get_by_port_addresses\u0027, return_value\u003dself.node)"},{"line_number":205,"context_line":"        self.mock_gpba \u003d mock.patch.object("},{"line_number":206,"context_line":"            objects.Port, \u0027get_by_address\u0027, return_value\u003dself.port)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    @mock.patch.object(rpcapi.ConductorAPI, \u0027process_event\u0027, autospec\u003dTrue)"},{"line_number":209,"context_line":"    def test_network_process_bind_port(self, mock_process_event):"}],"source_content_type":"text/x-python","patch_set":6,"id":"9fdfeff1_a515639d","line":206,"in_reply_to":"9fdfeff1_c65d3649","updated":"2019-02-22 04:39:38.000000000","message":"Done","commit_id":"baee00b91f89222bd4616887437c4bc42c2ba672"}]}
