Bug #17247

Hammer --interface option doesn't work with subnet name and domain name while creating new host.

Added by Tomáš Strachota 9 months ago. Updated 4 months ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Networking
Target version:Foreman - Team Marek backlog
Difficulty: Bugzilla link:1384497
Found in release: Pull request:https://github.com/theforeman/hammer-cli-foreman/pull/273
Story points-
Velocity based estimate-
Releasehammer-cli-foreman-0.10.0Release relationshipAuto

Description

Description of problem:
New host creation using --interface options with hammer doesn't accept the subnet and domain names. It works fine with IDs.

hammer host create --name amar-host-one-domain-subnet --hostgroup 'RHEL7' --lifecycle-environment Library --content-view RHEL7 --root-password 'RedHat' --location Celestial --organization Orion --build false --interface="type=interface,mac=fe:54:00:06:f6:68,identifier=eth0,name=h1test,subnet=OrionSubnet1,domain=sat6.gsslab.pnq.redhat.com,ip=10.65.242.70,primary=true,provision=true" 
[Foreman] Password for admin: 
Could not create the host:
  Subnet(#124149220) expected, got String(#19113840)

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

Steps to Reproduce:
1. Try to create a new system profile with hammer using domain name and subnet name

Actual results:

Could not create the host:
  Subnet(#124149220) expected, got String(#19113840)

Expected results:
It should create the host.

Associated revisions

Revision ef32a551
Added by Tomas Strachota 6 months ago

Fixes #17247 - resolve subnet and domain for host create/update (#273)

History

#1 Updated by Tomáš Strachota 9 months ago

  • Subject changed from Hammer --interface option doesn't work with subnet name and domain name while creating new host. to Hammer --interface option doesn't work with subnet name and domain name while creating new host.
  • Category set to Networking
  • Target version set to Team Marek backlog

#2 Updated by The Foreman Bot 7 months ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Tomáš Strachota
  • Pull request https://github.com/theforeman/hammer-cli-foreman/pull/273 added

#3 Updated by Anonymous 6 months ago

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

#4 Updated by Tomáš Strachota 4 months ago

  • Release set to hammer-cli-foreman-0.10.0

Also available in: Atom PDF