Bug 1416797
| Summary: | Ability to add a custom attribute that already exists | |||
|---|---|---|---|---|
| Product: | Red Hat CloudForms Management Engine | Reporter: | Gilad Shefer <gshefer> | |
| Component: | Providers | Assignee: | Zohar Gal-Or <zgalor> | |
| Status: | CLOSED NOTABUG | QA Contact: | Gilad Shefer <gshefer> | |
| Severity: | low | Docs Contact: | ||
| Priority: | low | |||
| Version: | 5.7.0 | CC: | fsimonce, greartes, gshefer, jfrey, jhardy, mtayer, obarenbo, twade | |
| Target Milestone: | GA | Flags: | gshefer:
automate_bug+
|
|
| Target Release: | 5.8.0 | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | container | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1429228 (view as bug list) | Environment: | ||
| Last Closed: | 2017-04-24 15:23:56 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: | 1429228 | |||
|
Description
Gilad Shefer
2017-01-26 12:48:49 UTC
Hi, I did not found "custom" attributes here: http://manageiq.org/docs/reference/latest/api/appendices/resource_attributes#providers Are we talking of custom attributes for VMs? (or Instances ,etc, depending on the provider) I already used "custom attributes" to VMs/Instances, but i did not find other "custom attributes". In case of custom attributes for VMs/Instances, that behavior (while incorrect) is quite convenient. Cheers. Gilad Please add: The request you are using (POST, PUT etc) the entire body method: post
url: https://<appliance IP>/api/providers/1/custom_attributes
payload:
{
"action": "add",
"resources": [{
"name": "foo",
"value": "17"
}]}
There seems to be an intent in the code to allow "edit" from "add": https://github.com/ManageIQ/manageiq/blob/master/app/controllers/api/subcollections/custom_attributes.rb#L35-L36 This code is common for Vms and Providers, and as Guillermo stated in comment 2 this could be quite convenient. However, this seems to be a confusing behaviour. Tim, what do you think? As per conversation in Gitter, this is intended behavior: https://gitter.im/ManageIQ/api?at=58fe170e881b89e1017f2eb2 |