Red Hat Bugzilla – Bug 1470676
Validations around Hostname_prefix setting are missing
Last modified: 2018-04-10 01:18:04 EDT
Description of problem:
Hostname_prefix setting description says: The default prefix to use for the host name, must start with a letter
Since we know that prefix must start w/ letter then lets add some validation around prefix. For now I can enter any string for this setting, which may not work when host is discovered.
Like: I tried -mac(notice - ) and it was updated, though when I discovered host, given prefix was not set. So we should add validations.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. go to Administer -> settings -> discovered -> hostname_prefix
2. set some string which doesn't start w/ letter
any string starting w/ special characters, number is being accepted
user shouldn't be able to set any random string. in case user tries to update string which doesn't start w/ letter, should get validation error.
Please note similar validation needs to be set in hammer:
]# hammer -u admin -p changeme settings list | grep discovery_prefix
discovery_prefix | | The default prefix to use for the host name, must start with a letter
[root@cloud-qe]# hammer -u admin -p changeme settings set --name discovery_prefix --value "1mac"
Setting [discovery_prefix] updated to [1mac]