Get all available log format names and ids.

    :return: A dictionary of the log format names and ids.
    :rtype: dict

    CLI Example:

    .. code-block:: bash

        salt '*' win_smtp_server.get_log_format_types
182909
def get_log_format_types():
    '''
    
    '''
    ret = dict()
    prefix = 'logging/'

    with salt.utils.winapi.Com():
        try:
            connection = wmi.WMI(namespace=_WMI_NAMESPACE)
            objs = connection.IISLogModuleSetting()

            # Remove the prefix from the name.
            for obj in objs:
                name = six.text_type(obj.Name).replace(prefix, '', 1)
                ret[name] = six.text_type(obj.LogModuleId)
        except wmi.x_wmi as error:
            _LOG.error('Encountered WMI error: %s', error.com_error)
        except (AttributeError, IndexError) as error:
            _LOG.error('Error getting IISLogModuleSetting: %s', error)

    if not ret:
        _LOG.error('Unable to get log format types.')
    return ret
1286197
def get_jids():
    '''
    
    '''
    serv = _get_serv(ret=None)
    jids = _get_list(serv, 'jids')
    loads = serv.get_multi(jids)  # {jid: load, jid: load, ...}
    ret = {}
    for jid, load in six.iteritems(loads):
        ret[jid] = salt.utils.jid.format_jid_instance(jid, salt.utils.json.loads(load))
    return ret
864950
def get_log_lines(self):
        
        rel = self._client.reverse_url('SCAN', self.url)
        return self._manager.get_log_lines(**rel)
1112840
def to_api_repr(self):
        
        info = {}
        if self.log_name is not None:
            info["logName"] = self.log_name
        if self.resource is not None:
            info["resource"] = self.resource._to_dict()
        if self.labels is not None:
            info["labels"] = self.labels
        if self.insert_id is not None:
            info["insertId"] = self.insert_id
        if self.severity is not None:
            info["severity"] = self.severity
        if self.http_request is not None:
            info["httpRequest"] = self.http_request
        if self.timestamp is not None:
            info["timestamp"] = _datetime_to_rfc3339(self.timestamp)
        if self.trace is not None:
            info["trace"] = self.trace
        if self.span_id is not None:
            info["spanId"] = self.span_id
        if self.trace_sampled is not None:
            info["traceSampled"] = self.trace_sampled
        if self.source_location is not None:
            source_location = self.source_location.copy()
            source_location["line"] = str(source_location.pop("line", 0))
            info["sourceLocation"] = source_location
        if self.operation is not None:
            info["operation"] = self.operation
        return info
906471
def _format_info(data):
    '''
    
    '''
    return {'gid': data.pw_gid,
            'groups': list_groups(data.pw_name),
            'home': data.pw_dir,
            'name': data.pw_name,
            'shell': data.pw_shell,
            'uid': data.pw_uid,
            'fullname': data.pw_gecos}
1359671
def get_files_types(self):
        
        for i in self.get_files():
            buffer = self.zip.read(i)
            self.files_crc32[i] = crc32(buffer)
            self.files[i] = "Unknown"
        return self.files
293407
def get_metadata():
    
    misc_path = pkg_resources.resource_filename('hwrt', 'misc/')
    wm_symbols = os.path.join(misc_path, 'wm_symbols.csv')
    wm_tags = os.path.join(misc_path, 'wm_tags.csv')
    wm_tags2symbols = os.path.join(misc_path, 'wm_tags2symbols.csv')
    return {'symbols': read_csv(wm_symbols),
            'tags': read_csv(wm_tags),
            'tags2symbols': read_csv(wm_tags2symbols)}
1288391
def __get_logging_options(cmd_line_options, conf_file_options=None):
    
    options = {}

    for option in DEFAULT_OPTIONS['logging'].keys():
        options[option] = DEFAULT_OPTIONS['logging'][option]

        if conf_file_options and option in conf_file_options:
            options[option] = conf_file_options[option]

        if cmd_line_options and option in cmd_line_options:
            options[option] = cmd_line_options[option]

    return options
428073
def to_dict(self):
        
        return {
            'name': self.name,
            'id': self.id,
            'type': self.type,
            'workflow_id': self.workflow_id,
            'queue': self.queue,
            'start_time': self.start_time,
            'arguments': self.arguments,
            'acknowledged': self.acknowledged,
            'func_name': self.func_name,
            'hostname': self.hostname,
            'worker_name': self.worker_name,
            'worker_pid': self.worker_pid,
            'routing_key': self.routing_key
        }
950945
def get_type_data(name):
    
    name = name.upper()
    try:
        return {
            'authority': 'okapia.net',
            'namespace': 'TextFormats',
            'identifier': name,
            'domain': 'DisplayText Formats',
            'display_name': FORMAT_TYPES[name] + ' Format Type',
            'display_label': FORMAT_TYPES[name],
            'description': ('The display text format type for the ' +
                            FORMAT_TYPES[name] + ' format.')
        }
    except KeyError:
        raise NotFound('Format Type:' + name)
809322
def system_types():
    '''
    
    '''
    ret = {}
    for line in __salt__['cmd.run']('sfdisk -T').splitlines():
        if not line:
            continue
        if line.startswith('Id'):
            continue
        comps = line.strip().split()
        ret[comps[0]] = comps[1]
    return ret
1225406
def get_jids():
    '''
    
    '''
    with _get_serv(ret=None, commit=True) as cur:

        sql = '''SELECT jid, load
                FROM jids'''

        cur.execute(sql)
        data = cur.fetchall()
        ret = {}
        for jid, load in data:
            ret[jid] = salt.utils.jid.format_jid_instance(jid,
                                                          salt.utils.json.loads(load))
        return ret
1162658
def get_unpack_formats():
    
    formats = [(name, info[0], info[3]) for name, info in
               _UNPACK_FORMATS.items()]
    formats.sort()
    return formats
1048018
def get_logs(self):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinLookupSession.get_bins_template
        catalogs = self._get_provider_session('log_lookup_session').get_logs()
        cat_list = []
        for cat in catalogs:
            cat_list.append(Log(self._provider_manager, cat, self._runtime, self._proxy))
        return LogList(cat_list)
407178
def get_configuration():
    
    root = getLogger()
    name_levels = [('', logging.getLevelName(root.level))]
    name_levels.extend(
        (name, logging.getLevelName(logger.level))
        for name, logger
        in root.manager.loggerDict.items()
        if hasattr(logger, 'level')
    )

    config_string = ','.join('%s:%s' % x for x in name_levels)

    return dict(config_string=config_string, log_json=SLogger.manager.log_json)
875195
def get_formats(self):
        
        formats = []
        for key in (self.FORMAT_DC, self.FORMAT_FGDC, self.FORMAT_ISO):
            if hasattr(self, key):
                formats.append(key)
        return formats
381389
def get_formats(self, id, **data):
        
        
        return self.get("/formats/{0}/".format(id), data=data)