Skip to content

Display attachements related verbs/methods on the general opentf-ctl help message

Current situation

As of version 0.45.0 of the tools, the opentf-ctl --help message does not dipslay attachement related methods (get and cp),c.f message displayed below :

> opentf-ctl --help
opentf-ctl controls the OpenTestFactory orchestrators.

Find more information at: https://opentestfactory.org/tools/running-commands

Basic Commands:
  get workflows                    List active and recent workflows
  run workflow {filename}          Start a workflow
  get workflow {workflow_id}       Get a workflow status
  kill workflow {workflow_id}      Cancel a running workflow

Agent Commands:
  get agents                       List registered agents
  delete agent {agent_id}          De-register an agent

Channel Commands:
  get channels                     List known channels

Qualitygate Commands:
  get qualitygate {workflow_id}    Get quality gate status for a workflow
  describe qualitygate {workflow_id}
                                   Get description of a quality gate status for a workflow

Token Commands:
  generate token using {key}       Interactively generate a signed token
  check token {token} using {key}  Check if token signature matches public key
  view token {token}               Show token payload

Advanced Commands:
  get namespaces                   List accessible namespaces
  get subscriptions                List active subscriptions
  delete subscription {sub_id}     Cancel an active subscription

Other Commands:
  config                           Modify current opentf-tools configuration
  version                          List the tools version

Usage:
  opentf-ctl <command> [options]

Use "opentf-ctl <command> --help" for more information about a given command.
Use "opentf-ctl options" for a list of global command-line options (applies to all commands).

Yet opentf-ctl get attachments and opentf-ctl cp exists in this version. And their help messages can be accessed.

The problem is that one must know that these subcommands exist. This is I think a minor issue but still an issue

Desired outcome

opentf-ctl --help should display someting along the lines of :

> opentf-ctl --help
opentf-ctl controls the OpenTestFactory orchestrators.

Find more information at: https://opentestfactory.org/tools/running-commands

Basic Commands:
  get workflows                    List active and recent workflows
  run workflow {filename}          Start a workflow
  get workflow {workflow_id}       Get a workflow status
  kill workflow {workflow_id}      Cancel a running workflow

Agent Commands:
  get agents                       List registered agents
  delete agent {agent_id}          De-register an agent

Channel Commands:
  get channels                     List known channels

Qualitygate Commands:
  get qualitygate {workflow_id}    Get quality gate status for a workflow
  describe qualitygate {workflow_id}
                                   Get description of a quality gate status for a workflow

Token Commands:
  generate token using {key}       Interactively generate a signed token
  check token {token} using {key}  Check if token signature matches public key
  view token {token}               Show token payload

Advanced Commands:
  get namespaces                   List accessible namespaces
  get subscriptions                List active subscriptions
  delete subscription {sub_id}     Cancel an active subscription

Attachments commands: 
  get attachments {workflow_id}    List workflow attachments
  cp {workflow_id:(attachment_id|pattern} 
                                   Get a local copy of a workflow attachment of workflow attachments
Other Commands:
  config                           Modify current opentf-tools configuration
  version                          List the tools version

Usage:
  opentf-ctl <command> [options]

Use "opentf-ctl <command> --help" for more information about a given command.
Use "opentf-ctl options" for a list of global command-line options (applies to all commands).