Skip to content

UI: Fix user role login due to missing API access on custom hypervisor name - #7939

Merged
yadvr merged 3 commits into
apache:mainfrom
shapeblue:fix-user-login-apicall
Sep 11, 2023
Merged

UI: Fix user role login due to missing API access on custom hypervisor name#7939
yadvr merged 3 commits into
apache:mainfrom
shapeblue:fix-user-login-apicall

Conversation

@nvazquez

@nvazquez nvazquez commented Sep 4, 2023

Copy link
Copy Markdown
Contributor

Description

This PR fixes the user role login in the UI on the main branch, bug introduced by the PR: #7692

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)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

  • As administrator, add 'Custom' to the 'hypervisor.list'
  • Restart management server
  • Create a Custom hypervisor zone
  • Attempt login as a user -> verify it works
  • As a user check the custom hypervisor is listed as a hypervisor on the new zone when trying to register a template

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@nvazquez normal user may not have listConfigurations API access. Is this to bypass that?

@nvazquez

nvazquez commented Sep 4, 2023

Copy link
Copy Markdown
Contributor Author

@shwstppr yes, in case they don't have access then we set the default name for the Custom hypervisor

@shwstppr

shwstppr commented Sep 4, 2023

Copy link
Copy Markdown
Contributor

@shwstppr yes, in case they don't have access then we set the default name for the Custom hypervisor

@nvazquez in that case a normal user will always see custom hypervisor as Custom even though the admin has set some display name. Not sure if the value is used in UI/API. Would it be better to return the config value as a response param of listCapabilities API?

@nvazquez

nvazquez commented Sep 4, 2023

Copy link
Copy Markdown
Contributor Author

@shwstppr good idea, let me fix that

@nvazquez

nvazquez commented Sep 4, 2023

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@nvazquez a [SF] 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.

@codecov

codecov Bot commented Sep 4, 2023

Copy link
Copy Markdown

Codecov Report

Merging #7939 (856f7b6) into main (2e6100d) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

❗ Current head 856f7b6 differs from pull request most recent head 75f7d14. Consider uploading reports for the commit 75f7d14 to get more accurate results

@@             Coverage Diff              @@
##               main    #7939      +/-   ##
============================================
- Coverage     14.40%   14.40%   -0.01%     
+ Complexity    10111    10109       -2     
============================================
  Files          2748     2748              
  Lines        259390   259391       +1     
  Branches      40381    40381              
============================================
- Hits          37365    37358       -7     
- Misses       217190   217202      +12     
+ Partials       4835     4831       -4     
Files Changed Coverage Δ
...in/java/com/cloud/server/ManagementServerImpl.java 5.37% <0.00%> (-0.01%) ⬇️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@blueorangutan

Copy link
Copy Markdown

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

@nvazquez

nvazquez commented Sep 4, 2023

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@nvazquez a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

Comment thread api/src/main/java/org/apache/cloudstack/api/response/CapabilitiesResponse.java Outdated
jschoiRR added a commit to jschoiRR/ablestack-mold that referenced this pull request Sep 5, 2023
@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - didn't test it

@nvazquez

nvazquez commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@nvazquez a [SF] 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
Copy Markdown

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

@nvazquez

nvazquez commented Sep 6, 2023

Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

@nvazquez a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_05_vmschedule_test_e2e Failure 265.92 test_vm_schedule.py

@yadvr
yadvr merged commit 940733c into apache:main Sep 11, 2023
@yadvr
yadvr deleted the fix-user-login-apicall branch September 11, 2023 08:38
shwstppr pushed a commit to shapeblue/cloudstack that referenced this pull request Oct 12, 2023
…r name (apache#7939)

* UI: Fix user role login due to missing API access on custom hypervisor name

* Refactor to include the custom HW display name as part of the response of listCapabilities API

* Add since parameter

(cherry picked from commit 940733c)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
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.

6 participants