Revision b3efb0eb
Added by John Mitsch almost 6 years ago
app/views/katello/api/v2/upstream_subscriptions/base.json.rabl | ||
---|---|---|
object @resource ||= @object
|
||
|
||
attributes :pool_id => :id
|
||
attributes :pool_id
|
||
attributes :id
|
||
attributes :status
|
||
attributes :quantity
|
||
attributes :available
|
||
... | ... | |
attributes :product_name
|
||
attributes :product_id
|
||
attributes :subscription_id
|
||
|
||
if params[:pool_ids]
|
||
attributes :local_pool_ids
|
||
end
|
||
attributes :local_pool_ids
|
Also available in: Unified diff
Fixes #24064 - Update upstream subs API response id
and always return local pool ids on index call.
This changes the index GET response for
/katello/api/v2/organizations/$ORG/upstream_subscriptions.
The `pool_id` attribute is removed since it is redundant, the
id parameter will return the candlepin ID, so it was duplicating data.
Local pool ids are also always returned on an index call. Since
upstream sub information is being returned to us when we import
sub data from candlepin locally, its trivial to import this into
our database. Having this info in our database means we can match
the upstream subscriptions to local pool ids during the index call
to /upstream_subscriptions without adding much complexity to the
call.