NM.SettingBridgePort¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/en |
|||
r/w/en |
|||
r/w/en |
|||
r/w |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class NM.SettingBridgePort(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Bridge Port Settings
- classmethod new()¶
- Returns:
the new empty
NM.SettingBridgePort
object- Return type:
Creates a new
NM.SettingBridgePort
object with default values.
- add_vlan(vlan)¶
- Parameters:
vlan (
NM.BridgeVlan
) – the vlan to add
Appends a new vlan and associated information to the setting. The given vlan gets sealed and a reference to it is added.
New in version 1.18.
- clear_vlans()¶
Removes all configured VLANs.
New in version 1.18.
- get_hairpin_mode()¶
- Returns:
the
NM.SettingBridgePort
:hairpin-mode
property of the setting- Return type:
- get_path_cost()¶
- Returns:
the
NM.SettingBridgePort
:path-cost
property of the setting- Return type:
- get_priority()¶
- Returns:
the
NM.SettingBridgePort
:priority
property of the setting- Return type:
- get_vlan(idx)¶
- Parameters:
idx (
int
) – index number of the VLAN to return- Returns:
the VLAN at index idx
- Return type:
New in version 1.18.
- remove_vlan(idx)¶
- Parameters:
idx (
int
) – index number of the VLAN.
Removes the vlan at index idx.
New in version 1.18.
- remove_vlan_by_vid(vid_start, vid_end)¶
- Parameters:
- Returns:
- Return type:
Remove the VLAN with range vid_start to vid_end. If vid_end is zero, it is assumed to be equal to vid_start and so the single-id VLAN with id vid_start is removed.
New in version 1.18.
Property Details¶
- NM.SettingBridgePort.props.hairpin_mode¶
- Name:
hairpin-mode
- Type:
- Default Value:
- Flags:
Enables or disables “hairpin mode” for the port, which allows frames to be sent back out through the port the frame was received on.
- NM.SettingBridgePort.props.path_cost¶
- Name:
path-cost
- Type:
- Default Value:
100
- Flags:
The Spanning Tree Protocol (STP) port cost for destinations via this port.
- NM.SettingBridgePort.props.priority¶
- Name:
priority
- Type:
- Default Value:
32
- Flags:
The Spanning Tree Protocol (STP) priority of this bridge port.
- NM.SettingBridgePort.props.vlans¶
- Name:
vlans
- Type:
- Default Value:
- Flags:
Array of bridge VLAN objects. In addition to the VLANs specified here, the port will also have the default-pvid VLAN configured on the bridge by the bridge.vlan-default-pvid property.
In nmcli the VLAN list can be specified with the following syntax:
$vid ‘pvid [untagged]’ [, $vid ‘pvid [untagged]’]…
where $vid is either a single id between 1 and 4094 or a range, represented as a couple of ids separated by a dash.
New in version 1.18.