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

SDN Create Address Pool for Load Balancer problem

Open malopMSFT opened this issue 10 years ago • 3 comments

When using the following command **az network lb address-pool create **

The operation works fine, but the JSON response is the entire Load Balancer and should be only the address pool az network lb address-pool create -g "IMDS_Demo" --lb-name "MyLB" -n "MyAddressPool" { "backendAddressPools": [ { "backendIpConfigurations": null, "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB/backendAddressPools/MyLBbepool", "loadBalancingRules": null, "name": "MyLBbepool", "outboundNatRule": null, "provisioningState": "Succeeded", "resourceGroup": "IMDS_Demo" }, { "backendIpConfigurations": null, "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB/backendAddressPools/MyAddressPool", "loadBalancingRules": null, "name": "MyAddressPool", "outboundNatRule": null, "provisioningState": "Succeeded", "resourceGroup": "IMDS_Demo" } ], "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "frontendIpConfigurations": [ { "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB/frontendIPConfigurations/LoadBalancerFrontEnd", "inboundNatPools": null, "inboundNatRules": null, "loadBalancingRules": null, "name": "LoadBalancerFrontEnd", "outboundNatRules": null, "privateIpAddress": null, "privateIpAllocationMethod": "Dynamic", "provisioningState": "Succeeded", "publicIpAddress": { "dnsSettings": null, "etag": null, "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/publicIPAddresses/PublicIPMyLB", "idleTimeoutInMinutes": null, "ipAddress": null, "ipConfiguration": null, "location": null, "name": null, "provisioningState": null, "publicIpAddressVersion": null, "publicIpAllocationMethod": null, "resourceGroup": "IMDS_Demo", "resourceGuid": null, "tags": null, "type": null }, "resourceGroup": "IMDS_Demo", "subnet": null }, { "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB/frontendIPConfigurations/MyFrontendIP", "inboundNatPools": null, "inboundNatRules": null, "loadBalancingRules": null, "name": "MyFrontendIP", "outboundNatRules": null, "privateIpAddress": null, "privateIpAllocationMethod": "Dynamic", "provisioningState": "Succeeded", "publicIpAddress": { "dnsSettings": null, "etag": null, "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/publicIPAddresses/MyPIP", "idleTimeoutInMinutes": null, "ipAddress": null, "ipConfiguration": null, "location": null, "name": null, "provisioningState": null, "publicIpAddressVersion": null, "publicIpAllocationMethod": null, "resourceGroup": "IMDS_Demo", "resourceGuid": null, "tags": null, "type": null }, "resourceGroup": "IMDS_Demo", "subnet": null } ], "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB", "inboundNatPools": [], "inboundNatRules": [], "loadBalancingRules": [], "location": "eastus", "name": "MyLB", "outboundNatRules": [], "probes": [ { "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB/probes/MyProbe", "intervalInSeconds": 15, "loadBalancingRules": null, "name": "MyProbe", "numberOfProbes": 2, "port": 80, "protocol": "Tcp", "provisioningState": "Succeeded", "requestPath": null, "resourceGroup": "IMDS_Demo" } ], "provisioningState": "Succeeded", "resourceGroup": "IMDS_Demo", "resourceGuid": "cb37c62f-34c3-4d46-8391-2a27009bacdb", "tags": {}, "type": "Microsoft.Network/loadBalancers" }

Tested on CLI and is returns only the Address Pool JSON

malopMSFT avatar Nov 04 '16 18:11 malopMSFT

Tested on CLI and is returns only the Address Pool JSON

To clarify, are you commenting on the different between the HTTP response payload and the command output? The underlying command is a PUT on the load balancer, which will return the entire payload for the load balancer. However, since the command is for address pool create, the command will only return the portion of that object which reflects the newly created address pool.

tjprescott avatar Nov 04 '16 19:11 tjprescott

It should only return the address pool created like the following example: { "backendIpConfigurations": null, "etag": "W/"2b5da4de-a4f2-4a00-a4db-a313eb36f828"", "id": "/subscriptions/23a27f7b-7bd9-4ef6-91f5-9bf25ea00d6a/resourceGroups/IMDS_Demo/providers/Microsoft.Network/loadBalancers/MyLB/backendAddressPools/MyAddressPool", "loadBalancingRules": null, "name": "MyAddressPool", "outboundNatRule": null, "provisioningState": "Succeeded", "resourceGroup": "IMDS_Demo" }

But instead is returning the entire Load Balancer Object

malopMSFT avatar Nov 04 '16 19:11 malopMSFT

Ah, okay, yes, that's a bug. :)

tjprescott avatar Nov 04 '16 19:11 tjprescott