Project

General

Profile

Actions

Bug #18339

closed

hammer host create require -id version of options when name is used

Added by Tomáš Strachota almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Description of problem:

When creating a host without hostgroup validation on hammer side fails because it blindly checks whether options --architecture-id, --domain-id, --operatingsystem-id, --partition-table-id were passed and ignores the fact that they have name equivalents (--architecture, --domain, --operatingsystem, --partition-table).

Example:

hammer host create --architecture-id=1 --compute-profile="02-vm" --compute-resource="Local KVM" --domain="test.org" --environment-id=1 --location="Lab" --name="basic73" --operatingsystem-id=2 
Could not create the host:
  Error: Options --architecture-id, --domain-id, --operatingsystem-id, --partition-table-id are required

  See: 'hammer host create --help'

Version-Release number of selected component (if applicable):
hammer-cli-foreman 0.9.0

How reproducible:
100% when hostgroup is not used.

Steps to Reproduce:
1. Execute the above command

Actual results:
host creation fails

Expected results:
Host created

Actions

Also available in: Atom PDF