'Update information for the specified trunk.'

@db_base_plugin_common.convert_result_to_dict
def update_trunk(self, context, trunk_id, trunk):

    trunk_data = trunk['trunk']
    with db_api.context_manager.writer.using(context):
        trunk_obj = self._get_trunk(context, trunk_id)
        original_trunk = copy.deepcopy(trunk_obj)
        trunk_obj.update_fields(trunk_data, reset_changes=True)
        trunk_obj.update()
        payload = callbacks.TrunkPayload(context, trunk_id, original_trunk=original_trunk, current_trunk=trunk_obj)
        registry.notify(constants.TRUNK, events.PRECOMMIT_UPDATE, self, payload=payload)
    registry.notify(constants.TRUNK, events.AFTER_UPDATE, self, payload=payload)
    return trunk_obj
