It works using the identifier of the host but we don't look for the host by its name (if only the name is specified) as we should
verified on ovirt-engine-4.5.0.1-601.f26e9ea8cac5.3.el8ev.noarch POST https://{{host}}/ovirt-engine/api/clusters/{clusterId}/affinitygroups/{affinitygroupID}/hosts body: <host><name>host_mixed_2</name></host> response: 200 <action> <status>complete</status> </action>
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022. Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.