apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
2.11k stars 1.11k forks source link

Hide UserData field from the EditVM view for VMs that do not offer it #9731

Closed FelipeM525 closed 1 month ago

FelipeM525 commented 1 month ago

Description

Currently in ACS, when editing a VM, the field userdata will be present even if the VM's network does not support the feature. This PR fixes this issue by not showing the field if the VM does not offer userdata.

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

How Has This Been Tested?

I tested this by verifying if the userdata field would still show up in the Edit VM View when editing VMs whose networks did not offer userdata, and it worked as expected. I've also tested cases in which a VM could have more than one network, and for these cases it will consider the default network and disregard the other networks.

codecov[bot] commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 15.08%. Comparing base (9df783c) to head (cda4901). Report is 10 commits behind head on 4.19.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.19 #9731 +/- ## ============================================ - Coverage 15.11% 15.08% -0.03% Complexity 11184 11184 ============================================ Files 5402 5402 Lines 473120 473147 +27 Branches 58327 59210 +883 ============================================ - Hits 71507 71370 -137 - Misses 393812 393838 +26 - Partials 7801 7939 +138 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9731/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/apache/cloudstack/pull/9731/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `4.29% <ø> (-0.47%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9731/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `15.80% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

kiranchavala commented 1 month ago

@blueorangutan ui

blueorangutan commented 1 month ago

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

blueorangutan commented 1 month ago

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9731 (QA-JID-457)

DaanHoogland commented 1 month ago

@blueorangutan ui

blueorangutan commented 1 month ago

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

blueorangutan commented 1 month ago

UI build: :heavy_check_mark: Live QA URL: https://qa.cloudstack.cloud/simulator/pr/9731 (QA-JID-459)

JoaoJandre commented 1 month ago

Merging based on approvals and manual test by @kiranchavala (https://github.com/apache/cloudstack/pull/9731#pullrequestreview-2330202785)