LinchPin Extra Modules

These are modules not documented elsewhere in the LinchPin API, but may be useful to a developer.

class linchpin.utils.dataparser.DataParser[source]
load_pinfile(pinfile)[source]
parse_json_yaml(data)[source]

parses yaml file into json object

process(file_w_path, data_w_path=None)[source]

Processes the PinFile and any data (if a template) using Jinja2. Returns json of PinFile, topology, layout, and hooks.

Parameters:
  • file_w_path – Full path to the provided file to process
  • targets – A tuple of targets to provision
  • run_id – An optional run_id if the task is idempotent or a destroy action
render(template, context)[source]

Performs the rendering of template and context data using Jinja2.

Parameters:
  • template – Full path to the Jinja2 template
  • context – A dictionary of variables to be rendered againt the template
run_script(script)[source]
write_json(provision_data, pf_outfile)[source]
linchpin.utils.dataparser.dict_constructor(loader, node)[source]
linchpin.utils.dataparser.dict_representer(dumper, data)[source]
exception linchpin.exceptions.ActionError(*args, **kwargs)[source]
exception linchpin.exceptions.ActionManagerError(*args, **kwargs)[source]
exception linchpin.exceptions.HookError(*args, **kwargs)[source]
exception linchpin.exceptions.LinchpinError(*args, **kwargs)[source]
exception linchpin.exceptions.SchemaError(*args, **kwargs)[source]
exception linchpin.exceptions.StateError(*args, **kwargs)[source]
exception linchpin.exceptions.TopologyError(*args, **kwargs)[source]
exception linchpin.exceptions.ValidationError(*args, **kwargs)[source]
class linchpin.fetch.FetchLocal(ctx, fetch_type, src, dest, cache_dir, root)[source]
fetch_files()[source]
class linchpin.fetch.FetchHttp(ctx, fetch_type, src, dest, cache_dir, root)[source]
call_wget(src, fetch_dir=None)[source]
fetch_files()[source]
class linchpin.fetch.FetchGit(ctx, fetch_type, src, dest, cache_dir, root)[source]
call_clone(fetch_dir=None)[source]
fetch_files()[source]