libioc.Distribution module

ioc Distribution module.

class libioc.Distribution.Distribution(host=None, zfs=None, logger=None)[source]

Bases: libioc.Distribution.DistributionGenerator

Synchronous wrapper of the host distribution.

class libioc.Distribution.DistributionGenerator(host=None, zfs=None, logger=None)[source]

Bases: object

Asynchronous representation of the host distribution.

property eol_list

Return the (memoized) list of release names listed as EOL.

Return type

List[str]

eol_url = 'https://www.freebsd.org/security/unsupported.html'
fetch_releases()[source]

Fetch and cache the available releases.

Return type

None

property hash_file

Return the name of the checksum file found on the mirror.

Return type

str

property mirror_url

Return the mirror URL of the distribution.

URL that points to the top level directory of a distributions release asset HTTP server.

Return type

str

property name

Return the name of the host distribution.

Often used to differentiate between operations for HardenedBSD or standard FreeBSD.

Return type

str

release_name_blacklist = ['', '.', '..', 'ISO-IMAGES']
property releases

List of available releases.

Raises an error when the releases cannot be fetched at the current time

Return type

List[ReleaseGenerator]

class libioc.Distribution.EOLParser(*, convert_charrefs=True)[source]

Bases: html.parser.HTMLParser

Parser for EOL releases.

current_branch = ''
data = []
eol_releases = []
handle_data(data)[source]

Handle data in HTML tags.

Return type

None

handle_endtag(tag)[source]

Handle closing HTML tags.

Return type

None

handle_starttag(tag, attrs)[source]

Handle opening HTML tags.

Return type

None

in_id = False
td_counter = 0