cmd: Move elasticsearch create to deployment API #67
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a breaking change which breaks backwards compatibility with the
previously released behavior of deployment elasticsearch create since
the "--capacity" flag now disappears in favour of a "--size" flag.
Additionally the accepted ElasticsearchPayload from both stdin and the
"--file" flag might be different after this change. In any case there's
a very detailed help and examples section for this command.
Furthermore, specified a version through the "--version" flag is not
required anymore, this is caused by more user-friendly behavior which
now auto-discovers the latest Elastic Stack version for the platform and
uses that as a default.
To keep the ability to track creating deployments a new function called
depresource.TrackResources
is introduced which has the caveat of notsupporting AppSearch change tracking since the structure is different
under th /deployments API. This is of course less than ideal but it's
also not the scope of that PR to introduce a fucntion which can track
AppSearch workloads. This will be done in a future PR.
Most importantly for this PR is underestanding that the user will now be
faced with a much larger set of configurable options, yet the basic user
won't have too know as much Deployment Templates and toplogies which can
form an Elasticsearch deployment and the its settings, since none of the
flags is required off the bat.
Last, an new function
cmdutil.DecodeDefinition
is introduced so it canbe re-used with commands that accept both a file flag and also a stdin
piping with the same contents as the file.
TODO
elasticsearch.Create
code (ae757de)Related Issues
Resolves #62
How Has This Been Tested?
Manually (See markdown examples)
Types of Changes