Commit 5f45f6d
Resolves: MTV-5248 | Un-hide EC2 network/storage mapping steps in plan wizard (#2395)
* Un-hide EC2 network/storage mapping steps in plan wizard
MTV-5227 hid the mapping steps for EC2 providers, but the backend
validates that EC2 plans have proper network and storage mappings.
Plans created via UI got empty spec.map and failed with CannotStart
due to VMNetworksNotMapped and VMStorageNotMapped conditions.
- Un-hide NetworkMap and StorageMap wizard steps for EC2
- Show mapping sections in the review step
- Add EC2 to the storage inventory subPath map
- Define shared Ec2Network, Ec2Storage, and Ec2VmObject types
- Extract subnet IDs from EC2 VMs for network mapping
- Treat all EBS volume types as used for storage mapping
- Use name-based source for EC2 storage mappings (backend matches
Source.Name against volume type)
- Add EC2 case to getMapResourceLabel
- Remove stale EC2 skip comment from createNetworkMap
Resolves: MTV-5248
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Address CodeRabbit review comments
- Replace unsafe type assertions with type guards (isEc2Vm)
- Fix subnet fallback when NetworkInterfaces exists but yields
no SubnetId entries
- Fix EC2 storage name fallback to prevent dropping mappings
when source.name is missing
Resolves: MTV-5248
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Extract shared EC2 helpers and add unit tests
- Move isEc2Vm, Ec2VmLike, getEc2SubnetIds to shared
src/utils/types/ec2Inventory.ts (removes duplication)
- Add 22 unit tests covering: isEc2Vm type guard,
getEc2SubnetIds fallback logic, EC2 buildStorageMappings
name-based source, getStorageMappingValues for EC2,
and getMapResourceLabel EC2 case
Resolves: MTV-5248
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Fix TS errors in getMapResourceLabel test
Add missing revision and selfLink fields to Ec2Network test
fixtures to match the full type shape.
Resolves: MTV-5248
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Resolves: MTV-5248 | update gitignore for playwright MCP generated files
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
---------
Signed-off-by: Aviv Turgeman <aturgema@redhat.com>
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 44bd9e3 commit 5f45f6d
17 files changed
Lines changed: 338 additions & 39 deletions
File tree
- src
- plans/create
- steps
- __tests__
- network-map
- review
- utils
- providers/details/tabs/VirtualMachines/utils/types
- storageMaps
- create/utils
- __tests__
- utils
- utils
- hooks
- types
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
40 | 39 | | |
41 | 40 | | |
42 | 41 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | 42 | | |
49 | 43 | | |
50 | 44 | | |
| |||
61 | 55 | | |
62 | 56 | | |
63 | 57 | | |
64 | | - | |
| 58 | + | |
65 | 59 | | |
66 | 60 | | |
67 | 61 | | |
| |||
91 | 85 | | |
92 | 86 | | |
93 | 87 | | |
94 | | - | |
95 | 88 | | |
96 | 89 | | |
97 | 90 | | |
98 | 91 | | |
99 | 92 | | |
100 | 93 | | |
101 | | - | |
102 | 94 | | |
103 | 95 | | |
104 | 96 | | |
| |||
Lines changed: 45 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
28 | | - | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | 8 | | |
11 | | - | |
12 | 9 | | |
13 | 10 | | |
14 | 11 | | |
| |||
33 | 30 | | |
34 | 31 | | |
35 | 32 | | |
36 | | - | |
37 | 33 | | |
38 | 34 | | |
39 | | - | |
40 | | - | |
41 | 35 | | |
42 | 36 | | |
43 | 37 | | |
| |||
64 | 58 | | |
65 | 59 | | |
66 | 60 | | |
67 | | - | |
68 | | - | |
| 61 | + | |
| 62 | + | |
69 | 63 | | |
70 | 64 | | |
71 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
20 | | - | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
56 | | - | |
| 57 | + | |
| 58 | + | |
57 | 59 | | |
58 | 60 | | |
59 | 61 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments