Skip to content

Conversation

@lucas-a-martins
Copy link
Collaborator

@lucas-a-martins lucas-a-martins commented Jan 15, 2025

Description

Normal users are allowed to register a direct download template via API, but the option is disabled in the UI.

This PR fix the issue #9923 by removing this restriction.

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):

The template registered by a normal user using the direct download option:

Screenshot from 2025-01-15 17-44-59

How Has This Been Tested?

I tested by registering a template via UI using an account with the User role. Selecting the KVM hypervisor gave me the direct download option.

Copy link
Contributor

@shwstppr shwstppr 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

@shwstppr
Copy link
Contributor

@blueorangutan ui

@shwstppr shwstppr requested a review from nvazquez January 16, 2025 09:00
@blueorangutan
Copy link

@shwstppr a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@codecov
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.15%. Comparing base (34d2a3b) to head (4e1964e).
Report is 26 commits behind head on 4.20.

Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #10193   +/-   ##
=========================================
  Coverage     16.15%   16.15%           
- Complexity    12976    12978    +2     
=========================================
  Files          5639     5639           
  Lines        494081   494081           
  Branches      59910    59910           
=========================================
+ Hits          79800    79806    +6     
+ Misses       405453   405446    -7     
- Partials       8828     8829    +1     
Flag Coverage Δ
uitests 4.02% <ø> (ø)
unittests 17.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.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10193 (QA-JID-507)

@DaanHoogland
Copy link
Contributor

@lucas-a-martins , it does not seem to work in qa. I can not tell from the API if this needs a version after 4.20. Do you know?

Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

LGTM - haven't tested it though

@lucas-a-martins
Copy link
Collaborator Author

lucas-a-martins commented Jan 16, 2025

@lucas-a-martins , it does not seem to work in qa. I can not tell from the API if this needs a version after 4.20. Do you know?

@DaanHoogland , I tried to test in the same QA (#10193 (comment)), but the only hypervisor option it has for normal users is "Simulator".

image

Even before this PR, the direct download only works if the hypervisor is KVM or hyperCustomShow (I actually don't know what this mean haha). The first test I did (the one in the PR description) was in an 4.20 environment with the KVM option for normal users.

@kiranchavala
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@kiranchavala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/10193 (QA-JID-530)

@kiranchavala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@kiranchavala 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.

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor

@lucas-a-martins do you want this on 4.20 or 21? (it is targetted to main now)

Copy link
Member

@winterhazel winterhazel left a comment

Choose a reason for hiding this comment

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

Tested locally by registering a direct download template as a normal user, and deploying a VM from the template.

@lucas-a-martins
Copy link
Collaborator Author

@lucas-a-martins do you want this on 4.20 or 21? (it is targetted to main now)

@DaanHoogland 4.20 lgtm

@DaanHoogland
Copy link
Contributor

@lucas-a-martins do you want this on 4.20 or 21? (it is targetted to main now)

@DaanHoogland 4.20 lgtm

ok @lucas-a-martins , can you rebase it on the 4.20 branch then? It looks ready for merge otherwise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants