libioc.ResourceUpdater module

Updater for Releases and other LaunchableResources like Jails.

class libioc.ResourceUpdater.FreeBSD(resource, host)[source]

Bases: libioc.ResourceUpdater.Updater

Updater for FreeBSD.

property patch_version

Return the latest known patch version.

This version is parsed from FreeBSDs /bin/freebsd-version file.

Return type

int

update_conf_name = 'freebsd-update.conf'
update_name = 'freebsd-update'
update_script_name = 'freebsd-update.sh'
class libioc.ResourceUpdater.HardenedBSD(resource, host)[source]

Bases: libioc.ResourceUpdater.Updater

Updater for HardenedBSD.

property patch_version

Return the latest known patch version.

On HardenedBSD this version is published among the updated downloaded by hbsd-update. Right before fetching an updater this file is downloaded, so that the revision mentioned can be used for snapshot creation.

Return type

int

property release_branch_name

Return the branch name of the HBSD release.

Return type

str

update_conf_name = 'hbsd-update.conf'
update_name = 'hbsd-update'
update_script_name = 'hbsd-update'
class libioc.ResourceUpdater.Updater(resource, host)[source]

Bases: object

Updater for Releases and other LaunchableResources like Jails.

apply(event_scope=None)[source]

Apply the fetched updates to the associated release or jail.

Return type

Generator[Union[IocEvent, bool], None, None]

fetch(event_scope=None)[source]

Fetch the update of a release.

Return type

Generator[IocEvent, None, None]

property host_updates_dataset

Return the updates dataset.

Return type

ZFSDataset

property host_updates_dataset_name

Return the name of the updates dataset.

Return type

str

property host_updates_dir

Return the mountpoint of the updates dataset.

Return type

str

property local_release_updater_config

Return the local path to the release updater config.

Return type

str

property local_release_updates_dir

Return the absolute path to updater directory (os-dependend).

Return type

str

property local_temp_dir

Return the update temp directory relative to the jail root.

Return type

str

property logger

Shortcut to the resources logger.

Return type

Logger

property patch_version

Return the latest known patch version.

When no patch version is known the release was not updated yet.

Return type

int

property release

Return the associated release.

Return type

ReleaseGenerator

property temporary_jail

Temporary jail instance that will be created to run the update.

Return type

JailGenerator

libioc.ResourceUpdater.get_launchable_update_resource(host, resource)[source]

Return an updater instance for the host distribution.

Return type

Updater