freckles¶
This is the documentation of freckles.
Contents¶
License¶
The Parity Public License 6.0.0
Contributor: Markus Binsteiner
Source Code: https://gitlab.com/freckles-io/freckles
This license lets you use and share this software for free, as long as you contribute software you make with it. Specifically:
If you follow the rules below, you may do everything with this software that would otherwise infringe either the contributor’s copyright in it, any patent claim the contributor can license, or both.
- Contribute changes and additions you make to this software.
- If you combine this software with other software, contribute that other software.
- Contribute software you develop, deploy, monitor, or run with this software.
- Ensure everyone who gets a copy of this software from you, in source code or any other form, gets the text of this license and the contributor and source code lines above.
- Do not make any legal claim against anyone accusing this software, with or without changes, alone or with other software, of infringing any patent claim.
To contribute software, publish all its source code, in the preferred form for making changes, through a freely accessible distribution system widely used for similar source code, and license contributions not already licensed to the public on terms as permissive as this license accordingly.
You are excused for unknowingly breaking 1, 2, or 3 if you contribute as required, or stop doing anything requiring this license, within 30 days of learning you broke the rule.
As far as the law allows, this software comes as is, without any warranty, and the contributor will not be liable to anyone for any damages related to this software or this license, for any kind of legal claim.
Contributors¶
- Markus Binsteiner <markus@frkl.io>
freckles¶
freckles package¶
Subpackages¶
freckles.adapters package¶
-
class
freckles.adapters.freckles.freckles_adapter_freckles.
FrecklesAdapterFreckles
(name, context)[source]¶ Bases:
freckles.adapters.adapters.FrecklesAdapter
-
get_resources_for_task
(task)[source]¶ Return a map of paths to all resources that are necessary for this task.
-
-
class
freckles.adapters.shell.freckles_adapter_shell.
FrecklesAdapterShell
(name, context)[source]¶ Bases:
freckles.adapters.adapters.FrecklesAdapter
-
get_resources_for_task
(task)[source]¶ Return a map of paths to all resources that are necessary for this task.
-
prepare_execution_requirements
(run_config, parent_task)[source]¶ Prepares all external dependencies that are needed for this adapter to successfully run an execution.
Should throw an exception if it fails.
Returns: a version indicator Return type: int
-
shell_adapter_contex
¶
-
-
class
freckles.adapters.shell.processors.
ShellCommandProcessor
[source]¶ Bases:
freckles.adapters.shell.processors.ShellTaskTypeProcessor
-
class
freckles.adapters.shell.processors.
ShellScriptProcessor
(scriptling_index)[source]¶ Bases:
freckles.adapters.shell.processors.ShellTaskTypeProcessor
-
class
freckles.adapters.shell.processors.
ShellScriptTemplateProcessor
[source]¶ Bases:
freckles.adapters.shell.processors.ShellTaskTypeProcessor
-
class
freckles.adapters.adapters.
FrecklesAdapter
(adapter_name, context, config_schema, run_config_schema)[source]¶ Bases:
object
-
context
¶
-
get_resources_for_task
(task)[source]¶ Return a map of paths to all resources that are necessary for this task.
-
name
¶
-
freckles.context package¶
-
class
freckles.context.config.
ContextConfig
(alias, config_chain=None, extra_repos=None, use_community=False, config_unlocked=False)[source]¶ Bases:
object
-
cnf
¶
-
config_unlocked
¶
-
-
class
freckles.context.config.
ContextConfigTingCast
[source]¶ Bases:
ting.ting_cast.TingCast
A
TingCast
to create freckles profiles by reading yaml files.-
CNF_PROFILE_ATTRIBUTES
= [<ting.ting_attributes.FileStringContentAttribute object>, <ting.ting_attributes.FrontmatterAndContentAttribute object>, <ting.ting_attributes.ValueAttribute object>, <ting.ting_attributes.DictContentAttribute object>]¶
-
-
class
freckles.context.config.
ContextConfigs
(repo_name, tingsets, cnf, **kwargs)[source]¶ Bases:
ting.tings.TingTings
A class to manage freckles profiles.
This reads all ‘*.profile’ files in the freckles config folder. Those are later used to create a freckles context (per profile). It also checks whether there exists a ‘default.profile’ file with the ‘accept_freckles_license’ value set to ‘true’. Only if that is the case will it allow custom profiles (mainly for security reasons - the user should explicitely accept that certain configurations can be insecure).
-
DEFAULT_TING_CAST
¶ alias of
ContextConfigTingCast
-
-
class
freckles.context.freckles_context.
FrecklesContext
(context_name, config)[source]¶ Bases:
object
-
adapters
¶
-
callbacks
¶
-
context_name
¶
-
frecklet_index
¶
-
frkl_pkg
¶
-
load_frecklet
(frecklet_full_path_or_name_or_content, validate=False)[source]¶ Loads a frecklet.
First, checksi if argument is a path and exists. If that is the case, uses that to create the frecklet. If not, tries to find a frecklet with the provided name. If that doesn’t exists either, it tries to interprete the string as frecklet content.
-
freckles.frecklet package¶
-
class
freckles.frecklet.arguments.
CliArgumentsAttribute
(target_attr_name='cli_arguments', source_attr_name='vars_frecklet')[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
CLICK_CEREBUS_ARG_MAP
= {'boolean': <class 'bool'>, 'dict': <frutils.parameters.VarsTypeSimple object>, 'float': <class 'float'>, 'integer': <class 'int'>, 'password': <class 'str'>, 'string': <class 'str'>}¶
-
DEFAULT_CLI_SCHEMA
= {'param_type': 'option', 'show_default': True}¶
-
-
class
freckles.frecklet.arguments.
VariablesAttribute
(target_attr_name='vars_frecklet', default_argument_description=None)[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
FreckletAugmentMetadataAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
FreckletExplodedAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
FreckletHtmlAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
FreckletMarkdownAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
FreckletMetaAttribute
[source]¶ Bases:
ting.ting_attributes.ValueAttribute
-
class
freckles.frecklet.frecklet.
FreckletValidAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
FreckletsTemplateKeysAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
PagelingContentAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.frecklet.
PagelingMetadataAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
Bases:
ting.ting_attributes.TingAttribute
Return a list of attributes this object will add to a Ting.
Return an list of attributes this object requires to be able to augment the Ting.
-
class
freckles.frecklet.tasks.
AddRootFreckletProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
-
class
freckles.frecklet.tasks.
CleanupFreckletProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
-
class
freckles.frecklet.tasks.
CommandNameProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
Adds potential missing command/name keys.
-
class
freckles.frecklet.tasks.
DirectParentArgsProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
Adds arguments for ‘direct’ parents.
For example if a frecklet has something like:
- user-exists:
- name: “{{:: name ::}}”
Where the variable name stays the same, and no filter is involved, the args will be inherited directly.
-
class
freckles.frecklet.tasks.
ExplodedArgsProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
Sets the exploded args property.
-
class
freckles.frecklet.tasks.
FreckletsAttribute
[source]¶ Bases:
ting.ting_attributes.ValueAttribute
-
class
freckles.frecklet.tasks.
MoveEmbeddedTaskKeysProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
Moves keys that start with __task__ from the vars to the task sub-dict.
-
class
freckles.frecklet.tasks.
SpecialCaseProcessor
(**init_params)[source]¶ Bases:
frkl.processors.ConfigProcessor
Makes sure that no keywords are in vars.
-
class
freckles.frecklet.tasks.
TaskListDetailedAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
FRECKLET_FORMAT
= {'child_marker': 'frecklets', 'default_leaf': 'frecklet', 'default_leaf_key': 'name', 'key_move_map': {'*': ('vars', 'default')}, 'other_keys': ['args', 'doc', 'meta', 'frecklet', 'task'], 'use_context': False}¶
-
-
class
freckles.frecklet.tasks.
TaskListResolvedAttribute
[source]¶ Bases:
ting.ting_attributes.TingAttribute
-
class
freckles.frecklet.vars.
VarCast
(prefix)[source]¶ Bases:
ting.ting_cast.TingCast
-
VAR_ATTRS
= []¶
-
freckles.utils package¶
Generic configuration class.
-
freckles.utils.doc_utils.
describe_tasklist_in_markdown
(tasklist, use_short_help_name_as_title=False)[source]¶
-
freckles.utils.doc_utils.
describe_tasklist_string
(tasklist, use_short_help_name_as_title=False)[source]¶
-
class
freckles.utils.host_utils.
FrecklesRunTarget
(context, target_dict=None, target_string=None)[source]¶ Bases:
object
-
become_pass
¶
-
config
¶
-
connection_type
¶
-
host
¶
-
port
¶
-
protocol
¶
-
ssh_key
¶
-
ssh_pass
¶
-
user
¶
-
Submodules¶
freckles.defaults module¶
freckles.exceptions module¶
-
exception
freckles.exceptions.
FrecklesConfigException
(keys=None, msg=None, solution=None, reason=None, references=None)[source]¶ Bases:
frutils.exceptions.FrklException
-
exception
freckles.exceptions.
FrecklesPermissionException
(key=None, msg=None, solution=None, reason=None, addition_references=None)[source]¶ Bases:
frutils.exceptions.FrklException
-
exception
freckles.exceptions.
FrecklesUnlockException
(message)[source]¶ Bases:
frutils.exceptions.FrklException
-
exception
freckles.exceptions.
FrecklesVarException
(frecklet=None, var_name=None, message=None, errors=None, task_path=None, vars=None, task=None)[source]¶ Bases:
frutils.exceptions.FrklException
-
exception
freckles.exceptions.
FreckletBuildException
(frecklet, msg, solution=None, reason=None, references=None)[source]¶ Bases:
frutils.exceptions.FrklException
freckles.frecklecutable module¶
-
class
freckles.frecklecutable.
Frecklecutable
(frecklet, context)[source]¶ Bases:
object
-
context
¶
-
frecklet
¶
-