NM.SriovVF

Fields

None

Methods

class

attribute_validate (name, value)

class

new (index)

add_vlan (vlan_id)

dup ()

equal (other)

get_attribute (name)

get_attribute_names ()

get_index ()

get_vlan_ids ()

get_vlan_protocol (vlan_id)

get_vlan_qos (vlan_id)

ref ()

remove_vlan (vlan_id)

set_attribute (name, value)

set_vlan_protocol (vlan_id, protocol)

set_vlan_qos (vlan_id, qos)

unref ()

Details

class NM.SriovVF
classmethod attribute_validate(name, value)
Parameters:
  • name (str) – the attribute name

  • value (GLib.Variant) – the attribute value

Raises:

GLib.Error

Returns:

True if the attribute is valid, False otherwise

known:

on return, whether the attribute name is a known one

Return type:

(bool, known: bool)

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:

NM.SriovVF

Creates a new NM.SriovVF object.

New in version 1.14.

add_vlan(vlan_id)
Parameters:

vlan_id (int) – the VLAN id

Returns:

True if the VLAN was added; False if it already existed

Return type:

bool

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:

NM.SriovVF

Creates a copy of self.

New in version 1.14.

equal(other)
Parameters:

other (NM.SriovVF) – the NM.SriovVF to compare self to.

Returns:

True if the objects contain the same values, False if they do not.

Return type:

bool

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:

GLib.Variant

Gets the value of the attribute with name name on self

New in version 1.14.

get_attribute_names()
Returns:

a None-terminated array of attribute names

Return type:

[str]

Gets an array of attribute names defined on self.

New in version 1.14.

get_index()
Returns:

the VF index

Return type:

int

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:

NM.SriovVFVlanProtocol

Returns the configured protocol for the given VLAN.

New in version 1.14.

get_vlan_qos(vlan_id)
Parameters:

vlan_id (int) – the VLAN id

Returns:

the QoS value

Return type:

int

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:

bool

Removes a VLAN from a VF.

New in version 1.14.

set_attribute(name, value)
Parameters:

Sets the named attribute on self to the given value.

New in version 1.14.

set_vlan_protocol(vlan_id, protocol)
Parameters:

Sets the protocol for the given VLAN.

New in version 1.14.

set_vlan_qos(vlan_id, qos)
Parameters:
  • vlan_id (int) – the VLAN id

  • qos (int) – a QoS (priority) value

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.