SoftwareUpdate

The SoftwareUpdate class provides helpers for update tests.

SoftwareUpdate

class firefox_puppeteer.api.software_update.SoftwareUpdate(marionette)

The SoftwareUpdate API adds support for an easy access to the update process.

ABI

Get the customized ABI for the update service.

Returns:ABI version
active_update

Holds a reference to an ActiveUpdate object.

allowed

Check if the user has permissions to run the software update

Returns:Status if the user has the permissions
build_info

Return information of the current build version

Returns:A dictionary of build information
force_fallback()

Update the update.status file and set the status to ‘failed:6’

get_formatted_update_url(force=False)

Retrieve the formatted AUS update URL the update snippet is retrieved from.

Parameters:force – Boolean flag to force an update check
Returns:The URL of the update snippet
get_update_snippet(update_url)

Retrieve contents of the update snippet.

Parameters:update_url – URL to the update snippet
is_complete_update

Return true if the offered update is a complete update

Returns:True if the offered update is a complete update
mar_channels

Holds a reference to a MARChannels object.

os_version

Returns information about the OS version

Returns:The OS version
patch_info

Returns information of the active update in the queue.

staging_directory

Returns the path to the updates staging directory.

update_channel

Return the currently used update channel.

update_type

Returns the type of the active update.

update_url

Return the update URL used for update checks.

ActiveUpdate

class firefox_puppeteer.api.software_update.ActiveUpdate(marionette)
exists

Checks if there is an active update.

Returns:True if there is an active update
get_patch_at(patch_index)

Use nsIUpdate.getPatchAt to return a patch from an update.

Returns:JSON data for an nsIUpdatePatch object
patch_count

Get the patchCount from the active update.

Returns:The patch count
selected_patch

Get the selected patch for the active update.

Returns:JSON data for the selected patch

MARChannels

class firefox_puppeteer.api.software_update.MARChannels(marionette)

Class to handle the allowed MAR channels as listed in update-settings.ini.

class MARConfigParser(defaults=None, dict_type=<class 'collections.OrderedDict'>, allow_no_value=False)

INI parser which allows to read and write MAR config files.

Virtually identical to the original method, but delimit keys and values with ‘=’ instead of ‘ = ‘

write(fp)

Write an .ini-format representation of the configuration state.

add_channels(channels)

Add additional MAR channels.

Parameters:channels – A set of channel names to add
channels

The currently accepted MAR channels.

Returns:A set of channel names
remove_channels(channels)

Remove MAR channels.

Parameters:channels – A set of channel names to remove

UpdateChannel