Code stringlengths 103 85.9k | Summary listlengths 0 94 |
|---|---|
Please provide a description of the function:def is_fifo(name):
'''
Check if a file exists and is a FIFO.
CLI Example:
.. code-block:: bash
salt '*' file.is_fifo /dev/fifo
'''
name = os.path.expanduser(name)
stat_structure = None
try:
stat_structure = os.stat(name)
... | [] |
Please provide a description of the function:def mknod_fifo(name,
user=None,
group=None,
mode='0660'):
'''
.. versionadded:: 0.17.0
Create a FIFO pipe.
CLI Example:
.. code-block:: bash
salt '*' file.mknod_fifo /dev/fifo
'''
name = os.p... | [] |
Please provide a description of the function:def mknod(name,
ntype,
major=0,
minor=0,
user=None,
group=None,
mode='0600'):
'''
.. versionadded:: 0.17.0
Create a block device, character device, or fifo pipe.
Identical to the gnu mknod.
CLI... | [] |
Please provide a description of the function:def list_backups(path, limit=None):
'''
.. versionadded:: 0.17.0
Lists the previous versions of a file backed up using Salt's :ref:`file
state backup <file-state-backups>` system.
path
The path on the minion to check for backups
limit
... | [] |
Please provide a description of the function:def list_backups_dir(path, limit=None):
'''
Lists the previous versions of a directory backed up using Salt's :ref:`file
state backup <file-state-backups>` system.
path
The directory on the minion to check for backups
limit
Limit the numb... | [] |
Please provide a description of the function:def restore_backup(path, backup_id):
'''
.. versionadded:: 0.17.0
Restore a previous version of a file that was backed up using Salt's
:ref:`file state backup <file-state-backups>` system.
path
The path on the minion to check for backups
bac... | [] |
Please provide a description of the function:def delete_backup(path, backup_id):
'''
.. versionadded:: 0.17.0
Delete a previous version of a file that was backed up using Salt's
:ref:`file state backup <file-state-backups>` system.
path
The path on the minion to check for backups
backu... | [] |
Please provide a description of the function:def grep(path,
pattern,
*opts):
'''
Grep for a string in the specified file
.. note::
This function's return value is slated for refinement in future
versions of Salt
path
Path to the file to be searched
..... | [] |
Please provide a description of the function:def open_files(by_pid=False):
'''
Return a list of all physical open files on the system.
CLI Examples:
.. code-block:: bash
salt '*' file.open_files
salt '*' file.open_files by_pid=True
'''
# First we collect valid PIDs
pids = ... | [] |
Please provide a description of the function:def move(src, dst):
'''
Move a file or directory
CLI Example:
.. code-block:: bash
salt '*' file.move /path/to/src /path/to/dst
'''
src = os.path.expanduser(src)
dst = os.path.expanduser(dst)
if not os.path.isabs(src):
rais... | [] |
Please provide a description of the function:def diskusage(path):
'''
Recursively calculate disk usage of path and return it
in bytes
CLI Example:
.. code-block:: bash
salt '*' file.diskusage /path/to/check
'''
total_size = 0
seen = set()
if os.path.isfile(path):
... | [] |
Please provide a description of the function:def set_(key, value, profile=None):
'''
Set a key/value pair in sqlite3
'''
if not profile:
return False
conn, cur, table = _connect(profile)
if six.PY2:
value = buffer(salt.utils.msgpack.packb(value))
else:
value = memoryv... | [] |
Please provide a description of the function:def get(key, profile=None):
'''
Get a value from sqlite3
'''
if not profile:
return None
_, cur, table = _connect(profile)
q = profile.get('get_query', ('SELECT value FROM {0} WHERE '
'key=:key'.format(table))... | [] |
Please provide a description of the function:def delete(key, profile=None):
'''
Delete a key/value pair from sqlite3
'''
if not profile:
return None
conn, cur, table = _connect(profile)
q = profile.get('delete_query', ('DELETE FROM {0} WHERE '
'key=:k... | [] |
Please provide a description of the function:def show(destination, protocol=None, **kwargs): # pylint: disable=unused-argument
'''
Displays all details for a certain route learned via a specific protocol.
If the protocol is not specified, will return all possible routes.
.. note::
This funct... | [] |
Please provide a description of the function:def present(name,
skip_translate=None,
ignore_collisions=False,
validate_ip_addrs=True,
containers=None,
reconnect=True,
**kwargs):
'''
.. versionchanged:: 2018.3.0
Support added for netw... | [] |
Please provide a description of the function:def absent(name):
'''
Ensure that a network is absent.
name
Name of the network
Usage Example:
.. code-block:: yaml
network_foo:
docker_network.absent
'''
ret = {'name': name,
'changes': {},
'res... | [] |
Please provide a description of the function:def _remove_network(network):
'''
Remove network, including all connected containers
'''
ret = {'name': network['Name'],
'changes': {},
'result': False,
'comment': ''}
errors = []
for cid in network['Containers']:
... | [] |
Please provide a description of the function:def pre_fork(self, _):
'''
Pre-fork we need to create the zmq router device
'''
if 'aes' not in salt.master.SMaster.secrets:
# TODO: This is still needed only for the unit tests
# 'tcp_test.py' and 'zeromq_test.py'. Fix... | [] |
Please provide a description of the function:def _encrypt_private(self, ret, dictkey, target):
'''
The server equivalent of ReqChannel.crypted_transfer_decode_dictentry
'''
# encrypt with a specific AES key
pubfn = os.path.join(self.opts['pki_dir'],
'... | [] |
Please provide a description of the function:def _update_aes(self):
'''
Check to see if a fresh AES key is available and update the components
of the worker
'''
if salt.master.SMaster.secrets['aes']['secret'].value != self.crypticle.key_string:
self.crypticle = salt.c... | [] |
Please provide a description of the function:def _auth(self, load):
'''
Authenticate the client, use the sent public key to encrypt the AES key
which was generated at start up.
This method fires an event over the master event manager. The event is
tagged "auth" and returns a dic... | [] |
Please provide a description of the function:def which(exe):
'''
Decorator wrapper for salt.utils.path.which
'''
def wrapper(function):
def wrapped(*args, **kwargs):
if salt.utils.path.which(exe) is None:
raise CommandNotFoundError(
'The \'{0}\' bi... | [] |
Please provide a description of the function:def which_bin(exes):
'''
Decorator wrapper for salt.utils.path.which_bin
'''
def wrapper(function):
def wrapped(*args, **kwargs):
if salt.utils.path.which_bin(exes) is None:
raise CommandNotFoundError(
'... | [] |
Please provide a description of the function:def runner():
'''
Return all inline documentation for runner modules
CLI Example:
.. code-block:: bash
salt-run doc.runner
'''
client = salt.runner.RunnerClient(__opts__)
ret = client.get_docs()
return ret | [] |
Please provide a description of the function:def wheel():
'''
Return all inline documentation for wheel modules
CLI Example:
.. code-block:: bash
salt-run doc.wheel
'''
client = salt.wheel.Wheel(__opts__)
ret = client.get_docs()
return ret | [] |
Please provide a description of the function:def execution():
'''
Collect all the sys.doc output from each minion and return the aggregate
CLI Example:
.. code-block:: bash
salt-run doc.execution
'''
client = salt.client.get_local_client(__opts__['conf_file'])
docs = {}
try:
... | [] |
Please provide a description of the function:def file(suffix='', prefix='tmp', parent=None):
'''
Create a temporary file
CLI Example:
.. code-block:: bash
salt '*' temp.file
salt '*' temp.file prefix='mytemp-' parent='/var/run/'
'''
fh_, tmp_ = tempfile.mkstemp(suffix, prefix,... | [] |
Please provide a description of the function:def _reformat_low(self, low):
'''
Format the low data for RunnerClient()'s master_call() function
This also normalizes the following low data formats to a single, common
low data structure.
Old-style low: ``{'fun': 'jobs.lookup_jid',... | [] |
Please provide a description of the function:def cmd_async(self, low):
'''
Execute a runner function asynchronously; eauth is respected
This function requires that :conf_master:`external_auth` is configured
and the user is authorized to execute runner functions: (``@runner``).
... | [] |
Please provide a description of the function:def cmd_sync(self, low, timeout=None, full_return=False):
'''
Execute a runner function synchronously; eauth is respected
This function requires that :conf_master:`external_auth` is configured
and the user is authorized to execute runner func... | [] |
Please provide a description of the function:def run(self):
'''
Execute the runner sequence
'''
# Print documentation only
if self.opts.get('doc', False):
self.print_docs()
else:
return self._run_runner() | [] |
Please provide a description of the function:def _run_runner(self):
'''
Actually execute specific runner
:return:
'''
import salt.minion
ret = {}
low = {'fun': self.opts['fun']}
try:
# Allocate a jid
async_pub = self._gen_async_pub(... | [] |
Please provide a description of the function:def reg(name):
'''
Activate this register to turn on a minion status tracking register, this
register keeps the current status beacon data and the time that each beacon
was last checked in.
'''
ret = {'name': name,
'changes': {},
... | [] |
Please provide a description of the function:def top(**kwargs):
'''
Query |reclass| for the top data (states of the minions).
'''
# If reclass is installed, __virtual__ put it onto the search path, so we
# don't need to protect against ImportError:
# pylint: disable=3rd-party-module-not-gated
... | [] |
Please provide a description of the function:def create_pipeline(name, unique_id, description='', region=None, key=None, keyid=None,
profile=None):
'''
Create a new, empty pipeline. This function is idempotent.
CLI example:
.. code-block:: bash
salt myminion boto_datapipel... | [] |
Please provide a description of the function:def delete_pipeline(pipeline_id, region=None, key=None, keyid=None, profile=None):
'''
Delete a pipeline, its pipeline definition, and its run history. This function is idempotent.
CLI example:
.. code-block:: bash
salt myminion boto_datapipeline.d... | [] |
Please provide a description of the function:def describe_pipelines(pipeline_ids, region=None, key=None, keyid=None, profile=None):
'''
Retrieve metadata about one or more pipelines.
CLI example:
.. code-block:: bash
salt myminion boto_datapipeline.describe_pipelines ['my_pipeline_id']
''... | [] |
Please provide a description of the function:def list_pipelines(region=None, key=None, keyid=None, profile=None):
'''
Get a list of pipeline ids and names for all pipelines.
CLI Example:
.. code-block:: bash
salt myminion boto_datapipeline.list_pipelines profile=myprofile
'''
client =... | [] |
Please provide a description of the function:def pipeline_id_from_name(name, region=None, key=None, keyid=None, profile=None):
'''
Get the pipeline id, if it exists, for the given name.
CLI example:
.. code-block:: bash
salt myminion boto_datapipeline.pipeline_id_from_name my_pipeline_name
... | [] |
Please provide a description of the function:def put_pipeline_definition(pipeline_id, pipeline_objects, parameter_objects=None,
parameter_values=None, region=None, key=None, keyid=None, profile=None):
'''
Add tasks, schedules, and preconditions to the specified pipeline. This functio... | [] |
Please provide a description of the function:def _get_client(region, key, keyid, profile):
'''
Get a boto connection to Data Pipeline.
'''
session = _get_session(region, key, keyid, profile)
if not session:
log.error("Failed to get datapipeline client.")
return None
return sessi... | [] |
Please provide a description of the function:def _get_session(region, key, keyid, profile):
'''
Get a boto3 session
'''
if profile:
if isinstance(profile, six.string_types):
_profile = __salt__['config.option'](profile)
elif isinstance(profile, dict):
_profile = p... | [] |
Please provide a description of the function:def make_image(location, size, fmt):
'''
Create a blank virtual machine image file of the specified size in
megabytes. The image can be created in any format supported by qemu
CLI Example:
.. code-block:: bash
salt '*' qemu_img.make_image /tmp/... | [] |
Please provide a description of the function:def convert(orig, dest, fmt):
'''
Convert an existing disk image to another format using qemu-img
CLI Example:
.. code-block:: bash
salt '*' qemu_img.convert /path/to/original.img /path/to/new.img qcow2
'''
cmd = ('qemu-img', 'convert', '-O... | [] |
Please provide a description of the function:def ping(host, timeout=False, return_boolean=False):
'''
Performs a ping to a host
CLI Example:
.. code-block:: bash
salt '*' network.ping archlinux.org
.. versionadded:: 2016.11.0
Return a True or False instead of ping output.
.. co... | [] |
Please provide a description of the function:def netstat():
'''
Return information on open ports and states
CLI Example:
.. code-block:: bash
salt '*' network.netstat
'''
ret = []
cmd = ['netstat', '-nao']
lines = __salt__['cmd.run'](cmd, python_shell=False).splitlines()
f... | [] |
Please provide a description of the function:def traceroute(host):
'''
Performs a traceroute to a 3rd party host
CLI Example:
.. code-block:: bash
salt '*' network.traceroute archlinux.org
'''
ret = []
cmd = ['tracert', salt.utils.network.sanitize_host(host)]
lines = __salt__[... | [] |
Please provide a description of the function:def nslookup(host):
'''
Query DNS for information about a domain or ip address
CLI Example:
.. code-block:: bash
salt '*' network.nslookup archlinux.org
'''
ret = []
addresses = []
cmd = ['nslookup', salt.utils.network.sanitize_host... | [] |
Please provide a description of the function:def get_route(ip):
'''
Return routing information for given destination ip
.. versionadded:: 2016.11.5
CLI Example::
salt '*' network.get_route 10.10.10.10
'''
cmd = 'Find-NetRoute -RemoteIPAddress {0}'.format(ip)
out = __salt__['cmd.ru... | [] |
Please provide a description of the function:def dig(host):
'''
Performs a DNS lookup with dig
Note: dig must be installed on the Windows minion
CLI Example:
.. code-block:: bash
salt '*' network.dig archlinux.org
'''
cmd = ['dig', salt.utils.network.sanitize_host(host)]
retu... | [] |
Please provide a description of the function:def interfaces_names():
'''
Return a list of all the interfaces names
CLI Example:
.. code-block:: bash
salt '*' network.interfaces_names
'''
ret = []
with salt.utils.winapi.Com():
c = wmi.WMI()
for iface in c.Win32_Net... | [] |
Please provide a description of the function:def ip_addrs(interface=None, include_loopback=False, cidr=None, type=None):
'''
Returns a list of IPv4 addresses assigned to the host.
interface
Only IP addresses from that interface will be returned.
include_loopback : False
Include loopbac... | [] |
Please provide a description of the function:def ip_addrs6(interface=None, include_loopback=False, cidr=None):
'''
Returns a list of IPv6 addresses assigned to the host.
interface
Only IP addresses from that interface will be returned.
include_loopback : False
Include loopback ::1 IPv6... | [] |
Please provide a description of the function:def connect(host, port=None, **kwargs):
'''
Test connectivity to a host using a particular
port from the minion.
.. versionadded:: 2016.3.0
CLI Example:
.. code-block:: bash
salt '*' network.connect archlinux.org 80
salt '*' netwo... | [] |
Please provide a description of the function:def _post_message(user,
device,
message,
title,
priority,
expire,
retry,
sound,
api_version=1,
token=None):
'... | [] |
Please provide a description of the function:def returner(ret):
'''
Send an PushOver message with the data
'''
_options = _get_options(ret)
user = _options.get('user')
device = _options.get('device')
token = _options.get('token')
title = _options.get('title')
priority = _options.ge... | [] |
Please provide a description of the function:def _format_entrypoint_target(ep):
'''
Makes a string describing the target of an EntryPoint object.
Base strongly on EntryPoint.__str__().
'''
s = ep.module_name
if ep.attrs:
s += ':' + '.'.join(ep.attrs)
return s | [] |
Please provide a description of the function:def minion_mods(
opts,
context=None,
utils=None,
whitelist=None,
initial_load=False,
loaded_base_name=None,
notify=False,
static_modules=None,
proxy=None):
'''
Load execution modules
Returns... | [] |
Please provide a description of the function:def raw_mod(opts, name, functions, mod='modules'):
'''
Returns a single module loaded raw and bypassing the __virtual__ function
.. code-block:: python
import salt.config
import salt.loader
__opts__ = salt.config.minion_config('/etc/sal... | [] |
Please provide a description of the function:def engines(opts, functions, runners, utils, proxy=None):
'''
Return the master services plugins
'''
pack = {'__salt__': functions,
'__runners__': runners,
'__proxy__': proxy,
'__utils__': utils}
return LazyLoader(
... | [] |
Please provide a description of the function:def proxy(opts, functions=None, returners=None, whitelist=None, utils=None):
'''
Returns the proxy module for this salt-proxy-minion
'''
ret = LazyLoader(
_module_dirs(opts, 'proxy'),
opts,
tag='proxy',
pack={'__salt__': functi... | [] |
Please provide a description of the function:def returners(opts, functions, whitelist=None, context=None, proxy=None):
'''
Returns the returner modules
'''
return LazyLoader(
_module_dirs(opts, 'returners', 'returner'),
opts,
tag='returner',
whitelist=whitelist,
p... | [] |
Please provide a description of the function:def utils(opts, whitelist=None, context=None, proxy=proxy):
'''
Returns the utility modules
'''
return LazyLoader(
_module_dirs(opts, 'utils', ext_type_dirs='utils_dirs'),
opts,
tag='utils',
whitelist=whitelist,
pack={'... | [] |
Please provide a description of the function:def pillars(opts, functions, context=None):
'''
Returns the pillars modules
'''
ret = LazyLoader(_module_dirs(opts, 'pillar'),
opts,
tag='pillar',
pack={'__salt__': functions,
... | [] |
Please provide a description of the function:def tops(opts):
'''
Returns the tops modules
'''
if 'master_tops' not in opts:
return {}
whitelist = list(opts['master_tops'].keys())
ret = LazyLoader(
_module_dirs(opts, 'tops', 'top'),
opts,
tag='top',
whiteli... | [] |
Please provide a description of the function:def wheels(opts, whitelist=None, context=None):
'''
Returns the wheels modules
'''
if context is None:
context = {}
return LazyLoader(
_module_dirs(opts, 'wheel'),
opts,
tag='wheel',
whitelist=whitelist,
pac... | [] |
Please provide a description of the function:def outputters(opts):
'''
Returns the outputters modules
:param dict opts: The Salt options dictionary
:returns: LazyLoader instance, with only outputters present in the keyspace
'''
ret = LazyLoader(
_module_dirs(opts, 'output', ext_type_dir... | [] |
Please provide a description of the function:def auth(opts, whitelist=None):
'''
Returns the auth modules
:param dict opts: The Salt options dictionary
:returns: LazyLoader
'''
return LazyLoader(
_module_dirs(opts, 'auth'),
opts,
tag='auth',
whitelist=whitelist,
... | [] |
Please provide a description of the function:def fileserver(opts, backends):
'''
Returns the file server modules
'''
return LazyLoader(_module_dirs(opts, 'fileserver'),
opts,
tag='fileserver',
whitelist=backends,
pac... | [] |
Please provide a description of the function:def roster(opts, runner=None, utils=None, whitelist=None):
'''
Returns the roster modules
'''
return LazyLoader(
_module_dirs(opts, 'roster'),
opts,
tag='roster',
whitelist=whitelist,
pack={
'__runner__': ru... | [] |
Please provide a description of the function:def thorium(opts, functions, runners):
'''
Load the thorium runtime modules
'''
pack = {'__salt__': functions, '__runner__': runners, '__context__': {}}
ret = LazyLoader(_module_dirs(opts, 'thorium'),
opts,
tag='thorium',
... | [] |
Please provide a description of the function:def states(opts, functions, utils, serializers, whitelist=None, proxy=None, context=None):
'''
Returns the state modules
:param dict opts: The Salt options dictionary
:param dict functions: A dictionary of minion modules, with module names as
... | [] |
Please provide a description of the function:def beacons(opts, functions, context=None, proxy=None):
'''
Load the beacon modules
:param dict opts: The Salt options dictionary
:param dict functions: A dictionary of minion modules, with module names as
keys and funcs as values... | [] |
Please provide a description of the function:def log_handlers(opts):
'''
Returns the custom logging handler modules
:param dict opts: The Salt options dictionary
'''
ret = LazyLoader(
_module_dirs(
opts,
'log_handlers',
int_type='handlers',
ba... | [] |
Please provide a description of the function:def ssh_wrapper(opts, functions=None, context=None):
'''
Returns the custom logging handler modules
'''
return LazyLoader(
_module_dirs(
opts,
'wrapper',
base_path=os.path.join(SALT_BASE_PATH, os.path.join('client',... | [] |
Please provide a description of the function:def render(opts, functions, states=None, proxy=None, context=None):
'''
Returns the render modules
'''
if context is None:
context = {}
pack = {'__salt__': functions,
'__grains__': opts.get('grains', {}),
'__context__': co... | [] |
Please provide a description of the function:def grain_funcs(opts, proxy=None):
'''
Returns the grain functions
.. code-block:: python
import salt.config
import salt.loader
__opts__ = salt.config.minion_config('/etc/salt/minion')
grainfuncs = salt.loader.grain_fu... | [] |
Please provide a description of the function:def _load_cached_grains(opts, cfn):
'''
Returns the grains cached in cfn, or None if the cache is too old or is
corrupted.
'''
if not os.path.isfile(cfn):
log.debug('Grains cache file does not exist.')
return None
grains_cache_age = i... | [] |
Please provide a description of the function:def grains(opts, force_refresh=False, proxy=None):
'''
Return the functions for the dynamic grains and the values for the static
grains.
Since grains are computed early in the startup process, grains functions
do not have __salt__ or __proxy__ available.... | [] |
Please provide a description of the function:def call(fun, **kwargs):
'''
Directly call a function inside a loader directory
'''
args = kwargs.get('args', [])
dirs = kwargs.get('dirs', [])
funcs = LazyLoader(
[os.path.join(SALT_BASE_PATH, 'modules')] + dirs,
None,
tag='m... | [] |
Please provide a description of the function:def runner(opts, utils=None, context=None, whitelist=None):
'''
Directly call a function inside a loader directory
'''
if utils is None:
utils = {}
if context is None:
context = {}
ret = LazyLoader(
_module_dirs(opts, 'runners'... | [] |
Please provide a description of the function:def sdb(opts, functions=None, whitelist=None, utils=None):
'''
Make a very small database call
'''
if utils is None:
utils = {}
return LazyLoader(
_module_dirs(opts, 'sdb'),
opts,
tag='sdb',
pack={
'__s... | [] |
Please provide a description of the function:def pkgdb(opts):
'''
Return modules for SPM's package database
.. versionadded:: 2015.8.0
'''
return LazyLoader(
_module_dirs(
opts,
'pkgdb',
base_path=os.path.join(SALT_BASE_PATH, 'spm')
),
opt... | [] |
Please provide a description of the function:def clouds(opts):
'''
Return the cloud functions
'''
# Let's bring __active_provider_name__, defaulting to None, to all cloud
# drivers. This will get temporarily updated/overridden with a context
# manager when needed.
functions = LazyLoader(
... | [] |
Please provide a description of the function:def executors(opts, functions=None, context=None, proxy=None):
'''
Returns the executor modules
'''
executors = LazyLoader(
_module_dirs(opts, 'executors', 'executor'),
opts,
tag='executor',
pack={'__salt__': functions, '__cont... | [] |
Please provide a description of the function:def cache(opts, serial):
'''
Returns the returner modules
'''
return LazyLoader(
_module_dirs(opts, 'cache', 'cache'),
opts,
tag='cache',
pack={'__opts__': opts, '__context__': {'serial': serial}},
) | [] |
Please provide a description of the function:def _inject_into_mod(mod, name, value, force_lock=False):
'''
Inject a variable into a module. This is used to inject "globals" like
``__salt__``, ``__pillar``, or ``grains``.
Instead of injecting the value directly, a ``ThreadLocalProxy`` is created.
If... | [] |
Please provide a description of the function:def global_injector_decorator(inject_globals):
'''
Decorator used by the LazyLoader to inject globals into a function at
execute time.
globals
Dictionary with global variables to inject
'''
def inner_decorator(f):
@functools.wraps(f)
... | [] |
Please provide a description of the function:def missing_fun_string(self, function_name):
'''
Return the error string for a missing function.
This can range from "not available' to "__virtual__" returned False
'''
mod_name = function_name.split('.')[0]
if mod_name in sel... | [] |
Please provide a description of the function:def _refresh_file_mapping(self):
'''
refresh the mapping of the FS on disk
'''
# map of suffix to description for imp
if self.opts.get('cython_enable', True) is True:
try:
global pyximport
py... | [] |
Please provide a description of the function:def clear(self):
'''
Clear the dict
'''
with self._lock:
super(LazyLoader, self).clear() # clear the lazy loader
self.loaded_files = set()
self.missing_modules = {}
self.loaded_modules = {}
... | [] |
Please provide a description of the function:def __prep_mod_opts(self, opts):
'''
Strip out of the opts any logger instance
'''
if '__grains__' not in self.pack:
grains = opts.get('grains', {})
if isinstance(grains, ThreadLocalProxy):
grains = Thr... | [] |
Please provide a description of the function:def _iter_files(self, mod_name):
'''
Iterate over all file_mapping files in order of closeness to mod_name
'''
# do we have an exact match?
if mod_name in self.file_mapping:
yield mod_name
# do we have a partial ma... | [] |
Please provide a description of the function:def _load(self, key):
'''
Load a single item if you have it
'''
# if the key doesn't have a '.' then it isn't valid for this mod dict
if not isinstance(key, six.string_types):
raise KeyError('The key must be a string.')
... | [] |
Please provide a description of the function:def _load_all(self):
'''
Load all of them
'''
with self._lock:
for name in self.file_mapping:
if name in self.loaded_files or name in self.missing_modules:
continue
self._load_mod... | [] |
Please provide a description of the function:def _apply_outputter(self, func, mod):
'''
Apply the __outputter__ variable to the functions
'''
if hasattr(mod, '__outputter__'):
outp = mod.__outputter__
if func.__name__ in outp:
func.__outputter__ = ... | [] |
Please provide a description of the function:def _process_virtual(self, mod, module_name, virtual_func='__virtual__'):
'''
Given a loaded module and its default name determine its virtual name
This function returns a tuple. The first value will be either True or
False and will indicate ... | [] |
Please provide a description of the function:def get(string, clean=True):
'''
Get an individual DMI string from SMBIOS info
string
The string to fetch. DMIdecode supports:
- ``bios-vendor``
- ``bios-version``
- ``bios-release-date``
- ``system-manufacturer``
... | [] |
Please provide a description of the function:def records(rec_type=None, fields=None, clean=True):
'''
Return DMI records from SMBIOS
type
Return only records of type(s)
The SMBIOS specification defines the following DMI types:
==== ======================================
Ty... | [] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.