AWS recently added support for tagging CloudFront distributions,
which allows us to start managing them via Salt
as we can insert a Salt-controlled identifier as a `Name` tag.
(CloudFront distributions get unique IDs generated by AWS,
which we can't predict and thus use to manage them idempotently.)
Some states are complicated and multiple subparts,
or maybe cross-call into __states__ if they manage subresources.
In these cases, they will have multiple comments.
Make this more ergonomic by supporting a list of strings as the
value for ret['comment'] in state returns and documenting this.
By joining comments on newlines, it is possible to combine
single-line and multi-line comments cleanly, as opposed to e.g. commas.
The driving impetus for this is some of the boto modules.
An update to the boto_sqs module is included as an example.
Add a check that outgoing state return data has the right shape,
and add a testcase as well.
Fix the NPM state tests and the saltmod runner & wheel state functions
to comply with the prescribed format.
Moves the following functions from `salt.utils` to `salt.utils.state`:
- gen_state_tag
- search_onfail_requisites
- check_onfail_requisites
- check_state_result
Original functions have a deprecation warning added and all references
in Salt code were updated to use the new function path, including moving
some unit tests.
Currently, in test mode states always return None even on failure.
This masks failed states in highstate output,
which instead just look like they are going to make changes.
In some cases states can determine if they will fail even on a dry run,
e.g., if an API call to a service to determine the state of a
resource fails due to invalid credentials or a missing parameter.
In these cases, allow returning a result of False even in dry runs
to enable catching more errors at testing time.
* Add Ingest pipeline methods to Elasticsearch execution module
* Refactor Elasticsearch execution module and properly handle exceptions
* Throw CommandExecutionError in methods applicable for different Elasticsearch versions
* Refactor Elasticsearch states to reflect execution module changes
* Add state for managing Elasticsearch pipelines
* Fix few typos in Elasticsearch module, return None when deleted document doesn't exist
* Implements stats and health methods for Elasticsearch
* Add Elasticsearch methods to open/close index, manage search templates and repositories
* Merge existing Elasticsearch states into single one, add Search Template handling
* Add index alias state for Elasticsearch, fix documentation
* Catch all global exceptions in Elasticsearch states, unit test all of them
* Implement few Unit tests for Elasticsearch execution module, merge fixes into deprecated elastic states
* Implement additional unit tests for Elasticsearch execution module
* Finalize Elasticsearch module documentation
This does the following:
- Splits states for container/volume/image/network management into four
separate state modules.
- Preserves backward compatibility by making ``docker.image_present``
invoke ``docker_image.present``, etc.
- Changes how Salt detects that a container needs to be replaced.
Instead of comparing each passed argument to the named container's
configuration, it creates a temporary container, and compares that
container to the named container. If the two differ, then the older
container is removed, and the new one is renamed and started, becoming
the named container.
- Removes the unit tests for container management and replaces them with
integration tests.
- Adds unit tests for the new salt.utils.docker
In 2014.7.0, default matcher in the top file was changed to the compound
matcher, but the docs still suggest that it is the glob matcher. This
commit updates the docs to explicitly mention that the compound matcher
is now the default, and adds a table describing all of the available
matchers that can be set in the top file.