Project

General

Profile

Bug #16889

Hammer makes additional calls to the API that are unneeded

Added by David Davis almost 3 years ago. Updated about 1 year ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:
Difficulty:
Triaged:
Yes
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

Description

I am running this command:

hammer content-view filter update --name blahah --content-view Test --organization "Default Organization"

Here are the requests I see:

[ INFO 2016-10-12T11:49:54 API] GET /katello/api/organizations
[DEBUG 2016-10-12T11:49:54 API] Params: {
    :search => "name = \"Default Organization\"" 
}
[DEBUG 2016-10-12T11:49:54 API] Headers: {
    :params => {
        :search => "name = \"Default Organization\"" 
    }
}
[ INFO 2016-10-12T11:49:54 API] GET /katello/api/organizations/1/content_views
[DEBUG 2016-10-12T11:49:54 API] Params: {
    "name" => "Test" 
}
[DEBUG 2016-10-12T11:49:54 API] Headers: {
    :params => {
        "name" => "Test" 
    }
}
[ INFO 2016-10-12T11:49:55 API] GET /katello/api/organizations
[DEBUG 2016-10-12T11:49:55 API] Params: {
    :search => "name = \"Default Organization\"" 
}
[DEBUG 2016-10-12T11:49:55 API] Headers: {
    :params => {
        :search => "name = \"Default Organization\"" 
    }
}
[ INFO 2016-10-12T11:49:56 API] GET /katello/api/organizations/1/content_views
[DEBUG 2016-10-12T11:49:56 API] Params: {
    "name" => "Test" 
}
[DEBUG 2016-10-12T11:49:56 API] Headers: {
    :params => {
        "name" => "Test" 
    }
}
[ INFO 2016-10-12T11:49:56 API] GET /katello/api/content_views/2/filters
[DEBUG 2016-10-12T11:49:56 API] Params: {
    "name" => "blahah" 
}
[DEBUG 2016-10-12T11:49:56 API] Headers: {
    :params => {
        "name" => "blahah" 
    }
}
[ INFO 2016-10-12T11:49:56 API] PUT /katello/api/content_views/2/filters/1
[DEBUG 2016-10-12T11:49:56 API] Params: {
    "name" => "blahah" 
}

Seems like it's calling the org endpoint and content view endpoint an extra two times. Not sure if this applies to other commands.


Related issues

Is duplicate of Katello - Bug #15930: Organization options hit the API multiple times in hammer-cli-katelloNew2016-08-01

History

#1 Updated by David Davis almost 3 years ago

  • Is duplicate of Bug #15930: Organization options hit the API multiple times in hammer-cli-katello added

#2 Updated by David Davis almost 3 years ago

  • Status changed from New to Duplicate

#3 Updated by Justin Sherrill almost 3 years ago

  • Legacy Backlogs Release (now unused) set to 166

Also available in: Atom PDF