Retrieves a string representation of the severity.

    Args:
      severity (int): severity.

    Returns:
      str: description of the event severity.
429837
def GetSeverityString(self, severity):
    
    if 0 <= severity < len(self._SEVERITY):
      return self._SEVERITY[severity]
    return 'Unknown {0:d}'.format(severity)
1343129
protected function getSeverityString($severity)
    {
        switch ($severity) {
            case Log::Error:
                return 'Error';
            case Log::Warning:
                return 'Warning';
            case Log::Notice:
                return 'Notice';
            case Log::Info:
                return 'Info';
            case Log::Debug:
            default:
                return 'Debug';
        }
    }
1275456
def version(self, event):
        
        name = "%s.%s" % (self.__class__.__module__, self.__class__.__name__)
        return "%s [%s]" % (settings.GNOTTY_VERSION_STRING, name)
484183
public static String getStatusDescription(int status)
   {
      String description = "";

      Integer statusKey = new Integer(status);
      if (statusDescriptions.containsKey(statusKey))
      {
         description = statusDescriptions.get(statusKey);
      }

      return String.format("%s %d %s", WebDavConst.HTTPVER, status, description);
   }
227188
def str_def(self):
        
        return "classname={!r}; read_timeout={!r}; read_retries={!r}; " \
            "message={!r};". \
            format(self.__class__.__name__, self.read_timeout,
                   self.read_retries, self.args[0])
877358
def get_severity(self, alert):
        
        query = {
            'environment': alert.environment,
            'resource': alert.resource,
            '$or': [
                {
                    'event': alert.event,
                    'severity': {'$ne': alert.severity}
                },
                {
                    'event': {'$ne': alert.event},
                    'correlate': alert.event
                }],
            'customer': alert.customer
        }
        r = self.get_db().alerts.find_one(query, projection={'severity': 1, '_id': 0})
        return r['severity'] if r else None
1097825
def get_summary_string(self):
        
        from rez.plugin_managers import plugin_manager

        txt = "Rez %s" % __version__
        txt += "\n\n%s" % plugin_manager.get_summary_string()
        return txt
885275
def show_details(self):
        
        res = str(self)
        res += '\nDETAILS\n'
        for f in self.factors:
            res += str(f)

        return res
652256
def status(self, status_code=None):
        
        if status_code is not None:
            self.response_model.status = status_code
        # return string for response support
        return str(self.response_model.status)
640474
def get_description(self):
        '''
        
        '''
        return '%(description)s listening on %(host)s:%(port)s' % {
            'description': super(WebInterface, self).get_description(),
            'host': self._host,
            'port': self._port
        }
1243156
def _parse(self):
        

        try:

            self.vars['status'] = self.json['status']

        except (KeyError, ValueError, TypeError):

            pass

        for v in ['remarks', 'notices']:

            try:

                self.vars[v] = self.summarize_notices(self.json[v])

            except (KeyError, ValueError, TypeError):

                pass

        try:

            self.vars['links'] = self.summarize_links(self.json['links'])

        except (KeyError, ValueError, TypeError):

            pass

        try:

            self.vars['events'] = self.summarize_events(self.json['events'])

        except (KeyError, ValueError, TypeError):

            pass
430578
def status_to_string(cls, status):
        
        strings = {CheckerMessages.INFO: "Info",
                   CheckerMessages.WARNING: "Warning",
                   CheckerMessages.ERROR: "Error"}
        return strings[status]
476549
private SeverityEnumType getSeverity(Severity severity, Severity defaultSeverity) {
        if (severity == null) {
            severity = defaultSeverity;
        }
        return defaultSeverity != null ? SeverityEnumType.fromValue(severity.getValue()) : null;
    }
37665
def get_issuer_str(self):
        
        name_str = ""
        attrsDict = self.get_issuer()
        for attrType, attrSymbol in _attrName_mapping:
            if attrType in attrsDict:
                name_str += "/" + attrSymbol + "="
                name_str += attrsDict[attrType]
        for attrType in sorted(attrsDict):
            if attrType not in _attrName_specials:
                name_str += "/" + attrType + "="
                name_str += attrsDict[attrType]
        return name_str
306285
def get_string(self):
    
    return self.left.chr+':'+str(self.left.end)+'-'+self.right.chr+':'+str(self.right.start)
325556
def str_def(self):
        
        return "classname={!r}; operation_timeout={!r}; message={!r};". \
            format(self.__class__.__name__, self.operation_timeout,
                   self.args[0])
96310
def severity(self):
        
        resource_list = self.traffic_incident()
        severity = namedtuple('severity', 'severity')
        if len(resource_list) == 1 and resource_list[0] is None:
            return None
        else:
            try:
                return [severity(resource['severity'])
                        for resource in resource_list]
            except (KeyError, TypeError):
                return [severity(resource['Severity'])
                        for resource in resource_list]