The way to add a compute resource to an organization is to pass it to the org update api in the compute_resource_ids field. This field, however, must contain _all_ the ids not just the one being added. To do this, first a call must be made to get the org, then the new compute resource id can be added, and then update called. However, consider the case where a user, through their roles, only has a subset of the compute resources visible. Following the steps above, they would get just the existing compute resources they had permission to see, add the new compute resource id to the list, and call update. This would (attempt to?) remove all the other compute resources that the user did not have visibility into on that org. The same applies for locations since they are implemented similarly through taxonomy.
Created from redmine issue http://projects.theforeman.org/issues/5550
Created a GitHub issue to track progress on testing this issue. See: https://github.com/omaciel/robottelo/issues/1123
*** Bug 1118743 has been marked as a duplicate of this bug. ***
Upstream bug component is Provisioning
Upstream bug component is API
This is an older bug which has been reported upstream. We are not going to track this bug downstream. When the upstream issue is resolved, the next build will contain the fix. Thank you.