Skip to content

az interactive: add flag to clear the cache #473

@mdavis-xyz

Description

@mdavis-xyz

Describe the bug

az group delete --name mygroup

works as a command, but not inside az interactive.

az group delete --help

returns

Arguments
    --name --resource-group -g -n [Required] : Name of resource group. You can configure the default

This clearly means that either --name or --resource-group is an acceptable flag for the name of the resource group you want to delete.

And az group delete --name mygroup does work.

If you run az interactive and type group delete -- the suggestions are

az>> group delete --name draw-demo
 --name            [Required] Name of resource group. You can configure the default group using `az configure --defaults group=<na...
 --resource-group  [Required] Name of resource group. You can configure the default group using `az configure --defaults group=<na...

This also makes it clear that either --name or --resource-group can be used.

However if you try to run the same command as before, but now in interactive mode, it fails.

$ az interactive
az>> group delete --name mygroup
az group delete: error: the following arguments are required: --resource-group/-g
usage: az group delete [-h] [--verbose] [--debug]
                       [--output {json,jsonc,table,tsv,yaml}]
                       [--query JMESPATH] --resource-group RESOURCE_GROUP_NAME
                       [--yes] [--no-wait] [--subscription _SUBSCRIPTION]

To Reproduce

$ az interactive
az>> group delete --name mygroup

Expected behavior

Group is successfully deleted

Actual Behavior

az group delete: error: the following arguments are required: --resource-group/-g
usage: az group delete [-h] [--verbose] [--debug]
                       [--output {json,jsonc,table,tsv,yaml}]
                       [--query JMESPATH] --resource-group RESOURCE_GROUP_NAME
                       [--yes] [--no-wait] [--subscription _SUBSCRIPTION]

Environment summary

  • Ubuntu 18
  • installed based on the official instructions
  • az --version:
azure-cli (2.0.54)
...

Extensions:
interactive (0.4.1)
...
Python (Linux) 3.6.5

Metadata

Metadata

Assignees

Labels

customer-reportedIssues that are reported by GitHub users external to the Azure organization.enhancementextension/interactivefeature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions