Fix Pool handling and refactor VM loading #1174
Merged
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.
Fixes: #1128
Fixes: BZ1771793
A few related changes:
UPDATE_VMPOOLS_COUNT reducer fixed. If a pool VM is fetched and processed before the Pool, the reducer would break and cause UI errors trying to load a Pool that does not yet exist. Now a missing pool is skipped. The reducer will process properly once the Pool is loaded.
VM saga updates:
Removed code for ovirt-engine versions < 4.2. The version is already blocked at app startup time so the code is dead.
VM permits and canUse* mappings updated following the frontend method used by Clusters etc (see Fetch roles and permit at login and do entity permission to permit mapping on frontend #1020)
There is no visual change to the display of a Pool card. However, this change does leave a scenario where a VM could momentarily appear as a normal VM but the get tagged as a Pool VM once the Pool is actually fetched. To mitigate this confusion, all Pool VMs whose Pool is unknown (typically it hasn't been fetched yet) will not be displayed. The Pool and all of its VMs will be rendered together once they are all available.