code: def is_correct(self):
          
          state = True
          cls = self.__class__
  
          hname = getattr(self, 'host_name', '')
          hgname = getattr(self, 'hostgroup_name', '')
          sdesc = getattr(self, 'service_description', '')
  
          if not sdesc:
              self.add_error("a %s has been defined without service_description, from: %s"
                             % (cls, self.imported_from))
          elif not hname:
              self.add_error("[%s::%s] not bound to any host."
                             % (self.my_type, self.get_name()))
          elif not hname and not hgname:
              self.add_error("a %s has been defined without host_name nor "
                             "hostgroup_name, from: %s" % (self.my_type, self.imported_from))
          elif self.host is None:
              self.add_error("[%s::%s] unknown host_name '%s'"
                             % (self.my_type, self.get_name(), self.host_name))
  
          # Set display_name if needed
          if not getattr(self, 'display_name', ''):
              self.display_name = "%s/%s" % (hname, sdesc)
  
          for char in cls.illegal_object_name_chars:
              if char not in self.service_description:
                  continue
  
              self.add_error("[%s::%s] service_description got an illegal character: %s"
                             % (self.my_type, self.get_name(), char))
  
          return super(Service, self).is_correct() and state
docs: Check if this object configuration is correct ::
  
          * Check our own specific properties
          * Call our parent class is_correct checker
  
          :return: True if the configuration is correct, otherwise False
          :rtype: bool