idmtools.registry.platform_specification module#
PlatformSpecification provided definition for the platform plugin specification, hooks, and plugin manager.
Copyright 2021, Bill & Melinda Gates Foundation. All rights reserved.
- class idmtools.registry.platform_specification.PlatformSpecification[source]#
Bases:
PluginSpecification
,ABC
PlatformSpecification for Platform Plugins.
- classmethod get_name(strip_all: bool = True) str [source]#
Get name of plugin. By default we remove the PlatformSpecification portion.
- Parameters:
strip_all – When true, PlatformSpecification is stripped from name. When false only Specification is Stripped
- Returns:
Name of plugin
- example_configuration()[source]#
Example configuration for the platform. This is useful in help or error messages.
- Returns:
Example configuration
- get(configuration: dict) IPlatform [source]#
Return a new platform using the passed in configuration.
- Parameters:
configuration – The INI configuration file to use.
- Returns:
The new platform.
- get_configuration_aliases() Dict[str, Dict] [source]#
Get a list of configuration aliases for the platform.
A configuration alias should be in the form of “name” -> “Spec, Config Options Dict” where name is the alias the user will use, and the config options is a dictionary of config options to be passed to the item Returns:
- class idmtools.registry.platform_specification.PlatformPlugins(strip_all: bool = True)[source]#
Bases:
SingletonMixin
PlatformPlugin registry.
- __init__(strip_all: bool = True) None [source]#
Initialize the Platform Registry. When strip all is false, the full plugin name will be used for names in map.
- Parameters:
strip_all – Whether to strip common parts of name from plugins in plugin map
- get_plugins() Set[PlatformSpecification] [source]#
Get platform plugins.
- Returns:
Platform plugins
- get_aliases() Dict[str, Tuple[PlatformSpecification, Dict]] [source]#
Get Platform Configuration Aliases for Platform Plugin.
- Returns:
Platform CConfiguration Aliases
- get_plugin_map() Dict[str, PlatformSpecification] [source]#
Get plugin map for Platform Plugins.
- Returns:
Plugin map