repo
stringlengths
7
54
path
stringlengths
4
223
func_name
stringlengths
1
134
original_string
stringlengths
75
104k
language
stringclasses
1 value
code
stringlengths
75
104k
code_tokens
listlengths
20
28.4k
docstring
stringlengths
1
46.3k
docstring_tokens
listlengths
1
1.66k
sha
stringlengths
40
40
url
stringlengths
87
315
partition
stringclasses
1 value
summary
stringlengths
4
350
obf_code
stringlengths
7.85k
764k
saltstack/salt
salt/pillar/s3.py
ext_pillar
def ext_pillar(minion_id, pillar, # pylint: disable=W0613 bucket, key=None, keyid=None, verify_ssl=True, location=None, multiple_env=False, environment='base', prefix='', ...
python
def ext_pillar(minion_id, pillar, # pylint: disable=W0613 bucket, key=None, keyid=None, verify_ssl=True, location=None, multiple_env=False, environment='base', prefix='', ...
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "# pylint: disable=W0613", "bucket", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "verify_ssl", "=", "True", ",", "location", "=", "None", ",", "multiple_env", "=", "False", ",", "envir...
Execute a command and read the output as YAML
[ "Execute", "a", "command", "and", "read", "the", "output", "as", "YAML" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L129-L189
train
Execute a command and read the output as YAML and return the resulting pillar.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_init
def _init(creds, bucket, multiple_env, environment, prefix, s3_cache_expire): ''' Connect to S3 and download the metadata for each file in all buckets specified and cache the data to disk. ''' cache_file = _get_buckets_cache_filename(bucket, prefix) exp = time.time() - s3_cache_expire # ch...
python
def _init(creds, bucket, multiple_env, environment, prefix, s3_cache_expire): ''' Connect to S3 and download the metadata for each file in all buckets specified and cache the data to disk. ''' cache_file = _get_buckets_cache_filename(bucket, prefix) exp = time.time() - s3_cache_expire # ch...
[ "def", "_init", "(", "creds", ",", "bucket", ",", "multiple_env", ",", "environment", ",", "prefix", ",", "s3_cache_expire", ")", ":", "cache_file", "=", "_get_buckets_cache_filename", "(", "bucket", ",", "prefix", ")", "exp", "=", "time", ".", "time", "(", ...
Connect to S3 and download the metadata for each file in all buckets specified and cache the data to disk.
[ "Connect", "to", "S3", "and", "download", "the", "metadata", "for", "each", "file", "in", "all", "buckets", "specified", "and", "cache", "the", "data", "to", "disk", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L192-L225
train
Initialize the pillars for the specified bucket.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_get_cache_dir
def _get_cache_dir(): ''' Get pillar cache directory. Initialize it if it does not exist. ''' cache_dir = os.path.join(__opts__['cachedir'], 'pillar_s3fs') if not os.path.isdir(cache_dir): log.debug('Initializing S3 Pillar Cache') os.makedirs(cache_dir) return cache_dir
python
def _get_cache_dir(): ''' Get pillar cache directory. Initialize it if it does not exist. ''' cache_dir = os.path.join(__opts__['cachedir'], 'pillar_s3fs') if not os.path.isdir(cache_dir): log.debug('Initializing S3 Pillar Cache') os.makedirs(cache_dir) return cache_dir
[ "def", "_get_cache_dir", "(", ")", ":", "cache_dir", "=", "os", ".", "path", ".", "join", "(", "__opts__", "[", "'cachedir'", "]", ",", "'pillar_s3fs'", ")", "if", "not", "os", ".", "path", ".", "isdir", "(", "cache_dir", ")", ":", "log", ".", "debug...
Get pillar cache directory. Initialize it if it does not exist.
[ "Get", "pillar", "cache", "directory", ".", "Initialize", "it", "if", "it", "does", "not", "exist", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L228-L239
train
Get pillar cache directory. Initialize it if it does not exist.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_get_buckets_cache_filename
def _get_buckets_cache_filename(bucket, prefix): ''' Return the filename of the cache for bucket contents. Create the path if it does not exist. ''' cache_dir = _get_cache_dir() if not os.path.exists(cache_dir): os.makedirs(cache_dir) return os.path.join(cache_dir, '{0}-{1}-files.c...
python
def _get_buckets_cache_filename(bucket, prefix): ''' Return the filename of the cache for bucket contents. Create the path if it does not exist. ''' cache_dir = _get_cache_dir() if not os.path.exists(cache_dir): os.makedirs(cache_dir) return os.path.join(cache_dir, '{0}-{1}-files.c...
[ "def", "_get_buckets_cache_filename", "(", "bucket", ",", "prefix", ")", ":", "cache_dir", "=", "_get_cache_dir", "(", ")", "if", "not", "os", ".", "path", ".", "exists", "(", "cache_dir", ")", ":", "os", ".", "makedirs", "(", "cache_dir", ")", "return", ...
Return the filename of the cache for bucket contents. Create the path if it does not exist.
[ "Return", "the", "filename", "of", "the", "cache", "for", "bucket", "contents", ".", "Create", "the", "path", "if", "it", "does", "not", "exist", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L256-L266
train
Returns the filename of the cache for the given bucket and prefix.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_refresh_buckets_cache_file
def _refresh_buckets_cache_file(creds, cache_file, multiple_env, environment, prefix): ''' Retrieve the content of all buckets and cache the metadata to the buckets cache file ''' # helper s3 query function def __get_s3_meta(): return __utils__['s3.query']( key=creds.key, ...
python
def _refresh_buckets_cache_file(creds, cache_file, multiple_env, environment, prefix): ''' Retrieve the content of all buckets and cache the metadata to the buckets cache file ''' # helper s3 query function def __get_s3_meta(): return __utils__['s3.query']( key=creds.key, ...
[ "def", "_refresh_buckets_cache_file", "(", "creds", ",", "cache_file", ",", "multiple_env", ",", "environment", ",", "prefix", ")", ":", "# helper s3 query function", "def", "__get_s3_meta", "(", ")", ":", "return", "__utils__", "[", "'s3.query'", "]", "(", "key",...
Retrieve the content of all buckets and cache the metadata to the buckets cache file
[ "Retrieve", "the", "content", "of", "all", "buckets", "and", "cache", "the", "metadata", "to", "the", "buckets", "cache", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L269-L349
train
Retrieve the content of all buckets and cache the metadata to the buckets cache file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_read_buckets_cache_file
def _read_buckets_cache_file(cache_file): ''' Return the contents of the buckets cache file ''' log.debug('Reading buckets cache file') with salt.utils.files.fopen(cache_file, 'rb') as fp_: data = pickle.load(fp_) return data
python
def _read_buckets_cache_file(cache_file): ''' Return the contents of the buckets cache file ''' log.debug('Reading buckets cache file') with salt.utils.files.fopen(cache_file, 'rb') as fp_: data = pickle.load(fp_) return data
[ "def", "_read_buckets_cache_file", "(", "cache_file", ")", ":", "log", ".", "debug", "(", "'Reading buckets cache file'", ")", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "cache_file", ",", "'rb'", ")", "as", "fp_", ":", "data", "=", "pi...
Return the contents of the buckets cache file
[ "Return", "the", "contents", "of", "the", "buckets", "cache", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L352-L362
train
Read the contents of the buckets cache file
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_find_files
def _find_files(metadata): ''' Looks for all the files in the S3 bucket cache metadata ''' ret = {} for bucket, data in six.iteritems(metadata): if bucket not in ret: ret[bucket] = [] # grab the paths from the metadata filePaths = [k['Key'] for k in data] ...
python
def _find_files(metadata): ''' Looks for all the files in the S3 bucket cache metadata ''' ret = {} for bucket, data in six.iteritems(metadata): if bucket not in ret: ret[bucket] = [] # grab the paths from the metadata filePaths = [k['Key'] for k in data] ...
[ "def", "_find_files", "(", "metadata", ")", ":", "ret", "=", "{", "}", "for", "bucket", ",", "data", "in", "six", ".", "iteritems", "(", "metadata", ")", ":", "if", "bucket", "not", "in", "ret", ":", "ret", "[", "bucket", "]", "=", "[", "]", "# g...
Looks for all the files in the S3 bucket cache metadata
[ "Looks", "for", "all", "the", "files", "in", "the", "S3", "bucket", "cache", "metadata" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L365-L381
train
Find all the files in the S3 bucket cache metadata
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/s3.py
_get_file_from_s3
def _get_file_from_s3(creds, metadata, saltenv, bucket, path, cached_file_path): ''' Checks the local cache for the file, if it's old or missing go grab the file from S3 and update the cache ''' # check the local cache... if os.path.isfile(cached_file_path): file_m...
python
def _get_file_from_s3(creds, metadata, saltenv, bucket, path, cached_file_path): ''' Checks the local cache for the file, if it's old or missing go grab the file from S3 and update the cache ''' # check the local cache... if os.path.isfile(cached_file_path): file_m...
[ "def", "_get_file_from_s3", "(", "creds", ",", "metadata", ",", "saltenv", ",", "bucket", ",", "path", ",", "cached_file_path", ")", ":", "# check the local cache...", "if", "os", ".", "path", ".", "isfile", "(", "cached_file_path", ")", ":", "file_meta", "=",...
Checks the local cache for the file, if it's old or missing go grab the file from S3 and update the cache
[ "Checks", "the", "local", "cache", "for", "the", "file", "if", "it", "s", "old", "or", "missing", "go", "grab", "the", "file", "from", "S3", "and", "update", "the", "cache" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/s3.py#L398-L432
train
Get the file from S3
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
_arg2opt
def _arg2opt(arg): ''' Turn a pass argument into the correct option ''' res = [o for o, a in option_toggles.items() if a == arg] res += [o for o, a in option_flags.items() if a == arg] return res[0] if res else None
python
def _arg2opt(arg): ''' Turn a pass argument into the correct option ''' res = [o for o, a in option_toggles.items() if a == arg] res += [o for o, a in option_flags.items() if a == arg] return res[0] if res else None
[ "def", "_arg2opt", "(", "arg", ")", ":", "res", "=", "[", "o", "for", "o", ",", "a", "in", "option_toggles", ".", "items", "(", ")", "if", "a", "==", "arg", "]", "res", "+=", "[", "o", "for", "o", ",", "a", "in", "option_flags", ".", "items", ...
Turn a pass argument into the correct option
[ "Turn", "a", "pass", "argument", "into", "the", "correct", "option" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L61-L67
train
Turn a pass argument into the correct option
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
_parse_conf
def _parse_conf(conf_file=default_conf): ''' Parse a logadm configuration file. ''' ret = {} with salt.utils.files.fopen(conf_file, 'r') as ifile: for line in ifile: line = salt.utils.stringutils.to_unicode(line).strip() if not line: continue ...
python
def _parse_conf(conf_file=default_conf): ''' Parse a logadm configuration file. ''' ret = {} with salt.utils.files.fopen(conf_file, 'r') as ifile: for line in ifile: line = salt.utils.stringutils.to_unicode(line).strip() if not line: continue ...
[ "def", "_parse_conf", "(", "conf_file", "=", "default_conf", ")", ":", "ret", "=", "{", "}", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "conf_file", ",", "'r'", ")", "as", "ifile", ":", "for", "line", "in", "ifile", ":", "line", ...
Parse a logadm configuration file.
[ "Parse", "a", "logadm", "configuration", "file", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L70-L84
train
Parse a logadm configuration file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
_parse_options
def _parse_options(entry, options, include_unset=True): ''' Parse a logadm options string ''' log_cfg = {} options = shlex.split(options) if not options: return None ## identifier is entry or log? if entry.startswith('/'): log_cfg['log_file'] = entry else: lo...
python
def _parse_options(entry, options, include_unset=True): ''' Parse a logadm options string ''' log_cfg = {} options = shlex.split(options) if not options: return None ## identifier is entry or log? if entry.startswith('/'): log_cfg['log_file'] = entry else: lo...
[ "def", "_parse_options", "(", "entry", ",", "options", ",", "include_unset", "=", "True", ")", ":", "log_cfg", "=", "{", "}", "options", "=", "shlex", ".", "split", "(", "options", ")", "if", "not", "options", ":", "return", "None", "## identifier is entry...
Parse a logadm options string
[ "Parse", "a", "logadm", "options", "string" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L87-L152
train
Parse a logadm options string and return a dictionary of logadm options.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
show_conf
def show_conf(conf_file=default_conf, name=None): ''' Show configuration conf_file : string path to logadm.conf, defaults to /etc/logadm.conf name : string optional show only a single entry CLI Example: .. code-block:: bash salt '*' logadm.show_conf salt '*' l...
python
def show_conf(conf_file=default_conf, name=None): ''' Show configuration conf_file : string path to logadm.conf, defaults to /etc/logadm.conf name : string optional show only a single entry CLI Example: .. code-block:: bash salt '*' logadm.show_conf salt '*' l...
[ "def", "show_conf", "(", "conf_file", "=", "default_conf", ",", "name", "=", "None", ")", ":", "cfg", "=", "_parse_conf", "(", "conf_file", ")", "# filter", "if", "name", "and", "name", "in", "cfg", ":", "return", "{", "name", ":", "cfg", "[", "name", ...
Show configuration conf_file : string path to logadm.conf, defaults to /etc/logadm.conf name : string optional show only a single entry CLI Example: .. code-block:: bash salt '*' logadm.show_conf salt '*' logadm.show_conf name=/var/log/syslog
[ "Show", "configuration" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L155-L179
train
Show configuration of logadm. conf
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
list_conf
def list_conf(conf_file=default_conf, log_file=None, include_unset=False): ''' Show parsed configuration .. versionadded:: 2018.3.0 conf_file : string path to logadm.conf, defaults to /etc/logadm.conf log_file : string optional show only one log file include_unset : boolean ...
python
def list_conf(conf_file=default_conf, log_file=None, include_unset=False): ''' Show parsed configuration .. versionadded:: 2018.3.0 conf_file : string path to logadm.conf, defaults to /etc/logadm.conf log_file : string optional show only one log file include_unset : boolean ...
[ "def", "list_conf", "(", "conf_file", "=", "default_conf", ",", "log_file", "=", "None", ",", "include_unset", "=", "False", ")", ":", "cfg", "=", "_parse_conf", "(", "conf_file", ")", "cfg_parsed", "=", "{", "}", "## parse all options", "for", "entry", "in"...
Show parsed configuration .. versionadded:: 2018.3.0 conf_file : string path to logadm.conf, defaults to /etc/logadm.conf log_file : string optional show only one log file include_unset : boolean include unset flags in output CLI Example: .. code-block:: bash ...
[ "Show", "parsed", "configuration" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L182-L217
train
Show parsed configuration file and all options in logadm. conf
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
show_args
def show_args(): ''' Show which arguments map to which flags and options. .. versionadded:: 2018.3.0 CLI Example: .. code-block:: bash salt '*' logadm.show_args ''' mapping = {'flags': {}, 'options': {}} for flag, arg in option_toggles.items(): mapping['flags'][flag] ...
python
def show_args(): ''' Show which arguments map to which flags and options. .. versionadded:: 2018.3.0 CLI Example: .. code-block:: bash salt '*' logadm.show_args ''' mapping = {'flags': {}, 'options': {}} for flag, arg in option_toggles.items(): mapping['flags'][flag] ...
[ "def", "show_args", "(", ")", ":", "mapping", "=", "{", "'flags'", ":", "{", "}", ",", "'options'", ":", "{", "}", "}", "for", "flag", ",", "arg", "in", "option_toggles", ".", "items", "(", ")", ":", "mapping", "[", "'flags'", "]", "[", "flag", "...
Show which arguments map to which flags and options. .. versionadded:: 2018.3.0 CLI Example: .. code-block:: bash salt '*' logadm.show_args
[ "Show", "which", "arguments", "map", "to", "which", "flags", "and", "options", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L221-L239
train
Show which arguments map to which flags and options are used.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
rotate
def rotate(name, pattern=None, conf_file=default_conf, **kwargs): ''' Set up pattern for logging. name : string alias for entryname pattern : string alias for log_file conf_file : string optional path to alternative configuration file kwargs : boolean|string|int ...
python
def rotate(name, pattern=None, conf_file=default_conf, **kwargs): ''' Set up pattern for logging. name : string alias for entryname pattern : string alias for log_file conf_file : string optional path to alternative configuration file kwargs : boolean|string|int ...
[ "def", "rotate", "(", "name", ",", "pattern", "=", "None", ",", "conf_file", "=", "default_conf", ",", "*", "*", "kwargs", ")", ":", "## cleanup kwargs", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")...
Set up pattern for logging. name : string alias for entryname pattern : string alias for log_file conf_file : string optional path to alternative configuration file kwargs : boolean|string|int optional additional flags and parameters .. note:: ``name`` and `...
[ "Set", "up", "pattern", "for", "logging", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L242-L323
train
Return a new log file with the given name and pattern.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/logadm.py
remove
def remove(name, conf_file=default_conf): ''' Remove log pattern from logadm CLI Example: .. code-block:: bash salt '*' logadm.remove myapplog ''' command = "logadm -f {0} -r {1}".format(conf_file, name) result = __salt__['cmd.run_all'](command, python_shell=False) if result['re...
python
def remove(name, conf_file=default_conf): ''' Remove log pattern from logadm CLI Example: .. code-block:: bash salt '*' logadm.remove myapplog ''' command = "logadm -f {0} -r {1}".format(conf_file, name) result = __salt__['cmd.run_all'](command, python_shell=False) if result['re...
[ "def", "remove", "(", "name", ",", "conf_file", "=", "default_conf", ")", ":", "command", "=", "\"logadm -f {0} -r {1}\"", ".", "format", "(", "conf_file", ",", "name", ")", "result", "=", "__salt__", "[", "'cmd.run_all'", "]", "(", "command", ",", "python_s...
Remove log pattern from logadm CLI Example: .. code-block:: bash salt '*' logadm.remove myapplog
[ "Remove", "log", "pattern", "from", "logadm" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/logadm.py#L326-L343
train
Remove log pattern from logadm
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/locales.py
get_encodings
def get_encodings(): ''' return a list of string encodings to try ''' encodings = [__salt_system_encoding__] try: sys_enc = sys.getdefaultencoding() except ValueError: # system encoding is nonstandard or malformed sys_enc = None if sys_enc and sys_enc not in encodings: ...
python
def get_encodings(): ''' return a list of string encodings to try ''' encodings = [__salt_system_encoding__] try: sys_enc = sys.getdefaultencoding() except ValueError: # system encoding is nonstandard or malformed sys_enc = None if sys_enc and sys_enc not in encodings: ...
[ "def", "get_encodings", "(", ")", ":", "encodings", "=", "[", "__salt_system_encoding__", "]", "try", ":", "sys_enc", "=", "sys", ".", "getdefaultencoding", "(", ")", "except", "ValueError", ":", "# system encoding is nonstandard or malformed", "sys_enc", "=", "None...
return a list of string encodings to try
[ "return", "a", "list", "of", "string", "encodings", "to", "try" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/locales.py#L16-L33
train
return a list of string encodings to try
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/locales.py
split_locale
def split_locale(loc): ''' Split a locale specifier. The general format is language[_territory][.codeset][@modifier] [charmap] For example: ca_ES.UTF-8@valencia UTF-8 ''' def split(st, char): ''' Split a string `st` once by `char`; always return a two-element list ...
python
def split_locale(loc): ''' Split a locale specifier. The general format is language[_territory][.codeset][@modifier] [charmap] For example: ca_ES.UTF-8@valencia UTF-8 ''' def split(st, char): ''' Split a string `st` once by `char`; always return a two-element list ...
[ "def", "split_locale", "(", "loc", ")", ":", "def", "split", "(", "st", ",", "char", ")", ":", "'''\n Split a string `st` once by `char`; always return a two-element list\n even if the second element is empty.\n '''", "split_st", "=", "st", ".", "split", ...
Split a locale specifier. The general format is language[_territory][.codeset][@modifier] [charmap] For example: ca_ES.UTF-8@valencia UTF-8
[ "Split", "a", "locale", "specifier", ".", "The", "general", "format", "is" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/locales.py#L58-L83
train
Split a locale specifier into a list of locale - specific components.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/locales.py
join_locale
def join_locale(comps): ''' Join a locale specifier split in the format returned by split_locale. ''' loc = comps['language'] if comps.get('territory'): loc += '_' + comps['territory'] if comps.get('codeset'): loc += '.' + comps['codeset'] if comps.get('modifier'): lo...
python
def join_locale(comps): ''' Join a locale specifier split in the format returned by split_locale. ''' loc = comps['language'] if comps.get('territory'): loc += '_' + comps['territory'] if comps.get('codeset'): loc += '.' + comps['codeset'] if comps.get('modifier'): lo...
[ "def", "join_locale", "(", "comps", ")", ":", "loc", "=", "comps", "[", "'language'", "]", "if", "comps", ".", "get", "(", "'territory'", ")", ":", "loc", "+=", "'_'", "+", "comps", "[", "'territory'", "]", "if", "comps", ".", "get", "(", "'codeset'"...
Join a locale specifier split in the format returned by split_locale.
[ "Join", "a", "locale", "specifier", "split", "in", "the", "format", "returned", "by", "split_locale", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/locales.py#L86-L99
train
Join a locale specifier split in the format returned by split_locale.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/locales.py
normalize_locale
def normalize_locale(loc): ''' Format a locale specifier according to the format returned by `locale -a`. ''' comps = split_locale(loc) comps['territory'] = comps['territory'].upper() comps['codeset'] = comps['codeset'].lower().replace('-', '') comps['charmap'] = '' return join_locale(co...
python
def normalize_locale(loc): ''' Format a locale specifier according to the format returned by `locale -a`. ''' comps = split_locale(loc) comps['territory'] = comps['territory'].upper() comps['codeset'] = comps['codeset'].lower().replace('-', '') comps['charmap'] = '' return join_locale(co...
[ "def", "normalize_locale", "(", "loc", ")", ":", "comps", "=", "split_locale", "(", "loc", ")", "comps", "[", "'territory'", "]", "=", "comps", "[", "'territory'", "]", ".", "upper", "(", ")", "comps", "[", "'codeset'", "]", "=", "comps", "[", "'codese...
Format a locale specifier according to the format returned by `locale -a`.
[ "Format", "a", "locale", "specifier", "according", "to", "the", "format", "returned", "by", "locale", "-", "a", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/locales.py#L102-L110
train
Normalizes a locale specifier according to the format returned by locale - a.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/mongo_return.py
_remove_dots
def _remove_dots(src): ''' Remove dots from the given data structure ''' output = {} for key, val in six.iteritems(src): if isinstance(val, dict): val = _remove_dots(val) output[key.replace('.', '-')] = val return output
python
def _remove_dots(src): ''' Remove dots from the given data structure ''' output = {} for key, val in six.iteritems(src): if isinstance(val, dict): val = _remove_dots(val) output[key.replace('.', '-')] = val return output
[ "def", "_remove_dots", "(", "src", ")", ":", "output", "=", "{", "}", "for", "key", ",", "val", "in", "six", ".", "iteritems", "(", "src", ")", ":", "if", "isinstance", "(", "val", ",", "dict", ")", ":", "val", "=", "_remove_dots", "(", "val", ")...
Remove dots from the given data structure
[ "Remove", "dots", "from", "the", "given", "data", "structure" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mongo_return.py#L96-L105
train
Remove dots from the given data structure
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/mongo_return.py
_get_conn
def _get_conn(ret): ''' Return a mongodb connection object ''' _options = _get_options(ret) host = _options.get('host') port = _options.get('port') db_ = _options.get('db') user = _options.get('user') password = _options.get('password') indexes = _options.get('indexes', False) ...
python
def _get_conn(ret): ''' Return a mongodb connection object ''' _options = _get_options(ret) host = _options.get('host') port = _options.get('port') db_ = _options.get('db') user = _options.get('user') password = _options.get('password') indexes = _options.get('indexes', False) ...
[ "def", "_get_conn", "(", "ret", ")", ":", "_options", "=", "_get_options", "(", "ret", ")", "host", "=", "_options", ".", "get", "(", "'host'", ")", "port", "=", "_options", ".", "get", "(", "'port'", ")", "db_", "=", "_options", ".", "get", "(", "...
Return a mongodb connection object
[ "Return", "a", "mongodb", "connection", "object" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mongo_return.py#L127-L165
train
Return a mongodb connection object
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/mongo_return.py
get_jid
def get_jid(jid): ''' Return the return information associated with a jid ''' conn, mdb = _get_conn(ret=None) ret = {} rdata = mdb.saltReturns.find({'jid': jid}, {'_id': 0}) if rdata: for data in rdata: minion = data['minion'] # return data in the format {<min...
python
def get_jid(jid): ''' Return the return information associated with a jid ''' conn, mdb = _get_conn(ret=None) ret = {} rdata = mdb.saltReturns.find({'jid': jid}, {'_id': 0}) if rdata: for data in rdata: minion = data['minion'] # return data in the format {<min...
[ "def", "get_jid", "(", "jid", ")", ":", "conn", ",", "mdb", "=", "_get_conn", "(", "ret", "=", "None", ")", "ret", "=", "{", "}", "rdata", "=", "mdb", ".", "saltReturns", ".", "find", "(", "{", "'jid'", ":", "jid", "}", ",", "{", "'_id'", ":", ...
Return the return information associated with a jid
[ "Return", "the", "return", "information", "associated", "with", "a", "jid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mongo_return.py#L203-L215
train
Return the return information associated with a jid
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/mongo_return.py
get_fun
def get_fun(fun): ''' Return the most recent jobs that have executed the named function ''' conn, mdb = _get_conn(ret=None) ret = {} rdata = mdb.saltReturns.find_one({'fun': fun}, {'_id': 0}) if rdata: ret = rdata return ret
python
def get_fun(fun): ''' Return the most recent jobs that have executed the named function ''' conn, mdb = _get_conn(ret=None) ret = {} rdata = mdb.saltReturns.find_one({'fun': fun}, {'_id': 0}) if rdata: ret = rdata return ret
[ "def", "get_fun", "(", "fun", ")", ":", "conn", ",", "mdb", "=", "_get_conn", "(", "ret", "=", "None", ")", "ret", "=", "{", "}", "rdata", "=", "mdb", ".", "saltReturns", ".", "find_one", "(", "{", "'fun'", ":", "fun", "}", ",", "{", "'_id'", "...
Return the most recent jobs that have executed the named function
[ "Return", "the", "most", "recent", "jobs", "that", "have", "executed", "the", "named", "function" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/mongo_return.py#L218-L227
train
Return the most recent jobs that have executed the named function
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/acme.py
_cert_file
def _cert_file(name, cert_type): ''' Return expected path of a Let's Encrypt live cert ''' return os.path.join(LE_LIVE, name, '{0}.pem'.format(cert_type))
python
def _cert_file(name, cert_type): ''' Return expected path of a Let's Encrypt live cert ''' return os.path.join(LE_LIVE, name, '{0}.pem'.format(cert_type))
[ "def", "_cert_file", "(", "name", ",", "cert_type", ")", ":", "return", "os", ".", "path", ".", "join", "(", "LE_LIVE", ",", "name", ",", "'{0}.pem'", ".", "format", "(", "cert_type", ")", ")" ]
Return expected path of a Let's Encrypt live cert
[ "Return", "expected", "path", "of", "a", "Let", "s", "Encrypt", "live", "cert" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/acme.py#L64-L68
train
Return expected path of a Let s Encrypt live cert
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/acme.py
_expires
def _expires(name): ''' Return the expiry date of a cert :return datetime object of expiry date ''' cert_file = _cert_file(name, 'cert') # Use the salt module if available if 'tls.cert_info' in __salt__: expiry = __salt__['tls.cert_info'](cert_file)['not_after'] # Cobble it toge...
python
def _expires(name): ''' Return the expiry date of a cert :return datetime object of expiry date ''' cert_file = _cert_file(name, 'cert') # Use the salt module if available if 'tls.cert_info' in __salt__: expiry = __salt__['tls.cert_info'](cert_file)['not_after'] # Cobble it toge...
[ "def", "_expires", "(", "name", ")", ":", "cert_file", "=", "_cert_file", "(", "name", ",", "'cert'", ")", "# Use the salt module if available", "if", "'tls.cert_info'", "in", "__salt__", ":", "expiry", "=", "__salt__", "[", "'tls.cert_info'", "]", "(", "cert_fi...
Return the expiry date of a cert :return datetime object of expiry date
[ "Return", "the", "expiry", "date", "of", "a", "cert" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/acme.py#L71-L89
train
Return the expiry date of a certificate
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/acme.py
_renew_by
def _renew_by(name, window=None): ''' Date before a certificate should be renewed :param name: Common Name of the certificate (DNS name of certificate) :param window: days before expiry date to renew :return datetime object of first renewal date ''' expiry = _expires(name) if window is ...
python
def _renew_by(name, window=None): ''' Date before a certificate should be renewed :param name: Common Name of the certificate (DNS name of certificate) :param window: days before expiry date to renew :return datetime object of first renewal date ''' expiry = _expires(name) if window is ...
[ "def", "_renew_by", "(", "name", ",", "window", "=", "None", ")", ":", "expiry", "=", "_expires", "(", "name", ")", "if", "window", "is", "not", "None", ":", "expiry", "=", "expiry", "-", "datetime", ".", "timedelta", "(", "days", "=", "window", ")",...
Date before a certificate should be renewed :param name: Common Name of the certificate (DNS name of certificate) :param window: days before expiry date to renew :return datetime object of first renewal date
[ "Date", "before", "a", "certificate", "should", "be", "renewed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/acme.py#L92-L104
train
Returns the date before a certificate should be renewed.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/acme.py
cert
def cert(name, aliases=None, email=None, webroot=None, test_cert=False, renew=None, keysize=None, server=None, owner='root', group='root', mode='0640', certname=None, preferred_challenges=None, tls_sni_0...
python
def cert(name, aliases=None, email=None, webroot=None, test_cert=False, renew=None, keysize=None, server=None, owner='root', group='root', mode='0640', certname=None, preferred_challenges=None, tls_sni_0...
[ "def", "cert", "(", "name", ",", "aliases", "=", "None", ",", "email", "=", "None", ",", "webroot", "=", "None", ",", "test_cert", "=", "False", ",", "renew", "=", "None", ",", "keysize", "=", "None", ",", "server", "=", "None", ",", "owner", "=", ...
Obtain/renew a certificate from an ACME CA, probably Let's Encrypt. :param name: Common Name of the certificate (DNS name of certificate) :param aliases: subjectAltNames (Additional DNS names on certificate) :param email: e-mail address for interaction with ACME provider :param webroot: True or a full ...
[ "Obtain", "/", "renew", "a", "certificate", "from", "an", "ACME", "CA", "probably", "Let", "s", "Encrypt", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/acme.py#L107-L258
train
This function returns a certificate from an ACME server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/acme.py
info
def info(name): ''' Return information about a certificate .. note:: Will output tls.cert_info if that's available, or OpenSSL text if not :param name: CommonName of cert CLI example: .. code-block:: bash salt 'gitlab.example.com' acme.info dev.example.com ''' cert_f...
python
def info(name): ''' Return information about a certificate .. note:: Will output tls.cert_info if that's available, or OpenSSL text if not :param name: CommonName of cert CLI example: .. code-block:: bash salt 'gitlab.example.com' acme.info dev.example.com ''' cert_f...
[ "def", "info", "(", "name", ")", ":", "cert_file", "=", "_cert_file", "(", "name", ",", "'cert'", ")", "# Use the salt module if available", "if", "'tls.cert_info'", "in", "__salt__", ":", "cert_info", "=", "__salt__", "[", "'tls.cert_info'", "]", "(", "cert_fil...
Return information about a certificate .. note:: Will output tls.cert_info if that's available, or OpenSSL text if not :param name: CommonName of cert CLI example: .. code-block:: bash salt 'gitlab.example.com' acme.info dev.example.com
[ "Return", "information", "about", "a", "certificate" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/acme.py#L274-L300
train
Return information about a certificate
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/acme.py
needs_renewal
def needs_renewal(name, window=None): ''' Check if a certificate needs renewal :param name: CommonName of cert :param window: Window in days to renew earlier or True/force to just return True Code example: .. code-block:: python if __salt__['acme.needs_renewal']('dev.example.com'): ...
python
def needs_renewal(name, window=None): ''' Check if a certificate needs renewal :param name: CommonName of cert :param window: Window in days to renew earlier or True/force to just return True Code example: .. code-block:: python if __salt__['acme.needs_renewal']('dev.example.com'): ...
[ "def", "needs_renewal", "(", "name", ",", "window", "=", "None", ")", ":", "if", "window", "is", "not", "None", "and", "window", "in", "(", "'force'", ",", "'Force'", ",", "True", ")", ":", "return", "True", "return", "_renew_by", "(", "name", ",", "...
Check if a certificate needs renewal :param name: CommonName of cert :param window: Window in days to renew earlier or True/force to just return True Code example: .. code-block:: python if __salt__['acme.needs_renewal']('dev.example.com'): __salt__['acme.cert']('dev.example.com'...
[ "Check", "if", "a", "certificate", "needs", "renewal" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/acme.py#L344-L363
train
Check if a certificate needs renewal
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_analyse_overview_field
def _analyse_overview_field(content): ''' Split the field in drbd-overview ''' if "(" in content: # Output like "Connected(2*)" or "UpToDate(2*)" return content.split("(")[0], content.split("(")[0] elif "/" in content: # Output like "Primar/Second" or "UpToDa/UpToDa" ...
python
def _analyse_overview_field(content): ''' Split the field in drbd-overview ''' if "(" in content: # Output like "Connected(2*)" or "UpToDate(2*)" return content.split("(")[0], content.split("(")[0] elif "/" in content: # Output like "Primar/Second" or "UpToDa/UpToDa" ...
[ "def", "_analyse_overview_field", "(", "content", ")", ":", "if", "\"(\"", "in", "content", ":", "# Output like \"Connected(2*)\" or \"UpToDate(2*)\"", "return", "content", ".", "split", "(", "\"(\"", ")", "[", "0", "]", ",", "content", ".", "split", "(", "\"(\"...
Split the field in drbd-overview
[ "Split", "the", "field", "in", "drbd", "-", "overview" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L13-L24
train
Analyse the field in drbd - overview
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_count_spaces_startswith
def _count_spaces_startswith(line): ''' Count the number of spaces before the first character ''' if line.split('#')[0].strip() == "": return None spaces = 0 for i in line: if i.isspace(): spaces += 1 else: return spaces
python
def _count_spaces_startswith(line): ''' Count the number of spaces before the first character ''' if line.split('#')[0].strip() == "": return None spaces = 0 for i in line: if i.isspace(): spaces += 1 else: return spaces
[ "def", "_count_spaces_startswith", "(", "line", ")", ":", "if", "line", ".", "split", "(", "'#'", ")", "[", "0", "]", ".", "strip", "(", ")", "==", "\"\"", ":", "return", "None", "spaces", "=", "0", "for", "i", "in", "line", ":", "if", "i", ".", ...
Count the number of spaces before the first character
[ "Count", "the", "number", "of", "spaces", "before", "the", "first", "character" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L27-L39
train
Count the number of spaces before the first character in the line.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_analyse_status_type
def _analyse_status_type(line): ''' Figure out the sections in drbdadm status ''' spaces = _count_spaces_startswith(line) if spaces is None: return '' switch = { 0: 'RESOURCE', 2: {' disk:': 'LOCALDISK', ' role:': 'PEERNODE', ' connection:': 'PEERNODE'}, 4: {' p...
python
def _analyse_status_type(line): ''' Figure out the sections in drbdadm status ''' spaces = _count_spaces_startswith(line) if spaces is None: return '' switch = { 0: 'RESOURCE', 2: {' disk:': 'LOCALDISK', ' role:': 'PEERNODE', ' connection:': 'PEERNODE'}, 4: {' p...
[ "def", "_analyse_status_type", "(", "line", ")", ":", "spaces", "=", "_count_spaces_startswith", "(", "line", ")", "if", "spaces", "is", "None", ":", "return", "''", "switch", "=", "{", "0", ":", "'RESOURCE'", ",", "2", ":", "{", "' disk:'", ":", "'LOCAL...
Figure out the sections in drbdadm status
[ "Figure", "out", "the", "sections", "in", "drbdadm", "status" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L42-L67
train
Analyse the status type of the current resource
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_add_res
def _add_res(line): ''' Analyse the line of local resource of ``drbdadm status`` ''' global resource fields = line.strip().split() if resource: ret.append(resource) resource = {} resource["resource name"] = fields[0] resource["local role"] = fields[1].split(":")[1] ...
python
def _add_res(line): ''' Analyse the line of local resource of ``drbdadm status`` ''' global resource fields = line.strip().split() if resource: ret.append(resource) resource = {} resource["resource name"] = fields[0] resource["local role"] = fields[1].split(":")[1] ...
[ "def", "_add_res", "(", "line", ")", ":", "global", "resource", "fields", "=", "line", ".", "strip", "(", ")", ".", "split", "(", ")", "if", "resource", ":", "ret", ".", "append", "(", "resource", ")", "resource", "=", "{", "}", "resource", "[", "\...
Analyse the line of local resource of ``drbdadm status``
[ "Analyse", "the", "line", "of", "local", "resource", "of", "drbdadm", "status" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L70-L84
train
Analyse the line of local resource of drbdadm status
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_add_volume
def _add_volume(line): ''' Analyse the line of volumes of ``drbdadm status`` ''' section = _analyse_status_type(line) fields = line.strip().split() volume = {} for field in fields: volume[field.split(':')[0]] = field.split(':')[1] if section == 'LOCALDISK': resource['lo...
python
def _add_volume(line): ''' Analyse the line of volumes of ``drbdadm status`` ''' section = _analyse_status_type(line) fields = line.strip().split() volume = {} for field in fields: volume[field.split(':')[0]] = field.split(':')[1] if section == 'LOCALDISK': resource['lo...
[ "def", "_add_volume", "(", "line", ")", ":", "section", "=", "_analyse_status_type", "(", "line", ")", "fields", "=", "line", ".", "strip", "(", ")", ".", "split", "(", ")", "volume", "=", "{", "}", "for", "field", "in", "fields", ":", "volume", "[",...
Analyse the line of volumes of ``drbdadm status``
[ "Analyse", "the", "line", "of", "volumes", "of", "drbdadm", "status" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L87-L102
train
Analyse the line of volumes of drbdadm status
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_add_peernode
def _add_peernode(line): ''' Analyse the line of peer nodes of ``drbdadm status`` ''' global lastpnodevolumes fields = line.strip().split() peernode = {} peernode["peernode name"] = fields[0] #Could be role or connection: peernode[fields[1].split(":")[0]] = fields[1].split(":")[1] ...
python
def _add_peernode(line): ''' Analyse the line of peer nodes of ``drbdadm status`` ''' global lastpnodevolumes fields = line.strip().split() peernode = {} peernode["peernode name"] = fields[0] #Could be role or connection: peernode[fields[1].split(":")[0]] = fields[1].split(":")[1] ...
[ "def", "_add_peernode", "(", "line", ")", ":", "global", "lastpnodevolumes", "fields", "=", "line", ".", "strip", "(", ")", ".", "split", "(", ")", "peernode", "=", "{", "}", "peernode", "[", "\"peernode name\"", "]", "=", "fields", "[", "0", "]", "#Co...
Analyse the line of peer nodes of ``drbdadm status``
[ "Analyse", "the", "line", "of", "peer", "nodes", "of", "drbdadm", "status" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L105-L119
train
Analyse the line of peer nodes of drbdadm status
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
_line_parser
def _line_parser(line): ''' Call action for different lines ''' section = _analyse_status_type(line) fields = line.strip().split() switch = { '': _empty, 'RESOURCE': _add_res, 'PEERNODE': _add_peernode, 'LOCALDISK': _add_volume, 'PEERDISK': _add_volume, ...
python
def _line_parser(line): ''' Call action for different lines ''' section = _analyse_status_type(line) fields = line.strip().split() switch = { '': _empty, 'RESOURCE': _add_res, 'PEERNODE': _add_peernode, 'LOCALDISK': _add_volume, 'PEERDISK': _add_volume, ...
[ "def", "_line_parser", "(", "line", ")", ":", "section", "=", "_analyse_status_type", "(", "line", ")", "fields", "=", "line", ".", "strip", "(", ")", ".", "split", "(", ")", "switch", "=", "{", "''", ":", "_empty", ",", "'RESOURCE'", ":", "_add_res", ...
Call action for different lines
[ "Call", "action", "for", "different", "lines" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L137-L154
train
Call action for different lines
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
overview
def overview(): ''' Show status of the DRBD devices, support two nodes only. drbd-overview is removed since drbd-utils-9.6.0, use status instead. CLI Example: .. code-block:: bash salt '*' drbd.overview ''' cmd = 'drbd-overview' for line in __salt__['cmd.run'](cmd).splitli...
python
def overview(): ''' Show status of the DRBD devices, support two nodes only. drbd-overview is removed since drbd-utils-9.6.0, use status instead. CLI Example: .. code-block:: bash salt '*' drbd.overview ''' cmd = 'drbd-overview' for line in __salt__['cmd.run'](cmd).splitli...
[ "def", "overview", "(", ")", ":", "cmd", "=", "'drbd-overview'", "for", "line", "in", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ")", ".", "splitlines", "(", ")", ":", "ret", "=", "{", "}", "fields", "=", "line", ".", "strip", "(", ")", ".", ...
Show status of the DRBD devices, support two nodes only. drbd-overview is removed since drbd-utils-9.6.0, use status instead. CLI Example: .. code-block:: bash salt '*' drbd.overview
[ "Show", "status", "of", "the", "DRBD", "devices", "support", "two", "nodes", "only", ".", "drbd", "-", "overview", "is", "removed", "since", "drbd", "-", "utils", "-", "9", ".", "6", ".", "0", "use", "status", "instead", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L157-L228
train
Show status of the DRBD devices support two nodes only.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/drbd.py
status
def status(name='all'): ''' Using drbdadm to show status of the DRBD devices, available in the latest drbd9. Support multiple nodes, multiple volumes. :type name: str :param name: Resource name. :return: drbd status of resource. :rtype: list(dict(res)) CLI Example: .....
python
def status(name='all'): ''' Using drbdadm to show status of the DRBD devices, available in the latest drbd9. Support multiple nodes, multiple volumes. :type name: str :param name: Resource name. :return: drbd status of resource. :rtype: list(dict(res)) CLI Example: .....
[ "def", "status", "(", "name", "=", "'all'", ")", ":", "# Initialize for multiple times test cases", "global", "ret", "global", "resource", "ret", "=", "[", "]", "resource", "=", "{", "}", "cmd", "=", "[", "'drbdadm'", ",", "'status'", "]", "cmd", ".", "app...
Using drbdadm to show status of the DRBD devices, available in the latest drbd9. Support multiple nodes, multiple volumes. :type name: str :param name: Resource name. :return: drbd status of resource. :rtype: list(dict(res)) CLI Example: .. code-block:: bash salt '*'...
[ "Using", "drbdadm", "to", "show", "status", "of", "the", "DRBD", "devices", "available", "in", "the", "latest", "drbd9", ".", "Support", "multiple", "nodes", "multiple", "volumes", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/drbd.py#L237-L283
train
Show status of the current node and volume of the current node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rdp.py
_parse_return_code_powershell
def _parse_return_code_powershell(string): ''' return from the input string the return code of the powershell command ''' regex = re.search(r'ReturnValue\s*: (\d*)', string) if not regex: return (False, 'Could not parse PowerShell return code.') else: return int(regex.group(1))
python
def _parse_return_code_powershell(string): ''' return from the input string the return code of the powershell command ''' regex = re.search(r'ReturnValue\s*: (\d*)', string) if not regex: return (False, 'Could not parse PowerShell return code.') else: return int(regex.group(1))
[ "def", "_parse_return_code_powershell", "(", "string", ")", ":", "regex", "=", "re", ".", "search", "(", "r'ReturnValue\\s*: (\\d*)'", ",", "string", ")", "if", "not", "regex", ":", "return", "(", "False", ",", "'Could not parse PowerShell return code.'", ")", "el...
return from the input string the return code of the powershell command
[ "return", "from", "the", "input", "string", "the", "return", "code", "of", "the", "powershell", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rdp.py#L34-L43
train
Parses the return code of the powershell command
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rdp.py
_psrdp
def _psrdp(cmd): ''' Create a Win32_TerminalServiceSetting WMI Object as $RDP and execute the command cmd returns the STDOUT of the command ''' rdp = ('$RDP = Get-WmiObject -Class Win32_TerminalServiceSetting ' '-Namespace root\\CIMV2\\TerminalServices -Computer . ' '-Authentic...
python
def _psrdp(cmd): ''' Create a Win32_TerminalServiceSetting WMI Object as $RDP and execute the command cmd returns the STDOUT of the command ''' rdp = ('$RDP = Get-WmiObject -Class Win32_TerminalServiceSetting ' '-Namespace root\\CIMV2\\TerminalServices -Computer . ' '-Authentic...
[ "def", "_psrdp", "(", "cmd", ")", ":", "rdp", "=", "(", "'$RDP = Get-WmiObject -Class Win32_TerminalServiceSetting '", "'-Namespace root\\\\CIMV2\\\\TerminalServices -Computer . '", "'-Authentication 6 -ErrorAction Stop'", ")", "return", "__salt__", "[", "'cmd.run'", "]", "(", ...
Create a Win32_TerminalServiceSetting WMI Object as $RDP and execute the command cmd returns the STDOUT of the command
[ "Create", "a", "Win32_TerminalServiceSetting", "WMI", "Object", "as", "$RDP", "and", "execute", "the", "command", "cmd", "returns", "the", "STDOUT", "of", "the", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rdp.py#L46-L55
train
Execute the command in a Win32_TerminalServiceSetting WMI Object and return the STDOUT of the command
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rdp.py
list_sessions
def list_sessions(logged_in_users_only=False): ''' List information about the sessions. .. versionadded:: 2016.11.0 :param logged_in_users_only: If True, only return sessions with users logged in. :return: A list containing dictionaries of session information. CLI Example: .. code-block:...
python
def list_sessions(logged_in_users_only=False): ''' List information about the sessions. .. versionadded:: 2016.11.0 :param logged_in_users_only: If True, only return sessions with users logged in. :return: A list containing dictionaries of session information. CLI Example: .. code-block:...
[ "def", "list_sessions", "(", "logged_in_users_only", "=", "False", ")", ":", "ret", "=", "list", "(", ")", "server", "=", "win32ts", ".", "WTS_CURRENT_SERVER_HANDLE", "protocols", "=", "{", "win32ts", ".", "WTS_PROTOCOL_TYPE_CONSOLE", ":", "'console'", ",", "win...
List information about the sessions. .. versionadded:: 2016.11.0 :param logged_in_users_only: If True, only return sessions with users logged in. :return: A list containing dictionaries of session information. CLI Example: .. code-block:: bash salt '*' rdp.list_sessions
[ "List", "information", "about", "the", "sessions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rdp.py#L104-L151
train
List all the sessions in the current server.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rdp.py
get_session
def get_session(session_id): ''' Get information about a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A dictionary of session information. CLI Example: .. code-block:: bash salt '*' rdp.get_session session_id salt '*' r...
python
def get_session(session_id): ''' Get information about a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A dictionary of session information. CLI Example: .. code-block:: bash salt '*' rdp.get_session session_id salt '*' r...
[ "def", "get_session", "(", "session_id", ")", ":", "ret", "=", "dict", "(", ")", "sessions", "=", "list_sessions", "(", ")", "session", "=", "[", "item", "for", "item", "in", "sessions", "if", "item", "[", "'session_id'", "]", "==", "session_id", "]", ...
Get information about a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A dictionary of session information. CLI Example: .. code-block:: bash salt '*' rdp.get_session session_id salt '*' rdp.get_session 99
[ "Get", "information", "about", "a", "session", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rdp.py#L155-L181
train
Get information about a session.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rdp.py
disconnect_session
def disconnect_session(session_id): ''' Disconnect a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A boolean representing whether the disconnect succeeded. CLI Example: .. code-block:: bash salt '*' rdp.disconnect_session session...
python
def disconnect_session(session_id): ''' Disconnect a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A boolean representing whether the disconnect succeeded. CLI Example: .. code-block:: bash salt '*' rdp.disconnect_session session...
[ "def", "disconnect_session", "(", "session_id", ")", ":", "try", ":", "win32ts", ".", "WTSDisconnectSession", "(", "win32ts", ".", "WTS_CURRENT_SERVER_HANDLE", ",", "session_id", ",", "True", ")", "except", "PyWinError", "as", "error", ":", "_LOG", ".", "error",...
Disconnect a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A boolean representing whether the disconnect succeeded. CLI Example: .. code-block:: bash salt '*' rdp.disconnect_session session_id salt '*' rdp.disconnect_session 99
[ "Disconnect", "a", "session", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rdp.py#L185-L207
train
Disconnect a session.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/rdp.py
logoff_session
def logoff_session(session_id): ''' Initiate the logoff of a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A boolean representing whether the logoff succeeded. CLI Example: .. code-block:: bash salt '*' rdp.logoff_session session...
python
def logoff_session(session_id): ''' Initiate the logoff of a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A boolean representing whether the logoff succeeded. CLI Example: .. code-block:: bash salt '*' rdp.logoff_session session...
[ "def", "logoff_session", "(", "session_id", ")", ":", "try", ":", "win32ts", ".", "WTSLogoffSession", "(", "win32ts", ".", "WTS_CURRENT_SERVER_HANDLE", ",", "session_id", ",", "True", ")", "except", "PyWinError", "as", "error", ":", "_LOG", ".", "error", "(", ...
Initiate the logoff of a session. .. versionadded:: 2016.11.0 :param session_id: The numeric Id of the session. :return: A boolean representing whether the logoff succeeded. CLI Example: .. code-block:: bash salt '*' rdp.logoff_session session_id salt '*' rdp.logoff_session 99
[ "Initiate", "the", "logoff", "of", "a", "session", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rdp.py#L211-L233
train
Initiate the logoff of a session.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
envs
def envs(backend=None, sources=False): ''' Return the available fileserver environments. If no backend is provided, then the environments for all configured backends will be returned. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 ...
python
def envs(backend=None, sources=False): ''' Return the available fileserver environments. If no backend is provided, then the environments for all configured backends will be returned. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 ...
[ "def", "envs", "(", "backend", "=", "None", ",", "sources", "=", "False", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "return", "sorted", "(", "fileserver", ".", "envs", "(", "back", "=", "backend", ...
Return the available fileserver environments. If no backend is provided, then the environments for all configured backends will be returned. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 If all passed backends start with a minus si...
[ "Return", "the", "available", "fileserver", "environments", ".", "If", "no", "backend", "is", "provided", "then", "the", "environments", "for", "all", "configured", "backends", "will", "be", "returned", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L11-L39
train
Return the available fileserver environments.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
clear_file_list_cache
def clear_file_list_cache(saltenv=None, backend=None): ''' .. versionadded:: 2016.11.0 The Salt fileserver caches the files/directories/symlinks for each fileserver backend and environment as they are requested. This is done to help the fileserver scale better. Without this caching, when hundre...
python
def clear_file_list_cache(saltenv=None, backend=None): ''' .. versionadded:: 2016.11.0 The Salt fileserver caches the files/directories/symlinks for each fileserver backend and environment as they are requested. This is done to help the fileserver scale better. Without this caching, when hundre...
[ "def", "clear_file_list_cache", "(", "saltenv", "=", "None", ",", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "load", "=", "{", "'saltenv'", ":", "saltenv", ",", "'fsbackend'", ":...
.. versionadded:: 2016.11.0 The Salt fileserver caches the files/directories/symlinks for each fileserver backend and environment as they are requested. This is done to help the fileserver scale better. Without this caching, when hundreds/thousands of minions simultaneously ask the master what files ar...
[ "..", "versionadded", "::", "2016", ".", "11", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L42-L147
train
Clear the file list caches for the specified environment and environment.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
file_list
def file_list(saltenv='base', backend=None): ''' Return a list of files from the salt fileserver saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``...
python
def file_list(saltenv='base', backend=None): ''' Return a list of files from the salt fileserver saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``...
[ "def", "file_list", "(", "saltenv", "=", "'base'", ",", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "load", "=", "{", "'saltenv'", ":", "saltenv", ",", "'fsbackend'", ":", "back...
Return a list of files from the salt fileserver saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``), then these backends will be excluded from the ...
[ "Return", "a", "list", "of", "files", "from", "the", "salt", "fileserver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L150-L193
train
Return a list of files from the salt - master
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
symlink_list
def symlink_list(saltenv='base', backend=None): ''' Return a list of symlinked files and dirs saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``), ...
python
def symlink_list(saltenv='base', backend=None): ''' Return a list of symlinked files and dirs saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``), ...
[ "def", "symlink_list", "(", "saltenv", "=", "'base'", ",", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "load", "=", "{", "'saltenv'", ":", "saltenv", ",", "'fsbackend'", ":", "b...
Return a list of symlinked files and dirs saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``), then these backends will be excluded from the enable...
[ "Return", "a", "list", "of", "symlinked", "files", "and", "dirs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L196-L239
train
Return a list of symlinked files and directories for the specified master environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
dir_list
def dir_list(saltenv='base', backend=None): ''' Return a list of directories in the given environment saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (...
python
def dir_list(saltenv='base', backend=None): ''' Return a list of directories in the given environment saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (...
[ "def", "dir_list", "(", "saltenv", "=", "'base'", ",", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "load", "=", "{", "'saltenv'", ":", "saltenv", ",", "'fsbackend'", ":", "backe...
Return a list of directories in the given environment saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``), then these backends will be excluded fro...
[ "Return", "a", "list", "of", "directories", "in", "the", "given", "environment" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L242-L285
train
Return a list of directories in the given environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
empty_dir_list
def empty_dir_list(saltenv='base', backend=None): ''' .. versionadded:: 2015.5.0 Return a list of empty directories in the given environment saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all ...
python
def empty_dir_list(saltenv='base', backend=None): ''' .. versionadded:: 2015.5.0 Return a list of empty directories in the given environment saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all ...
[ "def", "empty_dir_list", "(", "saltenv", "=", "'base'", ",", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "load", "=", "{", "'saltenv'", ":", "saltenv", ",", "'fsbackend'", ":", ...
.. versionadded:: 2015.5.0 Return a list of empty directories in the given environment saltenv : base The salt fileserver environment to be listed backend Narrow fileserver backends to a subset of the enabled ones. If all passed backends start with a minus sign (``-``), then these...
[ "..", "versionadded", "::", "2015", ".", "5", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L288-L322
train
Return a list of empty directories in the given environment
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
update
def update(backend=None): ''' Update the fileserver cache. If no backend is provided, then the cache for all configured backends will be updated. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 If all passed backends start wi...
python
def update(backend=None): ''' Update the fileserver cache. If no backend is provided, then the cache for all configured backends will be updated. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 If all passed backends start wi...
[ "def", "update", "(", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "fileserver", ".", "update", "(", "back", "=", "backend", ")", "return", "True" ]
Update the fileserver cache. If no backend is provided, then the cache for all configured backends will be updated. backend Narrow fileserver backends to a subset of the enabled ones. .. versionchanged:: 2015.5.0 If all passed backends start with a minus sign (``-``), then these ...
[ "Update", "the", "fileserver", "cache", ".", "If", "no", "backend", "is", "provided", "then", "the", "cache", "for", "all", "configured", "backends", "will", "be", "updated", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L325-L353
train
Update the fileserver cache for the current node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
clear_cache
def clear_cache(backend=None): ''' .. versionadded:: 2015.5.0 Clear the fileserver cache from VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). Executing this runner with no arguments will clear the cache for all ...
python
def clear_cache(backend=None): ''' .. versionadded:: 2015.5.0 Clear the fileserver cache from VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). Executing this runner with no arguments will clear the cache for all ...
[ "def", "clear_cache", "(", "backend", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "cleared", ",", "errors", "=", "fileserver", ".", "clear_cache", "(", "back", "=", "backend", ")", "ret", ...
.. versionadded:: 2015.5.0 Clear the fileserver cache from VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). Executing this runner with no arguments will clear the cache for all enabled VCS fileserver backends, but this ...
[ "..", "versionadded", "::", "2015", ".", "5", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L356-L391
train
Clear the fileserver cache for the specified backend.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
clear_lock
def clear_lock(backend=None, remote=None): ''' .. versionadded:: 2015.5.0 Clear the fileserver update lock from VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). This should only need to be done if a fileserver up...
python
def clear_lock(backend=None, remote=None): ''' .. versionadded:: 2015.5.0 Clear the fileserver update lock from VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). This should only need to be done if a fileserver up...
[ "def", "clear_lock", "(", "backend", "=", "None", ",", "remote", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "cleared", ",", "errors", "=", "fileserver", ".", "clear_lock", "(", "back", "=...
.. versionadded:: 2015.5.0 Clear the fileserver update lock from VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). This should only need to be done if a fileserver update was interrupted and a remote is not updating (gene...
[ "..", "versionadded", "::", "2015", ".", "5", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L394-L432
train
Clear the update lock for the specified backend and remote
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/runners/fileserver.py
lock
def lock(backend=None, remote=None): ''' .. versionadded:: 2015.5.0 Set a fileserver update lock for VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). .. note:: This will only operate on enabled backends...
python
def lock(backend=None, remote=None): ''' .. versionadded:: 2015.5.0 Set a fileserver update lock for VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). .. note:: This will only operate on enabled backends...
[ "def", "lock", "(", "backend", "=", "None", ",", "remote", "=", "None", ")", ":", "fileserver", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "__opts__", ")", "locked", ",", "errors", "=", "fileserver", ".", "lock", "(", "back", "=", "backend...
.. versionadded:: 2015.5.0 Set a fileserver update lock for VCS fileserver backends (:mod:`git <salt.fileserver.gitfs>`, :mod:`hg <salt.fileserver.hgfs>`, :mod:`svn <salt.fileserver.svnfs>`). .. note:: This will only operate on enabled backends (those configured in :conf_master:`files...
[ "..", "versionadded", "::", "2015", ".", "5", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/fileserver.py#L435-L474
train
Return a new set of fileserver update locks for the specified backend and remote.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
KeyCLI.run
def run(self): ''' Run the logic for saltkey ''' self._update_opts() cmd = self.opts['fun'] veri = None ret = None try: if cmd in ('accept', 'reject', 'delete'): ret = self._run_cmd('name_match') if not isinstan...
python
def run(self): ''' Run the logic for saltkey ''' self._update_opts() cmd = self.opts['fun'] veri = None ret = None try: if cmd in ('accept', 'reject', 'delete'): ret = self._run_cmd('name_match') if not isinstan...
[ "def", "run", "(", "self", ")", ":", "self", ".", "_update_opts", "(", ")", "cmd", "=", "self", ".", "opts", "[", "'fun'", "]", "veri", "=", "None", "ret", "=", "None", "try", ":", "if", "cmd", "in", "(", "'accept'", ",", "'reject'", ",", "'delet...
Run the logic for saltkey
[ "Run", "the", "logic", "for", "saltkey" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L228-L284
train
Run the logic for saltkey
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.gen_keys
def gen_keys(self, keydir=None, keyname=None, keysize=None, user=None): ''' Generate minion RSA public keypair ''' keydir, keyname, keysize, user = self._get_key_attrs(keydir, keyname, keysize, user) salt.crypt.gen_keys...
python
def gen_keys(self, keydir=None, keyname=None, keysize=None, user=None): ''' Generate minion RSA public keypair ''' keydir, keyname, keysize, user = self._get_key_attrs(keydir, keyname, keysize, user) salt.crypt.gen_keys...
[ "def", "gen_keys", "(", "self", ",", "keydir", "=", "None", ",", "keyname", "=", "None", ",", "keysize", "=", "None", ",", "user", "=", "None", ")", ":", "keydir", ",", "keyname", ",", "keysize", ",", "user", "=", "self", ".", "_get_key_attrs", "(", ...
Generate minion RSA public keypair
[ "Generate", "minion", "RSA", "public", "keypair" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L343-L350
train
Generate minion RSA public keypair
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.gen_signature
def gen_signature(self, privkey, pubkey, sig_path): ''' Generate master public-key-signature ''' return salt.crypt.gen_signature(privkey, pubkey, sig_path, self.passphr...
python
def gen_signature(self, privkey, pubkey, sig_path): ''' Generate master public-key-signature ''' return salt.crypt.gen_signature(privkey, pubkey, sig_path, self.passphr...
[ "def", "gen_signature", "(", "self", ",", "privkey", ",", "pubkey", ",", "sig_path", ")", ":", "return", "salt", ".", "crypt", ".", "gen_signature", "(", "privkey", ",", "pubkey", ",", "sig_path", ",", "self", ".", "passphrase", ")" ]
Generate master public-key-signature
[ "Generate", "master", "public", "-", "key", "-", "signature" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L352-L359
train
Generate master public - key - signature
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.gen_keys_signature
def gen_keys_signature(self, priv, pub, signature_path, auto_create=False, keysize=None): ''' Generate master public-key-signature ''' # check given pub-key if pub: if not os.path.isfile(pub): return 'Public-key {0} does not exist'.format(pub) ...
python
def gen_keys_signature(self, priv, pub, signature_path, auto_create=False, keysize=None): ''' Generate master public-key-signature ''' # check given pub-key if pub: if not os.path.isfile(pub): return 'Public-key {0} does not exist'.format(pub) ...
[ "def", "gen_keys_signature", "(", "self", ",", "priv", ",", "pub", ",", "signature_path", ",", "auto_create", "=", "False", ",", "keysize", "=", "None", ")", ":", "# check given pub-key", "if", "pub", ":", "if", "not", "os", ".", "path", ".", "isfile", "...
Generate master public-key-signature
[ "Generate", "master", "public", "-", "key", "-", "signature" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L361-L416
train
Generate master public - key - signature for a given public - key and private - key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.check_minion_cache
def check_minion_cache(self, preserve_minions=None): ''' Check the minion cache to make sure that old minion data is cleared Optionally, pass in a list of minions which should have their caches preserved. To preserve all caches, set __opts__['preserve_minion_cache'] ''' ...
python
def check_minion_cache(self, preserve_minions=None): ''' Check the minion cache to make sure that old minion data is cleared Optionally, pass in a list of minions which should have their caches preserved. To preserve all caches, set __opts__['preserve_minion_cache'] ''' ...
[ "def", "check_minion_cache", "(", "self", ",", "preserve_minions", "=", "None", ")", ":", "if", "preserve_minions", "is", "None", ":", "preserve_minions", "=", "[", "]", "keys", "=", "self", ".", "list_keys", "(", ")", "minions", "=", "[", "]", "for", "k...
Check the minion cache to make sure that old minion data is cleared Optionally, pass in a list of minions which should have their caches preserved. To preserve all caches, set __opts__['preserve_minion_cache']
[ "Check", "the", "minion", "cache", "to", "make", "sure", "that", "old", "minion", "data", "is", "cleared" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L418-L448
train
Check the minion cache to make sure that all data for the minion is cleared
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.check_master
def check_master(self): ''' Log if the master is not running :rtype: bool :return: Whether or not the master is running ''' if not os.path.exists( os.path.join( self.opts['sock_dir'], 'publish_pull.ipc' ...
python
def check_master(self): ''' Log if the master is not running :rtype: bool :return: Whether or not the master is running ''' if not os.path.exists( os.path.join( self.opts['sock_dir'], 'publish_pull.ipc' ...
[ "def", "check_master", "(", "self", ")", ":", "if", "not", "os", ".", "path", ".", "exists", "(", "os", ".", "path", ".", "join", "(", "self", ".", "opts", "[", "'sock_dir'", "]", ",", "'publish_pull.ipc'", ")", ")", ":", "return", "False", "return",...
Log if the master is not running :rtype: bool :return: Whether or not the master is running
[ "Log", "if", "the", "master", "is", "not", "running" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L450-L464
train
Check if the master is running.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.name_match
def name_match(self, match, full=False): ''' Accept a glob which to match the of a key and return the key's location ''' if full: matches = self.all_keys() else: matches = self.list_keys() ret = {} if ',' in match and isinstance(match, six....
python
def name_match(self, match, full=False): ''' Accept a glob which to match the of a key and return the key's location ''' if full: matches = self.all_keys() else: matches = self.list_keys() ret = {} if ',' in match and isinstance(match, six....
[ "def", "name_match", "(", "self", ",", "match", ",", "full", "=", "False", ")", ":", "if", "full", ":", "matches", "=", "self", ".", "all_keys", "(", ")", "else", ":", "matches", "=", "self", ".", "list_keys", "(", ")", "ret", "=", "{", "}", "if"...
Accept a glob which to match the of a key and return the key's location
[ "Accept", "a", "glob", "which", "to", "match", "the", "of", "a", "key", "and", "return", "the", "key", "s", "location" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L466-L490
train
Accept a glob which to match the of a key and return the key s location
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.dict_match
def dict_match(self, match_dict): ''' Accept a dictionary of keys and return the current state of the specified keys ''' ret = {} cur_keys = self.list_keys() for status, keys in six.iteritems(match_dict): for key in salt.utils.data.sorted_ignorecase(ke...
python
def dict_match(self, match_dict): ''' Accept a dictionary of keys and return the current state of the specified keys ''' ret = {} cur_keys = self.list_keys() for status, keys in six.iteritems(match_dict): for key in salt.utils.data.sorted_ignorecase(ke...
[ "def", "dict_match", "(", "self", ",", "match_dict", ")", ":", "ret", "=", "{", "}", "cur_keys", "=", "self", ".", "list_keys", "(", ")", "for", "status", ",", "keys", "in", "six", ".", "iteritems", "(", "match_dict", ")", ":", "for", "key", "in", ...
Accept a dictionary of keys and return the current state of the specified keys
[ "Accept", "a", "dictionary", "of", "keys", "and", "return", "the", "current", "state", "of", "the", "specified", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L492-L504
train
Accept a dictionary of keys and return the current state of the theCOOKIES specified keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.local_keys
def local_keys(self): ''' Return a dict of local keys ''' ret = {'local': []} for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(self.opts['pki_dir'])): if fn_.endswith('.pub') or fn_.endswith('.pem'): path = os.path.join(self.opts['pki_dir'], fn_...
python
def local_keys(self): ''' Return a dict of local keys ''' ret = {'local': []} for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(self.opts['pki_dir'])): if fn_.endswith('.pub') or fn_.endswith('.pem'): path = os.path.join(self.opts['pki_dir'], fn_...
[ "def", "local_keys", "(", "self", ")", ":", "ret", "=", "{", "'local'", ":", "[", "]", "}", "for", "fn_", "in", "salt", ".", "utils", ".", "data", ".", "sorted_ignorecase", "(", "os", ".", "listdir", "(", "self", ".", "opts", "[", "'pki_dir'", "]",...
Return a dict of local keys
[ "Return", "a", "dict", "of", "local", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L506-L516
train
Return a dict of local keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.list_keys
def list_keys(self): ''' Return a dict of managed keys and what the key status are ''' key_dirs = self._check_minions_directories() ret = {} for dir_ in key_dirs: if dir_ is None: continue ret[os.path.basename(dir_)] = [] ...
python
def list_keys(self): ''' Return a dict of managed keys and what the key status are ''' key_dirs = self._check_minions_directories() ret = {} for dir_ in key_dirs: if dir_ is None: continue ret[os.path.basename(dir_)] = [] ...
[ "def", "list_keys", "(", "self", ")", ":", "key_dirs", "=", "self", ".", "_check_minions_directories", "(", ")", "ret", "=", "{", "}", "for", "dir_", "in", "key_dirs", ":", "if", "dir_", "is", "None", ":", "continue", "ret", "[", "os", ".", "path", "...
Return a dict of managed keys and what the key status are
[ "Return", "a", "dict", "of", "managed", "keys", "and", "what", "the", "key", "status", "are" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L518-L540
train
Return a dict of managed keys and what the key status are
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.all_keys
def all_keys(self): ''' Merge managed keys with local keys ''' keys = self.list_keys() keys.update(self.local_keys()) return keys
python
def all_keys(self): ''' Merge managed keys with local keys ''' keys = self.list_keys() keys.update(self.local_keys()) return keys
[ "def", "all_keys", "(", "self", ")", ":", "keys", "=", "self", ".", "list_keys", "(", ")", "keys", ".", "update", "(", "self", ".", "local_keys", "(", ")", ")", "return", "keys" ]
Merge managed keys with local keys
[ "Merge", "managed", "keys", "with", "local", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L542-L548
train
Returns a list of all managed keys with local keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.list_status
def list_status(self, match): ''' Return a dict of managed keys under a named status ''' acc, pre, rej, den = self._check_minions_directories() ret = {} if match.startswith('acc'): ret[os.path.basename(acc)] = [] for fn_ in salt.utils.data.sorted_i...
python
def list_status(self, match): ''' Return a dict of managed keys under a named status ''' acc, pre, rej, den = self._check_minions_directories() ret = {} if match.startswith('acc'): ret[os.path.basename(acc)] = [] for fn_ in salt.utils.data.sorted_i...
[ "def", "list_status", "(", "self", ",", "match", ")", ":", "acc", ",", "pre", ",", "rej", ",", "den", "=", "self", ".", "_check_minions_directories", "(", ")", "ret", "=", "{", "}", "if", "match", ".", "startswith", "(", "'acc'", ")", ":", "ret", "...
Return a dict of managed keys under a named status
[ "Return", "a", "dict", "of", "managed", "keys", "under", "a", "named", "status" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L550-L582
train
Return a dict of managed keys under a named status
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.key_str
def key_str(self, match): ''' Return the specified public key or keys based on a glob ''' ret = {} for status, keys in six.iteritems(self.name_match(match)): ret[status] = {} for key in salt.utils.data.sorted_ignorecase(keys): path = os.pat...
python
def key_str(self, match): ''' Return the specified public key or keys based on a glob ''' ret = {} for status, keys in six.iteritems(self.name_match(match)): ret[status] = {} for key in salt.utils.data.sorted_ignorecase(keys): path = os.pat...
[ "def", "key_str", "(", "self", ",", "match", ")", ":", "ret", "=", "{", "}", "for", "status", ",", "keys", "in", "six", ".", "iteritems", "(", "self", ".", "name_match", "(", "match", ")", ")", ":", "ret", "[", "status", "]", "=", "{", "}", "fo...
Return the specified public key or keys based on a glob
[ "Return", "the", "specified", "public", "key", "or", "keys", "based", "on", "a", "glob" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L584-L596
train
Return the specified public key or keys based on a glob
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.accept
def accept(self, match=None, match_dict=None, include_rejected=False, include_denied=False): ''' Accept public keys. If "match" is passed, it is evaluated as a glob. Pre-gathered matches can also be passed via "match_dict". ''' if match is not None: matches = self.nam...
python
def accept(self, match=None, match_dict=None, include_rejected=False, include_denied=False): ''' Accept public keys. If "match" is passed, it is evaluated as a glob. Pre-gathered matches can also be passed via "match_dict". ''' if match is not None: matches = self.nam...
[ "def", "accept", "(", "self", ",", "match", "=", "None", ",", "match_dict", "=", "None", ",", "include_rejected", "=", "False", ",", "include_denied", "=", "False", ")", ":", "if", "match", "is", "not", "None", ":", "matches", "=", "self", ".", "name_m...
Accept public keys. If "match" is passed, it is evaluated as a glob. Pre-gathered matches can also be passed via "match_dict".
[ "Accept", "public", "keys", ".", "If", "match", "is", "passed", "it", "is", "evaluated", "as", "a", "glob", ".", "Pre", "-", "gathered", "matches", "can", "also", "be", "passed", "via", "match_dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L612-L651
train
Accept public keys.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.accept_all
def accept_all(self): ''' Accept all keys in pre ''' keys = self.list_keys() for key in keys[self.PEND]: try: shutil.move( os.path.join( self.opts['pki_dir'], self.PEND, ...
python
def accept_all(self): ''' Accept all keys in pre ''' keys = self.list_keys() for key in keys[self.PEND]: try: shutil.move( os.path.join( self.opts['pki_dir'], self.PEND, ...
[ "def", "accept_all", "(", "self", ")", ":", "keys", "=", "self", ".", "list_keys", "(", ")", "for", "key", "in", "keys", "[", "self", ".", "PEND", "]", ":", "try", ":", "shutil", ".", "move", "(", "os", ".", "path", ".", "join", "(", "self", "....
Accept all keys in pre
[ "Accept", "all", "keys", "in", "pre" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L653-L677
train
Accept all keys in pre
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.delete_key
def delete_key(self, match=None, match_dict=None, preserve_minions=None, revoke_auth=False): ''' Delete public keys. If "match" is passed, it is evaluated as a glob. Pre-gathered matches can also be passed via "match...
python
def delete_key(self, match=None, match_dict=None, preserve_minions=None, revoke_auth=False): ''' Delete public keys. If "match" is passed, it is evaluated as a glob. Pre-gathered matches can also be passed via "match...
[ "def", "delete_key", "(", "self", ",", "match", "=", "None", ",", "match_dict", "=", "None", ",", "preserve_minions", "=", "None", ",", "revoke_auth", "=", "False", ")", ":", "if", "match", "is", "not", "None", ":", "matches", "=", "self", ".", "name_m...
Delete public keys. If "match" is passed, it is evaluated as a glob. Pre-gathered matches can also be passed via "match_dict". To preserve the master caches of minions who are matched, set preserve_minions
[ "Delete", "public", "keys", ".", "If", "match", "is", "passed", "it", "is", "evaluated", "as", "a", "glob", ".", "Pre", "-", "gathered", "matches", "can", "also", "be", "passed", "via", "match_dict", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L679-L729
train
Delete public keys.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.delete_all
def delete_all(self): ''' Delete all keys ''' for status, keys in six.iteritems(self.list_keys()): for key in keys: try: os.remove(os.path.join(self.opts['pki_dir'], status, key)) eload = {'result': True, ...
python
def delete_all(self): ''' Delete all keys ''' for status, keys in six.iteritems(self.list_keys()): for key in keys: try: os.remove(os.path.join(self.opts['pki_dir'], status, key)) eload = {'result': True, ...
[ "def", "delete_all", "(", "self", ")", ":", "for", "status", ",", "keys", "in", "six", ".", "iteritems", "(", "self", ".", "list_keys", "(", ")", ")", ":", "for", "key", "in", "keys", ":", "try", ":", "os", ".", "remove", "(", "os", ".", "path", ...
Delete all keys
[ "Delete", "all", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L750-L768
train
Delete all keys in the minion
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.reject_all
def reject_all(self): ''' Reject all keys in pre ''' keys = self.list_keys() for key in keys[self.PEND]: try: shutil.move( os.path.join( self.opts['pki_dir'], self.PEND, ...
python
def reject_all(self): ''' Reject all keys in pre ''' keys = self.list_keys() for key in keys[self.PEND]: try: shutil.move( os.path.join( self.opts['pki_dir'], self.PEND, ...
[ "def", "reject_all", "(", "self", ")", ":", "keys", "=", "self", ".", "list_keys", "(", ")", "for", "key", "in", "keys", "[", "self", ".", "PEND", "]", ":", "try", ":", "shutil", ".", "move", "(", "os", ".", "path", ".", "join", "(", "self", "....
Reject all keys in pre
[ "Reject", "all", "keys", "in", "pre" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L814-L841
train
Reject all keys in pre
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.finger
def finger(self, match, hash_type=None): ''' Return the fingerprint for a specified key ''' if hash_type is None: hash_type = __opts__['hash_type'] matches = self.name_match(match, True) ret = {} for status, keys in six.iteritems(matches): ...
python
def finger(self, match, hash_type=None): ''' Return the fingerprint for a specified key ''' if hash_type is None: hash_type = __opts__['hash_type'] matches = self.name_match(match, True) ret = {} for status, keys in six.iteritems(matches): ...
[ "def", "finger", "(", "self", ",", "match", ",", "hash_type", "=", "None", ")", ":", "if", "hash_type", "is", "None", ":", "hash_type", "=", "__opts__", "[", "'hash_type'", "]", "matches", "=", "self", ".", "name_match", "(", "match", ",", "True", ")",...
Return the fingerprint for a specified key
[ "Return", "the", "fingerprint", "for", "a", "specified", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L843-L860
train
Return the fingerprint for a specified key
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/key.py
Key.finger_all
def finger_all(self, hash_type=None): ''' Return fingerprints for all keys ''' if hash_type is None: hash_type = __opts__['hash_type'] ret = {} for status, keys in six.iteritems(self.all_keys()): ret[status] = {} for key in keys: ...
python
def finger_all(self, hash_type=None): ''' Return fingerprints for all keys ''' if hash_type is None: hash_type = __opts__['hash_type'] ret = {} for status, keys in six.iteritems(self.all_keys()): ret[status] = {} for key in keys: ...
[ "def", "finger_all", "(", "self", ",", "hash_type", "=", "None", ")", ":", "if", "hash_type", "is", "None", ":", "hash_type", "=", "__opts__", "[", "'hash_type'", "]", "ret", "=", "{", "}", "for", "status", ",", "keys", "in", "six", ".", "iteritems", ...
Return fingerprints for all keys
[ "Return", "fingerprints", "for", "all", "keys" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/key.py#L862-L878
train
Return fingerprints for all keys
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
__catalina_home
def __catalina_home(): ''' Tomcat paths differ depending on packaging ''' locations = ['/usr/share/tomcat*', '/opt/tomcat'] for location in locations: folders = glob.glob(location) if folders: for catalina_home in folders: if os.path.isdir(catalina_home + ...
python
def __catalina_home(): ''' Tomcat paths differ depending on packaging ''' locations = ['/usr/share/tomcat*', '/opt/tomcat'] for location in locations: folders = glob.glob(location) if folders: for catalina_home in folders: if os.path.isdir(catalina_home + ...
[ "def", "__catalina_home", "(", ")", ":", "locations", "=", "[", "'/usr/share/tomcat*'", ",", "'/opt/tomcat'", "]", "for", "location", "in", "locations", ":", "folders", "=", "glob", ".", "glob", "(", "location", ")", "if", "folders", ":", "for", "catalina_ho...
Tomcat paths differ depending on packaging
[ "Tomcat", "paths", "differ", "depending", "on", "packaging" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L119-L130
train
Return the path to the catalina home directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
_get_credentials
def _get_credentials(): ''' Get the username and password from opts, grains, or pillar ''' ret = { 'user': False, 'passwd': False } # Loop through opts, grains, and pillar # Return the first acceptable configuration found for item in ret: for struct in [__opts__,...
python
def _get_credentials(): ''' Get the username and password from opts, grains, or pillar ''' ret = { 'user': False, 'passwd': False } # Loop through opts, grains, and pillar # Return the first acceptable configuration found for item in ret: for struct in [__opts__,...
[ "def", "_get_credentials", "(", ")", ":", "ret", "=", "{", "'user'", ":", "False", ",", "'passwd'", ":", "False", "}", "# Loop through opts, grains, and pillar", "# Return the first acceptable configuration found", "for", "item", "in", "ret", ":", "for", "struct", "...
Get the username and password from opts, grains, or pillar
[ "Get", "the", "username", "and", "password", "from", "opts", "grains", "or", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L133-L156
train
Get the username and password from opts grains or pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
_auth
def _auth(uri): ''' returns a authentication handler. Get user & password from grains, if are not set default to modules.config.option If user & pass are missing return False ''' user, password = _get_credentials() if user is False or password is False: return False basic ...
python
def _auth(uri): ''' returns a authentication handler. Get user & password from grains, if are not set default to modules.config.option If user & pass are missing return False ''' user, password = _get_credentials() if user is False or password is False: return False basic ...
[ "def", "_auth", "(", "uri", ")", ":", "user", ",", "password", "=", "_get_credentials", "(", ")", "if", "user", "is", "False", "or", "password", "is", "False", ":", "return", "False", "basic", "=", "_HTTPBasicAuthHandler", "(", ")", "basic", ".", "add_pa...
returns a authentication handler. Get user & password from grains, if are not set default to modules.config.option If user & pass are missing return False
[ "returns", "a", "authentication", "handler", ".", "Get", "user", "&", "password", "from", "grains", "if", "are", "not", "set", "default", "to", "modules", ".", "config", ".", "option" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L159-L178
train
Returns a authentication handler.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
extract_war_version
def extract_war_version(war): ''' Extract the version from the war file name. There does not seem to be a standard for encoding the version into the `war file name`_ .. _`war file name`: https://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html Examples: .. code-block:: bash /path...
python
def extract_war_version(war): ''' Extract the version from the war file name. There does not seem to be a standard for encoding the version into the `war file name`_ .. _`war file name`: https://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html Examples: .. code-block:: bash /path...
[ "def", "extract_war_version", "(", "war", ")", ":", "basename", "=", "os", ".", "path", ".", "basename", "(", "war", ")", "war_package", "=", "os", ".", "path", ".", "splitext", "(", "basename", ")", "[", "0", "]", "# remove '.war'", "version", "=", "r...
Extract the version from the war file name. There does not seem to be a standard for encoding the version into the `war file name`_ .. _`war file name`: https://tomcat.apache.org/tomcat-6.0-doc/deployer-howto.html Examples: .. code-block:: bash /path/salt-2015.8.6.war -> 2015.8.6 /pa...
[ "Extract", "the", "version", "from", "the", "war", "file", "name", ".", "There", "does", "not", "seem", "to", "be", "a", "standard", "for", "encoding", "the", "version", "into", "the", "war", "file", "name", "_" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L181-L198
train
Extract the version from the war file name.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
_wget
def _wget(cmd, opts=None, url='http://localhost:8080/manager', timeout=180): ''' A private function used to issue the command to tomcat via the manager webapp cmd the command to execute url The URL of the server manager webapp (example: http://localhost:8080/manager) o...
python
def _wget(cmd, opts=None, url='http://localhost:8080/manager', timeout=180): ''' A private function used to issue the command to tomcat via the manager webapp cmd the command to execute url The URL of the server manager webapp (example: http://localhost:8080/manager) o...
[ "def", "_wget", "(", "cmd", ",", "opts", "=", "None", ",", "url", "=", "'http://localhost:8080/manager'", ",", "timeout", "=", "180", ")", ":", "ret", "=", "{", "'res'", ":", "True", ",", "'msg'", ":", "[", "]", "}", "# prepare authentication", "auth", ...
A private function used to issue the command to tomcat via the manager webapp cmd the command to execute url The URL of the server manager webapp (example: http://localhost:8080/manager) opts a dict of arguments timeout timeout for HTTP request Return...
[ "A", "private", "function", "used", "to", "issue", "the", "command", "to", "tomcat", "via", "the", "manager", "webapp" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L201-L265
train
Internal function to issue a command to tomcat via the manager webapp
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
_simple_cmd
def _simple_cmd(cmd, app, url='http://localhost:8080/manager', timeout=180): ''' Simple command wrapper to commands that need only a path option ''' try: opts = { 'path': app, 'version': ls(url)[app]['version'] } return '\n'.join(_wget(cmd, opts, url, tim...
python
def _simple_cmd(cmd, app, url='http://localhost:8080/manager', timeout=180): ''' Simple command wrapper to commands that need only a path option ''' try: opts = { 'path': app, 'version': ls(url)[app]['version'] } return '\n'.join(_wget(cmd, opts, url, tim...
[ "def", "_simple_cmd", "(", "cmd", ",", "app", ",", "url", "=", "'http://localhost:8080/manager'", ",", "timeout", "=", "180", ")", ":", "try", ":", "opts", "=", "{", "'path'", ":", "app", ",", "'version'", ":", "ls", "(", "url", ")", "[", "app", "]",...
Simple command wrapper to commands that need only a path option
[ "Simple", "command", "wrapper", "to", "commands", "that", "need", "only", "a", "path", "option" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L268-L280
train
Simple command wrapper to commands that need only a path option
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
ls
def ls(url='http://localhost:8080/manager', timeout=180): ''' list all the deployed webapps url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.ls sa...
python
def ls(url='http://localhost:8080/manager', timeout=180): ''' list all the deployed webapps url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.ls sa...
[ "def", "ls", "(", "url", "=", "'http://localhost:8080/manager'", ",", "timeout", "=", "180", ")", ":", "ret", "=", "{", "}", "data", "=", "_wget", "(", "'list'", ",", "''", ",", "url", ",", "timeout", "=", "timeout", ")", "if", "data", "[", "'res'", ...
list all the deployed webapps url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.ls salt '*' tomcat.ls http://localhost:8080/manager
[ "list", "all", "the", "deployed", "webapps" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L324-L358
train
list all the deployed webapps
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
status_webapp
def status_webapp(app, url='http://localhost:8080/manager', timeout=180): ''' return the status of the webapp (stopped | running | missing) app the webapp context path url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP req...
python
def status_webapp(app, url='http://localhost:8080/manager', timeout=180): ''' return the status of the webapp (stopped | running | missing) app the webapp context path url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP req...
[ "def", "status_webapp", "(", "app", ",", "url", "=", "'http://localhost:8080/manager'", ",", "timeout", "=", "180", ")", ":", "webapps", "=", "ls", "(", "url", ",", "timeout", "=", "timeout", ")", "for", "i", "in", "webapps", ":", "if", "i", "==", "app...
return the status of the webapp (stopped | running | missing) app the webapp context path url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.status_weba...
[ "return", "the", "status", "of", "the", "webapp", "(", "stopped", "|", "running", "|", "missing", ")" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L449-L473
train
Returns the status of the webapp
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
serverinfo
def serverinfo(url='http://localhost:8080/manager', timeout=180): ''' return details about the server url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.ser...
python
def serverinfo(url='http://localhost:8080/manager', timeout=180): ''' return details about the server url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.ser...
[ "def", "serverinfo", "(", "url", "=", "'http://localhost:8080/manager'", ",", "timeout", "=", "180", ")", ":", "data", "=", "_wget", "(", "'serverinfo'", ",", "{", "}", ",", "url", ",", "timeout", "=", "timeout", ")", "if", "data", "[", "'res'", "]", "...
return details about the server url : http://localhost:8080/manager the URL of the server manager webapp timeout : 180 timeout for HTTP request CLI Examples: .. code-block:: bash salt '*' tomcat.serverinfo salt '*' tomcat.serverinfo http://localhost:8080/manager
[ "return", "details", "about", "the", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L476-L503
train
get serverinfo for webapp
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
deploy_war
def deploy_war(war, context, force='no', url='http://localhost:8080/manager', saltenv='base', timeout=180, temp_war_location=None, version=True): ''' Deploy a WAR file war absolute path to WAR f...
python
def deploy_war(war, context, force='no', url='http://localhost:8080/manager', saltenv='base', timeout=180, temp_war_location=None, version=True): ''' Deploy a WAR file war absolute path to WAR f...
[ "def", "deploy_war", "(", "war", ",", "context", ",", "force", "=", "'no'", ",", "url", "=", "'http://localhost:8080/manager'", ",", "saltenv", "=", "'base'", ",", "timeout", "=", "180", ",", "temp_war_location", "=", "None", ",", "version", "=", "True", "...
Deploy a WAR file war absolute path to WAR file (should be accessible by the user running tomcat) or a path supported by the salt.modules.cp.get_file function context the context path to deploy force : False set True to deploy the webapp even one is deployed in the context ...
[ "Deploy", "a", "WAR", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L528-L635
train
Deploy a WAR file to the server manager
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
passwd
def passwd(passwd, user='', alg='sha1', realm=None): ''' This function replaces the $CATALINA_HOME/bin/digest.sh script convert a clear-text password to the $CATALINA_BASE/conf/tomcat-users.xml format CLI Examples: .. code-block:: bash salt '*' tomcat....
python
def passwd(passwd, user='', alg='sha1', realm=None): ''' This function replaces the $CATALINA_HOME/bin/digest.sh script convert a clear-text password to the $CATALINA_BASE/conf/tomcat-users.xml format CLI Examples: .. code-block:: bash salt '*' tomcat....
[ "def", "passwd", "(", "passwd", ",", "user", "=", "''", ",", "alg", "=", "'sha1'", ",", "realm", "=", "None", ")", ":", "# Shouldn't it be SHA265 instead of SHA1?", "digest", "=", "hasattr", "(", "hashlib", ",", "alg", ")", "and", "getattr", "(", "hashlib"...
This function replaces the $CATALINA_HOME/bin/digest.sh script convert a clear-text password to the $CATALINA_BASE/conf/tomcat-users.xml format CLI Examples: .. code-block:: bash salt '*' tomcat.passwd secret salt '*' tomcat.passwd secret tomcat sha1 salt '*' tomcat.passwd sec...
[ "This", "function", "replaces", "the", "$CATALINA_HOME", "/", "bin", "/", "digest", ".", "sh", "script", "convert", "a", "clear", "-", "text", "password", "to", "the", "$CATALINA_BASE", "/", "conf", "/", "tomcat", "-", "users", ".", "xml", "format" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L638-L663
train
This function replaces the $CATALINA_HOME / conf / tomcat - users. xml script convert a clear - text password to the $CATALINA_BASE / conf / tomcat - users. xml script format
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
version
def version(): ''' Return server version from catalina.sh version CLI Example: .. code-block:: bash salt '*' tomcat.version ''' cmd = __catalina_home() + '/bin/catalina.sh version' out = __salt__['cmd.run'](cmd).splitlines() for line in out: if not line: co...
python
def version(): ''' Return server version from catalina.sh version CLI Example: .. code-block:: bash salt '*' tomcat.version ''' cmd = __catalina_home() + '/bin/catalina.sh version' out = __salt__['cmd.run'](cmd).splitlines() for line in out: if not line: co...
[ "def", "version", "(", ")", ":", "cmd", "=", "__catalina_home", "(", ")", "+", "'/bin/catalina.sh version'", "out", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ")", ".", "splitlines", "(", ")", "for", "line", "in", "out", ":", "if", "not", "lin...
Return server version from catalina.sh version CLI Example: .. code-block:: bash salt '*' tomcat.version
[ "Return", "server", "version", "from", "catalina", ".", "sh", "version" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L667-L684
train
Return server version from catalina. sh version CLI Example :
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
fullversion
def fullversion(): ''' Return all server information from catalina.sh version CLI Example: .. code-block:: bash salt '*' tomcat.fullversion ''' cmd = __catalina_home() + '/bin/catalina.sh version' ret = {} out = __salt__['cmd.run'](cmd).splitlines() for line in out: ...
python
def fullversion(): ''' Return all server information from catalina.sh version CLI Example: .. code-block:: bash salt '*' tomcat.fullversion ''' cmd = __catalina_home() + '/bin/catalina.sh version' ret = {} out = __salt__['cmd.run'](cmd).splitlines() for line in out: ...
[ "def", "fullversion", "(", ")", ":", "cmd", "=", "__catalina_home", "(", ")", "+", "'/bin/catalina.sh version'", "ret", "=", "{", "}", "out", "=", "__salt__", "[", "'cmd.run'", "]", "(", "cmd", ")", ".", "splitlines", "(", ")", "for", "line", "in", "ou...
Return all server information from catalina.sh version CLI Example: .. code-block:: bash salt '*' tomcat.fullversion
[ "Return", "all", "server", "information", "from", "catalina", ".", "sh", "version" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L687-L706
train
Return all server information from catalina. sh version CLI Example : catalina. sh version salt '*' tomcat. fullversion
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/tomcat.py
signal
def signal(signal=None): ''' Signals catalina to start, stop, securestart, forcestop. CLI Example: .. code-block:: bash salt '*' tomcat.signal start ''' valid_signals = {'forcestop': 'stop -force', 'securestart': 'start -security', 'start': 's...
python
def signal(signal=None): ''' Signals catalina to start, stop, securestart, forcestop. CLI Example: .. code-block:: bash salt '*' tomcat.signal start ''' valid_signals = {'forcestop': 'stop -force', 'securestart': 'start -security', 'start': 's...
[ "def", "signal", "(", "signal", "=", "None", ")", ":", "valid_signals", "=", "{", "'forcestop'", ":", "'stop -force'", ",", "'securestart'", ":", "'start -security'", ",", "'start'", ":", "'start'", ",", "'stop'", ":", "'stop'", "}", "if", "signal", "not", ...
Signals catalina to start, stop, securestart, forcestop. CLI Example: .. code-block:: bash salt '*' tomcat.signal start
[ "Signals", "catalina", "to", "start", "stop", "securestart", "forcestop", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/tomcat.py#L709-L730
train
Signal a catalina container
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/appoptics_return.py
_get_options
def _get_options(ret=None): ''' Get the appoptics options from salt. ''' attrs = { 'api_token': 'api_token', 'api_url': 'api_url', 'tags': 'tags', 'sls_states': 'sls_states' } _options = salt.returners.get_returner_options( __virtualname__, ret, ...
python
def _get_options(ret=None): ''' Get the appoptics options from salt. ''' attrs = { 'api_token': 'api_token', 'api_url': 'api_url', 'tags': 'tags', 'sls_states': 'sls_states' } _options = salt.returners.get_returner_options( __virtualname__, ret, ...
[ "def", "_get_options", "(", "ret", "=", "None", ")", ":", "attrs", "=", "{", "'api_token'", ":", "'api_token'", ",", "'api_url'", ":", "'api_url'", ",", "'tags'", ":", "'tags'", ",", "'sls_states'", ":", "'sls_states'", "}", "_options", "=", "salt", ".", ...
Get the appoptics options from salt.
[ "Get", "the", "appoptics", "options", "from", "salt", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/appoptics_return.py#L98-L123
train
Get the appoptics options from salt.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/appoptics_return.py
_get_appoptics
def _get_appoptics(options): ''' Return an appoptics connection object. ''' conn = appoptics_metrics.connect( options.get('api_token'), sanitizer=appoptics_metrics.sanitize_metric_name, hostname=options.get('api_url')) log.info("Connected to appoptics.") return conn
python
def _get_appoptics(options): ''' Return an appoptics connection object. ''' conn = appoptics_metrics.connect( options.get('api_token'), sanitizer=appoptics_metrics.sanitize_metric_name, hostname=options.get('api_url')) log.info("Connected to appoptics.") return conn
[ "def", "_get_appoptics", "(", "options", ")", ":", "conn", "=", "appoptics_metrics", ".", "connect", "(", "options", ".", "get", "(", "'api_token'", ")", ",", "sanitizer", "=", "appoptics_metrics", ".", "sanitize_metric_name", ",", "hostname", "=", "options", ...
Return an appoptics connection object.
[ "Return", "an", "appoptics", "connection", "object", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/appoptics_return.py#L126-L135
train
Return an appoptics connection object.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/appoptics_return.py
returner
def returner(ret): ''' Parse the return data and return metrics to AppOptics. For each state that's provided in the configuration, return tagged metrics for the result of that state if it's present. ''' options = _get_options(ret) states_to_report = ['state.highstate'] if options.get('...
python
def returner(ret): ''' Parse the return data and return metrics to AppOptics. For each state that's provided in the configuration, return tagged metrics for the result of that state if it's present. ''' options = _get_options(ret) states_to_report = ['state.highstate'] if options.get('...
[ "def", "returner", "(", "ret", ")", ":", "options", "=", "_get_options", "(", "ret", ")", "states_to_report", "=", "[", "'state.highstate'", "]", "if", "options", ".", "get", "(", "'sls_states'", ")", ":", "states_to_report", ".", "append", "(", "'state.sls'...
Parse the return data and return metrics to AppOptics. For each state that's provided in the configuration, return tagged metrics for the result of that state if it's present.
[ "Parse", "the", "return", "data", "and", "return", "metrics", "to", "AppOptics", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/appoptics_return.py#L186-L209
train
Parse the return data and return metrics to AppOptics.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/zabbix_service.py
present
def present(host, service_root, trigger_desc, service_name=None, **kwargs): ''' .. versionadded:: Fluorine Ensure service exists under service root. :param host: Technical name of the host :param service_root: Path of service (path is split by /) :param service_name: Name of service :param...
python
def present(host, service_root, trigger_desc, service_name=None, **kwargs): ''' .. versionadded:: Fluorine Ensure service exists under service root. :param host: Technical name of the host :param service_root: Path of service (path is split by /) :param service_name: Name of service :param...
[ "def", "present", "(", "host", ",", "service_root", ",", "trigger_desc", ",", "service_name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "service_name", ":", "service_name", "=", "host", "changes_service_added", "=", "{", "host", ":", "{"...
.. versionadded:: Fluorine Ensure service exists under service root. :param host: Technical name of the host :param service_root: Path of service (path is split by /) :param service_name: Name of service :param trigger_desc: Description of trigger in zabbix :param _connection_user: Optional - ...
[ "..", "versionadded", "::", "Fluorine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_service.py#L17-L128
train
Ensure a service exists under a given service root.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/states/zabbix_service.py
absent
def absent(host, service_root, service_name=None, **kwargs): ''' .. versionadded:: Fluorine Ensure service does not exists under service root. :param host: Technical name of the host :param service_root: Path of service (path is split /) :param service_name: Name of service :param _connecti...
python
def absent(host, service_root, service_name=None, **kwargs): ''' .. versionadded:: Fluorine Ensure service does not exists under service root. :param host: Technical name of the host :param service_root: Path of service (path is split /) :param service_name: Name of service :param _connecti...
[ "def", "absent", "(", "host", ",", "service_root", ",", "service_name", "=", "None", ",", "*", "*", "kwargs", ")", ":", "if", "not", "service_name", ":", "service_name", "=", "host", "changes_service_deleted", "=", "{", "host", ":", "{", "'old'", ":", "'...
.. versionadded:: Fluorine Ensure service does not exists under service root. :param host: Technical name of the host :param service_root: Path of service (path is split /) :param service_name: Name of service :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see m...
[ "..", "versionadded", "::", "Fluorine", "Ensure", "service", "does", "not", "exists", "under", "service", "root", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_service.py#L131-L225
train
Ensure that a service is absent under a service root.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/support/intfunc.py
filetree
def filetree(collector, *paths): ''' Add all files in the tree. If the "path" is a file, only that file will be added. :param path: File or directory :return: ''' _paths = [] # Unglob for path in paths: _paths += glob.glob(path) for path in set(_paths): if not pa...
python
def filetree(collector, *paths): ''' Add all files in the tree. If the "path" is a file, only that file will be added. :param path: File or directory :return: ''' _paths = [] # Unglob for path in paths: _paths += glob.glob(path) for path in set(_paths): if not pa...
[ "def", "filetree", "(", "collector", ",", "*", "paths", ")", ":", "_paths", "=", "[", "]", "# Unglob", "for", "path", "in", "paths", ":", "_paths", "+=", "glob", ".", "glob", "(", "path", ")", "for", "path", "in", "set", "(", "_paths", ")", ":", ...
Add all files in the tree. If the "path" is a file, only that file will be added. :param path: File or directory :return:
[ "Add", "all", "files", "in", "the", "tree", ".", "If", "the", "path", "is", "a", "file", "only", "that", "file", "will", "be", "added", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/support/intfunc.py#L17-L53
train
Add all files in the tree.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_powercfg.py
_get_powercfg_minute_values
def _get_powercfg_minute_values(scheme, guid, subguid, safe_name): ''' Returns the AC/DC values in an dict for a guid and subguid for a the given scheme ''' if scheme is None: scheme = _get_current_scheme() if __grains__['osrelease'] == '7': cmd = 'powercfg /q {0} {1}'.format(sc...
python
def _get_powercfg_minute_values(scheme, guid, subguid, safe_name): ''' Returns the AC/DC values in an dict for a guid and subguid for a the given scheme ''' if scheme is None: scheme = _get_current_scheme() if __grains__['osrelease'] == '7': cmd = 'powercfg /q {0} {1}'.format(sc...
[ "def", "_get_powercfg_minute_values", "(", "scheme", ",", "guid", ",", "subguid", ",", "safe_name", ")", ":", "if", "scheme", "is", "None", ":", "scheme", "=", "_get_current_scheme", "(", ")", "if", "__grains__", "[", "'osrelease'", "]", "==", "'7'", ":", ...
Returns the AC/DC values in an dict for a guid and subguid for a the given scheme
[ "Returns", "the", "AC", "/", "DC", "values", "in", "an", "dict", "for", "a", "guid", "and", "subguid", "for", "a", "the", "given", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L44-L69
train
Returns the AC and DC values in an array for a guid and subguid for a given scheme
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_powercfg.py
_set_powercfg_value
def _set_powercfg_value(scheme, sub_group, setting_guid, power, value): ''' Sets the AC/DC values of a setting with the given power for the given scheme ''' if scheme is None: scheme = _get_current_scheme() cmd = 'powercfg /set{0}valueindex {1} {2} {3} {4}' \ ''.format(power, sche...
python
def _set_powercfg_value(scheme, sub_group, setting_guid, power, value): ''' Sets the AC/DC values of a setting with the given power for the given scheme ''' if scheme is None: scheme = _get_current_scheme() cmd = 'powercfg /set{0}valueindex {1} {2} {3} {4}' \ ''.format(power, sche...
[ "def", "_set_powercfg_value", "(", "scheme", ",", "sub_group", ",", "setting_guid", ",", "power", ",", "value", ")", ":", "if", "scheme", "is", "None", ":", "scheme", "=", "_get_current_scheme", "(", ")", "cmd", "=", "'powercfg /set{0}valueindex {1} {2} {3} {4}'",...
Sets the AC/DC values of a setting with the given power for the given scheme
[ "Sets", "the", "AC", "/", "DC", "values", "of", "a", "setting", "with", "the", "given", "power", "for", "the", "given", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L72-L81
train
Sets the value of a given power setting in the given scheme
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_powercfg.py
set_monitor_timeout
def set_monitor_timeout(timeout, power='ac', scheme=None): ''' Set the monitor timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the monitor will timeout power (str): Set the value for AC or DC power. Default is ...
python
def set_monitor_timeout(timeout, power='ac', scheme=None): ''' Set the monitor timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the monitor will timeout power (str): Set the value for AC or DC power. Default is ...
[ "def", "set_monitor_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_VIDEO'", ",", "setting_guid", "=", "'VIDEOIDLE'", ",", ...
Set the monitor timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the monitor will timeout power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC Po...
[ "Set", "the", "monitor", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L84-L123
train
Sets the monitor timeout in minutes for the given power scheme and returns True if successful False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_powercfg.py
set_disk_timeout
def set_disk_timeout(timeout, power='ac', scheme=None): ''' Set the disk timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the disk will timeout power (str): Set the value for AC or DC power. Default is ``ac``. V...
python
def set_disk_timeout(timeout, power='ac', scheme=None): ''' Set the disk timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the disk will timeout power (str): Set the value for AC or DC power. Default is ``ac``. V...
[ "def", "set_disk_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_DISK'", ",", "setting_guid", "=", "'DISKIDLE'", ",", "powe...
Set the disk timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the disk will timeout power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC Power) ...
[ "Set", "the", "disk", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L156-L195
train
Sets the disk timeout in minutes for the given power scheme Returns True if successful False otherwise.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/win_powercfg.py
set_standby_timeout
def set_standby_timeout(timeout, power='ac', scheme=None): ''' Set the standby timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer sleeps power (str): Set the value for AC or DC power. Default is ``ac`...
python
def set_standby_timeout(timeout, power='ac', scheme=None): ''' Set the standby timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer sleeps power (str): Set the value for AC or DC power. Default is ``ac`...
[ "def", "set_standby_timeout", "(", "timeout", ",", "power", "=", "'ac'", ",", "scheme", "=", "None", ")", ":", "return", "_set_powercfg_value", "(", "scheme", "=", "scheme", ",", "sub_group", "=", "'SUB_SLEEP'", ",", "setting_guid", "=", "'STANDBYIDLE'", ",", ...
Set the standby timeout in minutes for the given power scheme Args: timeout (int): The amount of time in minutes before the computer sleeps power (str): Set the value for AC or DC power. Default is ``ac``. Valid options are: - ``ac`` (AC Power) ...
[ "Set", "the", "standby", "timeout", "in", "minutes", "for", "the", "given", "power", "scheme" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/win_powercfg.py#L228-L267
train
Sets the standby timeout in minutes for the given power scheme.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...