Bug 1405776

Summary: Allow adding custom attributes with sections
Product: Red Hat CloudForms Management Engine Reporter: Prasad Mukhedkar <pmukhedk>
Component: ProvidersAssignee: Erez Freiberger <efreiber>
Status: CLOSED CURRENTRELEASE QA Contact: Gilad Shefer <gshefer>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 5.7.0CC: efreiber, epacific, gblomqui, jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.8.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1411466 (view as bug list) Environment:
Last Closed: 2017-06-12 16:06:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Container Management Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1411466    

Description Prasad Mukhedkar 2016-12-18 12:05:05 UTC
'Section' is not honored  when custom attributes 
added through the api. Section is always set to
default "Metadata", This causes problem later when
removing the custom attributes through the api.

backport request for :
https://github.com/ManageIQ/manageiq/pull/12913

Comment 6 Gilad Shefer 2017-04-24 07:57:17 UTC
Please provide steps to reproduce.

Comment 7 Erez Freiberger 2017-04-24 08:04:43 UTC
Gilad,

Add a Custom Attribute with a section different than "metadata"
before it used to ignore the section that you tried to set.

Comment 8 Gilad Shefer 2017-04-24 09:23:05 UTC
________________________________

{
"action": "add",
"section": "somesection",
"resources": [{
    "name": "foo",
    "value": "17"
}]}


_____________Results:________________
{
  "results": [
    {
      "id": 2363,
      "section": "metadata",
      "name": "foo",
      "value": "17",
      "resource_type": "ExtManagementSystem",
      "resource_id": 1,
      "source": "EVM",
      "serialized_value": "17"
    }
  ]
}

Comment 9 Erez Freiberger 2017-04-24 09:40:30 UTC
It is a very old bug, The system has changed since then to only allow specific sections.
Please try with "cluster_settings"

https://github.com/ManageIQ/manageiq/pull/13360

Comment 10 Gilad Shefer 2017-04-24 09:57:40 UTC
{
"action": "add",
"section": "cluster-settings",
"resources": [{
    "name": "foo1",
    "value": "171"
}]}
__________________Results:__________________
{
  "results": [
    {
      "id": 2364,
      "section": "metadata",
      "name": "foo1",
      "value": "171",
      "resource_type": "ExtManagementSystem",
      "resource_id": 1,
      "source": "EVM",
      "serialized_value": "171"
    }
  ]
}

Comment 11 Gilad Shefer 2017-04-24 10:01:59 UTC
Note: not working with "cluster_settings" as well.

Comment 12 Gilad Shefer 2017-04-24 10:15:51 UTC
The problem was a bad API call (the section field was out)  -->  moving to VERIFIED