Make sure hostname has no domain

In some environments, hostname returns a hostname with a
default domain, e.g novalocal. This domain may conflict
with the dns_domain option setting.  Added a test to strip
off domain if that happens.

Issue-Id: DCAEGEN2-128
Change-Id: Ie4995f542305e465ec11689acccc053f081f2df2
Signed-off-by: Lusheng Ji <lji@research.att.com>
1 file changed