runway.cfngin.actions.diff module¶
CFNgin diff action.
-
class
runway.cfngin.actions.diff.
DictValue
(key, old_value, new_value)[source]¶ Bases:
object
Used to create a diff of two dictionaries.
Instantiate class.
-
ADDED
= 'ADDED'¶
-
REMOVED
= 'REMOVED'¶
-
MODIFIED
= 'MODIFIED'¶
-
UNMODIFIED
= 'UNMODIFIED'¶
-
formatter
= '%s%s = %s'¶
-
-
runway.cfngin.actions.diff.
diff_dictionaries
(old_dict, new_dict)[source]¶ Calculate the diff two single dimension dictionaries.
-
runway.cfngin.actions.diff.
format_params_diff
(parameter_diff)[source]¶ Handle the formatting of differences in parameters.
- Parameters
parameter_diff (List[
DictValue
]) – A list ofDictValue
detailing the differences between two dicts returned bydiff_dictionaries()
.- Returns
A formatted string that represents a parameter diff
- Return type
-
runway.cfngin.actions.diff.
diff_parameters
(old_params, new_params)[source]¶ Compare the old vs. new parameters and returns a “diff”.
If there are no changes, we return an empty list.
- Parameters
old_params (Dict[Any, Any]) – old paramters
new_params (Dict[Any, Any]) – new parameters
- Returns
A list of differences.
- Return type
List[
DictValue
]
-
class
runway.cfngin.actions.diff.
Action
(context, provider_builder=None, cancel=None)[source]¶ Bases:
runway.cfngin.actions.build.Action
Responsible for diffing CloudFormation stacks in AWS and locally.
Generates the build plan based on stack dependencies (these dependencies are determined automatically based on references to output values from other stacks).
The plan is then used to create a changeset for a stack using a generated template based on the current config.
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
= 'Diff stacks'¶
-
NAME
= 'diff'¶