NM.SettingVlan¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
[ |
r/w |
||
r/w |
|||
r/w/en |
|||
[ |
r/w |
||
r/w/en |
|||
r/w/en |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class NM.SettingVlan(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
VLAN Settings
- classmethod new()¶
- Returns:
the new empty
NM.SettingVlan
object- Return type:
Creates a new
NM.SettingVlan
object with default values.
- add_priority(map, from_, to)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority mapfrom (
int
) – the priority to map to toto (
int
) – the priority to map from to
- Returns:
True
.- Return type:
Adds a priority mapping to the #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map properties of the setting. If from is already in the given priority map, this function will overwrite the existing entry with the new to.
If map is
NM.VlanPriorityMap.INGRESS_MAP
then from is the incoming 802.1q VLAN Priority Code Point (PCP) value, and to is the Linux SKB priority value.If map is
NM.VlanPriorityMap.EGRESS_MAP
then from is the Linux SKB priority value and to is the outgoing 802.1q VLAN Priority Code Point (PCP) value.
- add_priority_str(map, str)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority mapstr (
str
) – the string which contains a priority map, like “3:7”
- Returns:
True
if the entry was successfully added to the list, or it overwrote the old value,False
if str is not a valid mapping.- Return type:
Adds a priority map entry into either the #NMSettingVlan:ingress_priority_map or the #NMSettingVlan:egress_priority_map properties. The priority map maps the Linux SKB priorities to 802.1p priorities.
- clear_priorities(map)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority map
Clear all the entries from #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map properties.
- get_flags()¶
- Returns:
the
NM.SettingVlan
:flags
property of the setting- Return type:
- get_id()¶
- Returns:
the
NM.SettingVlan
:id
property of the setting- Return type:
- get_num_priorities(map)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority map- Returns:
return the number of ingress/egress priority entries.
- Return type:
Returns the number of entries in the #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map properties of this setting.
- get_parent()¶
- Returns:
the
NM.SettingVlan
:parent
property of the setting- Return type:
- get_priority(map, idx)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority mapidx (
int
) – the zero-based index of the ingress/egress priority map entry
- Returns:
returns
True
if idx is in range. Otherwise,False
.- out_from:
on return the value of the priority map’s ‘from’ item
- out_to:
on return the value of priority map’s ‘to’ item
- Return type:
Retrieve one of the entries of the #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map properties of this setting.
- get_protocol()¶
- Returns:
the
NM.SettingVlan
:protocol
property of the setting- Return type:
New in version 1.42.
- remove_priority(map, idx)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority mapidx (
int
) – the zero-based index of the priority map to remove
Removes the priority map at index idx from the #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map properties.
- remove_priority_by_value(map, from_, to)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority mapfrom (
int
) – the priority to map to toto (
int
) – the priority to map from to
- Returns:
True
if the priority mapping was found and removed;False
if it was not.- Return type:
Removes the priority map form:to from the #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map (according to map argument) properties.
- remove_priority_str_by_value(map, str)¶
- Parameters:
map (
NM.VlanPriorityMap
) – the type of priority mapstr (
str
) – the string which contains a priority map, like “3:7”
- Returns:
True
if the priority mapping was found and removed;False
if it was not.- Return type:
Removes the priority map str from the #NMSettingVlan:ingress_priority_map or #NMSettingVlan:egress_priority_map (according to map argument) properties.
Property Details¶
- NM.SettingVlan.props.egress_priority_map¶
-
For outgoing packets, a list of mappings from Linux SKB priorities to 802.1p priorities. The mapping is given in the format “from:to” where both “from” and “to” are unsigned integers, ie “7:3”.
- NM.SettingVlan.props.flags¶
- Name:
flags
- Type:
- Default Value:
- Flags:
One or more flags which control the behavior and features of the VLAN interface. Flags include
NM.VlanFlags.REORDER_HEADERS
(reordering of output packet headers),NM.VlanFlags.GVRP
(use of the GVRP protocol), andNM.VlanFlags.LOOSE_BINDING
(loose binding of the interface to its controller device’s operating state).NM.VlanFlags.MVRP
(use of the MVRP protocol).The default value of this property is
NM.VlanFlags.REORDER_HEADERS
, but it used to be 0. To preserve backward compatibility, the default-value in the D-Bus API continues to be 0 and a missing property on D-Bus is still considered as 0.
- NM.SettingVlan.props.id¶
- Name:
id
- Type:
- Default Value:
0
- Flags:
The VLAN identifier that the interface created by this connection should be assigned. The valid range is from 0 to 4094, without the reserved id 4095.
- NM.SettingVlan.props.ingress_priority_map¶
-
For incoming packets, a list of mappings from 802.1p priorities to Linux SKB priorities. The mapping is given in the format “from:to” where both “from” and “to” are unsigned integers, ie “7:3”.
- NM.SettingVlan.props.parent¶
- Name:
parent
- Type:
- Default Value:
- Flags:
If given, specifies the parent interface name or parent connection UUID from which this VLAN interface should be created. If this property is not specified, the connection must contain an
NM.SettingWired
setting with aNM.SettingWired
:mac-address
property.