@classmethod
    def update_offloading_modes(cls, instance, new_modes, keep_states=False):
        if keep_states:
            old_modes_states = instance.offloading_modes_as_flat_dict(
                instance.offloading_modes)
            for mode in new_modes:
                if mode["name"] in old_modes_states:
                    mode["state"] = old_modes_states[mode["name"]]
        instance.offloading_modes = new_modes
Update information about offloading modes for the interface.
dataset/ETHPy150Open openstack/fuel-web/nailgun/nailgun/extensions/network_manager/objects/interface.py/NIC.update_offloading_modes