Project

General

Profile

Actions

Bug #21190

closed

hammer cli is not able to figure out compute-resource-id from compute profile

Added by Stephan Schultchen over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

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

Actions #1

Updated by Marek Hulán over 6 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.

Actions

Also available in: Atom PDF