Added support to accept regex parameter as part of `airshipctl secret
generate encryptionkey` command. This allows user to pass regex parameter
so that the passphrase generated matches the regex.
Relates-To: #398
Change-Id: I3914e6a896bb669e3974fe67c466336e15989a8d
Currently airshipctl will overwrite an existing config file
by default during config init execution. This patch adds an
appropriate flag to explicitly control whether the user wants
to overwrite an existing file or not.
Change-Id: I9f4756b98e9d1245145809aed203974e99feb662
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
The below code changes the `airshipctl secret generate masterpassphrase`
command to `airshipctl secret generate encryptionkey`. This command will
be further enhanced to support regex fields while generating encryption key.
Relates-To: #398
Change-Id: I87626cb410fd19beeb8cd23a5b86d61c48b63e63
This reverts commit 9a608de653ffe1ce8f60b5f16249e2152b3522ad.
Requesting revert because of the sops+gpg testcase failure issues. The failed testcases are impacting airship-airshipctl-lint-unit zuul gate.
For more details please refer to https://github.com/airshipit/airshipctl/issues/378
Change-Id: I60f6b5daaeebc038b68556c60413b3d0c6db6d68
This change removes the SubPath entry portion of the config manifests, and
refactors several areas that used it. This also updates unit tests to
reflect the new changes.
Closes: #255
Change-Id: Ibbb519a3f1fb28a1594e971274c5de54b99c867e
This is first step in refactoring remote package to support
future inventory interface, also relates to remote-direct
executor, as it simplifies usage of Host objects
Relates-To: #362
Change-Id: Ief2fece134a465916ce461960cd7d16c9e237eb7
Relates-To: #362
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
We perform almost the same activities prior calling createBootstrapIso
function like we do that in phase executor, also image build command
now is techically outdated since it doesn't work because it fails with
"phase document was not found" error. This patch removes unnecessary
functions like GenerateBootstrapIso and runs image build command in
a phase way. Test coverage increases slightly (by 0.2%) by removing
partially duplicating code which was not tested properly. Minor bug
fixes included.
Change-Id: I545004cea721164838b296ae647a7651cde248ff
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
If no name or label filter specified baremetal operation will
be performed against all nodes with baremetalhost kind. Also,
baremeral cmd code was refactored and combined, which allowed
to remove duplicated code and slighlty improve test coverage
by reducing the number of untestable lines.
Change-Id: Ieadafdb9f55b995d4b47aeff1dc7233325f3191c
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #361
Closes: #361
Sometimes unit test for showProgress function fails if progress bar
was not finished before refreshing event occurs, so progress bar
prints to io.Writer its intermediate state (which is normal since
in regular terminal the output everytime overwrites by carriage
return), so expected and actual output become different. This PS
changes the concept of testing this function and adds the error
tracking of showProgress execution. Some other minor changes included.
Change-Id: I78b4fa9674d4412fa83c1e9320b686923cbe8084
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This patch provides the ability to show progress bar using
container logs (ubuntu/debian based only).
Change-Id: I86eebe4d368d81c4685fb27ca31b86cbb3dea08d
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #278
Currently we don't test document pull step by rewriting
manifest_directory variable as current source path, which
makes a mess in target_path, manifest_path and related paths
(concatenation of target_path+manifest_path won't return
an existing and proper location). This patch organizes
mentioned variables and enables document pull step which
starts working properly. The latest repo state used as
git source for this command.
Change-Id: I5abce73877441c7529f2f77add79cf410e2226d8
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
This patch moves all cluster status functionality from
cmd level to pkg level as well as unit tests, making code
cleaner and improving actual test coverage.
Change-Id: Ia811887b684b2129ca30dd90b5afc72e726271ff
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Command phase run will be used instead, so phase apply became no
longer needed.
Change-Id: I8bdbd6bcad7efbb03632978d8952700fc39d55ba
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
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
This module is no longer needed since all config preloading actions
were moved to config module and global flags are stored within root
level cmd.
Change-Id: I411f6717e5b3d2998706c35a82f1e7f1b2aef3a8
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
AirshipCTLSettings will no longer be used by any command, so this
patch removes it from root level.
Change-Id: I2aa1d80ab0785b498af1ac2c86334f9b0d9ff047
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
Config init command will no longer use AirshipCTLSettings for
defining a config object which needs to be saved.
Change-Id: I303f05a8df1e7439d1b3dcfd41cf2679d729a9f8
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Relates-To: #327
All the phase 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: I742c39788098c3185ce89936ea81cd461bf97af3
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