The description and examples are updated for the airshipctl
commands, which will be inturn used for generating documentation.
Please ignore the .md file changes in this PS. They are added for zuul
gates to pass. Here is the PS with generated documention
files https://review.opendev.org/c/airship/airshipctl/+/789250
Relates-To: #280
Change-Id: If3ec175e2f582919296576a4bff6ae64871a7333
* command internal logic was revised and optimized
* added ability to delete/reset context fields
* unit tests were reorganized, new cases were added
Change-Id: Ie35d11405e88fea21abf33cb75f44b03bb4644fd
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #348
This reverts commit 694067492cfedd5e7b369b396bfce9923c0ca3a1.
Reason for revert: Encryption configs inside airship config are
no longer required. Encrypt feature was implemented different way.
Change-Id: I1c8feec75000402e314e815e4832ce740f0e1254
We don't use clustertype anymore, so all the related functions must
be deleted or adjusted as well as appropriate config fields.
Change-Id: I3931fdc71d4318e916f8bbc2d94e062c9df5f641
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #349
All of these entities are no longer required and should be deleted.
Change-Id: Id4776efe668265df6961a38ce984b8ac37b27097
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
All the config commands was refactored for usage with new config
factory. Config object now is being initialized in pkg module on demand,
which provides more flexibility and cleaner code.
Change-Id: Ibad0985e30c16efa96109a49edf2840c60305df8
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
This commit cleans up the command constructors in an attempt to make the
codebase more uniform and approachable. This includes several refactors:
* Removed the FlagConstants - this makes the help messages and examples
significantly more readable without needed to compile and run
airshipctl
* Long help messages and examples are now constant
* Short, Long, and Examples all begin with a capitol letter
* Flag descriptions begin with a lowercase letter. This matches the flag
description for the builtin "help" flag, making formatting uniform for
all flags
* Removed redundant unit tests on non-leaf commands
This change also updates the documentation for the affected commands.
Change-Id: I8b9dcbfd9846b3deaab06dec17f80643dae78de9
This change removes the getters and setters for the following attributes
of pkg/environment.AirshipCTLSettings:
* airshipConfigPath
* kubeConfigPath
* config
The above attributes have been exported to account for the removal of
these methods.
Change-Id: I4e7d38bf6771f7521179a2fe2990475b936b5d95
* argument for set-context is optional, so removing the assignment of args[0] to Name.
Already conditionally the args[0] is assigned if passed
Change-Id: Ib3232fc19cbaa2cf3dd14b46e910def5d20fed52
Users can change their current context by executing airshipctl config
set-context [NAME]. The use-context subcommand was recently introduced
to replace this behavior. This change removes the original behavior.
Closes #56
Change-Id: Ib962d1d69a198c897aff18759fef869ee04d1beb
Signed-off-by: Drew Walters <andrew.walters@att.com>
* Added --current flag to set-context command to use current-context
when context not provided
* Added validation to throw error when both context and --current flag
* Updated golden files to match the recent change
given
* Added validation to check if current context is set when --current
flag is provided
Old Format: airshipctl config set-context default --manifest default --namespace default
New Format: airshipctl config set-context --current --manifest default --namespace default
Change-Id: I9ffe3a34f33ffd7ff03ca42de7609f91f5386b37
Executing "airshipctl config set-context [NAME]" misleadingly prints a
message saying the context has been modified, but doesn't change to that
context or modify any context values. This change modifies the behavior
of context command to switch to a provided context when no flags are
specified. It also removes the current-context flag, which becomes
redundant with this change.
Change-Id: I2622fbf59539513feb1236f13b9090978aeb81ef
Signed-off-by: Drew Walters <andrew.walters@att.com>
Fixes possible name collisions between variable names and package names
Remove redundant import naming
Use nil slices for slice declarations instead of empty slices
Use make for slices of fixed lengths
Remove redundant parentheses
Replace deprecated `SetOutput` method with `SetOut`
Fix swapped actual/expected arguments on assertEqualGolden
Change-Id: Ia39ef44372c3e44948e5440575125bdb470898df
to manage authentication information for clusters.
Includes username/password, certificate
and token options.
Change-Id: If95e5bbf5c3ddc4732465e81de407d5ad416e8f2
This change causes the linter to be a bit more complainy. The hope is
that this will cut down on some of the more pedantic issues being caught
in code reviews, and thus reduce the overall time a change spends in the
review process.
This change includes various changes to the codebase to bring it up to
the new standards.
Change-Id: I570d304bca5554404354f972d8a2743279a0171b
Each of these include an option for --current-context that set or retrieves
the curret context
This patchset mainly creates the cmd/config and pkg/config require additions
Also includes a fync getCurrentContext(<CLUSTERTYPE>) in the config pkg
that other modules should rely on.
Introduces new ErrMissingConfig and ErrConfigFailed types been used by
set-context, will decimate through get/ and set/get cluster after this is
reviewed.
Change-Id: I501483a9db99f33f860eaf329a65bb0209b2aaff