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

SDN Recursive information not shown with table output format

Open malopMSFT opened this issue 10 years ago • 5 comments

The following commands does not show the recursive information from their objects:

az network vnet show -g "IMDS_Demo" -n "MyVnet2" -o table
az network vnet peering show -g "IMDS_Demo" --vnet-name "MyVnetToPeer2" -n "MyVnetPeering" -o table
az network lb show -g "IMDS_Demo" -n "MyLB" -o table
az network nic show -g "IMDS_Demo" -n "MyNIC2" -o table
az network nsg show -g "IMDS_Demo" -n "MyNSG" -o table
az network route-table show -g "IMDS_Demo" -n "MyRouteTable" -o table

All of this commands works recursively on PS CLI Samples attached azure_network_table_output.txt

malopMSFT avatar Nov 10 '16 23:11 malopMSFT

We intentionally don't call recursively out to ARM to get data. This has both performance issues as well as the tendency to run into ARM management hourly call quota limitations.

If we can get the additional information through expand, then we should consider that. Recursive data in tables is a feature that we'd have to spec out.

@tjprescott, can you please investigate the first part?

johanste avatar Jan 19 '17 22:01 johanste

@johanste: VNet, LB, NIC, NSG and route-table show all expose the --expand parameter. VNet peering does not so we could not expand that without additional REST calls.

tjprescott avatar Jan 26 '17 22:01 tjprescott

@johanste this actually is not an issue relevant to expand.

Az

az network nsg show -g tjp-nsg -n nsg1 -otable

Location    Name    ProvisioningState    ResourceGroup    ResourceGuid
----------  ------  -------------------  ---------------  ------------------------------------
westus      nsg1    Succeeded            tjp-nsg          8dd80586-bfa0-455e-90e1-36036e242d54

Xplat

azure network nsg show -g "IMDS_Demo" -n "MyNSG"
Id                              : /subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/networkSecurityGroups/MyNSG
Name                            : MyNSG
Type                            : Microsoft.Network/networkSecurityGroups
Location                        : eastus
Provisioning state              : Succeeded
Security rules:
Name                           Source IP          Source Port  Destination IP  Destination Port  Protocol  Direction  Access  Priority
-----------------------------  -----------------  -----------  --------------  ----------------  --------  ---------  ------  --------
MyRule                         *                  *            10.0.0.0/24     22                UDP       Inbound    Allow   1000
AllowVnetInBound               VirtualNetwork     *            VirtualNetwork  *                 *         Inbound    Allow   65000
AllowAzureLoadBalancerInBound  AzureLoadBalancer  *            *               *                 *         Inbound    Allow   65001
DenyAllInBound                 *                  *            *               *                 *         Inbound    Deny    65500
AllowVnetOutBound              VirtualNetwork     *            VirtualNetwork  *                 *         Outbound   Allow   65000
AllowInternetOutBound          *                  *            Internet        *                 *         Outbound   Allow   65001
DenyAllOutBound                *                  *            *               *                 *         Outbound   Deny    65500

To show the rules with Az you would specify az network nsg rule list ... -o table. Also, we do not have the ability to display multiple tables AFAIK.

tjprescott avatar Jan 31 '17 19:01 tjprescott

@johanste, this will require a change to our output infrastructure (#1948). Moving this to the backlog as a result.

tjprescott avatar Jan 31 '17 21:01 tjprescott

Cleaning u old issues, reopen if this is still active.

JasonRShaver avatar Nov 03 '17 02:11 JasonRShaver