Azure / Azure/azure-cli

Az sig image-definition appending additional output

Open
#16,914 2 comments 0 reactions 1 assignee Claimed by @qwordy View on GitHub
act-observability-squad Compute feature-request
Dominant language
Python
Stars
4.6k
Forks
3.5k
Avg merge
3d 2h
Merged PRs (30d)
60

Description

> ### `az feedback` auto-generates most of the information requested below, as of CLI version 2.0.62

**Describe the bug**
The CLI is appending additional parameters to the underlying API response. Its not a blocker but can cause confusion about what is being returned. For example the endOfLifeDate parameter is tied to a specific version of the API and not the parent resource. This happens in PS as well.

**To Reproduce**
Run the command az sig image-definition list on the resource and you'll see the following values appended:

_"description": null,
"disallowed": null,
"endOfLifeDate": null,
"eula": null,
"features": null,_

Output from CLI -
{
_"description": null,
"disallowed": null,
"endOfLifeDate": null,
"eula": null,
"features": null,_
"hyperVGeneration": "V1",
"id": "/subscriptions/f4b86be3-30ae-494f-8dde-4338ab794e4f/resourceGroups/sharedgalleryimage/providers/Microsoft.Compute/galleries/test/images/test",
"identifier": {
"offer": "me",
"publisher": "me",
"sku": "me"
},
"location": "usgovvirginia",
"name": "test",
"osState": "Generalized",
"osType": "Windows",
"privacyStatementUri": null,
"provisioningState": "Succeeded",
"purchasePlan": null,
"recommended": {
"memory": {
"max": 1024,
"min": 500
},
"vCpUs": {
"max": 64,
"min": 16
}
},
"releaseNoteUri": null,
"resourceGroup": "sharedgalleryimage",
"tags": {},
"type": "Microsoft.Compute/galleries/images"
}

**Expected behavior**
We don't expect the endofLifeDate parameter in the response as seen below.

Raw output from the underlying API-
https://management.usgovcloudapi.net/subscriptions/f4b86be3-30ae-494f-8dde-_4338ab794e4f/resourcegroups/sharedgalleryimage/providers/Microsoft.Compute/galleries/test/images/test?api-version=2020-09-30
{
"name": "test",
"id": "/subscriptions/f4b86be3-30ae-494f-8dde-4338ab794e4f/resourceGroups/sharedgalleryimage/providers/Microsoft.Compute/galleries/test/images/test",
"type": "Microsoft.Compute/galleries/images",
"location": "usgovvirginia",
"tags": {},
"properties": {
"hyperVGeneration": "V1",
"osType": "Windows",
"osState": "Generalized",
"identifier": {
"publisher": "me",
"offer": "me",
"sku": "me"
},
"recommended": {
"vCPUs": {
"min": 16,
"max": 64
},
"memory": {
"min": 500,
"max": 1024
}
},
"provisioningState": "Succeeded"
}
}_

**Environment summary**
Linux-4.15.0-1106-azure-x86_64-with-debian-10.2 (Cloud Shell)
Python 3.6.10
Installer: DEB

azure-cli 2.18.0 *
azure-cli-ml 1.20.0

Extensions:
ai-examples 0.2.5
azure-cli-ml 1.20.0

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.