id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
19,600
saltstack/salt
saltstack_salt/salt/exceptions.py
salt.exceptions.VMwareRuntimeError
class VMwareRuntimeError(VMwareSaltError): """ Used when a runtime error is encountered when communicating with the vCenter """
class VMwareRuntimeError(VMwareSaltError): ''' Used when a runtime error is encountered when communicating with the vCenter ''' pass
1
1
0
0
0
0
0
4
1
0
0
0
0
0
0
13
5
0
1
1
0
4
1
1
0
0
6
0
0
19,601
saltstack/salt
saltstack_salt/salt/exceptions.py
salt.exceptions.VMwareSaltError
class VMwareSaltError(CommandExecutionError): """ Used when a VMware object cannot be retrieved """
class VMwareSaltError(CommandExecutionError): ''' Used when a VMware object cannot be retrieved ''' pass
1
1
0
0
0
0
0
3
1
0
0
11
0
0
0
13
4
0
1
1
0
3
1
1
0
0
5
0
0
19,602
saltstack/salt
saltstack_salt/salt/exceptions.py
salt.exceptions.VMwareSystemError
class VMwareSystemError(VMwareSaltError): """ Used when representing a generic VMware system error """
class VMwareSystemError(VMwareSaltError): ''' Used when representing a generic VMware system error ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
13
4
0
1
1
0
3
1
1
0
0
6
0
0
19,603
saltstack/salt
saltstack_salt/salt/exceptions.py
salt.exceptions.VMwareVmCreationError
class VMwareVmCreationError(VMwareSaltError): """ Used when a configuration parameter is incorrect """
class VMwareVmCreationError(VMwareSaltError): ''' Used when a configuration parameter is incorrect ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
13
4
0
1
1
0
3
1
1
0
0
6
0
0
19,604
saltstack/salt
saltstack_salt/salt/exceptions.py
salt.exceptions.VMwareVmRegisterError
class VMwareVmRegisterError(VMwareSaltError): """ Used when a configuration parameter is incorrect """
class VMwareVmRegisterError(VMwareSaltError): ''' Used when a configuration parameter is incorrect ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
13
4
0
1
1
0
3
1
1
0
0
6
0
0
19,605
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.Distribution
import sys import pathlib import itertools import email import re import abc import functools import csv from itertools import starmap import operator class Distribution: """A Python distribution package.""" @abc.abstractmethod def read_text(self, filename): """Attempt to load metadata file given ...
class Distribution: '''A Python distribution package.''' @abc.abstractmethod def read_text(self, filename): '''Attempt to load metadata file given by the name. :param filename: The name of the file in the distribution info. :return: The text if found, otherwise None. ''' ...
40
15
8
1
5
3
1
0.66
0
19
7
1
12
0
20
20
231
35
118
64
77
78
84
48
59
3
0
2
34
19,606
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.DistributionFinder
import abc import sys from importlib.abc import MetaPathFinder class DistributionFinder(MetaPathFinder): """ A MetaPathFinder capable of discovering installed distributions. """ class Context: """ Keyword arguments presented by the caller to ``distributions()`` or ``Distributio...
class DistributionFinder(MetaPathFinder): ''' A MetaPathFinder capable of discovering installed distributions. ''' class Context: ''' Keyword arguments presented by the caller to ``distributions()`` or ``Distribution.discover()`` to narrow the scope of a search for dist...
7
4
6
1
2
4
1
2.7
1
1
1
1
1
0
1
23
45
8
10
8
3
27
8
6
3
1
4
0
3
19,607
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.EntryPoint
from importlib import import_module from ._compat import NullFinder, PyPy_repr, install import re import functools from configparser import ConfigParser import collections class EntryPoint(PyPy_repr, collections.namedtuple('EntryPointBase', 'name value group')): """An entry point as defined by Python packaging con...
class EntryPoint(PyPy_repr, collections.namedtuple('EntryPointBase', 'name value group')): '''An entry point as defined by Python packaging conventions. See `the packaging docs on entry points <https://packaging.python.org/specifications/entry-points/>`_ for more information. ''' def load(self...
17
3
5
0
4
1
1
0.5
2
4
0
0
7
0
10
16
93
16
52
28
33
26
33
20
22
1
1
0
10
19,608
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.FastPath
import pathlib import posixpath import os from contextlib import suppress class FastPath: """ Micro-optimized class for searching a path for children. """ def __init__(self, root): self.root = str(root) self.base = os.path.basename(self.root).lower() def joinpath(self, child):...
class FastPath: ''' Micro-optimized class for searching a path for children. ''' def __init__(self, root): pass def joinpath(self, child): pass def children(self): pass def zip_children(self): pass def search(self, name): pass
6
1
5
0
4
0
1
0.17
0
6
0
0
5
2
5
5
33
6
23
10
17
4
19
10
13
1
0
1
5
19,609
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.FileHash
class FileHash: def __init__(self, spec): self.mode, _, self.value = spec.partition('=') def __repr__(self): return '<FileHash mode: {} value: {}>'.format(self.mode, self.value)
class FileHash: def __init__(self, spec): pass def __repr__(self): pass
3
0
2
0
2
0
1
0
0
0
0
0
2
2
2
2
6
1
5
4
2
0
5
4
2
1
0
0
2
19,610
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.MetadataPathFinder
from ._compat import NullFinder, PyPy_repr, install import itertools @install class MetadataPathFinder(NullFinder, DistributionFinder): """A degenerate finder for distribution packages on the file system. This finder supplies only a find_distributions() method for versions of Python that do not have a Pat...
@install class MetadataPathFinder(NullFinder, DistributionFinder): '''A degenerate finder for distribution packages on the file system. This finder supplies only a find_distributions() method for versions of Python that do not have a PathFinder find_distributions(). ''' def find_distributions(self,...
5
3
8
1
4
4
1
1.33
2
6
4
0
1
0
2
26
25
4
9
5
5
12
6
4
3
1
5
0
2
19,611
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.PackageMetadata
class PackageMetadata: def __len__(self): ... def __contains__(self, str): ... def __getitem__(self, str): ... def get_all(self, str, failobj=...): """ Return all values associated with a possibly multi-valued key. """
class PackageMetadata: def __len__(self): pass def __contains__(self, str): pass def __getitem__(self, str): pass def get_all(self, str, failobj=...): ''' Return all values associated with a possibly multi-valued key. ''' pass
5
1
3
0
2
2
1
0.75
0
0
0
0
4
0
4
4
14
3
8
5
3
6
8
5
3
1
0
0
4
19,612
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.PackageNotFoundError
class PackageNotFoundError(ModuleNotFoundError): """The package was not found.""" def __str__(self): tmpl = 'No package metadata was found for {self.name}' return tmpl.format(**locals()) @property def name(self): name, = self.args return name
class PackageNotFoundError(ModuleNotFoundError): '''The package was not found.''' def __str__(self): pass @property def name(self): pass
4
1
3
0
3
0
1
0.13
1
0
0
0
2
0
2
14
11
2
8
6
4
1
7
5
4
1
5
0
2
19,613
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.PackagePath
import pathlib class PackagePath(pathlib.PurePosixPath): """A reference to a path in a package""" def read_text(self, encoding='utf-8'): with self.locate().open(encoding=encoding) as stream: return stream.read() def read_binary(self): with self.locate().open('rb') as stream: ...
class PackagePath(pathlib.PurePosixPath): '''A reference to a path in a package''' def read_text(self, encoding='utf-8'): pass def read_binary(self): pass def locate(self): '''Return a path-like object for this path''' pass
4
2
3
0
3
0
1
0.22
1
0
0
0
3
0
3
42
14
3
9
6
5
2
9
4
5
1
3
1
3
19,614
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.PathDistribution
from contextlib import suppress class PathDistribution(Distribution): def __init__(self, path): """Construct a distribution from a path to the metadata directory. :param path: A pathlib.Path or similar object supporting .joinpath(), __div__, .parent, and .read_text(). ...
class PathDistribution(Distribution): def __init__(self, path): '''Construct a distribution from a path to the metadata directory. :param path: A pathlib.Path or similar object supporting .joinpath(), __div__, .parent, and .read_text(). ''' pass def read_t...
4
1
6
0
4
1
1
0.27
1
6
0
0
3
1
3
23
23
4
15
5
11
4
9
5
5
1
1
1
3
19,615
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/__init__.py
salt.ext.importlib_metadata.Prepared
import re import os class Prepared: """ A prepared search for metadata on a possibly-named package. """ normalized = None suffixes = ('.dist-info', '.egg-info') exact_matches = [''][:0] def __init__(self, name): self.name = name if name is None: return s...
class Prepared: ''' A prepared search for metadata on a possibly-named package. ''' def __init__(self, name): pass @staticmethod def normalize(name): ''' PEP 503 normalization plus dashes as underscores. ''' pass @staticmethod def legacy_normaliz...
8
3
8
0
6
2
2
0.31
0
0
0
0
3
1
5
5
53
6
36
18
28
11
24
16
18
3
0
1
8
19,616
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/_compat.py
salt.ext.importlib_metadata._compat.NullFinder
class NullFinder: """ A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. """ @staticmethod def find_spec(*args, **kwargs): return None find_module = find_spec
class NullFinder: ''' A "Finder" (aka "MetaClassFinder") that never finds any modules, but may find distributions. ''' @staticmethod def find_spec(*args, **kwargs): pass
3
1
2
0
2
0
1
2
0
0
0
1
0
0
1
1
17
2
5
4
2
10
4
3
2
1
0
0
1
19,617
saltstack/salt
saltstack_salt/salt/ext/importlib_metadata/_compat.py
salt.ext.importlib_metadata._compat.PyPy_repr
import sys class PyPy_repr: """ Override repr for EntryPoint objects on PyPy to avoid __iter__ access. Ref #97, #102. """ affected = hasattr(sys, 'pypy_version_info') def __compat_repr__(self): def make_param(name): value = getattr(self, name) return '{name}={v...
class PyPy_repr: ''' Override repr for EntryPoint objects on PyPy to avoid __iter__ access. Ref #97, #102. ''' def __compat_repr__(self): pass def make_param(name): pass
3
1
5
1
5
1
1
0.55
0
1
0
1
1
0
1
1
19
4
11
7
8
6
11
7
8
1
0
1
2
19,618
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress.IPv4Address
import functools class IPv4Address(_BaseV4, _BaseAddress): """Represent and manipulate single IPv4 Addresses.""" __slots__ = ('_ip', '__weakref__') def __init__(self, address): """ Args: address: A string or integer representing the IP Additionally, an integer ca...
class IPv4Address(_BaseV4, _BaseAddress): '''Represent and manipulate single IPv4 Addresses.''' def __init__(self, address): ''' Args: address: A string or integer representing the IP Additionally, an integer can be passed, so IPv4Address('192.0.2.1') ==...
20
9
10
2
3
5
1
1.1
2
4
1
1
9
1
9
41
115
29
41
21
21
45
31
13
21
4
2
1
12
19,619
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress.IPv4Interface
class IPv4Interface(IPv4Address): def __init__(self, address): addr, mask = self._split_addr_prefix(address) IPv4Address.__init__(self, addr) self.network = IPv4Network((addr, mask), strict=False) self.netmask = self.network.netmask self._prefixlen = self.network._prefixlen ...
class IPv4Interface(IPv4Address): def __init__(self, address): pass @property def hostmask(self): pass def __str__(self): pass def __eq__(self, other): pass def __lt__(self, other): pass def __hash__(self): pass @property def ip(se...
16
0
5
0
5
1
2
0.09
1
3
1
0
10
4
10
51
70
12
53
25
37
5
43
20
32
3
3
1
15
19,620
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress.IPv4Network
import functools class IPv4Network(_BaseV4, _BaseNetwork): """This class represents and manipulates 32-bit IPv4 network + addresses.. Attributes: [examples for IPv4Network('192.0.2.0/27')] .network_address: IPv4Address('192.0.2.0') .hostmask: IPv4Address('0.0.0.31') .broadcast_address:...
class IPv4Network(_BaseV4, _BaseNetwork): '''This class represents and manipulates 32-bit IPv4 network + addresses.. Attributes: [examples for IPv4Network('192.0.2.0/27')] .network_address: IPv4Address('192.0.2.0') .hostmask: IPv4Address('0.0.0.31') .broadcast_address: IPv4Address('192....
5
3
32
4
10
18
3
1.83
2
3
1
0
2
5
2
57
81
13
24
11
19
44
17
9
14
5
2
2
6
19,621
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress.IPv6Address
import functools class IPv6Address(_BaseV6, _BaseAddress): """Represent and manipulate single IPv6 Addresses.""" __slots__ = ('_ip', '_scope_id', '__weakref__') def __init__(self, address): """Instantiate a new IPv6 address object. Args: address: A string or integer representi...
class IPv6Address(_BaseV6, _BaseAddress): '''Represent and manipulate single IPv6 Addresses.''' def __init__(self, address): '''Instantiate a new IPv6 address object. Args: address: A string or integer representing the IP Additionally, an integer can be passed, so ...
32
15
10
2
4
5
2
1.04
2
6
2
1
17
2
17
51
209
52
77
37
45
80
62
24
44
4
2
1
26
19,622
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress.IPv6Interface
class IPv6Interface(IPv6Address): def __init__(self, address): addr, mask = self._split_addr_prefix(address) IPv6Address.__init__(self, addr) self.network = IPv6Network((addr, mask), strict=False) self.netmask = self.network.netmask self._prefixlen = self.network._prefixlen ...
class IPv6Interface(IPv6Address): def __init__(self, address): pass @property def hostmask(self): pass def __str__(self): pass def __eq__(self, other): pass def __lt__(self, other): pass def __hash__(self): pass @property def ip(se...
20
0
5
0
4
0
1
0.09
1
4
1
0
12
4
12
63
77
14
58
29
38
5
47
22
34
3
3
1
17
19,623
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress.IPv6Network
class IPv6Network(_BaseV6, _BaseNetwork): """This class represents and manipulates 128-bit IPv6 networks. Attributes: [examples for IPv6('2001:db8::1000/124')] .network_address: IPv6Address('2001:db8::1000') .hostmask: IPv6Address('::f') .broadcast_address: IPv6Address('2001:db8::100f')...
class IPv6Network(_BaseV6, _BaseNetwork): '''This class represents and manipulates 128-bit IPv6 networks. Attributes: [examples for IPv6('2001:db8::1000/124')] .network_address: IPv6Address('2001:db8::1000') .hostmask: IPv6Address('::f') .broadcast_address: IPv6Address('2001:db8::100f') ...
5
4
24
4
8
12
3
1.7
2
4
1
0
3
3
3
60
91
18
27
13
22
46
22
12
18
5
2
2
8
19,624
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress._BaseAddress
import functools @functools.total_ordering class _BaseAddress(_IPAddressBase): """A generic IP object. This IP class contains the version independent methods which are used by single IP addresses. """ __slots__ = () def __int__(self): return self._ip def __eq__(self, other): ...
@functools.total_ordering class _BaseAddress(_IPAddressBase): '''A generic IP object. This IP class contains the version independent methods which are used by single IP addresses. ''' def __int__(self): pass def __eq__(self, other): pass def __lt__(self, other): pa...
13
2
8
1
6
1
2
0.31
1
5
0
2
11
0
11
24
113
25
70
18
56
22
58
18
44
9
1
2
25
19,625
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress._BaseNetwork
import functools @functools.total_ordering class _BaseNetwork(_IPAddressBase): """A generic IP network object. This IP class contains the version independent methods which are used by networks. """ __slots__ = ('_cache',) def __init__(self): self._cache = {} def __repr__(self): ...
@functools.total_ordering class _BaseNetwork(_IPAddressBase): '''A generic IP network object. This IP class contains the version independent methods which are used by networks. ''' def __init__(self): pass def __repr__(self): pass def __str__(self): pass def h...
52
18
12
2
6
4
2
0.65
1
10
0
2
33
2
34
47
474
87
234
73
183
153
174
56
139
10
1
2
76
19,626
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress._BaseV4
class _BaseV4: """Base IPv4 object. The following methods are used by IPv4 objects in both single IP addresses and networks. """ __slots__ = () _version = 4 _ALL_ONES = 2 ** IPV4LENGTH - 1 _max_prefixlen = IPV4LENGTH _netmask_cache = {} def _explode_shorthand_ip_string(self): ...
class _BaseV4: '''Base IPv4 object. The following methods are used by IPv4 objects in both single IP addresses and networks. ''' def _explode_shorthand_ip_string(self): pass @classmethod def _make_netmask(cls, arg): '''Make a (netmask, prefix_len) tuple from the given argume...
15
6
13
2
6
5
3
0.75
0
7
3
2
4
0
8
8
139
29
63
27
48
47
56
20
47
6
0
3
20
19,627
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress._IPAddressBase
class _IPAddressBase: """The mother class.""" __slots__ = () @property def exploded(self): """Return the longhand version of the IP address as a string.""" return self._explode_shorthand_ip_string() @property def compressed(self): """Return the shorthand version of the ...
class _IPAddressBase: '''The mother class.''' @property def exploded(self): '''Return the longhand version of the IP address as a string.''' pass @property def compressed(self): '''Return the shorthand version of the IP address as a string.''' pass @property d...
24
9
11
1
6
4
2
0.65
0
9
2
2
7
0
13
13
176
34
86
39
62
56
73
29
59
4
0
1
26
19,628
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress._IPv4Constants
class _IPv4Constants: _linklocal_network = IPv4Network('169.254.0.0/16') _loopback_network = IPv4Network('127.0.0.0/8') _multicast_network = IPv4Network('224.0.0.0/4') _public_network = IPv4Network('100.64.0.0/10') _private_networks = [IPv4Network('0.0.0.0/8'), IPv4Network('10.0.0.0/8'), IPv4Network...
class _IPv4Constants: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
29
6
23
8
22
0
8
8
7
0
0
0
0
19,629
saltstack/salt
saltstack_salt/salt/ext/ipaddress.py
salt.ext.ipaddress._IPv6Constants
class _IPv6Constants: _linklocal_network = IPv6Network('fe80::/10') _multicast_network = IPv6Network('ff00::/8') _private_networks = [IPv6Network('::1/128'), IPv6Network('::/128'), IPv6Network('::ffff:0:0/96'), IPv6Network('100::/64'), IPv6Network('2001::/23'), IPv6Network('2001:2::/48'), IPv6Network('2001:...
class _IPv6Constants: pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
31
5
26
6
25
0
6
6
5
0
0
0
0
19,630
saltstack/salt
saltstack_salt/salt/ext/zipp.py
salt.ext.zipp.CompleteDirs
import itertools import posixpath import zipfile class CompleteDirs(zipfile.ZipFile): """ A ZipFile subclass that ensures that implied directories are always included in the namelist. """ @staticmethod def _implied_dirs(names): parents = itertools.chain.from_iterable(map(_parents, name...
class CompleteDirs(zipfile.ZipFile): ''' A ZipFile subclass that ensures that implied directories are always included in the namelist. ''' @staticmethod def _implied_dirs(names): pass def namelist(self): pass def _name_set(self): pass def resolve_dir(self,...
8
3
7
1
5
2
2
0.5
1
5
0
1
3
0
5
33
47
8
26
14
18
13
24
12
18
4
1
1
9
19,631
saltstack/salt
saltstack_salt/salt/ext/zipp.py
salt.ext.zipp.Path
import io import posixpath import pathlib class Path: """ A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.Z...
class Path: ''' A pathlib-compatible interface for zip files. Consider a zip file with this structure:: . ├── a.txt └── b ├── c.txt └── d └── e.txt >>> data = io.BytesIO() >>> zf = zipfile.ZipFile(data, 'w') >>> zf.writestr('a.txt'...
26
3
4
0
3
1
1
1
0
7
1
0
19
2
19
19
180
42
69
36
43
69
63
28
43
5
0
2
26
19,632
saltstack/salt
saltstack_salt/salt/features.py
salt.features.Features
class Features: def __init__(self, _features=None): if _features is None: self.features = {} else: self.features = _features self.setup = False def setup_features(self, opts): if not self.setup: self.features.update(opts.get('features', {})) ...
class Features: def __init__(self, _features=None): pass def setup_features(self, opts): pass def get(self, key, default=None): pass
4
0
7
0
7
0
2
0
0
0
0
0
3
2
3
3
24
3
21
7
16
0
14
7
9
2
0
1
5
19,633
saltstack/salt
saltstack_salt/salt/fileclient.py
salt.fileclient.Client
import salt.fileserver import urllib.parse import salt.utils.hashutils import salt.loader import salt.utils.http import string import http.server import salt.client import salt.utils.gzip_util from salt.exceptions import CommandExecutionError, MinionError, SaltClientError import os import salt.utils.files import salt.u...
class Client: ''' Base class for Salt file interactions ''' def __init__(self, opts): pass def __setstate__(self, state): pass def __getstate__(self): pass def _check_proto(self, path): ''' Make sure that this path is intended for the salt mas...
33
25
29
2
20
7
5
0.36
0
20
3
2
26
2
26
26
841
81
565
156
494
202
404
111
372
37
0
5
152
19,634
saltstack/salt
saltstack_salt/salt/fileclient.py
salt.fileclient.ContextlessFileClient
class ContextlessFileClient: def __init__(self, file_client): self.file_client = file_client def __getattr__(self, key): return getattr(self.file_client, key) def __exit__(self, *_): pass def __enter__(self): return self
class ContextlessFileClient: def __init__(self, file_client): pass def __getattr__(self, key): pass def __exit__(self, *_): pass def __enter__(self): pass
5
0
2
0
2
0
1
0
0
0
0
0
4
1
4
4
12
3
9
6
4
0
9
6
4
1
0
0
4
19,635
saltstack/salt
saltstack_salt/salt/fileclient.py
salt.fileclient.DumbAuth
class DumbAuth: """ The dumbauth class is used to stub out auth calls fired from the FSClient subsystem """ def gen_token(self, clear_tok): return clear_tok
class DumbAuth: ''' The dumbauth class is used to stub out auth calls fired from the FSClient subsystem ''' def gen_token(self, clear_tok): pass
2
1
2
0
2
0
1
1.33
0
0
0
0
1
0
1
1
8
1
3
2
1
4
3
2
1
1
0
0
1
19,636
saltstack/salt
saltstack_salt/salt/fileclient.py
salt.fileclient.FSClient
import salt.utils.url import salt.crypt import salt.utils.verify import salt.utils.path import salt.utils.templates import salt.utils.gzip_util import salt.channel.client import salt.utils.stringutils import salt.fileserver import salt.client import salt.utils.data import salt.utils.files import salt.utils.versions imp...
class FSClient(RemoteClient): ''' A local client that uses the RemoteClient but substitutes the channel for the FSChan object ''' def __init__(self, opts): pass
2
1
5
0
5
2
1
1
1
2
2
1
1
3
1
45
11
1
6
5
4
6
6
5
4
1
2
0
1
19,637
saltstack/salt
saltstack_salt/salt/fileclient.py
salt.fileclient.PillarClient
import salt.utils.verify import salt.utils.atomicfile import salt.utils.data import salt.fileserver import salt.utils.url import salt.utils.stringutils import salt.utils.gzip_util import salt.payload from salt.exceptions import CommandExecutionError, MinionError, SaltClientError import salt.utils.files import salt.cryp...
class PillarClient(Client): ''' Used by pillar to handle fileclient requests ''' def _find_file(self, path, saltenv='base'): ''' Locate the file path ''' pass def get_file(self, path, dest='', makedirs=False, saltenv='base', gzip=None, cachedir=None): ''' ...
13
13
15
1
9
5
3
0.6
1
4
1
0
12
0
12
38
196
19
111
43
96
67
96
40
83
4
1
3
32
19,638
saltstack/salt
saltstack_salt/salt/fileclient.py
salt.fileclient.RemoteClient
import salt.client import salt.payload import time from salt.exceptions import CommandExecutionError, MinionError, SaltClientError import os import salt.utils.gzip_util import salt.loader import salt.fileserver import salt.utils.stringutils import salt.utils.data import salt.utils.atomicfile import salt.utils.templates...
class RemoteClient(Client): ''' Interact with the salt master file server. ''' def __init__(self, opts): pass def _refresh_channel(self): ''' Reset the channel, in the event of an interruption ''' pass def _channel_send(self, load, raw=False): ...
19
14
19
1
15
4
3
0.27
1
12
3
1
18
3
18
44
371
32
269
59
248
72
184
52
165
27
1
6
56
19,639
saltstack/salt
saltstack_salt/salt/fileserver/__init__.py
salt.fileserver.FSChan
class FSChan: """ A class that mimics the transport channels allowing for local access to to the fileserver class class structure """ def __init__(self, opts, **kwargs): self.opts = opts self.kwargs = kwargs self.fs = Fileserver(self.opts) self.fs.init() if s...
class FSChan: ''' A class that mimics the transport channels allowing for local access to to the fileserver class class structure ''' def __init__(self, opts, **kwargs): pass def send(self, load, tries=None, timeout=None, raw=False): ''' Emulate the channel send met...
4
2
10
0
9
1
3
0.29
0
1
1
0
3
4
3
3
38
3
28
11
22
8
25
9
21
4
0
2
8
19,640
saltstack/salt
saltstack_salt/salt/fileserver/__init__.py
salt.fileserver.Fileserver
import errno from collections.abc import Sequence import salt.utils.files import salt.utils.url import salt.loader import os from salt.utils.args import get_function_argspec as _argspec from salt.utils.decorators import ensure_unicode_args import salt.utils.versions import salt.utils.path class Fileserver: """ ...
class Fileserver: ''' Create a fileserver wrapper object that wraps the fileserver functions and iterates over them to execute the desired function within the scope of the desired fileserver backend. ''' def __init__(self, opts): pass def backends(self, back=None): ''' ...
29
23
20
1
15
4
5
0.3
0
10
0
0
24
2
24
24
520
53
358
109
329
109
322
104
297
18
0
4
125
19,641
saltstack/salt
saltstack_salt/salt/grains/disks.py
salt.grains.disks._geomconsts
class _geomconsts: GEOMNAME = 'Geom name' MEDIASIZE = 'Mediasize' SECTORSIZE = 'Sectorsize' STRIPESIZE = 'Stripesize' STRIPEOFFSET = 'Stripeoffset' DESCR = 'descr' LUNID = 'lunid' LUNNAME = 'lunname' IDENT = 'ident' ROTATIONRATE = 'rotationrate' _aliases = {DESCR: 'device_mod...
class _geomconsts: pass
1
0
0
0
0
0
0
0.17
0
0
0
0
0
0
0
0
27
2
24
13
23
4
13
13
12
0
0
0
0
19,642
saltstack/salt
saltstack_salt/salt/key.py
salt.key.Key
import fnmatch from salt.utils.decorators import cached_property import salt.utils.args import salt.utils.stringutils import salt.client import salt.utils.event import salt.utils.files import salt.utils.json import salt.utils.data import salt.utils.crypt import salt.payload import salt.utils.sdb import sys import salt....
null
33
25
20
1
16
3
5
0.2
0
7
2
0
27
4
27
27
566
45
435
132
399
87
348
120
320
14
0
7
144
19,643
saltstack/salt
saltstack_salt/salt/key.py
salt.key.KeyCLI
import salt.utils.sdb import salt.utils.event import os import salt.transport import salt.utils.args import salt.utils.kinds import salt.utils.crypt import salt.utils.json import salt.utils.files import salt.utils.stringutils import salt.exceptions import salt.payload import salt.utils.user import salt.utils.data impor...
class KeyCLI: ''' Manage key CLI operations ''' def __init__(self, opts): pass def _update_opts(self): pass def _init_auth(self): pass def _get_args_kwargs(self, fun, args=None): pass def _run_cmd(self, cmd, args=None): pass def _filter_...
9
2
30
2
26
2
7
0.09
0
8
2
0
8
4
8
8
260
23
218
40
209
20
159
38
150
17
0
6
58
19,644
saltstack/salt
saltstack_salt/salt/loader/context.py
salt.loader.context.LoaderContext
class LoaderContext: """ A loader context object, this object is injected at <loaded module>.__salt_loader__ by the Salt loader. It is responsible for providing access to the current context's loader """ def __init__(self, loader_ctxvar=loader_ctxvar): self.loader_ctxvar = loader_ctxvar...
class LoaderContext: ''' A loader context object, this object is injected at <loaded module>.__salt_loader__ by the Salt loader. It is responsible for providing access to the current context's loader ''' def __init__(self, loader_ctxvar=loader_ctxvar): pass def __getitem__(self, it...
8
3
4
0
3
1
1
0.55
0
3
1
0
7
1
7
7
38
7
20
9
12
11
20
9
12
2
0
1
9
19,645
saltstack/salt
saltstack_salt/salt/loader/context.py
salt.loader.context.NamedLoaderContext
import copy import salt.exceptions import collections.abc class NamedLoaderContext(collections.abc.MutableMapping): """ A NamedLoaderContext object is injected by the loader providing access to Salt's 'magic dunders' (__salt__, __utils__, etc). """ def __init__(self, name, loader_context, default=...
class NamedLoaderContext(collections.abc.MutableMapping): ''' A NamedLoaderContext object is injected by the loader providing access to Salt's 'magic dunders' (__salt__, __utils__, etc). ''' def __init__(self, name, loader_context, default=None): pass def with_default(self, default): ...
20
3
4
0
4
0
1
0.16
1
4
1
0
18
3
18
59
97
18
68
25
49
11
62
25
43
5
7
1
26
19,646
saltstack/salt
saltstack_salt/salt/loader/lazy.py
salt.loader.lazy.FilterDictWrapper
from collections.abc import MutableMapping class FilterDictWrapper(MutableMapping): """ Create a dict which wraps another dict with a specific key suffix on get This is to replace "filter_load" """ def __init__(self, d, suffix): self._dict = d self.suffix = suffix def __setit...
class FilterDictWrapper(MutableMapping): ''' Create a dict which wraps another dict with a specific key suffix on get This is to replace "filter_load" ''' def __init__(self, d, suffix): pass def __setitem__(self, key, val): pass def __delitem__(self, key): pass ...
7
1
3
0
3
0
1
0.25
1
0
0
0
6
2
6
47
27
7
16
10
9
4
16
10
9
3
7
2
8
19,647
saltstack/salt
saltstack_salt/salt/loader/lazy.py
salt.loader.lazy.LazyLoader
import threading import importlib.util from salt.utils.decorators import Depends import salt.utils.stringutils import inspect from salt.utils.decorators.extension_deprecation import extension_deprecation_message import salt.utils.versions import copy import tempfile from zipimport import zipimporter import salt.utils.e...
class LazyLoader(salt.utils.lazy.LazyDict): ''' A pseduo-dictionary which has a set of keys which are the name of the module and function, delimited by a dot. When the value of the key is accessed, the function is then loaded from disk and into memory. .. note:: Iterating over keys will...
28
18
40
3
29
9
7
0.32
1
31
6
1
23
28
24
78
1,070
99
748
169
703
242
540
146
512
57
8
6
184
19,648
saltstack/salt
saltstack_salt/salt/loader/lazy.py
salt.loader.lazy.LoadedCoro
import salt.defaults.exitcodes import salt.utils.files import salt.loader.context import salt.config import salt.utils.platform import salt.utils.data import salt.utils.event import salt.utils.lazy import salt.utils.stringutils import salt.defaults.events import salt.utils.dictupdate import salt.utils.versions import s...
class LoadedCoro(LoadedFunc): ''' Coroutine functions loaded by LazyLoader instances using subscript notation 'a[k]' will be wrapped with LoadedCoro. - Makes sure functions are called with the correct loader's context. - Provides access to a wrapped func's __global__ attribute :param func s...
2
1
20
0
17
4
6
0.67
1
1
1
0
1
0
1
6
32
3
18
8
14
12
16
6
14
6
1
3
6
19,649
saltstack/salt
saltstack_salt/salt/loader/lazy.py
salt.loader.lazy.LoadedFunc
import salt.utils.lazy import salt.utils.data import salt.loader.context import salt.utils.odict import salt.utils.dictupdate import salt.utils.stringutils import salt.utils.context import sys import salt.defaults.events import salt.defaults.exitcodes import salt.syspaths import salt.utils.event import salt.utils.platf...
class LoadedFunc: ''' The functions loaded by LazyLoader instances using subscript notation 'a[k]' will be wrapped with LoadedFunc. - Makes sure functions are called with the correct loader's context. - Provides access to a wrapped func's __global__ attribute :param func str: The function n...
7
1
6
0
5
1
2
0.41
0
1
1
1
5
2
5
5
45
7
27
13
20
11
26
12
20
6
0
3
10
19,650
saltstack/salt
saltstack_salt/salt/loader/lazy.py
salt.loader.lazy.LoadedMod
class LoadedMod: """ This class is used as a proxy to a loaded module """ __slots__ = ('mod', 'loader') def __init__(self, mod, loader): """ Return the wrapped func's globals via this object's __globals__ attribute. """ self.mod = mod self.loader = lo...
class LoadedMod: ''' This class is used as a proxy to a loaded module ''' def __init__(self, mod, loader): ''' Return the wrapped func's globals via this object's __globals__ attribute. ''' pass def __getattr__(self, name): ''' Run the wr...
4
3
7
0
5
2
1
0.63
0
2
0
0
3
2
3
3
30
4
16
7
12
10
12
7
8
2
0
1
4
19,651
saltstack/salt
saltstack_salt/salt/master.py
salt.master.AESFuncs
import salt.exceptions import salt.utils.schedule import salt.engines import salt.utils.process import salt.defaults.exitcodes import salt.utils.platform import salt.daemons.masterapi import salt.utils.minions import salt.crypt import salt.utils.master import salt.client.ssh.client import salt.utils.job import salt.cli...
class AESFuncs(TransportMethods): ''' Set up functions that are available when the load is encrypted with AES ''' def __init__(self, opts): ''' Create a new AESFuncs :param dict opts: The salt options :rtype: AESFuncs :returns: Instance for handling AES operatio...
26
25
29
3
17
8
4
0.46
1
15
6
0
25
17
25
26
777
99
465
88
438
215
323
83
296
15
1
3
109
19,652
saltstack/salt
saltstack_salt/salt/master.py
salt.master.ClearFuncs
import salt.utils.ctx from salt.utils.channel import iter_transport_opts import threading import salt.utils.atomicfile import salt.utils.args from salt.defaults import DEFAULT_TARGET_DELIM import salt.state import salt.serializers.msgpack import salt.wheel import salt.runner import salt.utils.zeromq import salt.pillar ...
class ClearFuncs(TransportMethods): ''' Set up functions that are safe to execute when commands sent to the master without encryption and authentication ''' def __init__(self, opts, key): pass def runner(self, clear_load): ''' Send a master control function back to the...
17
11
38
3
28
7
6
0.26
1
18
9
0
15
11
15
16
605
59
437
92
420
113
262
89
246
21
1
3
83
19,653
saltstack/salt
saltstack_salt/salt/master.py
salt.master.EventMonitor
import salt.utils.ctx import salt.utils.event import tornado.gen import salt.utils.files import salt.acl import salt.utils.gitfs import salt.auth import salt.utils.gzip_util import salt.channel.server import salt.utils.jid import salt.client import salt.utils.job import salt.client.ssh.client import salt.utils.master i...
class EventMonitor(salt.utils.process.SignalHandlingProcess): ''' Monitor the master event bus. - Forward publish events to minion event publisher. - Handle key rotate events. ''' def __init__(self, opts, ipc_publisher, channels=None, name='EventMonitor'): pass async def handle_...
4
2
15
0
14
1
4
0.19
1
4
3
0
3
3
3
13
55
4
43
14
39
8
34
13
30
8
3
4
11
19,654
saltstack/salt
saltstack_salt/salt/master.py
salt.master.FileserverUpdate
import salt.state from salt.config import DEFAULT_INTERVAL import salt.serializers.msgpack import salt.wheel import salt.runner import salt.utils.zeromq import os import salt.pillar import salt.utils.verify import salt.payload import salt.utils.user import salt.minion import salt.utils.stringutils import salt.key impor...
class FileserverUpdate(salt.utils.process.SignalHandlingProcess): ''' A process from which to update any dynamic fileserver backends ''' def __init__(self, opts, **kwargs): pass def fill_buckets(self): ''' Get the configured backends and the intervals for any backend which...
8
5
28
1
21
6
4
0.28
1
8
1
0
3
4
5
15
149
10
109
28
100
31
66
25
59
7
3
4
20
19,655
saltstack/salt
saltstack_salt/salt/master.py
salt.master.MWorker
import salt.utils.args import salt.state import salt.serializers.msgpack import salt.wheel import salt.runner import salt.utils.zeromq import os import salt.pillar import salt.utils.verify import salt.payload import salt.utils.user import salt.minion import salt.utils.stringutils import salt.key import salt.utils.ssdp ...
class MWorker(salt.utils.process.SignalHandlingProcess): ''' The worker multiprocess instance to manage the backend operations for the salt master. ''' def __init__(self, opts, mkey, key, req_channels, **kwargs): ''' Create a salt master worker process :param dict opts: The...
11
8
19
1
13
6
3
0.5
1
7
3
0
10
10
10
20
213
21
130
40
119
65
103
40
92
5
3
3
30
19,656
saltstack/salt
saltstack_salt/salt/master.py
salt.master.Maintenance
import salt.utils.ctx from salt.utils.channel import iter_transport_opts import salt.utils.atomicfile from salt.transport import TRANSPORTS import salt.utils.args import stat import salt.state import salt.serializers.msgpack import salt.wheel import salt.runner import salt.utils.zeromq import salt.pillar import salt.ut...
class Maintenance(salt.utils.process.SignalHandlingProcess): ''' A generalized maintenance process which performs maintenance routines. ''' def __init__(self, opts, **kwargs): ''' Create a maintenance instance :param dict opts: The salt options ''' pass def...
9
9
28
2
18
8
5
0.46
1
11
4
0
8
12
8
18
233
20
147
47
138
68
124
42
115
11
3
3
37
19,657
saltstack/salt
saltstack_salt/salt/master.py
salt.master.Master
import salt.utils.ctx from salt.utils.channel import iter_transport_opts import salt.utils.atomicfile import sys import salt.utils.args import salt.state import signal import salt.serializers.msgpack import salt.wheel import salt.runner import salt.utils.zeromq import os import salt.pillar import salt.utils.verify impo...
class Master(SMaster): ''' The salt master server ''' def __init__(self, opts): ''' Create a salt master server instance :param dict: The salt options ''' pass def __set_max_open_files(self): pass def _pre_flight(self): ''' Run ...
7
5
57
5
45
8
8
0.19
1
19
12
0
6
4
6
13
351
35
270
38
261
50
162
34
153
20
1
5
48
19,658
saltstack/salt
saltstack_salt/salt/master.py
salt.master.ReqServer
import salt.utils.ctx from salt.utils.channel import iter_transport_opts import salt.utils.atomicfile import salt.utils.args import stat import salt.state import signal import salt.serializers.msgpack import salt.wheel import salt.runner import salt.utils.zeromq import os import salt.pillar import salt.utils.verify imp...
class ReqServer(salt.utils.process.SignalHandlingProcess): ''' Starts up the master request server, minions send results to this interface. ''' def __init__(self, opts, key, mkey, secrets=None, **kwargs): ''' Create a request server :param dict opts: The salt options dictio...
7
4
13
1
9
4
2
0.49
1
8
4
0
6
5
6
16
91
13
53
18
46
26
44
18
37
8
3
3
14
19,659
saltstack/salt
saltstack_salt/salt/master.py
salt.master.SMaster
import salt.utils.args import sys import salt.utils.atomicfile import salt.utils.ctx import salt.utils.event import salt.utils.files import salt.acl import salt.utils.gitfs import salt.auth import salt.utils.gzip_util import salt.channel.server import salt.utils.jid import salt.client import salt.utils.job import salt....
class SMaster: ''' Create a simple salt-master, this will generate the top-level master ''' def __init__(self, opts): ''' Create a salt master server instance :param dict opts: The salt options dictionary ''' pass def __setstate__(self, state): pass...
12
3
15
1
12
2
3
0.22
0
2
1
1
4
3
7
7
125
17
89
21
74
20
57
14
49
9
0
4
21
19,660
saltstack/salt
saltstack_salt/salt/master.py
salt.master.TransportMethods
class TransportMethods: """ Expose methods to the transport layer, methods with their names found in the class attribute 'expose_methods' will be exposed to the transport layer via 'get_method'. """ expose_methods = () def get_method(self, name): """ Get a method which shoul...
class TransportMethods: ''' Expose methods to the transport layer, methods with their names found in the class attribute 'expose_methods' will be exposed to the transport layer via 'get_method'. ''' def get_method(self, name): ''' Get a method which should be exposed to the tran...
2
2
11
0
8
3
3
0.8
0
1
0
3
1
0
1
1
20
2
10
3
8
8
9
3
7
3
0
2
3
19,661
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.MasterMinion
import salt.transport import salt.utils.zeromq import salt.syspaths import salt.utils.user import salt.serializers.msgpack import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import salt.utils.platform import salt.loader import salt....
class MasterMinion: ''' Create a fully loaded minion function object for generic use on the master. What makes this class different is that the pillar is omitted, otherwise everything else is loaded cleanly. ''' def __init__(self, opts, returners=True, states=True, rend=True, matcher=True, whi...
3
2
25
2
20
3
3
0.28
0
0
0
0
2
13
2
2
57
6
40
25
28
11
22
16
19
5
0
1
6
19,662
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.Minion
import sys import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import signal import salt.utils.process import salt.loader.lazy import random import salt.utils.platform import salt.loader from salt.utils.zeromq import ZMQ_VERSION_INFO, zmq import os import salt.utils.network import s...
class Minion(MinionBase): ''' This class instantiates a minion, runs connections for a minion, and loads all of the functions into the minion ''' def __init__(self, opts, timeout=60, safe=True, loaded_base_name=None, io_loop=None, jid_queue=None, load_grains=True): ''' Pass in the ...
72
37
40
3
32
5
6
0.17
1
36
16
2
41
28
44
51
2,034
172
1,603
272
1,517
278
975
222
921
46
1
6
335
19,663
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.MinionBase
import sys import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import random import salt.utils.platform import salt.loader from salt.utils.zeromq import ZMQ_VERSION_INFO, zmq import salt.utils.network import salt.engines import salt....
class MinionBase: def __init__(self, opts): pass def gen_modules(self, initial_load=False, context=None): ''' Tell the minion to reload the execution modules CLI Example: .. code-block:: bash salt '*' sys.reload_modules ''' pass @staticm...
10
5
67
4
53
12
10
0.22
0
14
3
4
6
14
7
7
481
33
372
54
362
82
235
48
227
48
0
6
72
19,664
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.MinionManager
import salt.utils.user import salt.serializers.msgpack import salt.utils.ssdp import salt.utils.zeromq import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import salt.utils.platform import salt.loader import salt.utils.network import salt.engines import sa...
class MinionManager(MinionBase): ''' Create a multi minion interface, this creates as many minions as are defined in the master option and binds each minion object to a respective master. ''' def __init__(self, opts): pass def __del__(self): pass def _bind(self): ...
14
6
15
0
13
2
3
0.2
1
8
4
1
12
9
12
19
201
18
155
49
131
31
106
35
93
9
1
3
33
19,665
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.ProxyMinion
import tornado.ioloop import tornado import tornado.gen class ProxyMinion(Minion): """ This class instantiates a 'proxy' minion--a minion that does not manipulate the host it runs on, but instead manipulates a device that cannot run a minion. """ @tornado.gen.coroutine def _post_master_init(se...
class ProxyMinion(Minion): ''' This class instantiates a 'proxy' minion--a minion that does not manipulate the host it runs on, but instead manipulates a device that cannot run a minion. ''' @tornado.gen.coroutine def _post_master_init(self, master): ''' Function to finish init ...
15
5
6
1
3
2
1
0.82
1
0
0
0
6
0
9
60
74
14
33
24
18
27
28
19
18
1
2
0
9
19,666
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.ProxyMinionManager
class ProxyMinionManager(MinionManager): """ Create the multi-minion interface but for proxy minions """ def _create_minion_object(self, opts, timeout, safe, io_loop=None, loaded_base_name=None, jid_queue=None, load_grains=True): """ Helper function to return the correct type of object ...
class ProxyMinionManager(MinionManager): ''' Create the multi-minion interface but for proxy minions ''' def _create_minion_object(self, opts, timeout, safe, io_loop=None, loaded_base_name=None, jid_queue=None, load_grains=True): ''' Helper function to return the correct type of object ...
2
2
22
0
19
3
1
0.3
1
1
1
0
1
0
1
20
27
1
20
11
9
6
3
2
1
1
2
0
1
19,667
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.SMinion
import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import salt.utils.platform import salt.loader import os import salt.utils.network import salt.engines import salt.utils.minions import salt.defaults.exitcodes import salt.utils.mini...
class SMinion(MinionBase): ''' Create an object that has loaded all of the minion module functions, grains, modules, returners etc. The SMinion allows developers to generate all of the salt minion functions and present them with these functions for general use. ''' def __init__(self, opts...
4
2
28
4
20
5
3
0.34
1
2
0
1
1
0
1
8
58
8
38
14
32
13
28
12
23
4
1
2
5
19,668
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.SProxyMinion
import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import salt.utils.platform import salt.loader import salt.utils.network import salt.engines import salt.utils.minions import salt.defaults.exitcodes import salt.utils.minion import ...
class SProxyMinion(SMinion): ''' Create an object that has loaded all of the minion module functions, grains, modules, returners etc. The SProxyMinion allows developers to generate all of the salt minion functions and present them with these functions for general use. ''' def gen_modules(...
2
2
101
17
70
14
4
0.28
1
1
1
0
1
11
1
9
109
18
71
16
69
20
40
15
38
4
2
1
4
19,669
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.Syndic
import salt.transport import time import salt.utils.zeromq import salt.syspaths import salt.utils.user import salt.serializers.msgpack import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import salt.utils.platform import salt.loader ...
class Syndic(Minion): ''' Make a Syndic minion, this minion will use the minion keys on the master to authenticate with a higher level master. ''' def __init__(self, opts, **kwargs): pass async def _handle_decoded_payload(self, data): ''' Override this method if you wi...
14
5
14
1
11
3
2
0.33
1
6
2
0
10
13
10
61
172
20
116
34
102
38
82
31
70
4
2
2
26
19,670
saltstack/salt
saltstack_salt/salt/minion.py
salt.minion.SyndicManager
import salt.transport import time import salt.utils.zeromq import salt.syspaths import threading import salt.utils.user import salt.serializers.msgpack import salt.utils.ssdp import salt.pillar import salt.utils.schedule import salt.payload import salt.utils.process import salt.loader.lazy import random import salt.uti...
class SyndicManager(MinionBase): ''' Make a MultiMaster syndic minion, this minion will handle relaying jobs and returns from all minions connected to it to the list of masters it is connected to. Modes (controlled by `syndic_mode`: sync: This mode will synchronize all events and publishes from...
15
8
24
1
18
5
4
0.31
1
13
2
0
13
16
13
20
345
35
242
60
227
76
183
58
169
12
1
4
55
19,671
saltstack/salt
saltstack_salt/salt/modules/artifactory.py
salt.modules.artifactory.ArtifactoryError
class ArtifactoryError(Exception): def __init__(self, value): super().__init__() self.value = value def __str__(self): return repr(self.value)
class ArtifactoryError(Exception): def __init__(self, value): pass def __str__(self): pass
3
0
3
0
3
0
1
0
1
1
0
0
2
1
2
12
7
1
6
4
3
0
6
4
3
1
3
0
2
19,672
saltstack/salt
saltstack_salt/salt/modules/cryptdev.py
salt.modules.cryptdev._crypttab_entry
import salt.utils.stringutils import salt.utils.platform import salt.utils.files import os class _crypttab_entry: """ Utility class for manipulating crypttab entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from crypttab() or raises a ValueError. """ ...
class _crypttab_entry: ''' Utility class for manipulating crypttab entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from crypttab() or raises a ValueError. ''' class ParseError(ValueError): '''Error raised when a line isn't parsible as a c...
15
8
5
0
4
1
2
0.32
0
3
0
0
5
1
9
9
71
14
44
22
29
14
36
18
25
5
0
2
15
19,673
saltstack/salt
saltstack_salt/salt/modules/ini_manage.py
salt.modules.ini_manage._Ini
import salt.utils.json from salt.exceptions import CommandExecutionError import salt.utils.data import salt.utils.stringutils import salt.utils.files import os class _Ini(_Section): def __init__(self, name, inicontents='', separator='=', commenter='#', encoding=None, no_spaces=False): super().__init__(sel...
class _Ini(_Section): def __init__(self, name, inicontents='', separator='=', commenter='#', encoding=None, no_spaces=False): pass def refresh(self, inicontents=None): pass def flush(self): pass @staticmethod def get_ini_file(file_name, separator='=', encoding=None, no_sp...
8
0
15
0
13
2
3
0.14
1
6
1
0
3
2
5
67
84
5
70
23
60
10
56
15
50
8
4
3
17
19,674
saltstack/salt
saltstack_salt/salt/modules/ini_manage.py
salt.modules.ini_manage._Section
import salt.utils.json import re import salt.utils.files import salt.utils.stringutils import os import salt.utils.data from salt.utils.odict import OrderedDict class _Section(OrderedDict): def __init__(self, name, inicontents='', separator='=', commenter='#', no_spaces=False): super().__init__(self) ...
class _Section(OrderedDict): def __init__(self, name, inicontents='', separator='=', commenter='#', no_spaces=False): pass def refresh(self, inicontents=None): pass def _uncomment_if_commented(self, opt_key): pass def update(self, update_dict): pass def gen_ini(...
13
0
13
0
11
2
3
0.16
1
4
0
1
12
6
12
62
166
15
135
47
122
21
119
47
106
9
3
4
39
19,675
saltstack/salt
saltstack_salt/salt/modules/junos.py
salt.modules.junos.HandleFileCopy
import salt.utils.path import salt.utils.json import salt.utils.files import salt.utils.args import salt.utils.stringutils import salt.utils.platform class HandleFileCopy: """ To figure out proper path either from proxy local file system or proxy cache or on master. If required, then only copy from mas...
class HandleFileCopy: ''' To figure out proper path either from proxy local file system or proxy cache or on master. If required, then only copy from master to proxy ''' def __init__(self, path, **kwargs): pass def __enter__(self): pass def __exit__(self, exc_type, ex...
4
1
16
0
14
2
3
0.23
0
0
0
0
3
4
3
3
59
5
44
13
40
10
35
12
31
6
0
4
10
19,676
saltstack/salt
saltstack_salt/salt/modules/mac_assistive.py
salt.modules.mac_assistive.TccDB
import hashlib import time from salt.exceptions import CommandExecutionError import sqlite3 class TccDB: def __init__(self, path=None): if path is None: path = TCC_DB_PATH self.path = path self.connection = None self.ge_mojave_and_catalina = False self.ge_bigsur...
class TccDB: def __init__(self, path=None): pass def _check_table_digest(self): pass def _get_client_type(self, app_id): pass def installed(self, app_id): pass def installed(self, app_id): pass def enabled(self, app_id): pass def enable...
12
0
17
0
13
4
3
0.33
0
1
1
0
11
4
11
11
197
10
141
28
129
46
75
28
63
5
0
2
32
19,677
saltstack/salt
saltstack_salt/salt/modules/mount.py
salt.modules.mount._FileSystemsEntry
import os from salt.utils.odict import OrderedDict class _FileSystemsEntry: """ Utility class for manipulating filesystem entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from fstab() or raises a ValueError. Note: We'll probably want to use os.normpat...
class _FileSystemsEntry: ''' Utility class for manipulating filesystem entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from fstab() or raises a ValueError. Note: We'll probably want to use os.normpath and os.normcase on 'name' ''' class Parse...
21
9
9
0
7
2
3
0.3
0
3
0
0
7
1
13
13
170
22
115
44
94
34
84
38
69
8
0
4
33
19,678
saltstack/salt
saltstack_salt/salt/modules/mount.py
salt.modules.mount._fstab_entry
import os class _fstab_entry: """ Utility class for manipulating fstab entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from fstab() or raises a ValueError. Note: We'll probably want to use os.normpath and os.normcase on 'name' """ class Pars...
class _fstab_entry: ''' Utility class for manipulating fstab entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from fstab() or raises a ValueError. Note: We'll probably want to use os.normpath and os.normcase on 'name' ''' class ParseError(Valu...
15
8
7
0
4
2
2
0.59
0
4
0
0
5
1
9
9
94
17
49
26
34
29
42
22
31
5
0
3
16
19,679
saltstack/salt
saltstack_salt/salt/modules/mount.py
salt.modules.mount._vfstab_entry
import os class _vfstab_entry: """ Utility class for manipulating vfstab entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from fstab() or raises a ValueError. Note: We'll probably want to use os.normpath and os.normcase on 'name' Note: This parses...
class _vfstab_entry: ''' Utility class for manipulating vfstab entries. Primarily we're parsing, formatting, and comparing lines. Parsing emits dicts expected from fstab() or raises a ValueError. Note: We'll probably want to use os.normpath and os.normcase on 'name' Note: This parses vfstab ent...
15
8
6
0
4
2
2
0.57
0
3
0
0
5
1
9
9
102
15
56
25
41
32
38
21
27
5
0
3
15
19,680
saltstack/salt
saltstack_salt/salt/modules/puppet.py
salt.modules.puppet._Puppet
import salt.utils.args import salt.utils.yaml import salt.utils.platform import salt.utils.files import salt.utils.path import salt.utils.stringutils class _Puppet: """ Puppet helper class. Used to format command for execution. """ def __init__(self): """ Setup a puppet instance, based...
class _Puppet: ''' Puppet helper class. Used to format command for execution. ''' def __init__(self): ''' Setup a puppet instance, based on the premis that default usage is to run 'puppet agent --test'. Configuration and run states are stored in the default location...
4
4
21
3
12
8
2
0.7
0
1
0
0
3
11
3
3
70
11
37
19
33
26
31
19
27
3
0
1
6
19,681
saltstack/salt
saltstack_salt/salt/modules/saltcheck.py
salt.modules.saltcheck.StateTestLoader
import os import salt.exceptions import salt.client from salt.utils.decorators import memoize import salt.utils.path import salt.utils.yaml import salt.utils.platform from salt.utils.json import dumps, loads from salt.utils.odict import OrderedDict import salt.utils.data import salt.utils.files import salt.utils.functo...
class StateTestLoader: ''' Class loads in test files for a state e.g. state_dir/saltcheck-tests/[1.tst, 2.tst, 3.tst] ''' def __init__(self, saltenv='base'): pass def load_test_suite(self): ''' Load tests either from one file, or a set of files ''' pass...
9
7
30
2
22
6
4
0.3
0
6
0
0
7
6
7
7
226
21
158
43
149
48
103
41
95
16
0
5
27
19,682
saltstack/salt
saltstack_salt/salt/modules/saltutil.py
salt.modules.saltutil._MMinion
import copy import salt.utils.process import salt.utils.path import salt.channel.client import salt.runner import salt.utils.args import salt.utils.functools import salt.client import salt import salt.defaults.events import salt.state import salt.utils.event import salt.utils.extmods import salt.utils.minion import sal...
class _MMinion: def __new__(cls, saltenv, reload_env=False): pass
2
0
28
3
17
10
3
0.56
0
0
0
0
1
0
1
1
29
3
18
8
14
10
18
8
14
3
0
1
3
19,683
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.Argument
class Argument: """ A TypedParameterValue has one or more Arguments. For example this can be the value of key_file. Does not need examples. """ def __init__(self, value=''): self.value = value def build(self): return _indent(self.value)
class Argument: ''' A TypedParameterValue has one or more Arguments. For example this can be the value of key_file. Does not need examples. ''' def __init__(self, value=''): pass def build(self): pass
3
1
2
0
2
0
1
1
0
0
0
0
2
1
2
2
13
3
5
4
2
5
5
4
2
1
0
0
2
19,684
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.Buildable
class Buildable: """ Base class of most classes, which have a build method. It contains a common build function. Does not need examples. """ def __init__(self, iterable, join_body_on='', append_extra_newline=True): self.iterable = iterable self.join_body_on = join_body_on ...
class Buildable: ''' Base class of most classes, which have a build method. It contains a common build function. Does not need examples. ''' def __init__(self, iterable, join_body_on='', append_extra_newline=True): pass def build_header(self): ''' Builds the header ...
6
5
8
1
5
3
1
0.75
0
0
0
5
5
3
5
5
52
10
24
15
18
18
23
15
17
3
0
1
7
19,685
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.GivenStatement
class GivenStatement(Buildable): """ This statement returns a string without modification. It can be used to use existing configuration snippets. Does not need examples. """ def __init__(self, value, add_newline=True): super().__init__(iterable=None) self.value = value ...
class GivenStatement(Buildable): ''' This statement returns a string without modification. It can be used to use existing configuration snippets. Does not need examples. ''' def __init__(self, value, add_newline=True): pass def build(self): pass
3
1
5
0
5
0
2
0.5
1
1
0
0
2
2
2
7
18
3
10
5
7
5
9
5
6
2
1
1
3
19,686
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.NamedStatement
class NamedStatement(Statement): """ It represents a configuration statement, which has a name, e.g. a source. Does not need examples. """ def __init__(self, type, id='', options=None): super().__init__(type, id, options, has_name=True)
class NamedStatement(Statement): ''' It represents a configuration statement, which has a name, e.g. a source. Does not need examples. ''' def __init__(self, type, id='', options=None): pass
2
1
2
0
2
0
1
1.33
1
1
0
0
1
0
1
10
9
2
3
2
1
4
3
2
1
1
2
0
1
19,687
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.Option
class Option(Buildable): """ A Statement class contains Option instances. An instance of Option can represent a file(), tcp(), udp(), etc. option. Does not need examples. """ def __init__(self, type='', params=None): super().__init__(params, ',\n') self.type = type se...
class Option(Buildable): ''' A Statement class contains Option instances. An instance of Option can represent a file(), tcp(), udp(), etc. option. Does not need examples. ''' def __init__(self, type='', params=None): pass def build(self): pass def add_parameter(self, ...
4
1
4
0
4
0
1
0.38
1
1
0
0
3
3
3
8
24
6
13
10
9
5
13
10
9
2
1
0
4
19,688
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.Parameter
class Parameter(Buildable): """ An Option has one or more Parameter instances. Does not need examples. """ def __init__(self, iterable=None, join_body_on=''): super().__init__(iterable, join_body_on)
class Parameter(Buildable): ''' An Option has one or more Parameter instances. Does not need examples. ''' def __init__(self, iterable=None, join_body_on=''): pass
2
1
2
0
2
0
1
1.33
1
1
0
2
1
0
1
6
9
2
3
2
1
4
3
2
1
1
1
0
1
19,689
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.ParameterValue
class ParameterValue(Buildable): """ A TypedParameter can have one or more values. Does not need examples. """ def __init__(self, iterable=None, join_body_on=''): super().__init__(iterable, join_body_on)
class ParameterValue(Buildable): ''' A TypedParameter can have one or more values. Does not need examples. ''' def __init__(self, iterable=None, join_body_on=''): pass
2
1
2
0
2
0
1
1.33
1
1
0
2
1
0
1
6
9
2
3
2
1
4
3
2
1
1
1
0
1
19,690
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.SimpleParameter
class SimpleParameter(Parameter): """ A Parameter is a SimpleParameter, if it's just a simple type, like a string. For example: .. code-block:: text destination d_file { file( '/var/log/messages' ); }; ``/var/log/messages`` is a SimpleP...
class SimpleParameter(Parameter): ''' A Parameter is a SimpleParameter, if it's just a simple type, like a string. For example: .. code-block:: text destination d_file { file( '/var/log/messages' ); }; ``/var/log/messages`` is a SimpleParam...
3
1
3
0
3
0
1
2.17
1
1
0
0
2
1
2
8
26
7
6
4
3
13
6
4
3
1
2
0
2
19,691
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.SimpleParameterValue
class SimpleParameterValue(ParameterValue): """ A ParameterValuem which holds a simple type, like a string or a number. For example in ip(127.0.0.1) 127.0.0.1 is a SimpleParameterValue. Does not need examples. """ def __init__(self, value=''): super().__init__() self.value = v...
class SimpleParameterValue(ParameterValue): ''' A ParameterValuem which holds a simple type, like a string or a number. For example in ip(127.0.0.1) 127.0.0.1 is a SimpleParameterValue. Does not need examples. ''' def __init__(self, value=''): pass def build(self): pass
3
1
3
0
3
0
1
0.83
1
1
0
0
2
1
2
8
15
4
6
4
3
5
6
4
3
1
2
0
2
19,692
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.Statement
class Statement(Buildable): """ It represents a syslog-ng configuration statement, e.g. source, destination, filter. Does not need examples. """ def __init__(self, type, id='', options=None, has_name=True): super().__init__(options, join_body_on='', append_extra_newline=False) ...
class Statement(Buildable): ''' It represents a syslog-ng configuration statement, e.g. source, destination, filter. Does not need examples. ''' def __init__(self, type, id='', options=None, has_name=True): pass def build_header(self): pass def build_tail(self): ...
5
1
4
0
4
0
2
0.29
1
1
0
2
4
5
4
9
27
5
17
10
12
5
16
10
11
2
1
1
6
19,693
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.SyslogNgError
class SyslogNgError(Exception): pass
class SyslogNgError(Exception): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
10
2
0
2
1
1
0
2
1
1
0
3
0
0
19,694
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.TypedParameter
class TypedParameter(Parameter): """ A Parameter, which has a type: .. code-block:: text destination d_tcp { tcp( ip(127.0.0.1) ); }; ``ip(127.0.0.1)`` is a TypedParameter. Does not need examples. """ def __init__(self, type='', va...
class TypedParameter(Parameter): ''' A Parameter, which has a type: .. code-block:: text destination d_tcp { tcp( ip(127.0.0.1) ); }; ``ip(127.0.0.1)`` is a TypedParameter. Does not need examples. ''' def __init__(self, type='', values...
4
1
4
0
4
0
1
0.85
1
1
0
0
3
3
3
9
32
8
13
10
9
11
13
10
9
2
2
0
4
19,695
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.TypedParameterValue
class TypedParameterValue(ParameterValue): """ We have to go deeper... A TypedParameter can have a 'parameter', which also have a type. For example key_file and cert_file: .. code-block:: text source demo_tls_source { tcp( ip(0.0.0.0) port(1999)...
class TypedParameterValue(ParameterValue): ''' We have to go deeper... A TypedParameter can have a 'parameter', which also have a type. For example key_file and cert_file: .. code-block:: text source demo_tls_source { tcp( ip(0.0.0.0) port(1999) ...
4
1
4
0
4
0
1
1.31
1
1
0
0
3
3
3
9
38
8
13
10
9
17
13
10
9
2
2
0
4
19,696
saltstack/salt
saltstack_salt/salt/modules/syslog_ng.py
salt.modules.syslog_ng.UnnamedStatement
class UnnamedStatement(Statement): """ It represents a configuration statement, which doesn't have a name, e.g. a log path. Does not need examples. """ def __init__(self, type, options=None): super().__init__(type, id='', options=options, has_name=False)
class UnnamedStatement(Statement): ''' It represents a configuration statement, which doesn't have a name, e.g. a log path. Does not need examples. ''' def __init__(self, type, options=None): pass
2
1
2
0
2
0
1
1.67
1
1
0
0
1
0
1
10
10
2
3
2
1
5
3
2
1
1
2
0
1
19,697
saltstack/salt
saltstack_salt/salt/modules/system.py
salt.modules.system._FixedOffset
from datetime import datetime, timedelta, tzinfo class _FixedOffset(tzinfo): """ Fixed offset in minutes east from UTC. """ def __init__(self, offset): super().__init__() self.__offset = timedelta(minutes=offset) def utcoffset(self, dt): return self.__offset def tznam...
class _FixedOffset(tzinfo): ''' Fixed offset in minutes east from UTC. ''' def __init__(self, offset): pass def utcoffset(self, dt): pass def tzname(self, dt): pass def dst(self, dt): pass
5
1
2
0
2
1
1
0.6
1
2
0
0
4
1
4
9
17
4
10
6
5
6
10
6
5
1
1
0
4
19,698
saltstack/salt
saltstack_salt/salt/modules/win_dacl.py
salt.modules.win_dacl.daclConstants
from salt.exceptions import CommandExecutionError import os class daclConstants: """ DACL constants used throughout the module """ def __init__(self): self.FILE_ALL_ACCESS = ntsecuritycon.STANDARD_RIGHTS_REQUIRED | ntsecuritycon.SYNCHRONIZE | 511 self.hkeys_security = {'HKEY_LOCAL_MACH...
class daclConstants: ''' DACL constants used throughout the module ''' def __init__(self): pass def getObjectTypeBit(self, t): ''' returns the bit value of the string object type ''' pass def getSecurityHkey(self, s): ''' returns the ne...
11
10
28
0
25
3
2
0.15
0
3
1
0
10
7
10
10
294
12
246
20
235
36
62
20
51
3
0
2
21
19,699
saltstack/salt
saltstack_salt/salt/modules/win_lgpo.py
salt.modules.win_lgpo._policy_info
from salt.exceptions import CommandExecutionError, SaltInvocationError import os class _policy_info: """ Policy Helper Class =================== The format of the policy dict is as follows: The top most two key/value pairs in the dict divide the policies object into the two sections of local ...
class _policy_info: ''' Policy Helper Class =================== The format of the policy dict is as follows: The top most two key/value pairs in the dict divide the policies object into the two sections of local group policy, using the keys "Machine" and "User". The value make-up of these d...
48
24
191
0
180
11
4
0.09
0
7
1
0
1
44
24
24
4,805
61
4,342
114
4,294
407
249
90
224
12
0
5
100