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,700
saltstack/salt
saltstack_salt/salt/modules/win_status.py
salt.modules.win_status.SYSTEM_PERFORMANCE_INFORMATION
import ctypes class SYSTEM_PERFORMANCE_INFORMATION(ctypes.Structure): _fields_ = [('IdleProcessTime', ctypes.c_int64), ('IoReadTransferCount', ctypes.c_int64), ('IoWriteTransferCount', ctypes.c_int64), ('IoOtherTransferCount', ctypes.c_int64), ('IoReadOperationCount', ctypes.c_ulong), ('IoWriteOperationCount', cty...
class SYSTEM_PERFORMANCE_INFORMATION(ctypes.Structure): pass
1
0
0
0
0
0
0
0.04
0
0
0
0
0
0
0
0
83
0
81
2
80
3
2
2
1
0
0
0
0
19,701
saltstack/salt
saltstack_salt/salt/modules/win_timezone.py
salt.modules.win_timezone.TzMapper
class TzMapper: def __init__(self, unix_to_win): self.win_to_unix = {k.lower(): v for k, v in unix_to_win.items()} self.unix_to_win = {v.lower(): k for k, v in unix_to_win.items()} def add(self, k, v): self.unix_to_win[k.lower()] = v self.win_to_unix[v.lower()] = k def rem...
class TzMapper: def __init__(self, unix_to_win): pass def add(self, k, v): pass def remove(self, k): pass def get_win(self, key, default=None): pass def get_unix(self, key, default=None): pass def list_win(self): pass def list_unix(self)...
8
0
2
0
2
0
1
0
0
0
0
0
7
2
7
7
23
6
17
10
9
0
17
10
9
1
0
0
7
19,702
saltstack/salt
saltstack_salt/salt/modules/x509.py
salt.modules.x509._Ctx
import ctypes class _Ctx(ctypes.Structure): """ This is part of an ugly hack to fix an ancient bug in M2Crypto https://bugzilla.osafoundation.org/show_bug.cgi?id=7530#c13 """ _fields_ = [('flags', ctypes.c_int), ('issuer_cert', ctypes.c_void_p), ('subject_cert', ctypes.c_void_p), ('subject_req', ct...
class _Ctx(ctypes.Structure): ''' This is part of an ugly hack to fix an ancient bug in M2Crypto https://bugzilla.osafoundation.org/show_bug.cgi?id=7530#c13 ''' pass
1
1
0
0
0
0
0
0.4
0
0
0
0
0
0
0
0
15
1
10
2
9
4
2
2
1
0
0
0
0
19,703
saltstack/salt
saltstack_salt/salt/modules/yumpkg.py
salt.modules.yumpkg.AvailablePackages
import salt.utils.data import salt.utils.lazy import salt.utils.versions import salt.utils.args import salt.utils.itertools import salt.utils.systemd import salt.utils.functools import salt.utils.pkg.rpm import salt.utils.files import salt.utils.pkg import salt.utils.environment import salt.utils.path class AvailableP...
class AvailablePackages(salt.utils.lazy.LazyDict): def __init__(self, *args, **kwargs): pass def _load(self, key): pass def _load_all(self): pass
4
0
3
0
3
0
1
0
1
1
0
0
3
4
3
57
13
2
11
8
7
0
11
8
7
1
8
0
3
19,704
saltstack/salt
saltstack_salt/salt/netapi/__init__.py
salt.netapi.NetapiClient
import salt.auth import salt.syspaths import salt.wheel import salt.daemons.masterapi import salt.client import salt.config from salt.defaults import DEFAULT_TARGET_DELIM import salt.exceptions import salt.runner import salt.utils.args import copy import os import salt.utils.minions import salt.client.ssh.client class...
class NetapiClient: ''' Provide a uniform method of accessing the various client interfaces in Salt in the form of low-data data structures. For example: >>> client = NetapiClient(__opts__) >>> lowstate = {'client': 'local', 'tgt': '*', 'fun': 'test.ping', 'arg': ''} >>> client.run(lowstate) ...
15
12
16
2
9
5
2
0.68
0
10
9
0
14
5
14
14
248
47
120
46
105
81
93
41
78
7
0
1
27
19,705
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.API
import salt.netapi import salt.utils.json import cherrypy import salt.auth import salt.utils.stringutils import salt.utils.versions import salt import salt.exceptions import salt.utils.yaml import salt.utils.args import salt.utils.event class API: """ Collect configuration and URL map for building the CherryPy...
class API: ''' Collect configuration and URL map for building the CherryPy app ''' def _setattr_url_map(self): ''' Set an attribute on the local instance for each key/val in url_map CherryPy uses class attributes to resolve URLs. ''' pass def _update_url_ma...
5
4
24
3
16
5
3
0.27
0
3
3
0
4
2
4
4
116
18
77
11
72
21
33
11
28
6
0
1
12
19,706
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.App
import cherrypy import os class App: """ Class to serve HTML5 apps """ exposed = True def GET(self, *args): """ Serve a single static file ignoring the remaining path This is useful in combination with a browser-based app using the HTML5 history API. .. ht...
class App: ''' Class to serve HTML5 apps ''' def GET(self, *args): ''' Serve a single static file ignoring the remaining path This is useful in combination with a browser-based app using the HTML5 history API. .. http:get:: /app :reqheader X-Auth-Tok...
2
2
21
6
6
9
1
1.5
0
0
0
0
1
0
1
1
28
8
8
5
6
12
6
5
4
1
0
0
1
19,707
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Events
import salt.utils.versions import salt.utils.yaml import salt.utils.stringutils import time import salt.utils.event import salt.utils.args import salt.auth import salt import salt.utils.json import salt.netapi import salt.exceptions import cherrypy class Events: """ Expose the Salt event bus The event bus...
class Events: ''' Expose the Salt event bus The event bus on the Salt master exposes a large variety of things, notably when executions are started on the master and also when minions ultimately return their results. This URL provides a real-time window into a running Salt infrastructure. ....
5
4
57
12
15
29
3
2.12
0
4
1
0
3
2
3
3
232
54
57
17
52
121
39
16
34
4
0
3
11
19,708
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Jobs
import cherrypy class Jobs(LowDataAdapter): _cp_config = dict(LowDataAdapter._cp_config, **{'tools.salt_auth.on': True}) def GET(self, jid=None, timeout=''): """ A convenience URL for getting lists of previously run jobs or getting the return from a single job .. http:get:: /j...
class Jobs(LowDataAdapter): def GET(self, jid=None, timeout=''): ''' A convenience URL for getting lists of previously run jobs or getting the return from a single job .. http:get:: /jobs/(jid) List jobs or show a single job from the job cache. :reqheader X-...
2
1
108
25
22
62
5
2.58
1
1
0
0
1
0
1
5
111
26
24
9
22
62
21
9
19
5
1
3
5
19,709
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Keys
import cherrypy import tarfile import io class Keys(LowDataAdapter): """ Convenience URLs for working with minion keys .. versionadded:: 2014.7.0 These URLs wrap the functionality provided by the :py:mod:`key wheel module <salt.wheel.key>` functions. """ def GET(self, mid=None): ...
class Keys(LowDataAdapter): ''' Convenience URLs for working with minion keys .. versionadded:: 2014.7.0 These URLs wrap the functionality provided by the :py:mod:`key wheel module <salt.wheel.key>` functions. ''' def GET(self, mid=None): ''' Show the list of minion keys or...
4
3
91
27
19
46
2
2.51
1
1
0
0
2
0
2
6
193
57
39
16
35
98
35
15
32
2
1
1
4
19,710
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Login
import salt.auth import salt.utils.yaml import salt.exceptions import salt.utils.stringutils import salt.netapi import salt.utils.args import salt.utils.versions import salt.utils.event import cherrypy import salt.utils.json import salt class Login(LowDataAdapter): """ Log in to receive a session token :r...
class Login(LowDataAdapter): ''' Log in to receive a session token :ref:`Authentication information <rest_cherrypy-auth>`. ''' def __init__(self, *args, **kwargs): pass def GET(self): ''' Present the login interface .. http:get:: /login An explanati...
4
3
56
12
19
25
4
1.34
1
5
2
0
3
1
3
7
177
40
59
10
55
79
35
10
31
9
1
2
11
19,711
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Logout
import cherrypy class Logout(LowDataAdapter): """ Class to remove or invalidate sessions """ _cp_config = dict(LowDataAdapter._cp_config, **{'tools.salt_auth.on': True, 'tools.lowdata_fmt.on': False}) def POST(self): """ Destroy the currently active session and expire the session c...
class Logout(LowDataAdapter): ''' Class to remove or invalidate sessions ''' def POST(self): ''' Destroy the currently active session and expire the session cookie ''' pass
2
2
8
1
4
6
1
1
1
0
0
0
1
0
1
5
18
3
9
3
7
9
6
3
4
1
1
0
1
19,712
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.LowDataAdapter
import salt import salt.netapi import salt.utils.yaml import salt.auth from collections.abc import Iterator, Mapping import cherrypy import salt.exceptions import salt.utils.versions import salt.utils.stringutils import salt.utils.args import salt.utils.json import salt.utils.event class LowDataAdapter: """ Th...
class LowDataAdapter: ''' The primary entry point to Salt's REST API ''' def __init__(self): pass def exec_lowstate(self, client=None, token=None): ''' Pull a Low State data structure from request and execute the low-data chunks through Salt. The low-data chunks wi...
8
4
36
9
9
19
3
1.65
0
6
1
7
4
3
4
4
167
41
48
15
40
79
33
13
28
10
0
3
13
19,713
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Minions
import cherrypy class Minions(LowDataAdapter): """ Convenience URLs for working with minions """ _cp_config = dict(LowDataAdapter._cp_config, **{'tools.salt_auth.on': True}) def GET(self, mid=None): """ A convenience URL for getting lists of minions or getting minion detail...
class Minions(LowDataAdapter): ''' Convenience URLs for working with minions ''' def GET(self, mid=None): ''' A convenience URL for getting lists of minions or getting minion details .. http:get:: /minions/(mid) :reqheader X-Auth-Token: |req_token| ...
3
3
56
14
10
33
1
3.09
1
1
0
0
2
0
2
6
120
31
22
5
19
68
9
5
6
1
1
0
2
19,714
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Run
class Run(LowDataAdapter): """ Run commands bypassing the :ref:`normal session handling <rest_cherrypy-auth>`. salt-api does not enforce authorization, Salt's eauth system does that. Local/Runner/WheelClient all accept ``username``/``password``/``eauth`` **or** ``token`` kwargs that are then ch...
class Run(LowDataAdapter): ''' Run commands bypassing the :ref:`normal session handling <rest_cherrypy-auth>`. salt-api does not enforce authorization, Salt's eauth system does that. Local/Runner/WheelClient all accept ``username``/``password``/``eauth`` **or** ``token`` kwargs that are then che...
2
2
115
26
4
85
1
16.5
1
1
0
0
1
0
1
5
136
31
6
3
4
99
4
3
2
1
1
0
1
19,715
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Stats
import cherrypy import logging class Stats: """ Expose statistics on the running CherryPy server """ exposed = True _cp_config = dict(LowDataAdapter._cp_config, **{'tools.salt_auth.on': True}) def __init__(self): if cherrypy.config['apiopts'].get('stats_disable_auth'): self...
class Stats: ''' Expose statistics on the running CherryPy server ''' def __init__(self): pass def GET(self): ''' Return a dump of statistics collected from the CherryPy server .. http:get:: /stats :reqheader X-Auth-Token: |req_token| :reqhe...
3
2
11
3
4
5
2
1.3
0
0
0
0
2
0
2
2
32
9
10
5
7
13
10
5
7
2
0
1
4
19,716
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Token
import cherrypy class Token(LowDataAdapter): """ Generate a Salt token from eauth credentials Wraps functionality in the :py:mod:`auth Runner <salt.runners.auth>`. .. versionadded:: 2017.7.0 """ @cherrypy.config(**{'tools.sessions.on': False}) def POST(self, **kwargs): """ ...
class Token(LowDataAdapter): ''' Generate a Salt token from eauth credentials Wraps functionality in the :py:mod:`auth Runner <salt.runners.auth>`. .. versionadded:: 2017.7.0 ''' @cherrypy.config(**{'tools.sessions.on': False}) def POST(self, **kwargs): ''' .. http:post:: /t...
3
2
56
10
19
27
3
1.52
1
2
0
0
1
0
1
5
66
13
21
4
18
32
8
3
6
3
1
2
3
19,717
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.Webhook
import salt.netapi import salt.utils.args import cherrypy import salt.utils.yaml import salt.utils.json import salt import salt.utils.versions import salt.auth import itertools import salt.exceptions import salt.utils.stringutils import salt.utils.event class Webhook: """ A generic web hook entry point that fi...
class Webhook: ''' A generic web hook entry point that fires an event on Salt's event bus External services can POST data to this URL to trigger an event in Salt. For example, Amazon SNS, Jenkins-CI or Travis-CI, or GitHub web hooks. .. note:: Be mindful of security Salt's Reactor can run a...
3
2
53
12
11
31
2
3.1
0
2
0
0
2
2
2
2
165
38
31
13
28
96
18
13
15
2
0
1
4
19,718
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/app.py
salt.netapi.rest_cherrypy.app.WebsocketEndpoint
import salt.netapi from multiprocessing import Pipe, Process import salt import salt.exceptions import salt.utils.json import signal import salt.utils.event import salt.utils.stringutils import cherrypy import salt.auth import salt.utils.args import os import salt.utils.yaml import salt.utils.versions class WebsocketE...
class WebsocketEndpoint: ''' Open a WebSocket connection to Salt's event bus The event bus on the Salt master exposes a large variety of things, notably when executions are started on the master and also when minions ultimately return their results. This URL provides a real-time window into a runni...
5
3
51
11
19
22
3
1.52
0
3
2
0
2
2
2
2
194
44
60
18
55
91
37
17
32
5
0
5
10
19,719
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/event_processor.py
salt.netapi.rest_cherrypy.event_processor.SaltInfo
import salt.utils.json import salt.netapi class SaltInfo: """ Class to handle processing and publishing of "real time" Salt upates. """ def __init__(self, handler): """ handler is expected to be the server side end of a websocket connection. """ self.handler = ...
class SaltInfo: ''' Class to handle processing and publishing of "real time" Salt upates. ''' def __init__(self, handler): ''' handler is expected to be the server side end of a websocket connection. ''' pass def publish_minions(self): ''' ...
10
10
20
3
12
5
3
0.42
0
2
1
0
9
3
9
9
197
39
112
46
102
47
90
46
80
9
0
3
26
19,720
saltstack/salt
saltstack_salt/salt/netapi/rest_cherrypy/tools/websockets.py
salt.netapi.rest_cherrypy.tools.websockets.SynchronizingWebsocket
from ws4py.websocket import WebSocket class SynchronizingWebsocket(WebSocket): """ Class to handle requests sent to this websocket connection. Each instance of this class represents a Salt websocket connection. Waits to receive a ``ready`` message from the client. Calls send on its end of the pipe ...
class SynchronizingWebsocket(WebSocket): ''' Class to handle requests sent to this websocket connection. Each instance of this class represents a Salt websocket connection. Waits to receive a ``ready`` message from the client. Calls send on its end of the pipe to signal to the sender on receipt ...
3
2
16
3
5
9
2
2.7
1
1
0
0
2
3
2
2
45
8
10
6
7
27
10
6
7
2
1
1
3
19,721
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/event_processor.py
salt.netapi.rest_tornado.event_processor.SaltInfo
import threading import salt.netapi import salt.utils.json class SaltInfo: """ Class to handle processing and publishing of "real time" Salt upates. """ def __init__(self, handler): """ handler is expected to be the server side end of a websocket connection. """ ...
class SaltInfo: ''' Class to handle processing and publishing of "real time" Salt upates. ''' def __init__(self, handler): ''' handler is expected to be the server side end of a websocket connection. ''' pass def publish_minions(self): ''' ...
10
10
23
3
15
5
3
0.37
0
2
1
0
9
3
9
9
224
36
138
44
128
51
109
44
99
8
0
3
29
19,722
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.Any
from tornado.concurrent import Future class Any(Future): """ Future that wraps other futures to "block" until one is done """ def __init__(self, futures): super().__init__() for future in futures: future.add_done_callback(self.done_callback) def done_callback(self, fut...
class Any(Future): ''' Future that wraps other futures to "block" until one is done ''' def __init__(self, futures): pass def done_callback(self, future): pass
3
1
4
0
4
1
2
0.5
1
1
0
0
2
0
2
2
14
2
8
4
5
4
8
4
5
2
1
1
4
19,723
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.BaseSaltAPIHandler
import salt.auth import tornado.httpserver import salt.utils.event import fnmatch import tornado.web import salt.utils.json import time import cgi import salt.utils.yaml import salt.utils.args import salt.client import tornado.gen import salt.utils.minions from copy import copy from functools import cached_property imp...
class BaseSaltAPIHandler(tornado.web.RequestHandler): def __init__(self, *args, **kwargs): pass def _verify_client(self, low): ''' Verify that the client is in fact one we have ''' pass def initialize(self): ''' Initialize the handler before reques...
20
14
13
1
8
4
2
0.49
1
7
3
3
15
9
15
96
222
36
126
47
108
62
101
46
84
4
2
3
36
19,724
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.EventListener
import tornado.gen import salt.utils.json import salt.utils.args import salt.utils.yaml import salt.utils.event import salt.netapi import tornado.ioloop import tornado.httpserver from collections import defaultdict import tornado.web import tornado.escape from tornado.concurrent import Future import salt.client import ...
class EventListener: ''' Class responsible for listening to the salt master event bus and updating futures. This is the core of what makes this asynchronous, this allows us to do non-blocking work in the main processes and "wait" for an event to happen ''' def __init__(self, mod_opts, opts): ...
12
5
13
1
10
3
3
0.32
0
5
1
0
6
6
8
8
134
20
88
33
69
28
69
24
59
7
0
3
26
19,725
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.EventsSaltAPIHandler
import tornado.httpserver import tornado.ioloop import tornado.web import tornado.gen import tornado.escape class EventsSaltAPIHandler(SaltAPIHandler): """ Expose the Salt event bus The event bus on the Salt master exposes a large variety of things, notably when executions are started on the master an...
class EventsSaltAPIHandler(SaltAPIHandler): ''' Expose the Salt event bus The event bus on the Salt master exposes a large variety of things, notably when executions are started on the master and also when minions ultimately return their results. This URL provides a real-time window into a running ...
3
2
118
34
20
64
5
3.32
1
1
1
0
1
0
1
107
131
37
22
4
19
73
21
3
19
5
4
3
5
19,726
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.JobsSaltAPIHandler
import tornado.gen import tornado.web import tornado.httpserver import tornado.escape import tornado.ioloop class JobsSaltAPIHandler(SaltAPIHandler): """ A convenience endpoint for job cache data """ @tornado.gen.coroutine def get(self, jid=None): """ A convenience URL for getting ...
class JobsSaltAPIHandler(SaltAPIHandler): ''' A convenience endpoint for job cache data ''' @tornado.gen.coroutine def get(self, jid=None): ''' A convenience URL for getting lists of previously run jobs or getting the return from a single job .. http:get:: /jobs/(jid...
3
2
92
23
9
61
3
5.91
1
0
0
0
1
1
1
107
98
24
11
4
8
65
9
3
7
3
4
1
3
19,727
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.MinionSaltAPIHandler
import tornado.web import tornado.ioloop import tornado.escape import tornado.httpserver import tornado.gen class MinionSaltAPIHandler(SaltAPIHandler): """ A convenience endpoint for minion related functions """ @tornado.gen.coroutine def get(self, mid=None): """ A convenience URL ...
class MinionSaltAPIHandler(SaltAPIHandler): ''' A convenience endpoint for minion related functions ''' @tornado.gen.coroutine def get(self, mid=None): ''' A convenience URL for getting lists of minions or getting minion details .. http:get:: /minions/(mid) ...
5
3
58
15
10
34
4
3.09
1
0
0
0
2
1
2
108
124
32
23
7
18
71
21
5
18
5
4
2
7
19,728
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.RunSaltAPIHandler
import tornado.gen import tornado.escape import tornado.httpserver import tornado.ioloop import tornado.web class RunSaltAPIHandler(SaltAPIHandler): """ Endpoint to run commands without normal session handling """ @tornado.gen.coroutine def post(self): """ Run commands bypassing th...
class RunSaltAPIHandler(SaltAPIHandler): ''' Endpoint to run commands without normal session handling ''' @tornado.gen.coroutine def post(self): ''' Run commands bypassing the :ref:`normal session handling <rest_cherrypy-auth>` .. http:post:: /run This en...
3
2
57
14
2
41
1
11.25
1
0
0
0
1
0
1
107
63
15
4
3
1
45
3
2
1
1
4
0
1
19,729
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.SaltAPIHandler
import salt.runner import salt.auth import tornado.gen import salt.client import salt.netapi import salt.utils.json import tornado.httpserver import tornado.web from salt.utils.event import tagify import salt.utils.minions import tornado.escape import tornado.ioloop import salt.utils.args import salt.utils.event import...
class SaltAPIHandler(BaseSaltAPIHandler): ''' Main API handler for base "/" ''' def get(self): ''' An endpoint to determine salt-api capabilities .. http:get:: / :reqheader Accept: |req_accept| :status 200: |200| :status 401: |401| ...
22
10
31
4
17
10
4
0.62
1
13
7
5
10
0
10
106
408
67
213
63
189
133
150
51
136
12
3
5
50
19,730
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.SaltAuthHandler
import salt.utils.minions import salt.utils.yaml import salt.auth import salt.runner import salt.utils.args import salt.client import salt.utils.json import salt.utils.event import salt.netapi class SaltAuthHandler(BaseSaltAPIHandler): """ Handler for login requests """ def get(self): """ ...
class SaltAuthHandler(BaseSaltAPIHandler): ''' Handler for login requests ''' def get(self): ''' All logins are done over post, this is a parked endpoint .. http:get:: /login :status 401: |401| :status 406: |406| **Example request:** .. c...
3
3
82
17
28
39
4
1.46
1
4
0
0
2
0
2
98
170
35
56
9
53
82
35
9
32
6
3
2
7
19,731
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado.py
salt.netapi.rest_tornado.saltnado.WebhookSaltAPIHandler
import salt.utils.yaml import salt.client import salt.utils.json import salt.utils.minions import salt.auth import salt.utils.event import salt.netapi import salt.runner import salt.utils.args class WebhookSaltAPIHandler(SaltAPIHandler): """ A generic web hook entry point that fires an event on Salt's event bu...
class WebhookSaltAPIHandler(SaltAPIHandler): ''' A generic web hook entry point that fires an event on Salt's event bus External services can POST data to this URL to trigger an event in Salt. For example, Amazon SNS, Jenkins-CI or Travis-CI, or GitHub web hooks. .. note:: Be mindful of security ...
2
2
124
26
30
69
5
3.19
1
1
0
0
1
1
1
107
166
38
31
9
29
99
19
9
17
5
4
2
5
19,732
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado_websockets.py
salt.netapi.rest_tornado.saltnado_websockets.AllEventsHandler
from .saltnado import _check_cors_origin import tornado.gen import tornado.websocket import salt.utils.json import salt.netapi class AllEventsHandler(tornado.websocket.WebSocketHandler): """ Server side websocket handler. """ def get(self, token): """ Check the token, returns a 401 if ...
class AllEventsHandler(tornado.websocket.WebSocketHandler): ''' Server side websocket handler. ''' def get(self, token): ''' Check the token, returns a 401 if the token is invalid. Else open the websocket connection ''' pass def open(self, token): '...
7
6
13
1
8
5
2
0.67
1
3
0
1
5
2
5
28
78
10
43
14
34
29
35
10
29
5
2
3
11
19,733
saltstack/salt
saltstack_salt/salt/netapi/rest_tornado/saltnado_websockets.py
salt.netapi.rest_tornado.saltnado_websockets.FormattedEventsHandler
from . import event_processor import salt.netapi import tornado.websocket import tornado.gen import salt.utils.json class FormattedEventsHandler(AllEventsHandler): @tornado.gen.coroutine def on_message(self, message): """Listens for a "websocket client ready" message. Once that message is rece...
class FormattedEventsHandler(AllEventsHandler): @tornado.gen.coroutine def on_message(self, message): '''Listens for a "websocket client ready" message. Once that message is received an asynchronous job is stated that yields messages to the client. These messages make up salt's...
3
1
44
3
32
10
5
0.32
1
3
2
0
1
1
1
29
46
3
34
8
31
11
20
6
18
5
3
3
5
19,734
saltstack/salt
saltstack_salt/salt/netapi/rest_wsgi.py
salt.netapi.rest_wsgi.HTTPError
class HTTPError(Exception): """ A custom exception that can take action based on an HTTP error code """ def __init__(self, code, message): self.code = code Exception.__init__(self, f'{code}: {message}')
class HTTPError(Exception): ''' A custom exception that can take action based on an HTTP error code ''' def __init__(self, code, message): pass
2
1
3
0
3
0
1
0.75
1
0
0
0
1
1
1
11
8
1
4
3
2
3
4
3
2
1
3
0
1
19,735
saltstack/salt
saltstack_salt/salt/output/nested.py
salt.output.nested.NestDisplay
import salt.utils.stringutils import salt.utils.color import salt.utils.odict from numbers import Number import salt.output from collections.abc import Mapping class NestDisplay: """ Manage the nested display contents """ def __init__(self, retcode=0): self.__dict__.update(salt.utils.color.get...
class NestDisplay: ''' Manage the nested display contents ''' def __init__(self, retcode=0): pass def ustring(self, indent, color, msg, prefix='', suffix='', endc=None): pass def display(self, ret, indent, prefix, out): ''' Recursively iterate down through dat...
4
2
34
2
29
4
9
0.16
0
9
0
0
3
5
3
3
110
8
88
18
84
14
65
15
61
22
0
3
27
19,736
saltstack/salt
saltstack_salt/salt/output/no_return.py
salt.output.no_return.NestDisplay
import salt.utils.color class NestDisplay: """ Create generator for nested output """ def __init__(self): self.colors = salt.utils.color.get_colors(__opts__.get('color'), __opts__.get('color_theme')) def display(self, ret, indent, prefix, out): """ Recursively iterate down...
class NestDisplay: ''' Create generator for nested output ''' def __init__(self): pass def display(self, ret, indent, prefix, out): ''' Recursively iterate down through data structures to determine output ''' pass
3
2
11
0
10
2
3
0.3
0
2
0
0
2
1
2
2
28
2
20
8
17
6
13
8
10
5
0
2
6
19,737
saltstack/salt
saltstack_salt/salt/output/table_out.py
salt.output.table_out.TableDisplay
import salt.utils.data import operator import salt.utils.color import salt.output from functools import reduce class TableDisplay: """ Manage the table display content. """ _JUSTIFY_MAP = {'center': str.center, 'right': str.rjust, 'left': str.ljust} def __init__(self, has_header=True, row_delimite...
class TableDisplay: ''' Manage the table display content. ''' def __init__(self, has_header=True, row_delimiter='-', delim=' | ', justify='center', separate_rows=True, prefix='| ', suffix=' |', width=50, wrapfunc=None): pass def ustring(self, indent, color, msg, prefix='', suffix='', endc...
9
6
31
3
26
4
5
0.18
0
8
0
0
6
11
6
6
242
31
196
57
176
35
109
45
100
13
0
5
40
19,738
saltstack/salt
saltstack_salt/salt/payload.py
salt.payload.SREQ
from salt.exceptions import SaltDeserializationError, SaltReqTimeoutError class SREQ: """ Create a generic interface to wrap salt zeromq req calls. """ def __init__(self, master, id_='', serial='msgpack', linger=0, opts=None): self.master = master self.id_ = id_ self.linger = l...
class SREQ: ''' Create a generic interface to wrap salt zeromq req calls. ''' def __init__(self, master, id_='', serial='msgpack', linger=0, opts=None): pass @property def socket(self): ''' Lazily create the socket. ''' pass def _set_tcp_keepalive(s...
10
5
15
0
13
2
4
0.17
0
3
1
0
8
7
8
8
132
9
105
27
95
18
86
26
77
8
0
3
34
19,739
saltstack/salt
saltstack_salt/salt/pillar/__init__.py
salt.pillar.AsyncPillar
import tornado.gen class AsyncPillar(Pillar): @tornado.gen.coroutine def compile_pillar(self, ext=True): ret = super().compile_pillar(ext=ext) raise tornado.gen.Return(ret)
class AsyncPillar(Pillar): @tornado.gen.coroutine def compile_pillar(self, ext=True): pass
3
0
3
0
3
0
1
0
1
2
0
0
1
0
1
19
5
0
5
4
2
0
4
3
2
1
1
0
1
19,740
saltstack/salt
saltstack_salt/salt/pillar/__init__.py
salt.pillar.AsyncRemotePillar
import salt.utils.args import time import salt.utils.cache import salt.utils.dictupdate import tornado.gen import salt.utils.url from salt.exceptions import SaltClientError import salt.channel.client import salt.utils.data import salt.fileclient import salt.utils.crypt import salt.minion import salt.loader class Async...
class AsyncRemotePillar(RemotePillarMixin): ''' Get the pillar from the master ''' def __init__(self, opts, grains, minion_id, saltenv, ext=None, functions=None, pillar_override=None, pillarenv=None, extra_minion_data=None, clean_cache=False): pass @tornado.gen.coroutine def compile_pi...
6
2
22
1
21
1
4
0.11
1
7
2
0
4
9
4
5
98
6
84
32
66
9
50
18
45
7
1
1
14
19,741
saltstack/salt
saltstack_salt/salt/pillar/__init__.py
salt.pillar.Pillar
import salt.channel.client import salt.utils.args import traceback import salt.utils.data import salt.utils.dictupdate import copy import sys from salt.utils.odict import OrderedDict import salt.utils.crypt import salt.minion import salt.fileclient from salt.version import __version__ from salt.template import compile_...
class Pillar: ''' Read over the pillar top files and render the pillar data ''' def __init__(self, opts, grains, minion_id, saltenv, ext=None, functions=None, pillar_override=None, pillarenv=None, extra_minion_data=None): pass def __valid_on_demand_ext_pillar(self, opts): ''' ...
19
17
46
1
40
5
9
0.13
0
15
2
1
18
16
18
18
849
38
722
142
690
95
449
125
428
28
0
9
165
19,742
saltstack/salt
saltstack_salt/salt/pillar/__init__.py
salt.pillar.PillarCache
import salt.minion import salt.utils.cache import salt.utils.args import salt.utils.crypt import os import salt.utils.data import salt.loader import salt.utils.dictupdate import salt.channel.client import salt.utils.url import salt.fileclient class PillarCache: """ Return a cached pillar if it exists, otherwis...
class PillarCache: ''' Return a cached pillar if it exists, otherwise cache it. Pillar caches are structed in two diminensions: minion_id with a dict of saltenvs. Each saltenv contains a pillar dict Example data structure: ``` {'minion_1': {'base': {'pilar_key_1' 'pillar_val_1'} ...
6
4
23
2
18
5
2
0.38
0
2
2
0
5
11
5
5
136
16
89
33
71
34
47
21
41
5
0
2
10
19,743
saltstack/salt
saltstack_salt/salt/pillar/__init__.py
salt.pillar.RemotePillar
import salt.loader import salt.utils.url import salt.utils.dictupdate import time import salt.utils.args import salt.utils.data from salt.exceptions import SaltClientError import salt.utils.crypt import salt.fileclient import salt.utils.cache import salt.channel.client import salt.minion class RemotePillar(RemotePilla...
class RemotePillar(RemotePillarMixin): ''' Get the pillar from the master ''' def __init__(self, opts, grains, minion_id, saltenv, ext=None, functions=None, pillar_override=None, pillarenv=None, extra_minion_data=None): pass def compile_pillar(self): ''' Return the pillar ...
5
2
21
1
20
1
3
0.1
1
6
2
0
4
8
4
5
94
7
80
28
64
8
46
16
41
6
1
1
13
19,744
saltstack/salt
saltstack_salt/salt/pillar/__init__.py
salt.pillar.RemotePillarMixin
import salt.utils.dictupdate import salt.utils.url from salt.exceptions import SaltClientError import salt.minion import salt.utils.crypt import salt.utils.data import salt.channel.client import salt.fileclient import salt.utils.args import salt.utils.cache import salt.loader class RemotePillarMixin: """ Commo...
class RemotePillarMixin: ''' Common remote pillar functionality ''' def get_ext_pillar_extra_minion_data(self, opts): ''' Returns the extra data from the minion's opts dict (the config file). This data will be passed to external pillar functions. ''' pass ...
4
3
31
2
22
8
4
0.43
0
2
1
2
1
0
1
1
47
4
30
9
27
13
25
9
22
4
0
2
8
19,745
saltstack/salt
saltstack_salt/salt/pillar/postgres.py
salt.pillar.postgres.POSTGRESExtPillar
from salt.pillar.sql_base import SqlBaseExtPillar from contextlib import contextmanager class POSTGRESExtPillar(SqlBaseExtPillar): """ This class receives and processes the database rows from POSTGRES. """ @classmethod def _db_name(cls): return 'POSTGRES' def _get_options(self): ...
class POSTGRESExtPillar(SqlBaseExtPillar): ''' This class receives and processes the database rows from POSTGRES. ''' @classmethod def _db_name(cls): pass def _get_options(self): ''' Returns options used for the POSTGRES connection. ''' pass @con...
7
4
12
0
10
3
2
0.34
1
1
0
0
3
0
4
32
58
4
41
15
34
14
26
12
21
3
4
2
7
19,746
saltstack/salt
saltstack_salt/salt/pillar/sql_base.py
salt.pillar.sql_base.SqlBaseExtPillar
from salt.utils.dictupdate import update import abc from salt.utils.odict import OrderedDict class SqlBaseExtPillar(metaclass=abc.ABCMeta): """ This class receives and processes the database rows in a database agnostic way. """ result = None focus = None field_names = None num_fields = ...
class SqlBaseExtPillar(metaclass=abc.ABCMeta): ''' This class receives and processes the database rows in a database agnostic way. ''' def __init__(self): pass @classmethod @abc.abstractmethod def _db_name(cls): ''' Return a friendly name for the database, e.g. ...
12
8
30
1
20
9
6
0.46
1
7
0
1
7
0
8
28
264
20
169
39
157
77
132
36
123
31
3
5
47
19,747
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.AuthInfo
class AuthInfo(ContiguousUnicode): def __init__(self): super().__init__() self.MessageType = self._message_type_
class AuthInfo(ContiguousUnicode): def __init__(self): pass
2
0
3
0
3
0
1
0.25
1
1
0
2
1
1
1
8
5
0
4
3
2
1
4
3
2
1
1
0
1
19,748
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.BOOL
from ctypes import wintypes class BOOL(wintypes.BOOL): def __repr__(self): name = self.__class__.__name__ return f'{name}({bool(self)})'
class BOOL(wintypes.BOOL): def __repr__(self): pass
2
0
3
0
3
0
1
0
1
1
0
0
1
0
1
1
4
0
4
3
2
0
4
3
2
1
1
0
1
19,749
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.ContiguousUnicode
import ctypes class ContiguousUnicode(ctypes.Structure): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) def _get_unicode_string(self, name): wchar_size = ctypes.sizeof(WCHAR) s = getattr(self, f'_{name}') length = s.Length // wchar_size buf = s....
class ContiguousUnicode(ctypes.Structure): def __init__(self, *args, **kwargs): pass def _get_unicode_string(self, name): pass def _set_unicode_buffer(self, values): pass def _set_unicode_string(self, name, value): pass def __getattr__(self, name): pass ...
9
0
10
0
9
0
3
0.04
0
5
0
2
6
0
7
7
76
7
68
33
59
3
62
32
54
5
0
2
18
19,750
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.DWORD_IDV
from ctypes import wintypes class DWORD_IDV(wintypes.DWORD): pass
class DWORD_IDV(wintypes.DWORD): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
19,751
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.HANDLE
import ctypes from ctypes import wintypes class HANDLE(wintypes.HANDLE): __slots__ = ('closed',) def __int__(self): return self.value or 0 def Detach(self): if not getattr(self, 'closed', False): self.closed = True value = int(self) self.value = None ...
class HANDLE(wintypes.HANDLE): def __int__(self): pass def Detach(self): pass def Close(self, CloseHandle=kernel32.CloseHandle): pass def __repr__(self): pass
5
0
4
0
4
0
2
0
1
2
0
0
4
2
4
4
22
5
17
10
12
0
17
10
12
2
1
1
6
19,752
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.HANDLE_IHV
from ctypes import wintypes class HANDLE_IHV(wintypes.HANDLE): pass
class HANDLE_IHV(wintypes.HANDLE): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
1
0
0
19,753
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.KERB_S4U_LOGON
class KERB_S4U_LOGON(S4ULogon): _message_type_ = KerbS4ULogon
class KERB_S4U_LOGON(S4ULogon): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
9
2
0
2
2
1
0
2
2
1
0
3
0
0
19,754
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.LARGE_INTEGER
from ctypes import wintypes import ctypes class LARGE_INTEGER(wintypes.LARGE_INTEGER): ntdll.RtlSecondsSince1970ToTime.restype = None _unix_epoch = wintypes.LARGE_INTEGER() ntdll.RtlSecondsSince1970ToTime(0, ctypes.byref(_unix_epoch)) _unix_epoch = _unix_epoch.value def __int__(self): retu...
class LARGE_INTEGER(wintypes.LARGE_INTEGER): def __int__(self): pass def __repr__(self): pass def as_time(self): pass @classmethod def from_time(cls, t): pass
6
0
3
0
3
0
1
0.05
1
2
0
0
3
0
4
4
24
4
19
10
13
1
18
9
13
2
1
1
5
19,755
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.LUID
import ctypes from ctypes import wintypes class LUID(ctypes.Structure): _fields_ = (('LowPart', wintypes.DWORD), ('HighPart', wintypes.LONG)) def __new__(cls, value=0): return cls.from_buffer_copy(ctypes.c_ulonglong(value)) def __int__(self): return ctypes.c_ulonglong.from_buffer(self).va...
class LUID(ctypes.Structure): def __new__(cls, value=0): pass def __int__(self): pass def __repr__(self): pass
4
0
2
0
2
0
1
0
0
1
0
0
3
0
3
3
15
3
12
6
8
0
9
6
5
1
0
0
3
19,756
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.MSV1_0_INTERACTIVE_LOGON
class MSV1_0_INTERACTIVE_LOGON(AuthInfo): _message_type_ = MsV1_0InteractiveLogon _string_names_ = ('LogonDomainName', 'UserName', 'Password') _fields_ = (('MessageType', LOGON_SUBMIT_TYPE), ('_LogonDomainName', UNICODE_STRING), ('_UserName', UNICODE_STRING), ('_Password', UNICODE_STRING)) def __init__...
class MSV1_0_INTERACTIVE_LOGON(AuthInfo): def __init__(self, UserName=None, Password=None, LogonDomainName=None): pass
2
0
8
0
8
0
4
0
1
1
0
0
1
3
1
9
19
2
17
8
15
0
12
8
10
4
2
1
4
19,757
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.MSV1_0_INTERACTIVE_PROFILE
from ctypes import wintypes class MSV1_0_INTERACTIVE_PROFILE(ProfileBuffer): _message_type_ = MsV1_0InteractiveLogon _string_names_ = ('LogonScript', 'HomeDirectory', 'FullName', 'ProfilePath', 'HomeDirectoryDrive', 'LogonServer') _fields_ = (('MessageType', PROFILE_BUFFER_TYPE), ('LogonCount', wintypes.US...
class MSV1_0_INTERACTIVE_PROFILE(ProfileBuffer): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
8
28
0
28
4
27
0
4
4
3
0
2
0
0
19,758
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.MSV1_0_S4U_LOGON
class MSV1_0_S4U_LOGON(S4ULogon): _message_type_ = MsV1_0S4ULogon
class MSV1_0_S4U_LOGON(S4ULogon): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
9
2
0
2
2
1
0
2
2
1
0
3
0
0
19,759
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.NTSTATUS
from ctypes import wintypes class NTSTATUS(wintypes.LONG): def to_error(self): return ntdll.RtlNtStatusToDosError(self) def __repr__(self): name = self.__class__.__name__ status = wintypes.ULONG.from_buffer(self) return f'{name}({status.value})'
class NTSTATUS(wintypes.LONG): def to_error(self): pass def __repr__(self): pass
3
0
3
0
3
0
1
0
1
0
0
0
2
0
2
2
8
1
7
5
4
0
7
5
4
1
1
0
2
19,760
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.PROCESS_INFORMATION
import ctypes from ctypes import wintypes class PROCESS_INFORMATION(ctypes.Structure): """https://msdn.microsoft.com/en-us/library/ms684873""" _fields_ = (('hProcess', wintypes.HANDLE), ('hThread', wintypes.HANDLE), ('dwProcessId', wintypes.DWORD), ('dwThreadId', wintypes.DWORD))
class PROCESS_INFORMATION(ctypes.Structure): '''https://msdn.microsoft.com/en-us/library/ms684873''' pass
1
1
0
0
0
0
0
0.14
0
0
0
0
0
0
0
0
9
1
7
2
6
1
2
2
1
0
0
0
0
19,761
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.PROC_THREAD_ATTRIBUTE_LIST
import ctypes class PROC_THREAD_ATTRIBUTE_LIST(ctypes.Structure): pass
class PROC_THREAD_ATTRIBUTE_LIST(ctypes.Structure): pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
1
1
0
2
1
1
0
0
0
0
19,762
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.ProfileBuffer
class ProfileBuffer(ContiguousUnicode): def __init__(self): super().__init__() self.MessageType = self._message_type_
class ProfileBuffer(ContiguousUnicode): def __init__(self): pass
2
0
3
0
3
0
1
0.25
1
1
0
1
1
1
1
8
5
0
4
3
2
1
4
3
2
1
1
0
1
19,763
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.QUOTA_LIMITS
import ctypes from ctypes import wintypes class QUOTA_LIMITS(ctypes.Structure): _fields_ = (('PagedPoolLimit', SIZE_T), ('NonPagedPoolLimit', SIZE_T), ('MinimumWorkingSetSize', SIZE_T), ('MaximumWorkingSetSize', SIZE_T), ('PagefileLimit', SIZE_T), ('TimeLimit', wintypes.LARGE_INTEGER))
class QUOTA_LIMITS(ctypes.Structure): pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
9
0
9
2
8
0
2
2
1
0
0
0
0
19,764
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.S4ULogon
from ctypes import wintypes class S4ULogon(AuthInfo): _string_names_ = ('UserPrincipalName', 'DomainName') _fields_ = (('MessageType', LOGON_SUBMIT_TYPE), ('Flags', wintypes.ULONG), ('_UserPrincipalName', UNICODE_STRING), ('_DomainName', UNICODE_STRING)) def __init__(self, UserPrincipalName=None, DomainNa...
class S4ULogon(AuthInfo): def __init__(self, UserPrincipalName=None, DomainName=None, Flags=0): pass
2
0
7
0
7
0
3
0
1
1
0
2
1
3
1
9
17
2
15
7
13
0
10
7
8
3
2
1
3
19,765
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.SECURITY_ATTRIBUTES
import ctypes from ctypes import wintypes class SECURITY_ATTRIBUTES(ctypes.Structure): _fields_ = (('nLength', wintypes.DWORD), ('lpSecurityDescriptor', wintypes.LPVOID), ('bInheritHandle', wintypes.BOOL)) def __init__(self, **kwds): self.nLength = ctypes.sizeof(self) super().__init__(**kwds)
class SECURITY_ATTRIBUTES(ctypes.Structure): def __init__(self, **kwds): pass
2
0
3
0
3
0
1
0
0
1
0
0
1
1
1
1
10
1
9
4
7
0
5
4
3
1
0
0
1
19,766
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.SID_AND_ATTRIBUTES
from ctypes import wintypes import ctypes class SID_AND_ATTRIBUTES(ctypes.Structure): _fields_ = (('Sid', PSID), ('Attributes', wintypes.DWORD))
class SID_AND_ATTRIBUTES(ctypes.Structure): pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0
5
2
4
0
2
2
1
0
0
0
0
19,767
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.STARTUPINFO
import ctypes from ctypes import wintypes class STARTUPINFO(ctypes.Structure): """https://msdn.microsoft.com/en-us/library/ms686331""" _fields_ = (('cb', wintypes.DWORD), ('lpReserved', wintypes.LPWSTR), ('lpDesktop', wintypes.LPWSTR), ('lpTitle', wintypes.LPWSTR), ('dwX', wintypes.DWORD), ('dwY', wintypes.DWO...
class STARTUPINFO(ctypes.Structure): '''https://msdn.microsoft.com/en-us/library/ms686331''' def __init__(self, **kwds): pass
2
1
3
0
3
0
1
0.04
0
1
0
1
1
1
1
1
27
2
24
4
22
1
5
4
3
1
0
0
1
19,768
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.STARTUPINFOEX
class STARTUPINFOEX(STARTUPINFO): _fields_ = (('lpAttributeList', PPROC_THREAD_ATTRIBUTE_LIST),)
class STARTUPINFOEX(STARTUPINFO): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
1
2
0
2
2
1
0
2
2
1
0
1
0
0
19,769
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.STRING
import ctypes from ctypes import wintypes class STRING(ctypes.Structure): _fields_ = (('Length', wintypes.USHORT), ('MaximumLength', wintypes.USHORT), ('Buffer', PCHAR))
class STRING(ctypes.Structure): pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
6
2
5
0
2
2
1
0
0
0
0
19,770
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.TOKEN_GROUPS
import ctypes from ctypes import wintypes class TOKEN_GROUPS(ctypes.Structure): _fields_ = (('GroupCount', wintypes.DWORD), ('Groups', SID_AND_ATTRIBUTES * 1))
class TOKEN_GROUPS(ctypes.Structure): pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
5
0
5
2
4
0
2
2
1
0
0
0
0
19,771
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.TOKEN_SOURCE
import ctypes class TOKEN_SOURCE(ctypes.Structure): _fields_ = (('SourceName', CHAR * TOKEN_SOURCE_LENGTH), ('SourceIdentifier', LUID)) def __init__(self, SourceName=None, SourceIdentifier=None): super().__init__() if SourceName is not None: if not isinstance(SourceName, bytes): ...
class TOKEN_SOURCE(ctypes.Structure): def __init__(self, SourceName=None, SourceIdentifier=None): pass
2
0
13
0
11
2
4
0.13
0
2
0
0
1
2
1
1
19
1
16
6
14
2
12
6
10
4
0
2
4
19,772
saltstack/salt
saltstack_salt/salt/platform/win.py
salt.platform.win.UNICODE_STRING
import ctypes from ctypes import wintypes class UNICODE_STRING(ctypes.Structure): _fields_ = (('Length', wintypes.USHORT), ('MaximumLength', wintypes.USHORT), ('Buffer', PWCHAR))
class UNICODE_STRING(ctypes.Structure): pass
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
6
0
6
2
5
0
2
2
1
0
0
0
0
19,773
saltstack/salt
saltstack_salt/salt/renderers/pyobjects.py
salt.renderers.pyobjects.PyobjectsModule
class PyobjectsModule: """This provides a wrapper for bare imports.""" def __init__(self, name, attrs): self.name = name self.__dict__ = attrs def __repr__(self): return f"<module '{self.name!s}' (pyobjects)>"
class PyobjectsModule: '''This provides a wrapper for bare imports.''' def __init__(self, name, attrs): pass def __repr__(self): pass
3
1
3
0
3
0
1
0.17
0
0
0
0
2
2
2
2
9
2
6
5
3
1
6
5
3
1
0
0
2
19,774
saltstack/salt
saltstack_salt/salt/renderers/stateconf.py
salt.renderers.stateconf.Bunch
class Bunch(dict): def __getattr__(self, name): return self[name]
class Bunch(dict): def __getattr__(self, name): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
28
3
0
3
2
1
0
3
2
1
1
2
0
1
19,775
saltstack/salt
saltstack_salt/salt/roster/__init__.py
salt.roster.Roster
import salt.loader import salt.syspaths class Roster: """ Used to manage a roster of minions allowing the master to become outwardly minion aware """ def __init__(self, opts, backends='flat'): self.opts = opts if isinstance(backends, list): self.backends = backends ...
class Roster: ''' Used to manage a roster of minions allowing the master to become outwardly minion aware ''' def __init__(self, opts, backends='flat'): pass def _gen_back(self): ''' Return a list of loaded roster backends ''' pass def targets(self...
4
3
14
0
12
2
4
0.31
0
4
0
0
3
3
3
3
51
4
36
16
32
11
34
15
30
5
0
3
13
19,776
saltstack/salt
saltstack_salt/salt/roster/scan.py
salt.roster.scan.RosterMatcher
import socket import copy from salt._compat import ipaddress import salt.utils.network class RosterMatcher: """ Matcher for the roster data structure """ def __init__(self, tgt, tgt_type): self.tgt = tgt self.tgt_type = tgt_type def targets(self): """ Return ip add...
class RosterMatcher: ''' Matcher for the roster data structure ''' def __init__(self, tgt, tgt_type): pass def targets(self): ''' Return ip addrs based on netmask, sitting in the "glob" spot because it is the default ''' pass
3
2
21
0
19
3
5
0.21
0
7
0
0
2
2
2
2
48
2
38
13
35
8
37
13
34
9
0
3
10
19,777
saltstack/salt
saltstack_salt/salt/roster/sshconfig.py
salt.roster.sshconfig.RosterMatcher
import fnmatch class RosterMatcher: """ Matcher for the roster data structure """ def __init__(self, raw, tgt, tgt_type): self.tgt = tgt self.tgt_type = tgt_type self.raw = raw def targets(self): """ Execute the correct tgt_type routine and return "...
class RosterMatcher: ''' Matcher for the roster data structure ''' def __init__(self, raw, tgt, tgt_type): pass def targets(self): ''' Execute the correct tgt_type routine and return ''' pass def ret_glob_minions(self): ''' Return minio...
5
4
8
0
6
2
3
0.5
0
3
0
0
4
3
4
4
40
4
24
11
19
12
24
11
19
4
0
3
10
19,778
saltstack/salt
saltstack_salt/salt/runner.py
salt.runner.Runner
import salt.utils.event from salt.output import display_output import salt.loader import salt.utils.user from salt.utils.lazy import verify_fun import os import salt.utils.args import salt.minion import salt.utils.files import salt.exceptions class Runner(RunnerClient): """ Execute the salt runner interface ...
class Runner(RunnerClient): ''' Execute the salt runner interface ''' def __init__(self, opts, context=None): pass def print_docs(self): ''' Print out the documentation! ''' pass def run(self, full_return=False): ''' Execute the runner ...
4
3
49
4
39
6
7
0.18
1
5
1
0
3
5
3
25
154
15
119
26
113
21
77
22
71
19
3
6
22
19,779
saltstack/salt
saltstack_salt/salt/runner.py
salt.runner.RunnerClient
import salt.utils.user import salt.utils.event import salt.minion import salt.utils.files import salt.utils.args import salt.loader from salt.utils.lazy import verify_fun from salt.client import mixins import salt.exceptions class RunnerClient(mixins.SyncClientMixin, mixins.AsyncClientMixin): """ The interface...
class RunnerClient(mixins.SyncClientMixin, mixins.AsyncClientMixin): ''' The interface used by the :command:`salt-run` CLI tool on the Salt Master It executes :ref:`runner modules <all-salt.runners>` which run on the Salt Master. Importing and using ``RunnerClient`` must be done on the same machine...
7
5
28
4
11
14
2
1.36
2
3
0
1
5
3
5
22
165
27
59
27
44
80
32
17
26
4
2
2
8
19,780
saltstack/salt
saltstack_salt/salt/serializers/__init__.py
salt.serializers.DeserializationError
from salt.exceptions import SaltException, SaltRenderError class DeserializationError(SaltRenderError, RuntimeError): """Raised when stream of string failed to be deserialized"""
class DeserializationError(SaltRenderError, RuntimeError): '''Raised when stream of string failed to be deserialized''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
14
2
0
1
1
0
1
1
1
0
0
5
0
0
19,781
saltstack/salt
saltstack_salt/salt/serializers/__init__.py
salt.serializers.SerializationError
from salt.exceptions import SaltException, SaltRenderError class SerializationError(SaltException, RuntimeError): """Raised when stream of string failed to be serialized"""
class SerializationError(SaltException, RuntimeError): '''Raised when stream of string failed to be serialized''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
13
2
0
1
1
0
1
1
1
0
0
4
0
0
19,782
saltstack/salt
saltstack_salt/salt/serializers/yaml.py
salt.serializers.yaml.Dumper
class Dumper(BaseDumper): """Overwrites Dumper as not for pollute legacy Dumper"""
class Dumper(BaseDumper): '''Overwrites Dumper as not for pollute legacy Dumper''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
0
2
0
1
1
0
2
1
1
0
0
1
0
0
19,783
saltstack/salt
saltstack_salt/salt/serializers/yaml.py
salt.serializers.yaml.EncryptedString
class EncryptedString(str): yaml_tag = '!encrypted' @staticmethod def yaml_constructor(loader, tag, node): return EncryptedString(loader.construct_scalar(node)) @staticmethod def yaml_dumper(dumper, data): return dumper.represent_scalar(EncryptedString.yaml_tag, str(data))
class EncryptedString(str): @staticmethod def yaml_constructor(loader, tag, node): pass @staticmethod def yaml_dumper(dumper, data): pass
5
0
2
0
2
0
1
0
1
0
0
0
0
0
2
68
11
3
8
6
3
0
6
4
3
1
2
0
2
19,784
saltstack/salt
saltstack_salt/salt/serializers/yaml.py
salt.serializers.yaml.Loader
class Loader(BaseLoader): """Overwrites Loader as not for pollute legacy Loader"""
class Loader(BaseLoader): '''Overwrites Loader as not for pollute legacy Loader''' pass
1
1
0
0
0
0
0
2
1
0
0
0
0
0
0
0
2
0
1
1
0
2
1
1
0
0
1
0
0
19,785
saltstack/salt
saltstack_salt/salt/serializers/yamlex.py
salt.serializers.yamlex.AggregatedMap
from salt.utils.aggregation import Map, Sequence, aggregate class AggregatedMap(SLSMap, Map): pass
class AggregatedMap(SLSMap, Map): pass
1
0
0
0
0
0
0
0
2
0
0
0
0
0
0
52
2
0
2
1
1
0
2
1
1
0
4
0
0
19,786
saltstack/salt
saltstack_salt/salt/serializers/yamlex.py
salt.serializers.yamlex.AggregatedSequence
from salt.utils.aggregation import Map, Sequence, aggregate class AggregatedSequence(Sequence): pass
class AggregatedSequence(Sequence): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
33
2
0
2
1
1
0
2
1
1
0
3
0
0
19,787
saltstack/salt
saltstack_salt/salt/serializers/yamlex.py
salt.serializers.yamlex.Dumper
class Dumper(BaseDumper): """ sls dumper. """ def represent_odict(self, data): return self.represent_mapping('tag:yaml.org,2002:map', list(data.items()))
class Dumper(BaseDumper): ''' sls dumper. ''' def represent_odict(self, data): pass
2
1
2
0
2
0
1
1.33
1
1
0
0
1
0
1
1
7
1
3
2
1
4
3
2
1
1
1
0
1
19,788
saltstack/salt
saltstack_salt/salt/serializers/yamlex.py
salt.serializers.yamlex.Loader
import copy from yaml.constructor import ConstructorError from yaml.nodes import MappingNode import yaml class Loader(BaseLoader): """ Create a custom YAML loader that uses the custom constructor. This allows for the YAML loading defaults to be manipulated based on needs within salt to make things like...
class Loader(BaseLoader): ''' Create a custom YAML loader that uses the custom constructor. This allows for the YAML loading defaults to be manipulated based on needs within salt to make things like sls file more intuitive. ''' def compose_document(self): pass def construct_yaml_o...
8
4
15
1
12
3
3
0.31
1
9
4
0
7
0
7
7
125
17
85
23
77
26
70
23
62
6
1
2
23
19,789
saltstack/salt
saltstack_salt/salt/serializers/yamlex.py
salt.serializers.yamlex.SLSMap
from salt.utils.odict import OrderedDict class SLSMap(OrderedDict): """ Ensures that dict str() and repr() are YAML friendly. .. code-block:: python >>> mapping = OrderedDict([('a', 'b'), ('c', None)]) >>> print mapping OrderedDict([('a', 'b'), ('c', None)]) >>> sls_map =...
class SLSMap(OrderedDict): ''' Ensures that dict str() and repr() are YAML friendly. .. code-block:: python >>> mapping = OrderedDict([('a', 'b'), ('c', None)]) >>> print mapping OrderedDict([('a', 'b'), ('c', None)]) >>> sls_map = SLSMap(mapping) >>> print sls_map._...
3
1
2
0
2
0
1
2
1
0
0
1
2
0
2
52
21
6
5
3
2
10
5
3
2
1
3
0
2
19,790
saltstack/salt
saltstack_salt/salt/serializers/yamlex.py
salt.serializers.yamlex.SLSString
class SLSString(str): """ Ensures that str str() and repr() are YAML friendly. .. code-block:: python >>> scalar = str('foo') >>> print 'foo' foo >>> sls_scalar = SLSString(scalar) >>> print sls_scalar "foo" """ def __str__(self): return s...
class SLSString(str): ''' Ensures that str str() and repr() are YAML friendly. .. code-block:: python >>> scalar = str('foo') >>> print 'foo' foo >>> sls_scalar = SLSString(scalar) >>> print sls_scalar "foo" ''' def __str__(self): pass de...
3
1
2
0
2
0
1
2
1
0
0
0
2
0
2
68
21
6
5
3
2
10
5
3
2
1
2
0
2
19,791
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMClient
import shutil import salt.loader import salt.syspaths as syspaths import hashlib import os import salt.cache import salt.config import salt.utils.files import salt.client import salt.utils.http as http import salt.utils.win_functions import salt.utils.path import salt.utils.yaml from salt.template import compile_templa...
class SPMClient: ''' Provide an SPM Client ''' def __init__(self, ui, opts=None): pass def _prep_pkgdb(self): pass def _prep_pkgfiles(self): pass def _init(self): pass def _close(self): pass def run(self, args): ''' Run t...
37
28
29
3
23
4
6
0.16
0
16
6
0
34
15
34
34
1,077
129
821
212
784
129
601
205
564
24
0
9
216
19,792
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMCmdlineInterface
import sys class SPMCmdlineInterface(SPMUserInterface): """ Command-line interface to SPMClient """ def status(self, msg): print(msg) def error(self, msg): print(msg, file=sys.stderr) def confirm(self, action): print(action) res = input('Proceed? [N/y] ') ...
class SPMCmdlineInterface(SPMUserInterface): ''' Command-line interface to SPMClient ''' def status(self, msg): pass def error(self, msg): pass def confirm(self, action): pass
4
1
3
0
3
0
1
0.3
1
1
1
0
3
0
3
6
16
3
10
5
6
3
10
5
6
2
1
1
4
19,793
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMDatabaseError
class SPMDatabaseError(SPMException): """ SPM database not found, etc """
class SPMDatabaseError(SPMException): ''' SPM database not found, etc ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
10
4
0
1
1
0
3
1
1
0
0
4
0
0
19,794
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMException
class SPMException(Exception): """ Base class for SPMClient exceptions """
class SPMException(Exception): ''' Base class for SPMClient exceptions ''' pass
1
1
0
0
0
0
0
3
1
0
0
4
0
0
0
10
4
0
1
1
0
3
1
1
0
0
3
0
0
19,795
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMInvocationError
class SPMInvocationError(SPMException): """ Wrong number of arguments or other usage error """
class SPMInvocationError(SPMException): ''' Wrong number of arguments or other usage error ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
10
4
0
1
1
0
3
1
1
0
0
4
0
0
19,796
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMOperationCanceled
class SPMOperationCanceled(SPMException): """ SPM install or uninstall was canceled """
class SPMOperationCanceled(SPMException): ''' SPM install or uninstall was canceled ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
10
4
0
1
1
0
3
1
1
0
0
4
0
0
19,797
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMPackageError
class SPMPackageError(SPMException): """ Problem with package file or package installation """
class SPMPackageError(SPMException): ''' Problem with package file or package installation ''' pass
1
1
0
0
0
0
0
3
1
0
0
0
0
0
0
10
4
0
1
1
0
3
1
1
0
0
4
0
0
19,798
saltstack/salt
saltstack_salt/salt/spm/__init__.py
salt.spm.SPMUserInterface
class SPMUserInterface: """ Handle user interaction with an SPMClient object """ def status(self, msg): """ Report an SPMClient status message """ raise NotImplementedError() def error(self, msg): """ Report an SPM error message """ r...
class SPMUserInterface: ''' Handle user interaction with an SPMClient object ''' def status(self, msg): ''' Report an SPMClient status message ''' pass def error(self, msg): ''' Report an SPM error message ''' pass def confirm(se...
4
4
6
0
2
4
1
2
0
1
0
2
3
0
3
3
24
3
7
4
3
14
7
4
3
1
0
0
3
19,799
saltstack/salt
saltstack_salt/salt/state.py
salt.state.BaseHighState
import salt.utils.msgpack from collections.abc import Callable, Hashable, Iterable, Mapping, Sequence import salt.utils.jid import traceback import salt.utils.immutabletypes as immutabletypes import salt.utils.hashutils import salt.utils.files import re import salt.utils.event import salt.utils.dictupdate import salt.u...
class BaseHighState: ''' The BaseHighState is an abstract base class that is the foundation of running a highstate, extend it and add a self.state object of type State. When extending this class, please note that ``self.client`` and ``self.matcher`` should be instantiated and handled. ''' ...
35
26
36
2
30
5
8
0.17
0
15
4
2
32
5
32
32
1,228
87
979
202
936
166
682
190
647
34
0
9
265