NM.SriovVF¶
Fields¶
None
Methods¶
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Details¶
- class NM.SriovVF¶
- classmethod attribute_validate(name, value)¶
- Parameters:
name (
str
) – the attribute namevalue (
GLib.Variant
) – the attribute value
- Raises:
- Returns:
True
if the attribute is valid,False
otherwise- known:
on return, whether the attribute name is a known one
- Return type:
Validates a VF attribute, i.e. checks that the attribute is a known one, the value is of the correct type and well-formed.
New in version 1.42.
- classmethod new(index)¶
- Parameters:
index (
int
) – the VF index- Returns:
the new
NM.SriovVF
object.- Return type:
Creates a new
NM.SriovVF
object.New in version 1.14.
- add_vlan(vlan_id)¶
- Parameters:
vlan_id (
int
) – the VLAN id- Returns:
- Return type:
Adds a VLAN to the VF. Currently kernel only supports one VLAN per VF.
New in version 1.14.
- dup()¶
- Returns:
a copy of self
- Return type:
Creates a copy of self.
New in version 1.14.
- equal(other)¶
- Parameters:
other (
NM.SriovVF
) – theNM.SriovVF
to compare self to.- Returns:
True
if the objects contain the same values,False
if they do not.- Return type:
Determines if two
NM.SriovVF
objects have the same index, attributes and VLANs.New in version 1.14.
- get_attribute(name)¶
- Parameters:
name (
str
) – the name of a VF attribute- Returns:
the value of the attribute with name name on self, or
None
if self has no such attribute.- Return type:
Gets the value of the attribute with name name on self
New in version 1.14.
- get_attribute_names()¶
-
Gets an array of attribute names defined on self.
New in version 1.14.
- get_index()¶
- Returns:
the VF index
- Return type:
Gets the index property of this VF object.
New in version 1.14.
- get_vlan_ids()¶
- Returns:
a list of VLAN ids configured on the VF.
- Return type:
[
int
]
Returns the VLANs currently configured on the VF. Currently kernel only supports one VLAN per VF.
New in version 1.14.
- get_vlan_protocol(vlan_id)¶
- Parameters:
vlan_id (
int
) – the VLAN id- Returns:
the configured protocol
- Return type:
Returns the configured protocol for the given VLAN.
New in version 1.14.
- get_vlan_qos(vlan_id)¶
-
Returns the QoS value for the given VLAN.
New in version 1.14.
- ref()¶
Increases the reference count of the object.
New in version 1.14.
- remove_vlan(vlan_id)¶
- Parameters:
vlan_id (
int
) – the VLAN id- Returns:
True
if the VLAN was removed,False
if the VLAN vlan_id did not belong to the VF.- Return type:
Removes a VLAN from a VF.
New in version 1.14.
- set_attribute(name, value)¶
- Parameters:
name (
str
) – the name of a route attributevalue (
GLib.Variant
orNone
) – the value
Sets the named attribute on self to the given value.
New in version 1.14.
- set_vlan_protocol(vlan_id, protocol)¶
- Parameters:
vlan_id (
int
) – the VLAN idprotocol (
NM.SriovVFVlanProtocol
) – the VLAN protocol
Sets the protocol for the given VLAN.
New in version 1.14.
- set_vlan_qos(vlan_id, qos)¶
-
Sets a QoS value for the given VLAN.
New in version 1.14.
- unref()¶
Decreases the reference count of the object. If the reference count reaches zero, the object will be destroyed.
New in version 1.14.