UI: fix userdataid or userdata content is passed when userdata append or override is unchecked#7758
Conversation
…/override is unchecked
|
@harikrishna-patnala a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress. |
|
UI build: ✔️ |
Codecov Report
@@ Coverage Diff @@
## 4.18 #7758 +/- ##
=========================================
Coverage 13.02% 13.02%
Complexity 9028 9028
=========================================
Files 2720 2720
Lines 256992 256992
Branches 40078 40078
=========================================
Hits 33463 33463
Misses 219330 219330
Partials 4199 4199 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| deployVmData.iothreadsenabled = values.iothreadsenabled | ||
| deployVmData.iodriverpolicy = values.iodriverpolicy | ||
| if (values.userdata && values.userdata.length > 0) { | ||
| const isUserdataAllowed = !this.userdataDefaultOverridePolicy || (this.userdataDefaultOverridePolicy === 'ALLOWOVERRIDE' && this.doUserdataOverride) || (this.userdataDefaultOverridePolicy === 'APPEND' && this.doUserdataAppend) |
There was a problem hiding this comment.
this could be a boolean method
|
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
|
@harikrishna-patnala |
harikrishna-patnala
left a comment
There was a problem hiding this comment.
LGTM,
verified with fix with registered userdata, registered userdata with params also and manual userdata. Worked fine on enabling and disabling the userdata from UI.
thanks a lot @harikrishna-patnala ! |
|
Merging based on approvals and manually verification |
Description
This PR fixes an issue in the deploy vm instance wizard.
(1) register template with userdata and userdatapolicy=APPEND

(2) deploy vm, check the "Userdata append", choose another userdata or input userdata manually
(3) uncheck "Userdata append"
(4) create a vm
expected: the additional userdata id or content are NOT passed (as "Userdata append" is unchecked)

actual: the additional userdata id or content are passed
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?