It's impossible to use hammer or the API to set the installation source to a synced content (product)
The scenario is as follows
- a product is created pointing to a Centos repo
- Katello creates the corresponding installation media
- the installation media (as synced content) is associated to an hostgroup: this is only possible via the UI
- any new host created via hammer and using the aforementioned hostgroup requires a --medium parameter, or it will say
Failed to generate PXELinux template : undefined method `path' for nil:NilClass
- by using the UI it is possible to create a host that uses the synced product as installation source. hammer host info show no difference between such a host and another created using the corresponding medium. The relevant difference is that while the host with synced content source draws the packages from the content source (in my case a capsule) the other one always refers to the URL, which points to the main katello instance.
Summarizing, the bugs are:
1. it's not possible to manage or point to a synced content as installation source
2. it's not possible to set a synced content as installation source using hammer or the api
3. the synced content set in the hostgroup is not correctly inherited by a host
4. it's not possible to create a host that uses the content source as installation media without using the UI.