Support #3899
closedhammer cli showing incorrect error message
Description
- hammer subnet create --dhcp-id --domain-ids --gateway --network='66.4.74.0' --dns-secondary --dns-primary --from --name='bbr58uxg' --tftp-id --mask='255.255.255.0' --vlanid --to --dns-id
ERROR: option '--name' is required
See: 'hammer subnet create --help'
In the command above, error message is thrown although --name argument is passed
Updated by Dominic Cleal over 10 years ago
Maybe because some other arguments are missing? It might have interpreted "--name" as the argument to "--from" as no arg was supplied there.
Updated by Daniel Lobato Garcia over 10 years ago
- Tracker changed from Bug to Support
- Status changed from New to Closed
This is failing because you are giving hammer unnecessary arguments that are not allowing it to parse --name.
If you give an argument --from, --dns-primary, etc... you need to fill them in otherwise the program will think whatever is after the qualifier ('--from' in this case) will be part of the argument ('--name').
Just make sure to include whichever arguments you want to pass, but not empty ones.
hammer subnet create --network='66.4.74.0' --name 'bbr58uxg' --mask='255.255.255.0'
would be the correct command for what you wrote above. I've tested it and it worked fine.
Updated by Suresh Thirugnanasambandan over 10 years ago
Thank you Daniel. This error is generated from our automation script. I will fix it to not pass empty arguments.