Repository navigation
ui: clarify the MAC address switch in the VM import form - #14532
Open
andrijapanicsb wants to merge 1 commit into
Open
andrijapanicsb wants to merge 1 commit into
andrijapanicsb wants to merge 1 commit into
Conversation
The switch that decides what happens when an imported NIC's MAC address is already used on the selected network was labelled "Allow duplicate MAC addresses" on the VMware to KVM form, which is the opposite of what it does, and just "Force" on the other import forms. Label it "Generate new MAC address if already in use", give it a plain tooltip, and hide it for remote KVM and disk imports, where the server always generates a new MAC address and ignores the switch.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #14532 +/- ##
=========================================
Coverage 20.75% 20.76%
- Complexity 21901 21904 +3
=========================================
Files 6496 6496
Lines 591602 591602
Branches 72583 72583
=========================================
+ Hits 122814 122835 +21
+ Misses 455456 455429 -27
- Partials 13332 13338 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Author
1 similar comment
Contributor
Author
Contributor
Author
|
fkcn BO... @Pearl1594 can you try to kick just UI building? |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
In short: the VM import form has a switch that decides what happens when an imported NIC's MAC address is already used on the selected network. Its label and tooltip did not say that. This PR renames it to "Generate new MAC address if already in use", gives it a plain tooltip, and hides it where it has no effect. UI only.
Why it matters: an operator importing a VMware VM into KVM sees a switch called "Allow duplicate MAC addresses". Turning it on does the opposite: CloudStack replaces the conflicting MAC with a new one. On the other import screens the same switch is just called "Force". On remote KVM and QCOW2 disk imports it does nothing, because the server always generates a new MAC there.
New tooltip on every screen where the switch is shown:
No API or backend change. Where the switch is still shown, the
forcedparameter is sent exactly as before. On the two screens where it is now hidden, the server already ignored it.Details
ui/public/locales/en.json: two new keys,label.generate.new.mac.if.in.useandmessage.generate.new.mac.if.in.use.ui/src/views/tools/ImportUnmanagedInstance.vue: bothforcedswitches use the new label and tooltip. The tooltip now comes from a UI string instead of theforcedAPI parameter description. The switch in the non-VMware row is hidden whenisExternalImportorisDiskImportis true.forcedon the hidden screens, inUnmanagedVMsManagerImpl:importExternalKvmVirtualMachinecallsimportNic(..., true)importKvmVirtualMachineFromDiskcallsnetworkOrchestrationService.importNic(..., true)label.allow.duplicate.macaddressesandlabel.forcedare left in place;label.forcedis used by other forms.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
ImportUnmanagedInstance.vue: no errors.en.jsonparses and has no duplicate keys.