Make hostname checks uniform between instance rename and add
Currently, we have instance rename doing extra checks on the host
name, to prevent accidental wrong renames; however, instance create
doesn't do these checks (issue 291), which (if DNS is misconfigured)
can lead to hard to diagnose errors.
This patch abstracts the name checking from LUInstanceRename into a
separate function, which is then reused in both instance rename and
instance create.
Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Bernardo Dal Seno <bdalseno@google.com>