turbinia icon indicating copy to clipboard operation
turbinia copied to clipboard

[FR]: turbinia-client not showing flag help text

Open aarontp opened this issue 10 months ago • 3 comments

What would this feature improve or what problem would it solve?

Would be able to see more details of the flags to know how to use the client better.

What is the feature you are proposing?

Not sure why, but the turbinia client is not showing the help text for the flags here:

$ turbinia-client submit googleclouddisk -h
2023-10-13 16:53:38,575 INFO turbinia - Using configuration instance name -> default with host http://localhost:8000
Usage: turbinia-client submit googleclouddisk [OPTIONS]

Options:
  --project TEXT          [default: (project); required]
  --zone TEXT             [default: (zone); required]
  --disk_name TEXT        [default: (disk_name); required]
  --mount_partition TEXT  [default: (mount_partition)]
  --name TEXT             [default: (name)]
  --tags TEXT             [default: (tags)]
  --source TEXT           [default: (source)]
  --description TEXT      [default: (description)]
  --recipe_name TEXT      [default: (recipe_name)]
  --recipe_data TEXT      [default: (recipe_data)]
  --jobs_allowlist TEXT   [default: (jobs_allowlist)]
  --jobs_denylist TEXT    [default: (jobs_denylist)]
  --filter_patterns TEXT  [default: (filter_patterns)]
  --yara_rules TEXT       [default: (yara_rules)]
  --sketch_id TEXT        [default: (sketch_id)]
  --group_id TEXT         [default: (group_id)]
  --reason TEXT           [default: (reason)]
  --request_id TEXT       [default: (request_id)]
  --requester TEXT        [default: (requester)]
  -h, --help              Show this message and exit.

What alternatives have you considered?

No response

aarontp avatar Oct 13 '23 14:10 aarontp

FYI @jleaniz

aarontp avatar Oct 13 '23 14:10 aarontp

Yeah, these flags are automatically generated based on the object attributes, so I'm not sure how we could add text to that dynamically without hardcoding some text and mapping text to options. The only thing i can think of is to somehow grab the text from the class docstring if there's a way to do that.

jleaniz avatar Oct 13 '23 15:10 jleaniz

I'll give that a shot to see if we can use the class attributes docstring as a help message and pass this to the client via the API. I assume that's not an issue because the "submit" sub-commands wouldn't be generated without being able to contact the API in the first place.

jleaniz avatar Oct 13 '23 15:10 jleaniz