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]
parse_json_yaml(data, ordered=True)[source]

parses yaml file into json object

process(file_w_path, data=None)[source]

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

  • file_w_path – Full path to the provided file to process
  • data – A JSON representation of data mapped to a Jinja2 template in file_w_path
render(template, context, ordered=True)[source]

Performs the rendering of template and context data using Jinja2.

  • template – Full path to the Jinja2 template
  • context – A dictionary of variables to be rendered againt the template
write_json(provision_data, pf_outfile)[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.exceptions.ValidationErrorHandler(tree=None)[source]
messages = {0: '{0}', 1: 'document is missing', 2: "field '{field}' is required", 3: "field '{field}' could not be recognized within the schema provided", 4: "field '{0}' is required", 5: 'depends on these values: {constraint}', 6: "{0} must not be present with '{field}'", 33: "'{0}' is not a document, must be a dict", 34: 'empty values not allowed', 35: 'null value not allowed', 36: "value for field '{field}' must be of type '{constraint}'", 37: 'must be of dict type', 38: 'length of list should be {constraint}, it is {0}', 39: 'min length is {constraint}', 40: 'max length is {constraint}', 65: "value does not match regex '{constraint}'", 66: 'min value is {constraint}', 67: 'max value is {constraint}', 68: "unallowed value '{value}' for field '{field}'. Allowed values are: {constraint}", 69: 'unallowed values {0}', 70: 'unallowed value {value}', 71: 'unallowed values {0}', 97: "field '{field}' cannot be coerced: {0}", 98: "field '{field}' cannot be renamed: {0}", 99: 'field is read-only', 100: "default value for '{field}' cannot be set: {0}", 129: "mapping doesn't validate subschema: {0}", 130: "one or more sequence-items don't validate: {0}", 131: "one or more keys of a mapping don't validate: {0}", 132: "one or more values in a mapping don't validate: {0}", 133: "one or more sequence-items don't validate: {0}", 145: 'one or more definitions validate', 146: 'none or more than one rule validate', 147: 'no definitions validate', 148: "one or more definitions don't validate"}
class linchpin.fetch.FetchLocal(ctx, fetch_type, src, dest, cache_dir, root)[source]
class linchpin.fetch.FetchHttp(ctx, fetch_type, src, dest, cache_dir, root='', root_ws='', ref=None)[source]
class linchpin.fetch.FetchGit(ctx, fetch_type, src, dest, cache_dir, root='', root_ws='', ref=None)[source]