linchpin module¶
The linchpin module contains calls to implement the Command Line Interface within linchpin. It uses the Click command line interface composer.
-
class
linchpin.
LinchpinAliases
(name=None, commands=None, **attrs)¶ -
get_command
(ctx, name)¶ Track aliases for specific commands and the commands and return the correct action.
-
list_commands
(ctx)¶ Provide a list of available commands. Anhthing deprecated should not be listed
-
lp_aliases
= {'down': 'destroy', 'drop': 'destroy', 'rise': 'up'}¶
-
lp_commands
= ['init', 'up', 'destroy']¶
-
-
linchpin.
init
()¶ Initializes a linchpin project, which generates an example PinFile, and creates the necessary directory structure for topologies and layouts.
Parameters: ctx – Context object defined by the click.make_pass_decorator method
-
linchpin.
up
()¶ Provisions nodes from the given target(s) in the given PinFile.
Parameters: - ctx – Context object defined by the click.make_pass_decorator method
- pinfile – path to pinfile (Default: ctx.workspace)
- targets – Provision ONLY the listed target(s). If omitted, ALL targets in the appropriate PinFile will be provisioned.
-
linchpin.
destroy
()¶ Destroys nodes from the given target(s) in the given PinFile.
Parameters: - ctx – Context object defined by the click.make_pass_decorator method
- pinfile – path to pinfile (Default: ctx.workspace)
- targets – Destroy ONLY the listed target(s). If omitted, ALL targets in the appropriate PinFile will be destroyed.