Bug #18905

Specifying a subnet name within the interface options of a 'hammer host create' command results in an error

Added by Ondřej Pražák 6 months ago. Updated 6 months ago.

Status:New
Priority:Normal
Assigned To:-
Category:Hosts
Target version:Foreman - Team Marek backlog
Difficulty: Bugzilla link:1340969
Found in release: Pull request:
Story points-
Velocity based estimate-

Description

We would like to use subnet name in interface options when creating a host.

[root@foreman ~]# hammer subnet list
---|---------------|---------------|--------------
ID | NAME | NETWORK | MASK
---|---------------|---------------|--------------
3 | Corporate 118 | 131.181.118.0 | 255.255.255.0
4 | Corporate 108 | 131.181.108.0 | 255.255.255.0

[root@foreman ~]# hammer host create --name "ess-r7-tst" --hostgroup "ESS Development Hosts - RHEL 7" --ask-root-password yes --interface="primary=true, provision=true, mac=00:50:56:91:7e:12, ip=131.181.108.85, subnet=Corporate_108"
Enter the root password for the host:
Could not create the host:
Subnet(#75847520) expected, got String(#7677800)

Using ID works OK
[root@foreman ~]# hammer host create --name "ess-r7-tst" --hostgroup "ESS Development Hosts - RHEL 7" --ask-root-password yes --interface='primary=true, provision=true, mac=00:50:56:91:7e:12, ip=131.181.108.85, subnet_id=4'
Enter the root password for the host:
Host created


Related issues

Related to Hammer CLI - Tracker #18935: Tracker for issues related to processing of nested option... New 03/16/2017

History

#1 Updated by Ondřej Pražák 6 months ago

  • Subject changed from Specifying a subnet name within the interface options of a 'hammer host create' command results in an error to Specifying a subnet name within the interface options of a 'hammer host create' command results in an error
  • Category changed from Other commands to Hosts
  • Target version set to Team Marek backlog

#2 Updated by Tomáš Strachota 6 months ago

  • Related to Tracker #18935: Tracker for issues related to processing of nested options in host create added

Also available in: Atom PDF