Commit c45596c
Refactor of Allocator classes (#9074)
* Refactoring Allocator classes
* Break into smaller methods random and firfit allocators.
* Added unit tests for random and firstfit allocators
* Move random allocator from cloud-plugins to cloud-server
* Add BaseAllocator abstract class for duplicate code
* Add missing license
* Add missing license to unit test file
* Remove host allocator random dependency
* Change exception message on smoke tests
* Remove conditional as it was never actually reached in the original flow
* Fix tests
* Fix flipped parameters
* Fix NPE while listing hosts for migration when suitableHosts is null
* Remove unnecessary stubbings
* Fix checkstyle
* Remove unnecessary file
* Rename exception error messages
* Apply suggestions from code review
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
* Rename UserVmDetailVO references to VMInstanceDetailVO
* Remove unused imports
* Add new line at EOF
* Remove unnecessary random allocator pom
* Fix GPU allocation mistake
* Fix failing tests
---------
Co-authored-by: Fabricio Duarte <fabricio.duarte@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>1 parent a73cc9a commit c45596c
26 files changed
Lines changed: 1593 additions & 981 deletions
File tree
- api/src/main/java
- com/cloud
- agent/manager/allocator
- deploy
- org/apache/cloudstack/api/command/admin/host
- client
- engine
- api/src/main/java/com/cloud/vm
- orchestration/src/main/java/com/cloud/vm
- schema/src/main/java/com/cloud/host/dao
- plugins
- host-allocators/random
- src
- main
- java/com/cloud/agent/manager/allocator/impl
- resources/META-INF/cloudstack/host-allocator-random
- test/java/com/cloud/agent/manager/allocator/impl
- server/src
- main
- java/com/cloud
- agent/manager/allocator/impl
- deploy
- server
- resources/META-INF/cloudstack/server-allocator
- test/java/com/cloud/agent/manager/allocator/impl
- test/integration/smoke
Lines changed: 0 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | 25 | | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | 30 | | |
39 | 31 | | |
40 | 32 | | |
| |||
49 | 41 | | |
50 | 42 | | |
51 | 43 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | 44 | | |
78 | 45 | | |
79 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
| 255 | + | |
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
377 | 377 | | |
378 | 378 | | |
379 | 379 | | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | 380 | | |
386 | 381 | | |
387 | 382 | | |
| |||
Lines changed: 0 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 184 | | |
194 | 185 | | |
195 | 186 | | |
| |||
Lines changed: 0 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4017 | 4017 | | |
4018 | 4018 | | |
4019 | 4019 | | |
4020 | | - | |
4021 | | - | |
4022 | | - | |
4023 | | - | |
4024 | | - | |
4025 | | - | |
4026 | | - | |
4027 | | - | |
4028 | | - | |
4029 | | - | |
4030 | | - | |
4031 | | - | |
4032 | | - | |
4033 | 4020 | | |
4034 | 4021 | | |
4035 | 4022 | | |
| |||
4469 | 4456 | | |
4470 | 4457 | | |
4471 | 4458 | | |
4472 | | - | |
4473 | | - | |
4474 | | - | |
4475 | | - | |
4476 | | - | |
4477 | 4459 | | |
4478 | 4460 | | |
4479 | 4461 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
221 | | - | |
| 221 | + | |
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1520 | 1520 | | |
1521 | 1521 | | |
1522 | 1522 | | |
1523 | | - | |
| 1523 | + | |
1524 | 1524 | | |
1525 | 1525 | | |
1526 | 1526 | | |
| |||
1534 | 1534 | | |
1535 | 1535 | | |
1536 | 1536 | | |
1537 | | - | |
| 1537 | + | |
1538 | 1538 | | |
1539 | 1539 | | |
1540 | 1540 | | |
| |||
This file was deleted.
0 commit comments