owmeta_core.bundle.common module

owmeta_core.bundle.common.bundle_tree_filter(path, fullpath)[source]

Returns true for file names that are to be included in a bundle for deployment or fetching.

Parameters
pathstr

The relative path of the file to check

fillpathstr

The full path of the file to check (usable for deeper inspection)

owmeta_core.bundle.common.fmt_bundle_directory(bundles_directory, ident, version=None)[source]

Get the directory for the given bundle identifier and version

Parameters
identstr

Bundle identifier

versionint

Version number. If not provided, returns the directory containing all of the versions

owmeta_core.bundle.common.validate_manifest(bundle_path, manifest_data)[source]

Validate manifest data in a dict

Parameters
bundle_pathstr

The path to the bundle directory or archive. Used in the exception message if the manifest data is invalid

manifest_datadict

The data from a manifest file

Raises
NotABundlePath

Thrown in one of these conditions:

  • manifest_data lacks a manifest_version

  • manifest_data has a manifest_version > BUNDLE_MANIFEST_VERSION

  • manifest_data has a manifest_version <= 0

  • manifest_data lacks a version

  • manifest_data lacks an id

owmeta_core.bundle.common.BUNDLE_ARCHIVE_MIME_TYPE = 'application/x-gtar'

MIME type for bundle archive files

owmeta_core.bundle.common.BUNDLE_INDEXED_DB_NAME = 'owm.db'

Base name of the indexed database that gets built in a bundle directory during installation

owmeta_core.bundle.common.BUNDLE_MANIFEST_FILE_NAME = 'manifest'

Name of the manifest file in a bundle directory or archive

owmeta_core.bundle.common.BUNDLE_MANIFEST_VERSION = 1

Current version number of the bundle manifest. Written by Installer and anticipated by Deployer and Fetcher.