Bug 1481547

Summary: [RFE] Missing the ability to set custom attributes on services via api
Product: Red Hat CloudForms Management Engine Reporter: Kevin Morey <kmorey>
Component: APIAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED ERRATA QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: jhardy, jmarc, kmorey, ldomb, nstephan, obarenbo, simaishi
Target Milestone: GAKeywords: FutureFeature
Target Release: 5.9.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.9.0.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-01 13:15:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Kevin Morey 2017-08-15 04:08:01 UTC
Description of problem:
We are missing the ability to set a custom attribute on services via the API. As a cloud administrator i need the ability to provision resources via an Ansible playbook and then leverage custom attributes to assist with a retirement playbook. But there does not seem to be a way to set custom attributes on services. The same exact api action works on VMs and providers but not on services.

Version-Release number of selected component (if applicable):
5.8.1

How reproducible:
100%

Steps to Reproduce:

This does not work:
# curl -k -u admin:smartvm -X GET https://localhost/api/services/12000000000002/custom_attributes

This works:
curl -k -u admin:smartvm -X GET https://localhost/api/vms/12000000000032/custom_attributes


Actual results:
HTTP 404 error

Expected results:
HTTP 200 and a list of custom attributes on the service

Additional info:

Comment 3 CFME Bot 2017-10-05 18:24:32 UTC
New commit detected on ManageIQ/manageiq-api/master:
https://github.com/ManageIQ/manageiq-api/commit/c4f74c0b9c025a557fcaef6e473aa658509b6184

commit c4f74c0b9c025a557fcaef6e473aa658509b6184
Author:     Bo Yao <icerove>
AuthorDate: Wed Sep 27 16:39:27 2017 -0400
Commit:     Bo Yao <icerove>
CommitDate: Sat Sep 30 10:09:57 2017 -0400

    add customer attr mixin for services api
    https://bugzilla.redhat.com/show_bug.cgi?id=1481547

 app/controllers/api/services_controller.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 7 Martin Kourim 2018-02-13 14:29:40 UTC
Verified using our test automation that it's possible to set a custom attribute on services via the API on 5.9.0.20

Comment 11 errata-xmlrpc 2018-03-01 13:15:53 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2018:0380