Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azure_rm_virtualmachine loads only one image (-> top=1), therefore the "version" option does not work #766

Closed
pgmgb opened this issue Feb 18, 2022 · 1 comment · Fixed by #767
Labels
has_pr PR fixes have been made medium_priority Medium priority

Comments

@pgmgb
Copy link
Contributor

pgmgb commented Feb 18, 2022

The implementation of top=1 makes the option version obsolete because the executed request returns every time one result.

Executed request at the moment:
https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/switzerlandnorth/publishers/SUSE/artifacttypes/vmimage/offers/sles-sap-15-sp2-byos/skus/gen2/versions?$top=1&$orderby=name%20desc&api-version=2019-07-01

[
  {
    "location": "SwitzerlandNorth",
    "name": "2022.01.28",
    "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/SwitzerlandNorth/Publishers/suse/ArtifactTypes/VMImage/Offers/sles-sap-15-sp2-byos/Skus/gen2/Versions/2022.01.28"
  }
]

Expected request
https://management.azure.com/subscriptions/{subscription-id}/providers/Microsoft.Compute/locations/switzerlandnorth/publishers/SUSE/artifacttypes/vmimage/offers/sles-sap-15-sp2-byos/skus/gen2/versions?&api-version=2019-07-01

[
  {
    "location": "SwitzerlandNorth",
    "name": "2021.06.05",
    "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/SwitzerlandNorth/Publishers/suse/ArtifactTypes/VMImage/Offers/sles-sap-15-sp2-byos/Skus/gen2/Versions/2021.06.05"
  },
  {
    "location": "SwitzerlandNorth",
    "name": "2022.01.28",
    "id": "/Subscriptions/{subscription-id}/Providers/Microsoft.Compute/Locations/SwitzerlandNorth/Publishers/suse/ArtifactTypes/VMImage/Offers/sles-sap-15-sp2-byos/Skus/gen2/Versions/2022.01.28"
  }
]
@Fred-sun
Copy link
Collaborator

@pgmgb Thank you for your questions. We will check and promote the merger of relevant PR as soon as possible. Thank you very much!

@Fred-sun Fred-sun added medium_priority Medium priority work in In trying to solve, or in working with contributors has_pr PR fixes have been made and removed work in In trying to solve, or in working with contributors labels Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has_pr PR fixes have been made medium_priority Medium priority
Projects
None yet
2 participants