wiz.registry¶
-
wiz.registry.get_local()[source]¶ Return the local registry if available.
Returns: ~/.wiz/registryor None.
-
wiz.registry.get_defaults()[source]¶ Return the default registries.
Returns: List of default registry paths. See also
-
wiz.registry.fetch(paths, include_local=True, include_working_directory=True)[source]¶ Fetch all registries from paths.
Parameters: - paths – List of paths to consider as registry paths if available.
- include_local – Indicate whether the local registry should be included.
- include_working_directory – Indicate whether the current working directory should be parsed to discover registry folders.
Returns: List of valid registry paths.
-
wiz.registry.discover(path)[source]¶ Yield available registry folders from path folder hierarchy.
Each folder constituting the hierarchy of path are parsed so that existing
.wiz/registryfolders can be yield from the deepest to the closest.Example:
>>> list(discover("/jobs/ads/project/identity/shot")) [ "/jobs/ads/project/.wiz/registry", "/jobs/ads/project/identity/shot/.wiz/registry" ]
Parameters: path – Path to discover registries from. Returns: List of valid registry paths. See also
-
wiz.registry.install_to_path(definitions, registry_path, overwrite=False)[source]¶ Install a list of definitions to a registry on the file system.
Parameters: - definitions – List of
wiz.definition.Definitioninstances. - registry_path – Targeted registry path to install to
- overwrite – Indicate whether existing definitions in the target registry should be overwritten. Default is False.
Raise: wiz.exception.DefinitionsExistif definitions already exist in the target registry and overwrite is False.Raise: wiz.exception.InstallNoChangesif definitions already exists in the target registry and no changes is detected.Raise: wiz.exception.InstallErrorif the target registry path is not a valid directory.Raise: OSErrorif definitions can not be exported in registry_path.- definitions – List of