Bug #7028
closedassociation of subnet, domain, templates and resources to organization has no effect via CLI
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1128664
Description of problem:
association of subnet, domain, templates and resources to organization has no effect via CLI.
Looks like there is no error message even via verbose and also in /var/log/foreman/production.log
a) resources
hammer -u admin -p changeme -v organization add-compute-resource --id=1 --compute-resource-id=$COMPUTERESOURCEID
b) subnet
hammer -u admin -p changeme -v organization add-subnet --id=1 --subnet-id=$SUBNETID
c) domain
hammer -u admin -p changeme -v organization add-domain --id=1 --domain-id=$DOMAINID
d) template
hammer -u admin -p changeme -v organization add-config-template --id=1 --config-template-id=$id
Version-Release number of selected component (if applicable):
sat6-GA-snap4
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Association of subnet, domain, templates and resources seem to fail
Expected results:
Association of the above said entites must be successful.
Additional info:
Updated by Dominic Cleal over 10 years ago
- Project changed from Foreman to Hammer CLI
- Category set to 74
Seems to be working for me on Foreman - from foreman-debug:
Processing by Katello::Api::V2::OrganizationsController#update as application/json;version=2
Parameters: {"domain_ids"=>["2"], "api_version"=>"v2", "id"=>"1", "organization"=>{}}
On my system:
Started PUT "/api/organizations/1" for 127.0.0.1 at 2014-08-12 08:40:16 +0100
Processing by Api::V2::OrganizationsController#update as JSON
Parameters: {"organization"=>{"domain_ids"=>["1"]}, "apiv"=>"v2", "id"=>"1"}
Maybe the lack of nesting of domain_ids is causing a problem (that's CLI side for me).
Updated by Tomáš Strachota over 10 years ago
- Status changed from New to Assigned
- Target version set to 1.7.5
Updated by Anonymous over 10 years ago
- Target version changed from 1.7.5 to 1.7.4
Updated by Tomáš Strachota over 10 years ago
- Has duplicate Bug #4295: hammer organization add_domain fails silently added
Updated by Tomáš Strachota over 10 years ago
- Has duplicate Bug #5076: Associate a compute resource with an org is not working added
Updated by Tomáš Strachota over 10 years ago
This turned out to be a complicated one. CLI builds the action params according to the api documentation which was partially missing for Katello's organization controller due to it inherits from Foreman's one. Apipie has limited means of docs inheritance. After discussion with inecas I decided to solve it by using param groups. Unfortunately there's a bug in apipie in renaming concern params (used by taxonomies).
Proper fix requires patches to all apipie, foreman and katello. 3 PRs will follow.
Updated by The Foreman Bot over 10 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1707 added
- Pull request deleted (
)
Updated by Tomáš Strachota over 10 years ago
- Pull request https://github.com/Katello/katello/pull/4603 added
- Pull request deleted (
https://github.com/theforeman/foreman/pull/1707)
Updated by Dominic Cleal over 10 years ago
- Has duplicate Bug #4695: cannot add environment to organization added
Updated by Dominic Cleal over 10 years ago
- Translation missing: en.field_release set to 10
Updated by Dominic Cleal over 10 years ago
- Project changed from Hammer CLI to Foreman
- Category changed from 74 to API
Updated by Anonymous over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ce690b76c112fc50af8681a655b1f904d345afd2.