Bug 1405776 - Allow adding custom attributes with sections
Summary: Allow adding custom attributes with sections
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: GA
: 5.8.0
Assignee: Erez Freiberger
QA Contact: Gilad Shefer
URL:
Whiteboard:
Depends On:
Blocks: 1411466
TreeView+ depends on / blocked
 
Reported: 2016-12-18 12:05 UTC by Prasad Mukhedkar
Modified: 2018-06-06 11:42 UTC (History)
7 users (show)

Fixed In Version: 5.8.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1411466 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:06:35 UTC
Category: ---
Cloudforms Team: Container Management
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.