Project

General

Profile

Bug #7028

association of subnet, domain, templates and resources to organization has no effect via CLI

Added by Bryan Kearney over 8 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
API
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:
Red Hat JIRA:

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:


Related issues

Has duplicate Hammer CLI - Bug #4295: hammer organization add_domain fails silentlyDuplicate2014-02-07
Has duplicate Hammer CLI - Bug #5076: Associate a compute resource with an org is not workingDuplicate2014-04-04
Has duplicate Foreman - Bug #4695: cannot add environment to organizationDuplicate2014-03-18

Associated revisions

Revision ce690b76 (diff)
Added by Tomáš Strachota over 8 years ago

Fixes #7028 - completing api docs for taxonomies

Revision 2dcaff38 (diff)
Added by Dominic Cleal over 8 years ago

refs #7028 - min apipie-rails for concerns fix

Revision 6b2c4397 (diff)
Added by Tomáš Strachota over 8 years ago

Fixes #7028 - completing api docs for taxonomies

(cherry picked from commit ce690b76c112fc50af8681a655b1f904d345afd2)

History

#1 Updated by Dominic Cleal over 8 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).

#2 Updated by Tomáš Strachota over 8 years ago

  • Status changed from New to Assigned
  • Target version set to 1.7.5

#3 Updated by Anonymous over 8 years ago

  • Target version changed from 1.7.5 to 1.7.4

#4 Updated by Tomáš Strachota over 8 years ago

  • Has duplicate Bug #4295: hammer organization add_domain fails silently added

#5 Updated by Tomáš Strachota over 8 years ago

  • Has duplicate Bug #5076: Associate a compute resource with an org is not working added

#6 Updated by Tomáš Strachota over 8 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.

#7 Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/1707 added
  • Pull request deleted ()

#8 Updated by Tomáš Strachota over 8 years ago

  • Pull request https://github.com/Katello/katello/pull/4603 added
  • Pull request deleted (https://github.com/theforeman/foreman/pull/1707)

#9 Updated by Dominic Cleal over 8 years ago

  • Has duplicate Bug #4695: cannot add environment to organization added

#10 Updated by Dominic Cleal over 8 years ago

  • Legacy Backlogs Release (now unused) set to 10

#11 Updated by Dominic Cleal over 8 years ago

  • Project changed from Hammer CLI to Foreman
  • Category changed from 74 to API

#12 Updated by Anonymous over 8 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF