Closed evgeni closed 4 years ago
Do we want to allow searching by pool_id
? I'm not sure if there is a better approach?
pool_id
is probably a good idea in this case, yeah.
Although the cp_id
(i.e. pool_id
) field exists in Katello:
$ curl -k https://$satlogin:$satpass@$(hostname -f)/katello/api/subscriptions/6 2>/dev/null | python -m json.tool | grep cp_id
"cp_id": "8a88e9826db22df5016dd018abdd029b",
It is not valid for searching:
$ curl -k https://$satlogin:$satpass@$(hostname -f)/katello/api/subscriptions?search=cp_id=8a88e9826db22df5016dd018abdd029b 2>/dev/null | python -m json.tool | grep error
"error": "Field 'cp_id' not recognized for searching!",
Right, these should be the possible search params:
https://github.com/Katello/katello/blob/master/app/models/katello/pool.rb#L24-L42
SUMMARY
when adding subscriptions to an activation key, ansible errors out when there are multiple subscriptions with the same name (but different contract dates, e.g.). this is because
handle_find_response
explicitly expects one result, not multiple.ISSUE TYPE
ANSIBLE VERSION
KATELLO/FOREMAN VERSION
NAILGUN VERSION
EXPECTED RESULTS
Sub is added
ACTUAL RESULTS