dealing with the scenario for hypervisor that hostname may or may not co...

...ntain domain name
Don't need "if name" here-there should always be a name passed in.  If you're concerned about it, just do a "if not name: return"

In your search, I think you meant hostfqdn=name, not hostname.  Hostname is not a property of Host.