DCmanager deprecated commands help is still working

Bug #2064294 reported by Raphael Lima
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Raphael Lima

Bug Description

Brief Description
-----------------
These commands are deprecated, but their help is still working.

dcmanager subcloud reinstall
dcmanager subcloud-deploy show
dcmanager subcloud-deploy upload
dcmanager subcloud reconfig
dcmanager subcloud restore

Severity
-----------------
Minor

Steps to Reproduce
-----------------
dcmanager subcloud reinstall
ERROR (app) This command has been deprecated. Please use 'subcloud redeploy' instead.

dcmanager help subcloud reinstall

Expected Behavior
-----------------
dcmanager help subcloud reinstall shouldn't provide any output, output command not found or deprecation message.

Actual Behavior
-----------------
dcmanager help subcloud reinstall

usage: dcmanager subcloud reinstall [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width] [--print-empty]

Reinstall a subcloud.

optional arguments:
  -h, --help show this help message and exit

output formatters:
  output formatter options

  -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
                        the output format, defaults to table
  -c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated to show multiple columns

json formatter:
  --noindent whether to disable indenting the JSON

shell formatter:
  a format a UNIX shell can parse (variable="value")

  --prefix PREFIX add a prefix to all variable names

table formatter:
  --max-width <integer>
                        Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
  --fit-width Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
  --print-empty Print empty table if there is no data to show.

dcmanager help subcloud redeploy

usage: dcmanager subcloud redeploy [-h] [-f {json,shell,table,value,yaml}] [-c COLUMN] [--noindent] [--prefix PREFIX] [--max-width <integer>] [--fit-width] [--print-empty]
                                   [--install-values INSTALL_VALUES] [--bootstrap-values BOOTSTRAP_VALUES] [--deploy-config DEPLOY_CONFIG] [--sysadmin-password SYSADMIN_PASSWORD]
                                   [--bmc-password BMC_PASSWORD] [--release RELEASE]
                                   subcloud

Redeploy a subcloud.

positional arguments:
  subcloud Name or ID of the subcloud to redeploy.

optional arguments:
  -h, --help show this help message and exit
  --install-values INSTALL_VALUES
                        YAML file containing parameters required for the remote install of the subcloud.
  --bootstrap-values BOOTSTRAP_VALUES
                        YAML file containing subcloud configuration settings. Can be either a local file path or a URL.
  --deploy-config DEPLOY_CONFIG
                        YAML file containing subcloud variables to be passed to the deploy playbook.
  --sysadmin-password SYSADMIN_PASSWORD
                        sysadmin password of the subcloud to be configured, if not provided you will be prompted.
  --bmc-password BMC_PASSWORD
                        bmc password of the subcloud to be configured, if not provided you will be prompted. This parameter is only valid if the --install-values are specified.
  --release RELEASE software release used to install, bootstrap and/or deploy the subcloud with. If not specified, the current software release of the system controller will be used.

output formatters:
  output formatter options

  -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
                        the output format, defaults to table
  -c COLUMN, --column COLUMN
                        specify the column(s) to include, can be repeated to show multiple columns

json formatter:
  --noindent whether to disable indenting the JSON

shell formatter:
  a format a UNIX shell can parse (variable="value")

  --prefix PREFIX add a prefix to all variable names

table formatter:
  --max-width <integer>
                        Maximum display width, <1 to disable. You can also use the CLIFF_MAX_TERM_WIDTH environment variable, but the parameter takes precedence.
  --fit-width Fit the table to the display width. Implied if --max-width greater than 0. Set the environment variable CLIFF_FIT_WIDTH=1 to always enable
  --print-empty Print empty table if there is no data to show.

Reproducibility
-----------------
100%

System Configuration
-----------------
DC system

Last Pass
-----------------
N/A

Timestamp/Logs
-----------------
N/A

Alarms
-----------------
N/A

Workaround
-----------------
N/A

Raphael Lima (r-lima)
Changed in starlingx:
assignee: nobody → Raphael Lima (r-lima)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud-client (master)

Reviewed: https://review.opendev.org/c/starlingx/distcloud-client/+/917493
Committed: https://opendev.org/starlingx/distcloud-client/commit/b4a8ec19dc6078952a3762d7eee8d426d520a1f0
Submitter: "Zuul (22348)"
Branch: master

commit b4a8ec19dc6078952a3762d7eee8d426d520a1f0
Author: Raphael Lima <email address hidden>
Date: Mon Apr 29 18:13:57 2024 -0300

    Disable help for deprecated commands

    Deprecated commands in dcmanager are not allowed to execute
    when requested, but their help was displayed.
    In this commit, the dcmanager help <command> is disabled for
    subcloud reinstall, subcloud-deploy show, subcloud-deploy upload,
    subcloud reconfig and subcloud restore.

    Test plan:
    1. PASS: Run dcmanager help <command> displays the relevant
    deprecation message
    2. PASS: Run dcmanager <command> displays the relevant
    deprecation message and does not execute

    Closes-Bug: 2064294

    Change-Id: I2cbe4b79d83b157413fd46337f4437f0a27717f6
    Signed-off-by: Raphael Lima <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.10.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.