scaleway-cli icon indicating copy to clipboard operation
scaleway-cli copied to clipboard

no autocomplete available for mnq get/delete/update credentials

Open remyleone opened this issue 2 years ago • 1 comments

$ scw mnq credential get
         --       region=

Here I should find a list of the credentials that exist in a given zone. If several namespace are available I should have a paginated example with a set of credentials in all the namespace.

remyleone avatar Mar 21 '23 13:03 remyleone

namespace-id is required for credential list. When doing scw mnq credential get <tab>, there is no namespace-id. It makes it impossible to list credentials for completions, current arguments completion would work otherwise.

It could be handled in the CLI, we could extend args completion to fetch missing arguments:

  • scw mnq credential get region=nl-ams <tab> -> fetch credential-id
  • scw mnq credential list region=nl-ams -> fetch list of missing namespace-id and aggregate a list of this request
  • scw mnq namespace list return all id

This would create a lot of requests for a completion behavior, I believe the list should be handled by the API without a required namespace

Codelax avatar Mar 22 '23 10:03 Codelax

I've managed to add some of the autocompletions for:

-scw mnq nats get-account -scw mnq nats list-credentials -scw mnq sqs list-credentials -scw mnq sqs get-credentials -scw mnq sns list-credentials -scw mnq sns get-credentials

However, for the NATS accounts, I agree with @Codelax that it would result in too many requests. I'm closing the ticket and will open a new one if it becomes necessary to do so for NATS.

#3700

jremy42 avatar Mar 06 '24 16:03 jremy42