Fwupd.Report

g Fwupd.Report Fwupd.Report GObject.Object GObject.Object GObject.Object->Fwupd.Report

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

flag_from_string (report_flag)

class

flag_to_string (report_flag)

class

from_variant (value)

class

new ()

add_flag (flag)

add_metadata_item (key, value)

get_created ()

get_device_name ()

get_distro_id ()

get_distro_variant ()

get_distro_version ()

get_flags ()

get_metadata ()

get_metadata_item (key)

get_remote_id ()

get_vendor ()

get_vendor_id ()

get_version_old ()

has_flag (flag)

remove_flag (flag)

set_created (created)

set_device_name (device_name)

set_distro_id (distro_id)

set_distro_variant (distro_variant)

set_distro_version (distro_version)

set_flags (flags)

set_remote_id (remote_id)

set_vendor (vendor)

set_vendor_id (vendor_id)

set_version_old (version_old)

to_json (builder)

to_string ()

to_variant ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

flags

int

r/w

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Fwupd.Report(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

Fwupd.ReportClass

A firmware report from a vendor.

This is the LVFS formatted report that the fwupd user consumes, NOT the thing that gets uploaded.

See also: [class`FwupdRelease`]

classmethod flag_from_string(report_flag)[source]
Parameters:

report_flag (str or None) – a string, e.g. from-oem

Returns:

enumerated value

Return type:

int

Converts a string to an enumerated report flag.

New in version 1.9.1.

classmethod flag_to_string(report_flag)[source]
Parameters:

report_flag (int) – report flags, e.g. Fwupd.REPORT_FLAG_FROM_OEM

Returns:

identifier string

Return type:

str

Converts an enumerated report flag to a string.

New in version 1.9.1.

classmethod from_variant(value)[source]
Parameters:

value (GLib.Variant) – the serialized data

Returns:

a new Fwupd.Report, or None if value was invalid

Return type:

Fwupd.Report

Creates a new report using serialized data.

New in version 1.8.8.

classmethod new()[source]
Returns:

a new Fwupd.Report

Return type:

Fwupd.Report

Creates a new report.

New in version 1.8.8.

add_flag(flag)[source]
Parameters:

flag (int) – the #FwupdReportFlags

Adds a specific report flag to the report.

New in version 1.9.1.

add_metadata_item(key, value)[source]
Parameters:
  • key (str) – the key

  • value (str) – the value

Sets a report metadata item.

New in version 1.8.8.

get_created()[source]
Returns:

UTC timestamp in UNIX format, or 0 if unset

Return type:

int

Gets when the report was created.

New in version 1.8.8.

get_device_name()[source]
Returns:

the name, or None if unset

Return type:

str

Gets the name of the device the update was performed on.

New in version 1.8.8.

get_distro_id()[source]
Returns:

the name, or None if unset

Return type:

str

Gets the distribution name.

New in version 1.8.8.

get_distro_variant()[source]
Returns:

variant, or None if unset

Return type:

str

Gets the distribution variant.

New in version 1.8.8.

get_distro_version()[source]
Returns:

a string, or None if unset

Return type:

str

Gets the distribution version.

New in version 1.8.8.

get_flags()[source]
Returns:

report flags, or 0 if unset

Return type:

int

Gets the report flags.

New in version 1.9.1.

get_metadata()[source]
Returns:

the metadata, which may be empty

Return type:

{object: object}

Gets the report metadata.

New in version 1.8.8.

get_metadata_item(key)[source]
Parameters:

key (str) – the key

Returns:

the value, or None if unset

Return type:

str

Gets a report metadata item.

New in version 1.8.8.

get_remote_id()[source]
Returns:

ID, or None if unset

Return type:

str

Gets the remote ID.

New in version 1.9.3.

get_vendor()[source]
Returns:

the test vendor, or None if unset

Return type:

str

Gets the vendor that uploaded the test result.

New in version 1.8.8.

get_vendor_id()[source]
Returns:

the vendor ID, or 0 if unset

Return type:

int

Gets the vendor identifier. The mapping is only known on the remote server, and this can be useful to filter on different QA teams that work for the same OEM.

New in version 1.8.8.

get_version_old()[source]
Returns:

the version, or None if unset

Return type:

str

Gets the old version, i.e. what the upser was upgrading *from*.

New in version 1.8.8.

has_flag(flag)[source]
Parameters:

flag (int) – a report flag

Returns:

True if the flag is set

Return type:

bool

Finds if the report has a specific report flag.

New in version 1.9.1.

remove_flag(flag)[source]
Parameters:

flag (int) – a report flag

Removes a specific report flag from the report.

New in version 1.9.1.

set_created(created)[source]
Parameters:

created (int) – UTC timestamp in UNIX format

Sets when the report was created.

New in version 1.8.8.

set_device_name(device_name)[source]
Parameters:

device_name (str or None) – the name, e.g. LENOVO ThinkPad P1 Gen 3

Sets the name of the device the update was performed on.

New in version 1.8.8.

set_distro_id(distro_id)[source]
Parameters:

distro_id (str or None) – the name, e.g. fedora

Sets the distribution name.

New in version 1.8.8.

set_distro_variant(distro_variant)[source]
Parameters:

distro_variant (str or None) – the variant, e.g. workstation

Sets the distribution variant.

New in version 1.8.8.

set_distro_version(distro_version)[source]
Parameters:

distro_version (str or None) – a string

Sets the distribution version.

New in version 1.8.8.

set_flags(flags)[source]
Parameters:

flags (int) – report flags, e.g. Fwupd.REPORT_FLAG_FROM_OEM

Sets the report flags.

New in version 1.9.1.

set_remote_id(remote_id)[source]
Parameters:

remote_id (str or None) – the remote, e.g. lvfs

Sets the remote ID.

New in version 1.9.3.

set_vendor(vendor)[source]
Parameters:

vendor (str or None) – the vendor name

Sets the vendor that uploaded the test result.

New in version 1.8.8.

set_vendor_id(vendor_id)[source]
Parameters:

vendor_id (int) – the vendor ID, or 0

Sets the vendor identifier. The mapping is only known on the remote server, and this can be useful to filter on different QA teams that work for the same OEM.

New in version 1.8.8.

set_version_old(version_old)[source]
Parameters:

version_old (str or None) – the version, e.g. 1.2.3

Sets the old version, i.e. what the upser was upgrading *from*.

New in version 1.8.8.

to_json(builder)[source]
Parameters:

builder (Json.Builder) – a JSON builder

Adds a fwupd report to a JSON builder

New in version 1.8.8.

to_string()[source]
Returns:

text, or None for invalid

Return type:

str

Builds a text representation of the object.

New in version 1.8.8.

to_variant()[source]
Returns:

the serialized data, or None for error

Return type:

GLib.Variant

Serialize the report data.

New in version 1.8.8.

Property Details

Fwupd.Report.props.flags
Name:

flags

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE

The report flags.

New in version 1.9.1.