Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Report names rather than ids in affinity conflicts #542

Merged
merged 1 commit into from
Jul 25, 2022

Commits on Jul 24, 2022

  1. core: Report names rather than ids in affinity conflicts

    When an affinity conflict occurs, the hosts or VMs participating in
    the conflict are reported by their ids.  This is accurate but not very
    user friendly, especially in the web UI dialog.  Let’s report the
    conflicting entities by their names instead.
    
    We must retrieve the names from the corresponding DAOs.  In theory,
    AffinityGroup’s should contain entity names corresponding to the ids,
    but this doesn’t hold and the names are often missing there.
    
    Due to the DAO access, AffinityValidator.checkAffinityGroupConflicts
    can no longer be static.  And because AffinityValidator is a
    singleton, it cannot be used in tests as it is (AFAICT).  That means
    we have to mock AffinityValidator.checkAffinityGroupConflicts in some
    tests and give up on testing that method there.
    
    Bug-Url: https://bugzilla.redhat.com/1991622
    mz-pdm authored and ahadas committed Jul 24, 2022
    Configuration menu
    Copy the full SHA
    7d089aa View commit details
    Browse the repository at this point in the history