Bug 1652064

Summary: Missing REST API endpoint to access affinity group hosts: .../affinitygroups/ID/hosts
Product: [oVirt] ovirt-engine Reporter: Paul Staniforth <p.staniforth>
Component: RestAPIAssignee: Lucia Jelinkova <ljelinko>
Status: CLOSED CURRENTRELEASE QA Contact: Guilherme Santos <gdeolive>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.2.7.1CC: akrejcir, bugs, ljelinko, lleistne, rbarry
Target Milestone: ovirt-4.4.0Flags: pm-rhel: ovirt-4.4+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: ovirt-engine-4.4.0 gitb5b5c99ca2f Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-20 20:02:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: Virt RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Staniforth 2018-11-21 14:07:17 UTC
Description of problem:

In the AffinityGroup Service there is no AffinityGroupHost AffinityGroupHosts 
although there is AffinityGroupVm and AffinityGroupVms

Comment 1 Michal Skrivanek 2020-03-10 12:25:25 UTC
change SLA team to virt, we're not tracking SLA separately anymore

Comment 2 Guilherme Santos 2020-03-25 18:07:01 UTC
Verified on:
ovirt-engine-4.4.0-0.25.master.el8ev.noarch

Steps:
1. On engine GUI, created a few AffinityGroups in a specific Cluster for hosts and vms
2. # curl -X GET -H "Accept: application/json" -u admin@internal:<password> --insecure https://<engine-fqdn>/ovirt-engine/api/v4/clusters/d012d3e9-8bf1-48e5-8ce0-2471b38c94e1/affinitygroups

Results:
hosts and vms created affinity groups showed on endpoints: 
/ovirt-engine/api/v4/clusters/123/affinitygroups/456/host(s) and /ovirt-engine/api/v4/clusters/123/affinitygroups/456/vm(s)

Comment 3 Sandro Bonazzola 2020-05-20 20:02:38 UTC
This bugzilla is included in oVirt 4.4.0 release, published on May 20th 2020.

Since the problem described in this bug report should be
resolved in oVirt 4.4.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.