Skip to content

Commit 9fdaa2e

Browse files
deckhouse-BOaTswainhardcoretimefl64
authored
Backport: chore(cli): enhance VMOP help in D8 CLI (#1993)
chore(cli): enhance VMOP help in D8 CLI (#1991) The help command should display the correct description for the `force` parameter. Signed-off-by: Roman Sysoev <roman.sysoev@flant.com> Co-authored-by: Roman Sysoev <36233932+hardcoretime@users.noreply.github.com> Co-authored-by: Pavel Tishkov <pavel.tishkov@flant.com>
1 parent 6d2266c commit 9fdaa2e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/cli/internal/cmd/lifecycle/lifecycle.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ func DefaultOptions() Options {
8282
}
8383
}
8484

85+
// TODO: If none of the flags are set, the operation output appears as if the `CreateOnly` flag is `true`,
86+
// although in reality, it is `false`. This flag should be refactored.
87+
// Consider changing it to a `silence` flag, which could be useful in scripting.
8588
type Options struct {
8689
Force bool
8790
WaitComplete bool
@@ -144,7 +147,7 @@ func (l *Lifecycle) Usage() string {
144147
{{ProgramName}} {{operation}} --%s=1m myvm
145148
# Configure wait vm phase (default: wait=%v)
146149
{{ProgramName}} {{operation}} --%s myvm`, opts.Timeout, timeoutFlag, opts.WaitComplete, waitFlag), "{{operation}}", string(l.cmd))
147-
if l.cmd != Start && l.cmd != Evict {
150+
if l.cmd != Start && l.cmd != Evict && l.cmd != Migrate {
148151
usage += fmt.Sprintf(`
149152
# Configure shutdown policy (default: force=%v)
150153
{{ProgramName}} %s --%s myvm`, opts.Force, l.cmd, forceFlag)
@@ -218,7 +221,7 @@ func AddCommandLineArgs(flagset *pflag.FlagSet, opts *Options) {
218221
flagset.BoolVarP(&opts.WaitComplete, waitFlag, waitFlagShort, opts.WaitComplete,
219222
"Set this flag to wait for the operation to complete.")
220223
flagset.BoolVarP(&opts.CreateOnly, createOnlyFlag, createOnlyFlagShort, opts.CreateOnly,
221-
"Set this flag for create operation only.")
224+
"Set this flag to only create the action without status warnings or notifications.")
222225
flagset.DurationVarP(&opts.Timeout, timeoutFlag, timeoutFlagShort, opts.Timeout,
223226
"Set this flag to change the timeout.")
224227
}

0 commit comments

Comments
 (0)