code: def get_name(self):
          
          if not self.is_tpl():
              try:
                  return self.host_name
              except AttributeError:  # outch, no hostname
                  return 'UNNAMEDHOST'
          else:
              try:
                  return self.name
              except AttributeError:  # outch, no name for this template
                  return 'UNNAMEDHOSTTEMPLATE'
docs: Get the host name.
          Try several attributes before returning UNNAMED*
  
          :return: The name of the host
          :rtype: str