Project

General

Profile

Bug #18339

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

Added by Tomáš Strachota over 3 years ago. Updated almost 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Hosts
Difficulty:
Triaged:
Bugzilla link:
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

Associated revisions

Revision 9697696e (diff)
Added by Tomas Strachota over 3 years ago

Fixes #18339 - host create uses name options

History

#1 Updated by Tomáš Strachota over 3 years ago

  • Subject changed from hammer host create require -id version of options when name is used to hammer host create require -id version of options when name is used
  • Category changed from Other commands to Hosts
  • Target version set to 115

#2 Updated by Tomáš Strachota over 3 years ago

  • Status changed from New to Assigned
  • Assignee set to Tomáš Strachota
  • Target version changed from 115 to 1.11.2

#3 Updated by Marek Hulán over 3 years ago

  • Target version changed from 1.11.2 to 1.11.4

#4 Updated by The Foreman Bot over 3 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/284 added

#5 Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#6 Updated by Tomáš Strachota over 3 years ago

  • Legacy Backlogs Release (now unused) set to 234

Also available in: Atom PDF