Project

General

Profile

Actions

Bug #4295

closed

hammer organization add_domain fails silently

Added by Og Maciel almost 11 years ago. Updated over 10 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

While attempting to add an existing domain to an existing organization via the CLI, I noticed that the domain was not being added. Since one cannot yet use the CLI (see #4294) to check whether a domain is associated with an organization or not, I used the web UI to confirm that the domain had been added but it had not (see attached screenshot).

[root@qetello03 ~]# hammer domain list
-----------
ID | NAME
-----------
1  | 20yhug
2  | ncvnr0
-----------
[root@qetello03 ~]# hammer organization info --id 1
Id:           1
Name:         ACME_Corporation
Created at:   2014/02/04 20:27:34
Updated at:   2014/02/04 20:27:34
Label:        ACME_Corporation
Description:  ACME_Corporation Organization

[root@qetello03 ~]# hammer organization add_domain --domain 20yhug --id 1

Files


Related issues 1 (0 open1 closed)

Is duplicate of Foreman - Bug #7028: association of subnet, domain, templates and resources to organization has no effect via CLIClosedTomáš Strachota08/11/2014Actions
Actions #1

Updated by Og Maciel almost 11 years ago

Using the domain id also didn't work:

[root@qetello03 ~]# hammer -v organization add_domain --domain-id 1 --id 1
Actions #2

Updated by Og Maciel almost 11 years ago

Started GET "/api/organizations/1" for 127.0.0.1 at 2014-02-07 10:08:17 -0500
Processing by Api::V2::OrganizationsController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"1", "organization"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/taxonomies/show.json.rabl (12.9ms)
Completed 200 OK in 75ms (Views: 11.6ms | ActiveRecord: 17.9ms)

Started GET "/api/domains/1" for 127.0.0.1 at 2014-02-07 10:08:17 -0500
Processing by Api::V2::DomainsController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"1", "domain"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/domains/show.json.rabl (1.8ms)
Completed 200 OK in 48ms (Views: 2.8ms | ActiveRecord: 10.6ms)

Started PUT "/api/organizations/1" for 127.0.0.1 at 2014-02-07 10:08:17 -0500
Processing by Api::V2::OrganizationsController#update as JSON
  Parameters: {"domain_ids"=>[1], "apiv"=>"v2", "id"=>"1", "organization"=>{}}
Authorized user admin(Admin User)
Expire fragment views/tabs_and_title_records-1 (0.5ms)
Completed 200 OK in 340ms (Views: 44.0ms | ActiveRecord: 0.0ms)
Actions #3

Updated by Og Maciel almost 11 years ago

The same issues applies to hammer organization add_user and hammer organization remove_user

[root@qetello03 ~]# hammer -v user info --id 2
Id:          2
Login:       hidden-jwwiEr
Name:
Email:       qVadfhEBUb@localhost
Last login:
Created at:  2014/02/04 20:27:34
Updated at:  2014/02/04 20:27:34

[root@qetello03 ~]# hammer -v organization add_user --id 1 --user-id 2
[root@qetello03 ~]# hammer -v organization add_user --name 'ACME_Corporation' --user-id 2

and

Started GET "/api/users/2" for 127.0.0.1 at 2014-02-07 10:52:16 -0500
Processing by Api::V2::UsersController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"2", "user"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/users/show.json.rabl (7.7ms)
Completed 200 OK in 62ms (Views: 8.1ms | ActiveRecord: 14.9ms)

Started GET "/api/organizations/1" for 127.0.0.1 at 2014-02-07 10:52:27 -0500
Processing by Api::V2::OrganizationsController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"1", "organization"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/taxonomies/show.json.rabl (13.5ms)
Completed 200 OK in 61ms (Views: 12.4ms | ActiveRecord: 12.9ms)

Started GET "/api/users/2" for 127.0.0.1 at 2014-02-07 10:52:27 -0500
Processing by Api::V2::UsersController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"2", "user"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/users/show.json.rabl (145.7ms)
Completed 200 OK in 192ms (Views: 145.9ms | ActiveRecord: 10.9ms)

Started PUT "/api/organizations/1" for 127.0.0.1 at 2014-02-07 10:52:27 -0500
Processing by Api::V2::OrganizationsController#update as JSON
  Parameters: {"user_ids"=>[2], "apiv"=>"v2", "id"=>"1", "organization"=>{}}
Authorized user admin(Admin User)
Expire fragment views/tabs_and_title_records-1 (0.5ms)
Completed 200 OK in 222ms (Views: 51.2ms | ActiveRecord: 0.0ms)

Started GET "/api/organizations?search=name+%3D+ACME_Corporation" for 127.0.0.1 at 2014-02-07 10:52:33 -0500
Processing by Api::V2::OrganizationsController#index as JSON
  Parameters: {"search"=>"name = ACME_Corporation", "apiv"=>"v2", "organization"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/taxonomies/index.json.rabl within api/v2/layouts/index_layout (3.1ms)
Completed 200 OK in 55ms (Views: 5.6ms | ActiveRecord: 15.3ms)

Started GET "/api/organizations/1" for 127.0.0.1 at 2014-02-07 10:52:33 -0500
Processing by Api::V2::OrganizationsController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"1", "organization"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/taxonomies/show.json.rabl (12.2ms)
Completed 200 OK in 60ms (Views: 11.0ms | ActiveRecord: 14.1ms)

Started GET "/api/users/2" for 127.0.0.1 at 2014-02-07 10:52:34 -0500
Processing by Api::V2::UsersController#show as JSON
  Parameters: {"apiv"=>"v2", "id"=>"2", "user"=>{}}
Authorized user admin(Admin User)
  Rendered api/v2/users/show.json.rabl (7.6ms)
Completed 200 OK in 71ms (Views: 8.2ms | ActiveRecord: 27.3ms)

Started PUT "/api/organizations/1" for 127.0.0.1 at 2014-02-07 10:52:34 -0500
Processing by Api::V2::OrganizationsController#update as JSON
  Parameters: {"user_ids"=>[2], "apiv"=>"v2", "id"=>"1", "organization"=>{}}
Authorized user admin(Admin User)
Expire fragment views/tabs_and_title_records-1 (0.1ms)
Completed 200 OK in 345ms (Views: 41.7ms | ActiveRecord: 0.0ms)
Actions #4

Updated by Og Maciel almost 11 years ago

The same issues applies to hammer organization add_hostgroup and hammer organization remove_hostgroup

[root@cloud-qe-10 ~]# hammer hostgroup list
--------------------------------------------------------------------------------------------------------------------------
ID | NAME        | LABEL       | OPERATING SYSTEM ID | SUBNET ID | DOMAIN ID | ENVIRONMENT ID | PUPPETCLASS IDS | ANCESTRY
--------------------------------------------------------------------------------------------------------------------------
1  | hostgroup01 | hostgroup01 |                     |           |           |                |                 |
2  | hostgroup02 | hostgroup02 |                     |           |           |                |                 |
--------------------------------------------------------------------------------------------------------------------------
[root@cloud-qe-10 ~]# hammer organization list
------------------------------------------------------------------------
ID | NAME             | LABEL            | DESCRIPTION
------------------------------------------------------------------------
1  | ACME_Corporation | ACME_Corporation | ACME_Corporation Organization
2  | foo              | foo              |
------------------------------------------------------------------------
[root@cloud-qe-10 ~]# hammer -v organization add_hostgroup --id 2 --hostgroup-id 1
[root@cloud-qe-10 ~]# hammer -v organization add_hostgroup --name foo --hostgroup-id 1
[root@cloud-qe-10 ~]# hammer -v organization add_hostgroup --id 2 --hostgroup hostgroup01
[root@cloud-qe-10 ~]# hammer -v organization add_hostgroup --name foo --hostgroup hostgroup01
Actions #5

Updated by Tomáš Strachota over 10 years ago

  • Is duplicate of Bug #7028: association of subnet, domain, templates and resources to organization has no effect via CLI added
Actions #6

Updated by Tomáš Strachota over 10 years ago

  • Status changed from New to Duplicate
Actions

Also available in: Atom PDF