runway.cfngin.actions.base module¶
CFNgin base action.
-
runway.cfngin.actions.base.
build_walker
(concurrency)[source]¶ Return a function for waling a graph.
Passed to
runway.cfngin.plan.Plan
for walking the graph.If concurrency is 1 (no parallelism) this will return a simple topological walker that doesn’t use any multithreading.
If concurrency is 0, this will return a walker that will walk the graph as fast as the graph topology allows.
If concurrency is greater than 1, it will return a walker that will only execute a maximum of concurrency steps at any given time.
- Parameters
concurrency (int) – Number of threads to use while walking.
- Returns
Function to walk a
runway.cfngin.dag.DAG
.- Return type
Callable[.., Any]
-
runway.cfngin.actions.base.
stack_template_url
(bucket_name, blueprint, endpoint)[source]¶ Produce an s3 url for a given blueprint.
- Parameters
bucket_name (str) – The name of the S3 bucket where the resulting templates are stored.
blueprint (
runway.cfngin.blueprints.base.Blueprint
) – The blueprint object to create the URL to.endpoint (str) – The s3 endpoint used for the bucket.
- Returns
S3 URL.
- Return type
-
class
runway.cfngin.actions.base.
BaseAction
(context, provider_builder=None, cancel=None)[source]¶ Bases:
object
Actions perform the actual work of each Command.
Each action is tied to a
runway.cfngin.commands.stacker.base.BaseCommand
, and is responsible for building therunway.cfngin.plan.Plan
that will be executed to perform that command.-
cancel
¶ Cancel handler.
- Type
-
context
¶ The context for the current run.
-
provider_builder
¶ An object that will build a provider that will be interacted with in order to perform the necessary actions.
- Type
Optional[BaseProviderBuilder]
-
s3_conn
¶ Boto3 S3 client.
- Type
boto3.client.Client
Instantiate class.
- Parameters
context (
runway.cfngin.context.Context
) – The context for the current run.provider_builder (Optional[
BaseProviderBuilder
]) – An object that will build a provider that will be interacted with in order to perform the necessary actions.cancel (threading.Event) – Cancel handler.
-
DESCRIPTION
= 'Base action'
-
NAME
= None¶
-
property
provider
¶ Return a generic provider using the default region.
Used for running things like hooks.
-
build_provider
(stack)[source]¶ Build a
runway.cfngin.providers.base.BaseProvider
.- Parameters
stack (
runway.cfngin.stack.Stack
) – Stack the action will be executed on.- Returns
Suitable for operating on the given
runway.cfngin.stack.Stack
.- Return type
-