question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Table output of Azure CLI 2.0 is not as user friendly as default output of Azure CLI 1.0

See original GitHub issue

For instance under 1.0:

$ azure vm list-usage -l eastus  | head
info:    Executing command vm list-usage
data:    Name                          Unit   CurrentValue  Limit
data:    ----------------------------  -----  ------------  -----
data:    Availability Sets             Count  0             2000 
data:    Total Regional Cores          Count  246           560  
data:    Virtual Machines              Count  38            10000
data:    Virtual Machine Scale Sets    Count  0             2000 
data:    Standard NC Family Cores      Count  246           558  
data:    Basic A Family Cores          Count  0             20   
data:    Standard A0-A7 Family Cores   Count  0             20   

now same command with 2.0:

$ az vm list-usage -l eastus -o table | head
  Limit    CurrentValue
-------  --------------
   2000
    560             246
  10000              38
   2000
    558             246
     20
     20
     20

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ogriselcommented, Mar 1, 2017

I found that this is not the only command. Pretty much all the az commands lack important infos that are displayed by default with the matching azure commands. For instance:

$ az vm list -o table
Name                    ResourceGroup           Location
----------------------  ----------------------  --------------
vm-name1                GROUP1                  eastus
vm-name2                GROUP1                  eastus

vs

$ azure vm list
data:    ResourceGroupName       Name                    ProvisioningState  PowerState      Location        Size         
data:    ----------------------  ----------------------  -----------------  --------------  --------------  -------------
data:    GROUP1                  vm-name1                Succeeded          VM deallocated  eastus          Standard_NC6 
data:    GROUP1                  vm-name2                Succeeded          VM deallocated  eastus          Standard_NC6 

I think a systematic review of all the commands is needed to ensure that UX is not degraded when switching from azure CLI 1.0 to azure CLI 2.0.

0reactions
yugangw-msftcommented, Nov 29, 2018

Closing this as both cases were taken care of. For showing powerState through -d, we would like keep this way, as it involves more expensive API invocation so opt-in is reasonable. For other commands, we have already fixed a lot. Let us can open individual ones for specific commands

Read more comments on GitHub >

github_iconTop Results From Across the Web

Output formats for Azure CLI commands - Microsoft Learn
Learn how to format the output of Azure CLI commands to tables, lists or json. ... The Azure CLI uses JSON as its...
Read more >
Release notes & updates – Azure CLI - Microsoft Learn
Learn about the latest Azure Command-Line Interface (CLI) release notes and updates for both the current and beta versions of the CLI.
Read more >
Output as table not working in Azure cli - Microsoft Q&A
Output as table not working in Azure cli. I have tried to get the output in table format, but not working in Azure...
Read more >
How to query Azure resources using the Azure CLI
The Azure CLI can be used to not only create, configure, and delete resources from Azure but to also query data from Azure....
Read more >
Get started with Azure Command-Line Interface (CLI)
Install or run in Azure Cloud Shell. The easiest way to learn how to use the Azure CLI is by running it in...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found