Skip to content

Add format and physicalsize in listIsoOs api response #11214

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

Merged
merged 1 commit into from
Jul 21, 2025

Conversation

sudo87
Copy link
Collaborator

@sudo87 sudo87 commented Jul 16, 2025

Description

This PR fixes issue #11126, listIsoOs API response will have format and physicalsize with this change.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Screenshot 2025-07-16 at 1 10 39 PM

How Has This Been Tested?

How did you try to break this feature and the system with this change?

Copy link

codecov bot commented Jul 16, 2025

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 15.18%. Comparing base (06c80cd) to head (bf3f5d5).
Report is 4 commits behind head on 4.19.

Files with missing lines Patch % Lines
...a/com/cloud/api/query/dao/TemplateJoinDaoImpl.java 0.00% 5 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #11214      +/-   ##
============================================
- Coverage     15.18%   15.18%   -0.01%     
- Complexity    11364    11365       +1     
============================================
  Files          5415     5415              
  Lines        475888   475892       +4     
  Branches      58094    58095       +1     
============================================
- Hits          72256    72252       -4     
- Misses       395546   395555       +9     
+ Partials       8086     8085       -1     
Flag Coverage Δ
uitests 4.28% <ø> (ø)
unittests 15.90% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14205

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@DaanHoogland
Copy link
Contributor

@blueorangutan test keepEnv

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-13817)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 50352 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11214-t13817-kvm-ol8.zip
Smoke tests completed. 133 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@sureshanaparti
Copy link
Contributor

Verified the response with ready and non-ready ISOes, it's not returning size, physical size when templates are not ready.

CMK =>

(localcloud) 🐱 > list isos filter=id,name,format,size,physicalsize,isready isofilter=self
{
  "count": 5,
  "iso": [
    {
      "format": "ISO",
      "id": "a320da7c-5638-464b-b38b-1a4540a6c6e0",
      "isready": true,
      "name": "macchinina-kvm",
      "physicalsize": 9369600,
      "size": 9369600
    },
    {
      "format": "ISO",
      "id": "2e28e46a-7b56-4b77-a618-2edc410db32d",
      "isready": true,
      "name": "proxmox",
      "physicalsize": 672958464,
      "size": 672958464
    },
    {
      "format": "ISO",
      "id": "cd0558d8-e11a-4bcf-b999-bf0627525186",
      "isready": true,
      "name": "CentOS-Stream-9",
      "physicalsize": 1381629952,
      "size": 1381629952
    },
    {
      "format": "ISO",
      "id": "8ad1993e-5797-4dc3-afa5-8b949de62acc",
      "isready": false,
      "name": "test1"
    },
    {
      "format": "ISO",
      "id": "9754aa88-179a-4516-8028-b6e337d7c208",
      "isready": false,
      "name": "test2-upload"
    }
  ]
}
(localcloud) 🐱 >

DB =>

mysql> SELECT uuid, name, tmpl.size as template_size, store.size as store_size, physical_size, tmpl.state as template_state, store.state as store_state, download_state FROM vm_template tmpl, template_store_ref store WHERE tmpl.id = store.template_id AND tmpl.format = 'ISO' AND tmpl.removed IS NULL;
+--------------------------------------+-----------------+---------------+------------+---------------+----------------+-------------+----------------+
| uuid                                 | name            | template_size | store_size | physical_size | template_state | store_state | download_state |
+--------------------------------------+-----------------+---------------+------------+---------------+----------------+-------------+----------------+
| a320da7c-5638-464b-b38b-1a4540a6c6e0 | macchinina-kvm  |       9369600 |    9369600 |       9369600 | Active         | Ready       | DOWNLOADED     |
| 2e28e46a-7b56-4b77-a618-2edc410db32d | proxmox         |     672958464 |  672958464 |     672958464 | Active         | Ready       | DOWNLOADED     |
| cd0558d8-e11a-4bcf-b999-bf0627525186 | CentOS-Stream-9 |    1381629952 | 1381629952 |    1381629952 | Active         | Ready       | DOWNLOADED     |
| 8ad1993e-5797-4dc3-afa5-8b949de62acc | test1           |             0 |          0 |             0 | Active         | Allocated   | DOWNLOAD_ERROR |
| 9754aa88-179a-4516-8028-b6e337d7c208 | test2-upload    |          NULL |       NULL |             0 | NotUploaded    | Allocated   | NULL           |
+--------------------------------------+-----------------+---------------+------------+---------------+----------------+-------------+----------------+
5 rows in set (0.01 sec)

 mysql> SELECT uuid, name, format, size, physical_size, state, template_state FROM template_view WHERE format = 'ISO' AND account_name != 'system' AND removed IS NULL;                                          
+--------------------------------------+-----------------+--------+------------+---------------+-----------+----------------+
| uuid                                 | name            | format | size       | physical_size | state     | template_state |
+--------------------------------------+-----------------+--------+------------+---------------+-----------+----------------+
| a320da7c-5638-464b-b38b-1a4540a6c6e0 | macchinina-kvm  | ISO    |    9369600 |       9369600 | Ready     | Active         |
| 2e28e46a-7b56-4b77-a618-2edc410db32d | proxmox         | ISO    |  672958464 |     672958464 | Ready     | Active         |
| cd0558d8-e11a-4bcf-b999-bf0627525186 | CentOS-Stream-9 | ISO    | 1381629952 |    1381629952 | Ready     | Active         |
| 8ad1993e-5797-4dc3-afa5-8b949de62acc | test1           | ISO    |          0 |             0 | Allocated | Active         |
| 9754aa88-179a-4516-8028-b6e337d7c208 | test2-upload    | ISO    |       NULL |             0 | Allocated | NotUploaded    |
+--------------------------------------+-----------------+--------+------------+---------------+-----------+----------------+
5 rows in set (0.00 sec)

mysql>

@sureshanaparti sureshanaparti merged commit 3fc02dd into apache:4.19 Jul 21, 2025
23 of 25 checks passed
@DaanHoogland DaanHoogland deleted the listIsoOsApi branch July 21, 2025 12:31
harikrishna-patnala pushed a commit to shapeblue/cloudstack that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

listIsos API does not return "format" and "physicalsize" as documented
6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy