Skip to content

[Advisor] Issues to resolve prior to Advisor module GA #5343

@tjprescott

Description

@tjprescott

High Priority

  • advisor configuration get should be split into advisor configuration list since it returns a collection. --resource-group should not be an optional parameter since, as far as I can tell, a resource group can only have a single configuration.
  • advisor configuration get returns a format with nextLink and value. It should only return the contents of value. Any paging should be automatically handled by autorest.
  • The commands lack examples. When I try to create a configuration for a resource group I just get an object with code: ImproperScope. The help text should also make clear that low-cpu-threshold can only use used for the subscription, not per RG.
  • advisor configuration set should be called advisor configuration update as it displays PATCH-like behavior, not PUT-like behavior.
  • For me, az advisor recommendation generate produces no output. If there are no recommendations, something to that effect should be output.
  • az advisor configuration set should return the updated object instead of forcing the user to make a subsequent call to get.
  • The relationship between recommendation generate and recommendation list is not clear to me. Generate appears to do nothing and list returns an empty collection. Speculating here based on how the configuration set command works, I suspect that generate should immediately follow up with a list when it completes.
  • The help text for --ids in the recommendation enable/disable commands makes reference to "Resource Id" arguments. However, these aren't in a Resource Id Arguments group. You should be able to specify the resource by names (resource group and configuration name). Additionally, the --ids parameter doesn't seem to work, if I give GUIDs or full ARM resource IDs...

Recommended

  • recommendation: tests should use the built-in checks syntax instead of getting outputs in json and making assertions on them.
  • If there can only be a single configuration object per resource group, you could also simply make the enable/disable commands accept the resource group name (if you can enable/disable the subscription level one, there would need to be a mechanism for that).
  • The recommendation enable/disable commands could logically be folded into a single command.
  • There should be an advisor configuration show command that optionally accepts resource group and shows the single configuration for that group (or if omitted, the subscription config).
  • Since exclude is a property of a an Advisor configuration object, --exclude should be a three-state flag and --include is not needed.

Environment summary

Install Method (e.g. pip, interactive script, apt-get, Docker, MSI, edge build) / CLI version (az --version) / OS version / Shell Type (e.g. bash, cmd.exe, Bash on Windows)

azure-cli 2.0.25

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions