Bug #18905
openSpecifying a subnet name within the interface options of a 'hammer host create' command results in an error
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
Updated by Ondřej Pražák over 7 years 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 115
Updated by Tomáš Strachota over 7 years ago
- Related to Tracker #18935: Tracker for issues related to processing of nested options in host create added
Updated by Aditi Puntambekar about 6 years ago
- Assignee set to Aditi Puntambekar
- Triaged set to No