Bug #21190
closedhammer cli is not able to figure out compute-resource-id from compute profile
Description
we use the vmware integration with foreman, we also have created compute profiles.
our hostgroups all have a compute-profile associated with it, as well as network & operating system details.
since compute profiles are always related to a single compute resource, one should not be needed to specify the --compute-resource-id with hammer.
so this should work:
hammer host create --hostgroup-id ${GROUP} --build true --name ${HOST}
but it is not, we have to specify the compute-resource-id like this:
hammer host create --hostgroup-id ${GROUP} --build true --name ${HOST} --compute-resource-id 1
if we do not do this, hammer complains about this:
Could not create the host:
Mac can't be blank
Updated by Marek Hulán over 7 years ago
- Status changed from New to Resolved
I don't think "compute profiles are always related to a single compute resource". Compute profile, e.g. "Small" is universal entity which can mean different set of compute attributes for different compute resources. E.g. small for libvirt can mean 1 CPU, 512 MB while for OpenStack it means tiny flavor. Therefore compute profile always need compute resource so we can tell what compute attributes should be applied to a host. Since host group can't specify compute resource (yet, see #5790), a compute resource id is always mandatory.
It might be just confusing since UI always selects first compute resource so you don't need to specify that manually. There's also a chance that I misunderstood the request, in such case please add a comment or ask for reopening with more information. I'm marking as resolved for now.