cloudstack
cloudstack copied to clipboard
Return vm userdata
Description
This PR extends PR #6051 by making the listVirtualMachines API return the VMs' userdata, so that when the editVM form is opened in the UI, the existing userdata will be shown.
A new optional boolean parameter called userdata was added to the listVirtualMachines API, that controls whether the API should return userdata or not. The default value is false.
The sanitizeReverse function was also moved to util.js to prevent duplicated code.
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)
- [X] 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
- [X] Minor
Bug Severity
- [ ] BLOCKER
- [ ] Critical
- [ ] Major
- [ ] Minor
- [ ] Trivial
Screenshots (if appropriate):

How Has This Been Tested?
This was tested in a local lab by creating a new VM and editing it's userdata through the UI. After the form was closed it was reopened to check if the userdata that was added before would be shown.
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6683 (SL-JID-2245)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6683 (SL-JID-2255)
Codecov Report
Merging #6683 (f25394a) into main (9f7e0cc) will increase coverage by
0.01%. The diff coverage is0.00%.
@@ Coverage Diff @@
## main #6683 +/- ##
============================================
+ Coverage 5.87% 5.88% +0.01%
- Complexity 3936 3944 +8
============================================
Files 2454 2454
Lines 242683 242727 +44
Branches 37978 37989 +11
============================================
+ Hits 14265 14293 +28
- Misses 226839 226851 +12
- Partials 1579 1583 +4
| Impacted Files | Coverage Δ | |
|---|---|---|
| server/src/main/java/com/cloud/api/ApiDBUtils.java | 0.00% <0.00%> (ø) |
|
| ...ain/java/com/cloud/api/query/QueryManagerImpl.java | 0.00% <0.00%> (ø) |
|
| ...n/java/com/cloud/api/query/ViewResponseHelper.java | 0.00% <0.00%> (ø) |
|
| ...ava/com/cloud/api/query/dao/UserVmJoinDaoImpl.java | 0.00% <0.00%> (ø) |
|
| ...dstack/storage/datastore/PrimaryDataStoreImpl.java | 2.25% <0.00%> (-0.09%) |
:arrow_down: |
| ...visor/vmware/manager/VmwareStorageManagerImpl.java | 1.06% <0.00%> (-0.03%) |
:arrow_down: |
| ...ne/schema/src/main/java/com/cloud/host/HostVO.java | 15.04% <0.00%> (ø) |
|
| .../src/main/java/com/cloud/vm/UserVmManagerImpl.java | 0.00% <0.00%> (ø) |
|
| ...chema/src/main/java/com/cloud/vm/VMInstanceVO.java | 24.40% <0.00%> (ø) |
|
| ...n/java/com/cloud/resource/ResourceManagerImpl.java | 0.00% <0.00%> (ø) |
|
| ... and 7 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
@blueorangutan package
@DaanHoogland a 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.
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4097
@blueorangutan test
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6683 (SL-JID-2263)
Found UI changes, kicking a new UI QA build @blueorangutan ui
@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.
UI build: :heavy_check_mark: Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6683 (SL-JID-2284)
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4134
@JoaoJandre , when testing this in the simulator user data won´t be saved. I suppose this is because of the backend changes needed. so probably not an issue, but your test description is not repeatable in http://qa.cloudstack.cloud:8080/client/pr/6683. just FYI (@everybody)
@DaanHoogland, can we run the tests for this one?
@blueorangutan test
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Trillian Build Failed (tid-5003)
@blueorangutan package
@DaanHoogland a 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.
Packaging result: :heavy_check_mark: el7 :heavy_check_mark: el8 :heavy_check_mark: debian :heavy_check_mark: suse15. SL-JID 4265
@blueorangutan test
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests
Trillian Build Failed (tid-5005)








