NM.SettingEthtool

g GObject.Object GObject.Object NM.Setting NM.Setting GObject.Object->NM.Setting NM.SettingEthtool NM.SettingEthtool NM.Setting->NM.SettingEthtool

Subclasses:

None

Methods

Inherited:

NM.Setting (21), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

clear_features ()

get_feature (optname)

get_optnames ()

set_feature (optname, value)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

NM.Setting (1)

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class NM.SettingEthtool(**kwargs)
Bases:

NM.Setting

Abstract:

No

Structure:

NM.SettingEthtoolClass

Ethtool Ethernet Settings

New in version 1.14.

classmethod new()
Returns:

the new empty NM.SettingEthtool object

Return type:

NM.Setting

Creates a new NM.SettingEthtool object with default values.

New in version 1.14.

clear_features()

Clears all offload features settings

New in version 1.14.

Deprecated since version 1.26: use NM.Setting.option_clear_by_name() with NM.ethtool_optname_is_feature() predicate instead.

get_feature(optname)
Parameters:

optname (str) – option name of the offload feature to get

Returns:

a NM.Ternary value indicating whether the offload feature is enabled, disabled, or left untouched.

Return type:

NM.Ternary

Gets and offload feature setting. Returns NM.Ternary.DEFAULT if the feature is not set.

Note that optname must be a valid name for a feature, according to NM.ethtool_optname_is_feature().

New in version 1.14.

Deprecated since version 1.26: use NM.Setting.option_get_boolean() instead.

get_optnames()
Returns:

list of set option names or None if no options are set. The option names are still owned by self and may get invalidated when self gets modified.

out_length:

return location for the number of keys returned, or None

Return type:

([str], out_length: int)

This returns all options names that are set. This includes the feature names like NM.ETHTOOL_OPTNAME_FEATURE_GRO. See NM.ethtool_optname_is_feature() to check whether the option name is valid for offload features.

New in version 1.20.

Deprecated since version 1.26: use NM.Setting.option_get_all_names() instead.

set_feature(optname, value)
Parameters:
  • optname (str) – option name of the offload feature to get

  • value (NM.Ternary) – the new value to set. The special value NM.Ternary.DEFAULT means to clear the offload feature setting.

Sets and offload feature setting.

Note that optname must be a valid name for a feature, according to NM.ethtool_optname_is_feature().

New in version 1.14.

Deprecated since version 1.26: use NM.Setting.option_set() or NM.Setting.option_set_boolean() instead.