Hostnames case-sensitive


why there is the possibility for adding hostnames with same name as long they are not same case?
For example I can add following hosts:

  • HOST1
  • host1
  • Host1
1 Like

Hosts are stored as config files on linux server.
Files with same name but different case use are different files.

It is not directly the file name thing but it goes in the right direction.
Every host is a key inside some Python dictionaries and every key, as far as i know, is key sensitive.
If you want to force one behavior then you can do something inside the software to convert all inserted host names to lower or upper case but i don’t want to force this with such a setting.

For me it was meant why there is the possibility… because imho it should not be allowed by the software. And the reason with “because it’s a python thing” is not really a reason to do it like that. But this discussion I already had at the API changes with is using a python format but not a JSON format which every tool could easy work with.
But thank you both for your answer. :slight_smile:

Yes, but some (not much) consumers of me prefer Uppercase Hostname, others (most) lowercase.

If the software now forces one way, some, not all would like that.

It’ not about forcing a way - it’s about not allowing a host which is called HOST1 if there is already a host1. Which way you want your hosts you still should be decide by your own.