Commit c3f814f
authored
Remove DataSource storage class fallback from DV template helper (#4985)
##### What this PR does / why we need it:
When calling `data_volume_template_with_source_ref_dict` we should
either use it with explicit `storage_class` field, or omit the field and
use the default storage class.
Relying on the storage class of the DataSources can cause miss
interpretations, while also causing issues since it is not possible to
match the storage class to the DataSource, if a snap shot storage class
is used.
##### Which issue(s) this PR fixes:
Failing tests when snapshot storage classes are set.
##### Special notes for reviewer:
Since we could not decide the storage class according to the
`VolumeSnapshot` that was used when creating the VM, this is the
approach we decided to use.
##### jira-ticket:
<!-- full-ticket-url needs to be provided. This would add a link to the
pull request to the jira and close it when the pull request is merged
If the task is not tracked by a Jira ticket, just write "NONE".
-->
https://redhat.atlassian.net/browse/CNV-88988
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Data volumes now use only an explicitly provided storage class and no
longer inherit or default from referenced sources, preventing unexpected
storage-class selection.
* **Tests**
* Test suite updated to validate scoped storage-class selection; test
fixtures adjusted to consistently provide the chosen storage class
across scopes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Signed-off-by: rkishner <rkishner@redhat.com>1 parent c0e6a28 commit c3f814f
4 files changed
Lines changed: 8 additions & 8 deletions
File tree
- tests
- infrastructure/golden_images
- storage
- utilities
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2629 | 2629 | | |
2630 | 2630 | | |
2631 | 2631 | | |
| 2632 | + | |
| 2633 | + | |
| 2634 | + | |
| 2635 | + | |
| 2636 | + | |
2632 | 2637 | | |
2633 | 2638 | | |
2634 | 2639 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | 18 | | |
20 | 19 | | |
| 20 | + | |
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
497 | 497 | | |
498 | 498 | | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | | - | |
504 | | - | |
505 | 500 | | |
506 | 501 | | |
507 | 502 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
569 | 568 | | |
570 | 569 | | |
571 | 570 | | |
572 | 571 | | |
573 | | - | |
| 572 | + | |
574 | 573 | | |
575 | 574 | | |
576 | 575 | | |
| |||
0 commit comments