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/minion.py | MinionManager._connect_minion | def _connect_minion(self, minion):
'''
Create a minion, and asynchronously connect it to a master
'''
auth_wait = minion.opts['acceptance_wait_time']
failed = False
while True:
if failed:
if auth_wait < self.max_auth_wait:
a... | python | def _connect_minion(self, minion):
'''
Create a minion, and asynchronously connect it to a master
'''
auth_wait = minion.opts['acceptance_wait_time']
failed = False
while True:
if failed:
if auth_wait < self.max_auth_wait:
a... | [
"def",
"_connect_minion",
"(",
"self",
",",
"minion",
")",
":",
"auth_wait",
"=",
"minion",
".",
"opts",
"[",
"'acceptance_wait_time'",
"]",
"failed",
"=",
"False",
"while",
"True",
":",
"if",
"failed",
":",
"if",
"auth_wait",
"<",
"self",
".",
"max_auth_w... | Create a minion, and asynchronously connect it to a master | [
"Create",
"a",
"minion",
"and",
"asynchronously",
"connect",
"it",
"to",
"a",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1030-L1072 | train | Connect a minion to a 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/minion.py | Minion.sync_connect_master | def sync_connect_master(self, timeout=None, failed=False):
'''
Block until we are connected to a master
'''
self._sync_connect_master_success = False
log.debug("sync_connect_master")
def on_connect_master_future_done(future):
self._sync_connect_master_success... | python | def sync_connect_master(self, timeout=None, failed=False):
'''
Block until we are connected to a master
'''
self._sync_connect_master_success = False
log.debug("sync_connect_master")
def on_connect_master_future_done(future):
self._sync_connect_master_success... | [
"def",
"sync_connect_master",
"(",
"self",
",",
"timeout",
"=",
"None",
",",
"failed",
"=",
"False",
")",
":",
"self",
".",
"_sync_connect_master_success",
"=",
"False",
"log",
".",
"debug",
"(",
"\"sync_connect_master\"",
")",
"def",
"on_connect_master_future_don... | Block until we are connected to a master | [
"Block",
"until",
"we",
"are",
"connected",
"to",
"a",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1209-L1238 | train | Connect to the master and wait for the connection to complete. | 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/minion.py | Minion.connect_master | def connect_master(self, failed=False):
'''
Return a future which will complete when you are connected to a master
'''
master, self.pub_channel = yield self.eval_master(self.opts, self.timeout, self.safe, failed)
yield self._post_master_init(master) | python | def connect_master(self, failed=False):
'''
Return a future which will complete when you are connected to a master
'''
master, self.pub_channel = yield self.eval_master(self.opts, self.timeout, self.safe, failed)
yield self._post_master_init(master) | [
"def",
"connect_master",
"(",
"self",
",",
"failed",
"=",
"False",
")",
":",
"master",
",",
"self",
".",
"pub_channel",
"=",
"yield",
"self",
".",
"eval_master",
"(",
"self",
".",
"opts",
",",
"self",
".",
"timeout",
",",
"self",
".",
"safe",
",",
"f... | Return a future which will complete when you are connected to a master | [
"Return",
"a",
"future",
"which",
"will",
"complete",
"when",
"you",
"are",
"connected",
"to",
"a",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1241-L1246 | train | Return a future which will complete when you are connected to a 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/minion.py | Minion._post_master_init | def _post_master_init(self, master):
'''
Function to finish init after connecting to a master
This is primarily loading modules, pillars, etc. (since they need
to know which master they connected to)
If this function is changed, please check ProxyMinion._post_master_init
... | python | def _post_master_init(self, master):
'''
Function to finish init after connecting to a master
This is primarily loading modules, pillars, etc. (since they need
to know which master they connected to)
If this function is changed, please check ProxyMinion._post_master_init
... | [
"def",
"_post_master_init",
"(",
"self",
",",
"master",
")",
":",
"if",
"self",
".",
"connected",
":",
"self",
".",
"opts",
"[",
"'master'",
"]",
"=",
"master",
"# Initialize pillar before loader to make pillar accessible in modules",
"async_pillar",
"=",
"salt",
".... | Function to finish init after connecting to a master
This is primarily loading modules, pillars, etc. (since they need
to know which master they connected to)
If this function is changed, please check ProxyMinion._post_master_init
to see if those changes need to be propagated.
... | [
"Function",
"to",
"finish",
"init",
"after",
"connecting",
"to",
"a",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1250-L1346 | train | Function to finish init after connecting to a 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/minion.py | Minion._prep_mod_opts | def _prep_mod_opts(self):
'''
Returns a copy of the opts with key bits stripped out
'''
mod_opts = {}
for key, val in six.iteritems(self.opts):
if key == 'logger':
continue
mod_opts[key] = val
return mod_opts | python | def _prep_mod_opts(self):
'''
Returns a copy of the opts with key bits stripped out
'''
mod_opts = {}
for key, val in six.iteritems(self.opts):
if key == 'logger':
continue
mod_opts[key] = val
return mod_opts | [
"def",
"_prep_mod_opts",
"(",
"self",
")",
":",
"mod_opts",
"=",
"{",
"}",
"for",
"key",
",",
"val",
"in",
"six",
".",
"iteritems",
"(",
"self",
".",
"opts",
")",
":",
"if",
"key",
"==",
"'logger'",
":",
"continue",
"mod_opts",
"[",
"key",
"]",
"="... | Returns a copy of the opts with key bits stripped out | [
"Returns",
"a",
"copy",
"of",
"the",
"opts",
"with",
"key",
"bits",
"stripped",
"out"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1348-L1357 | train | Returns a copy of the opts with key bits stripped out
| 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/minion.py | Minion._load_modules | def _load_modules(self, force_refresh=False, notify=False, grains=None, opts=None):
'''
Return the functions and the returners loaded up from the loader
module
'''
opt_in = True
if not opts:
opts = self.opts
opt_in = False
# if this is a *n... | python | def _load_modules(self, force_refresh=False, notify=False, grains=None, opts=None):
'''
Return the functions and the returners loaded up from the loader
module
'''
opt_in = True
if not opts:
opts = self.opts
opt_in = False
# if this is a *n... | [
"def",
"_load_modules",
"(",
"self",
",",
"force_refresh",
"=",
"False",
",",
"notify",
"=",
"False",
",",
"grains",
"=",
"None",
",",
"opts",
"=",
"None",
")",
":",
"opt_in",
"=",
"True",
"if",
"not",
"opts",
":",
"opts",
"=",
"self",
".",
"opts",
... | Return the functions and the returners loaded up from the loader
module | [
"Return",
"the",
"functions",
"and",
"the",
"returners",
"loaded",
"up",
"from",
"the",
"loader",
"module"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1359-L1419 | train | Load the modules from the loader | 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/minion.py | Minion._fire_master | def _fire_master(self, data=None, tag=None, events=None, pretag=None, timeout=60, sync=True, timeout_handler=None):
'''
Fire an event on the master, or drop message if unable to send.
'''
load = {'id': self.opts['id'],
'cmd': '_minion_event',
'pretag': pre... | python | def _fire_master(self, data=None, tag=None, events=None, pretag=None, timeout=60, sync=True, timeout_handler=None):
'''
Fire an event on the master, or drop message if unable to send.
'''
load = {'id': self.opts['id'],
'cmd': '_minion_event',
'pretag': pre... | [
"def",
"_fire_master",
"(",
"self",
",",
"data",
"=",
"None",
",",
"tag",
"=",
"None",
",",
"events",
"=",
"None",
",",
"pretag",
"=",
"None",
",",
"timeout",
"=",
"60",
",",
"sync",
"=",
"True",
",",
"timeout_handler",
"=",
"None",
")",
":",
"load... | Fire an event on the master, or drop message if unable to send. | [
"Fire",
"an",
"event",
"on",
"the",
"master",
"or",
"drop",
"message",
"if",
"unable",
"to",
"send",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1451-L1492 | train | Fire an event on the master or drop message if unable to send it. | 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/minion.py | Minion.ctx | def ctx(self):
'''
Return a single context manager for the minion's data
'''
if six.PY2:
return contextlib.nested(
self.functions.context_dict.clone(),
self.returners.context_dict.clone(),
self.executors.context_dict.clone(),
... | python | def ctx(self):
'''
Return a single context manager for the minion's data
'''
if six.PY2:
return contextlib.nested(
self.functions.context_dict.clone(),
self.returners.context_dict.clone(),
self.executors.context_dict.clone(),
... | [
"def",
"ctx",
"(",
"self",
")",
":",
"if",
"six",
".",
"PY2",
":",
"return",
"contextlib",
".",
"nested",
"(",
"self",
".",
"functions",
".",
"context_dict",
".",
"clone",
"(",
")",
",",
"self",
".",
"returners",
".",
"context_dict",
".",
"clone",
"(... | Return a single context manager for the minion's data | [
"Return",
"a",
"single",
"context",
"manager",
"for",
"the",
"minion",
"s",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1581-L1596 | train | Return a single context manager for the minion s data
| 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/minion.py | Minion._thread_return | def _thread_return(cls, minion_instance, opts, data):
'''
This method should be used as a threading target, start the actual
minion side execution.
'''
fn_ = os.path.join(minion_instance.proc_dir, data['jid'])
if opts['multiprocessing'] and not salt.utils.platform.is_win... | python | def _thread_return(cls, minion_instance, opts, data):
'''
This method should be used as a threading target, start the actual
minion side execution.
'''
fn_ = os.path.join(minion_instance.proc_dir, data['jid'])
if opts['multiprocessing'] and not salt.utils.platform.is_win... | [
"def",
"_thread_return",
"(",
"cls",
",",
"minion_instance",
",",
"opts",
",",
"data",
")",
":",
"fn_",
"=",
"os",
".",
"path",
".",
"join",
"(",
"minion_instance",
".",
"proc_dir",
",",
"data",
"[",
"'jid'",
"]",
")",
"if",
"opts",
"[",
"'multiprocess... | This method should be used as a threading target, start the actual
minion side execution. | [
"This",
"method",
"should",
"be",
"used",
"as",
"a",
"threading",
"target",
"start",
"the",
"actual",
"minion",
"side",
"execution",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1631-L1851 | train | This method is used as a threading target start the actual
minion side execution. | 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/minion.py | Minion._thread_multi_return | def _thread_multi_return(cls, minion_instance, opts, data):
'''
This method should be used as a threading target, start the actual
minion side execution.
'''
fn_ = os.path.join(minion_instance.proc_dir, data['jid'])
if opts['multiprocessing'] and not salt.utils.platform.... | python | def _thread_multi_return(cls, minion_instance, opts, data):
'''
This method should be used as a threading target, start the actual
minion side execution.
'''
fn_ = os.path.join(minion_instance.proc_dir, data['jid'])
if opts['multiprocessing'] and not salt.utils.platform.... | [
"def",
"_thread_multi_return",
"(",
"cls",
",",
"minion_instance",
",",
"opts",
",",
"data",
")",
":",
"fn_",
"=",
"os",
".",
"path",
".",
"join",
"(",
"minion_instance",
".",
"proc_dir",
",",
"data",
"[",
"'jid'",
"]",
")",
"if",
"opts",
"[",
"'multip... | This method should be used as a threading target, start the actual
minion side execution. | [
"This",
"method",
"should",
"be",
"used",
"as",
"a",
"threading",
"target",
"start",
"the",
"actual",
"minion",
"side",
"execution",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L1854-L1971 | train | This method is used as a threading target start the actual
minion side execution. | 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/minion.py | Minion._return_pub_multi | def _return_pub_multi(self, rets, ret_cmd='_return', timeout=60, sync=True):
'''
Return the data from the executed command to the master server
'''
if not isinstance(rets, list):
rets = [rets]
jids = {}
for ret in rets:
jid = ret.get('jid', ret.get... | python | def _return_pub_multi(self, rets, ret_cmd='_return', timeout=60, sync=True):
'''
Return the data from the executed command to the master server
'''
if not isinstance(rets, list):
rets = [rets]
jids = {}
for ret in rets:
jid = ret.get('jid', ret.get... | [
"def",
"_return_pub_multi",
"(",
"self",
",",
"rets",
",",
"ret_cmd",
"=",
"'_return'",
",",
"timeout",
"=",
"60",
",",
"sync",
"=",
"True",
")",
":",
"if",
"not",
"isinstance",
"(",
"rets",
",",
"list",
")",
":",
"rets",
"=",
"[",
"rets",
"]",
"ji... | Return the data from the executed command to the master server | [
"Return",
"the",
"data",
"from",
"the",
"executed",
"command",
"to",
"the",
"master",
"server"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2058-L2142 | train | Return the data from the executed command to the master 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/minion.py | Minion._state_run | def _state_run(self):
'''
Execute a state run based on information set in the minion config file
'''
if self.opts['startup_states']:
if self.opts.get('master_type', 'str') == 'disable' and \
self.opts.get('file_client', 'remote') == 'remote':
... | python | def _state_run(self):
'''
Execute a state run based on information set in the minion config file
'''
if self.opts['startup_states']:
if self.opts.get('master_type', 'str') == 'disable' and \
self.opts.get('file_client', 'remote') == 'remote':
... | [
"def",
"_state_run",
"(",
"self",
")",
":",
"if",
"self",
".",
"opts",
"[",
"'startup_states'",
"]",
":",
"if",
"self",
".",
"opts",
".",
"get",
"(",
"'master_type'",
",",
"'str'",
")",
"==",
"'disable'",
"and",
"self",
".",
"opts",
".",
"get",
"(",
... | Execute a state run based on information set in the minion config file | [
"Execute",
"a",
"state",
"run",
"based",
"on",
"information",
"set",
"in",
"the",
"minion",
"config",
"file"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2144-L2167 | train | Execute a state run based on information set in the minion config 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/minion.py | Minion._refresh_grains_watcher | def _refresh_grains_watcher(self, refresh_interval_in_minutes):
'''
Create a loop that will fire a pillar refresh to inform a master about a change in the grains of this minion
:param refresh_interval_in_minutes:
:return: None
'''
if '__update_grains' not in self.opts.get... | python | def _refresh_grains_watcher(self, refresh_interval_in_minutes):
'''
Create a loop that will fire a pillar refresh to inform a master about a change in the grains of this minion
:param refresh_interval_in_minutes:
:return: None
'''
if '__update_grains' not in self.opts.get... | [
"def",
"_refresh_grains_watcher",
"(",
"self",
",",
"refresh_interval_in_minutes",
")",
":",
"if",
"'__update_grains'",
"not",
"in",
"self",
".",
"opts",
".",
"get",
"(",
"'schedule'",
",",
"{",
"}",
")",
":",
"if",
"'schedule'",
"not",
"in",
"self",
".",
... | Create a loop that will fire a pillar refresh to inform a master about a change in the grains of this minion
:param refresh_interval_in_minutes:
:return: None | [
"Create",
"a",
"loop",
"that",
"will",
"fire",
"a",
"pillar",
"refresh",
"to",
"inform",
"a",
"master",
"about",
"a",
"change",
"in",
"the",
"grains",
"of",
"this",
"minion",
":",
"param",
"refresh_interval_in_minutes",
":",
":",
"return",
":",
"None"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2169-L2185 | train | Create a loop that will fire a grains refresh to inform a master about a change in the grains of this 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/minion.py | Minion.module_refresh | def module_refresh(self, force_refresh=False, notify=False):
'''
Refresh the functions and returners.
'''
log.debug('Refreshing modules. Notify=%s', notify)
self.functions, self.returners, _, self.executors = self._load_modules(force_refresh, notify=notify)
self.schedule... | python | def module_refresh(self, force_refresh=False, notify=False):
'''
Refresh the functions and returners.
'''
log.debug('Refreshing modules. Notify=%s', notify)
self.functions, self.returners, _, self.executors = self._load_modules(force_refresh, notify=notify)
self.schedule... | [
"def",
"module_refresh",
"(",
"self",
",",
"force_refresh",
"=",
"False",
",",
"notify",
"=",
"False",
")",
":",
"log",
".",
"debug",
"(",
"'Refreshing modules. Notify=%s'",
",",
"notify",
")",
"self",
".",
"functions",
",",
"self",
".",
"returners",
",",
... | Refresh the functions and returners. | [
"Refresh",
"the",
"functions",
"and",
"returners",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2207-L2215 | train | Refresh the functions and returners and executors. | 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/minion.py | Minion.beacons_refresh | def beacons_refresh(self):
'''
Refresh the functions and returners.
'''
log.debug('Refreshing beacons.')
self.beacons = salt.beacons.Beacon(self.opts, self.functions) | python | def beacons_refresh(self):
'''
Refresh the functions and returners.
'''
log.debug('Refreshing beacons.')
self.beacons = salt.beacons.Beacon(self.opts, self.functions) | [
"def",
"beacons_refresh",
"(",
"self",
")",
":",
"log",
".",
"debug",
"(",
"'Refreshing beacons.'",
")",
"self",
".",
"beacons",
"=",
"salt",
".",
"beacons",
".",
"Beacon",
"(",
"self",
".",
"opts",
",",
"self",
".",
"functions",
")"
] | Refresh the functions and returners. | [
"Refresh",
"the",
"functions",
"and",
"returners",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2217-L2222 | train | Refresh the functions and returners and beacons. | 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/minion.py | Minion.matchers_refresh | def matchers_refresh(self):
'''
Refresh the matchers
'''
log.debug('Refreshing matchers.')
self.matchers = salt.loader.matchers(self.opts) | python | def matchers_refresh(self):
'''
Refresh the matchers
'''
log.debug('Refreshing matchers.')
self.matchers = salt.loader.matchers(self.opts) | [
"def",
"matchers_refresh",
"(",
"self",
")",
":",
"log",
".",
"debug",
"(",
"'Refreshing matchers.'",
")",
"self",
".",
"matchers",
"=",
"salt",
".",
"loader",
".",
"matchers",
"(",
"self",
".",
"opts",
")"
] | Refresh the matchers | [
"Refresh",
"the",
"matchers"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2224-L2229 | train | Refresh the matchers dictionary. | 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/minion.py | Minion.pillar_refresh | def pillar_refresh(self, force_refresh=False, notify=False):
'''
Refresh the pillar
'''
if self.connected:
log.debug('Refreshing pillar. Notify: %s', notify)
async_pillar = salt.pillar.get_async_pillar(
self.opts,
self.opts['grains'... | python | def pillar_refresh(self, force_refresh=False, notify=False):
'''
Refresh the pillar
'''
if self.connected:
log.debug('Refreshing pillar. Notify: %s', notify)
async_pillar = salt.pillar.get_async_pillar(
self.opts,
self.opts['grains'... | [
"def",
"pillar_refresh",
"(",
"self",
",",
"force_refresh",
"=",
"False",
",",
"notify",
"=",
"False",
")",
":",
"if",
"self",
".",
"connected",
":",
"log",
".",
"debug",
"(",
"'Refreshing pillar. Notify: %s'",
",",
"notify",
")",
"async_pillar",
"=",
"salt"... | Refresh the pillar | [
"Refresh",
"the",
"pillar"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2233-L2259 | train | Refresh the pillar data. | 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/minion.py | Minion.manage_schedule | def manage_schedule(self, tag, data):
'''
Refresh the functions and returners.
'''
func = data.get('func', None)
name = data.get('name', None)
schedule = data.get('schedule', None)
where = data.get('where', None)
persist = data.get('persist', None)
... | python | def manage_schedule(self, tag, data):
'''
Refresh the functions and returners.
'''
func = data.get('func', None)
name = data.get('name', None)
schedule = data.get('schedule', None)
where = data.get('where', None)
persist = data.get('persist', None)
... | [
"def",
"manage_schedule",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"func",
"=",
"data",
".",
"get",
"(",
"'func'",
",",
"None",
")",
"name",
"=",
"data",
".",
"get",
"(",
"'name'",
",",
"None",
")",
"schedule",
"=",
"data",
".",
"get",
"("... | Refresh the functions and returners. | [
"Refresh",
"the",
"functions",
"and",
"returners",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2261-L2293 | train | Manage the schedule. | 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/minion.py | Minion.manage_beacons | def manage_beacons(self, tag, data):
'''
Manage Beacons
'''
func = data.get('func', None)
name = data.get('name', None)
beacon_data = data.get('beacon_data', None)
include_pillar = data.get('include_pillar', None)
include_opts = data.get('include_opts', No... | python | def manage_beacons(self, tag, data):
'''
Manage Beacons
'''
func = data.get('func', None)
name = data.get('name', None)
beacon_data = data.get('beacon_data', None)
include_pillar = data.get('include_pillar', None)
include_opts = data.get('include_opts', No... | [
"def",
"manage_beacons",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"func",
"=",
"data",
".",
"get",
"(",
"'func'",
",",
"None",
")",
"name",
"=",
"data",
".",
"get",
"(",
"'name'",
",",
"None",
")",
"beacon_data",
"=",
"data",
".",
"get",
"... | Manage Beacons | [
"Manage",
"Beacons"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2295-L2330 | train | Manage Beacons related to a specific tag. | 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/minion.py | Minion.environ_setenv | def environ_setenv(self, tag, data):
'''
Set the salt-minion main process environment according to
the data contained in the minion event data
'''
environ = data.get('environ', None)
if environ is None:
return False
false_unsets = data.get('false_unset... | python | def environ_setenv(self, tag, data):
'''
Set the salt-minion main process environment according to
the data contained in the minion event data
'''
environ = data.get('environ', None)
if environ is None:
return False
false_unsets = data.get('false_unset... | [
"def",
"environ_setenv",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"environ",
"=",
"data",
".",
"get",
"(",
"'environ'",
",",
"None",
")",
"if",
"environ",
"is",
"None",
":",
"return",
"False",
"false_unsets",
"=",
"data",
".",
"get",
"(",
"'fa... | Set the salt-minion main process environment according to
the data contained in the minion event data | [
"Set",
"the",
"salt",
"-",
"minion",
"main",
"process",
"environment",
"according",
"to",
"the",
"data",
"contained",
"in",
"the",
"minion",
"event",
"data"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2332-L2343 | train | Set the salt - minion main process environment according to the data contained in the minion event data. | 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/minion.py | Minion._pre_tune | def _pre_tune(self):
'''
Set the minion running flag and issue the appropriate warnings if
the minion cannot be started or is already running
'''
if self._running is None:
self._running = True
elif self._running is False:
log.error(
... | python | def _pre_tune(self):
'''
Set the minion running flag and issue the appropriate warnings if
the minion cannot be started or is already running
'''
if self._running is None:
self._running = True
elif self._running is False:
log.error(
... | [
"def",
"_pre_tune",
"(",
"self",
")",
":",
"if",
"self",
".",
"_running",
"is",
"None",
":",
"self",
".",
"_running",
"=",
"True",
"elif",
"self",
".",
"_running",
"is",
"False",
":",
"log",
".",
"error",
"(",
"'This %s was scheduled to stop. Not running %s.... | Set the minion running flag and issue the appropriate warnings if
the minion cannot be started or is already running | [
"Set",
"the",
"minion",
"running",
"flag",
"and",
"issue",
"the",
"appropriate",
"warnings",
"if",
"the",
"minion",
"cannot",
"be",
"started",
"or",
"is",
"already",
"running"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2345-L2378 | train | Check if the minion is running and if so issue the appropriate warnings. | 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/minion.py | Minion._mine_send | def _mine_send(self, tag, data):
'''
Send mine data to the master
'''
channel = salt.transport.client.ReqChannel.factory(self.opts)
data['tok'] = self.tok
try:
ret = channel.send(data)
return ret
except SaltReqTimeoutError:
log.... | python | def _mine_send(self, tag, data):
'''
Send mine data to the master
'''
channel = salt.transport.client.ReqChannel.factory(self.opts)
data['tok'] = self.tok
try:
ret = channel.send(data)
return ret
except SaltReqTimeoutError:
log.... | [
"def",
"_mine_send",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"channel",
"=",
"salt",
".",
"transport",
".",
"client",
".",
"ReqChannel",
".",
"factory",
"(",
"self",
".",
"opts",
")",
"data",
"[",
"'tok'",
"]",
"=",
"self",
".",
"tok",
"try... | Send mine data to the master | [
"Send",
"mine",
"data",
"to",
"the",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2380-L2393 | train | Send mine data to the 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/minion.py | Minion._handle_tag_module_refresh | def _handle_tag_module_refresh(self, tag, data):
'''
Handle a module_refresh event
'''
self.module_refresh(
force_refresh=data.get('force_refresh', False),
notify=data.get('notify', False)
) | python | def _handle_tag_module_refresh(self, tag, data):
'''
Handle a module_refresh event
'''
self.module_refresh(
force_refresh=data.get('force_refresh', False),
notify=data.get('notify', False)
) | [
"def",
"_handle_tag_module_refresh",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"self",
".",
"module_refresh",
"(",
"force_refresh",
"=",
"data",
".",
"get",
"(",
"'force_refresh'",
",",
"False",
")",
",",
"notify",
"=",
"data",
".",
"get",
"(",
"'n... | Handle a module_refresh event | [
"Handle",
"a",
"module_refresh",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2395-L2402 | train | Handle a module_refresh event. | 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/minion.py | Minion._handle_tag_pillar_refresh | def _handle_tag_pillar_refresh(self, tag, data):
'''
Handle a pillar_refresh event
'''
yield self.pillar_refresh(
force_refresh=data.get('force_refresh', False),
notify=data.get('notify', False)
) | python | def _handle_tag_pillar_refresh(self, tag, data):
'''
Handle a pillar_refresh event
'''
yield self.pillar_refresh(
force_refresh=data.get('force_refresh', False),
notify=data.get('notify', False)
) | [
"def",
"_handle_tag_pillar_refresh",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"yield",
"self",
".",
"pillar_refresh",
"(",
"force_refresh",
"=",
"data",
".",
"get",
"(",
"'force_refresh'",
",",
"False",
")",
",",
"notify",
"=",
"data",
".",
"get",
... | Handle a pillar_refresh event | [
"Handle",
"a",
"pillar_refresh",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2405-L2412 | train | Handle a pillar_refresh event. | 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/minion.py | Minion._handle_tag_grains_refresh | def _handle_tag_grains_refresh(self, tag, data):
'''
Handle a grains_refresh event
'''
if (data.get('force_refresh', False) or
self.grains_cache != self.opts['grains']):
self.pillar_refresh(force_refresh=True)
self.grains_cache = self.opts['grains'... | python | def _handle_tag_grains_refresh(self, tag, data):
'''
Handle a grains_refresh event
'''
if (data.get('force_refresh', False) or
self.grains_cache != self.opts['grains']):
self.pillar_refresh(force_refresh=True)
self.grains_cache = self.opts['grains'... | [
"def",
"_handle_tag_grains_refresh",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"if",
"(",
"data",
".",
"get",
"(",
"'force_refresh'",
",",
"False",
")",
"or",
"self",
".",
"grains_cache",
"!=",
"self",
".",
"opts",
"[",
"'grains'",
"]",
")",
":",... | Handle a grains_refresh event | [
"Handle",
"a",
"grains_refresh",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2438-L2445 | train | Handle a grains_refresh event | 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/minion.py | Minion._handle_tag_fire_master | def _handle_tag_fire_master(self, tag, data):
'''
Handle a fire_master event
'''
if self.connected:
log.debug('Forwarding master event tag=%s', data['tag'])
self._fire_master(data['data'], data['tag'], data['events'], data['pretag']) | python | def _handle_tag_fire_master(self, tag, data):
'''
Handle a fire_master event
'''
if self.connected:
log.debug('Forwarding master event tag=%s', data['tag'])
self._fire_master(data['data'], data['tag'], data['events'], data['pretag']) | [
"def",
"_handle_tag_fire_master",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"if",
"self",
".",
"connected",
":",
"log",
".",
"debug",
"(",
"'Forwarding master event tag=%s'",
",",
"data",
"[",
"'tag'",
"]",
")",
"self",
".",
"_fire_master",
"(",
"dat... | Handle a fire_master event | [
"Handle",
"a",
"fire_master",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2459-L2465 | train | Handle a fire_master event. | 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/minion.py | Minion._handle_tag_master_disconnected_failback | def _handle_tag_master_disconnected_failback(self, tag, data):
'''
Handle a master_disconnected_failback event
'''
# if the master disconnect event is for a different master, raise an exception
if tag.startswith(master_event(type='disconnected')) and data['master'] != self.opts['... | python | def _handle_tag_master_disconnected_failback(self, tag, data):
'''
Handle a master_disconnected_failback event
'''
# if the master disconnect event is for a different master, raise an exception
if tag.startswith(master_event(type='disconnected')) and data['master'] != self.opts['... | [
"def",
"_handle_tag_master_disconnected_failback",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"# if the master disconnect event is for a different master, raise an exception",
"if",
"tag",
".",
"startswith",
"(",
"master_event",
"(",
"type",
"=",
"'disconnected'",
")",... | Handle a master_disconnected_failback event | [
"Handle",
"a",
"master_disconnected_failback",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2467-L2581 | train | Handle a master_disconnected_failback event. | 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/minion.py | Minion._handle_tag_master_connected | def _handle_tag_master_connected(self, tag, data):
'''
Handle a master_connected event
'''
# handle this event only once. otherwise it will pollute the log
# also if master type is failover all the reconnection work is done
# by `disconnected` event handler and this event... | python | def _handle_tag_master_connected(self, tag, data):
'''
Handle a master_connected event
'''
# handle this event only once. otherwise it will pollute the log
# also if master type is failover all the reconnection work is done
# by `disconnected` event handler and this event... | [
"def",
"_handle_tag_master_connected",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"# handle this event only once. otherwise it will pollute the log",
"# also if master type is failover all the reconnection work is done",
"# by `disconnected` event handler and this event must never happe... | Handle a master_connected event | [
"Handle",
"a",
"master_connected",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2583-L2611 | train | Handle a master_connected event. | 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/minion.py | Minion._handle_tag_schedule_return | def _handle_tag_schedule_return(self, tag, data):
'''
Handle a _schedule_return event
'''
# reporting current connection with master
if data['schedule'].startswith(master_event(type='alive', master='')):
if data['return']:
log.debug(
... | python | def _handle_tag_schedule_return(self, tag, data):
'''
Handle a _schedule_return event
'''
# reporting current connection with master
if data['schedule'].startswith(master_event(type='alive', master='')):
if data['return']:
log.debug(
... | [
"def",
"_handle_tag_schedule_return",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"# reporting current connection with master",
"if",
"data",
"[",
"'schedule'",
"]",
".",
"startswith",
"(",
"master_event",
"(",
"type",
"=",
"'alive'",
",",
"master",
"=",
"''... | Handle a _schedule_return event | [
"Handle",
"a",
"_schedule_return",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2613-L2624 | train | Handle a _schedule_return event. | 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/minion.py | Minion._handle_tag_salt_error | def _handle_tag_salt_error(self, tag, data):
'''
Handle a _salt_error event
'''
if self.connected:
log.debug('Forwarding salt error event tag=%s', tag)
self._fire_master(data, tag) | python | def _handle_tag_salt_error(self, tag, data):
'''
Handle a _salt_error event
'''
if self.connected:
log.debug('Forwarding salt error event tag=%s', tag)
self._fire_master(data, tag) | [
"def",
"_handle_tag_salt_error",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"if",
"self",
".",
"connected",
":",
"log",
".",
"debug",
"(",
"'Forwarding salt error event tag=%s'",
",",
"tag",
")",
"self",
".",
"_fire_master",
"(",
"data",
",",
"tag",
"... | Handle a _salt_error event | [
"Handle",
"a",
"_salt_error",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2626-L2632 | train | Handle a _salt_error event. | 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/minion.py | Minion._handle_tag_salt_auth_creds | def _handle_tag_salt_auth_creds(self, tag, data):
'''
Handle a salt_auth_creds event
'''
key = tuple(data['key'])
log.debug(
'Updating auth data for %s: %s -> %s',
key, salt.crypt.AsyncAuth.creds_map.get(key), data['creds']
)
salt.crypt.Asy... | python | def _handle_tag_salt_auth_creds(self, tag, data):
'''
Handle a salt_auth_creds event
'''
key = tuple(data['key'])
log.debug(
'Updating auth data for %s: %s -> %s',
key, salt.crypt.AsyncAuth.creds_map.get(key), data['creds']
)
salt.crypt.Asy... | [
"def",
"_handle_tag_salt_auth_creds",
"(",
"self",
",",
"tag",
",",
"data",
")",
":",
"key",
"=",
"tuple",
"(",
"data",
"[",
"'key'",
"]",
")",
"log",
".",
"debug",
"(",
"'Updating auth data for %s: %s -> %s'",
",",
"key",
",",
"salt",
".",
"crypt",
".",
... | Handle a salt_auth_creds event | [
"Handle",
"a",
"salt_auth_creds",
"event"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2634-L2643 | train | Handle a salt_auth_creds event. | 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/minion.py | Minion.handle_event | def handle_event(self, package):
'''
Handle an event from the epull_sock (all local minion events)
'''
if not self.ready:
raise tornado.gen.Return()
tag, data = salt.utils.event.SaltEvent.unpack(package)
log.debug(
'Minion of \'%s\' is handling eve... | python | def handle_event(self, package):
'''
Handle an event from the epull_sock (all local minion events)
'''
if not self.ready:
raise tornado.gen.Return()
tag, data = salt.utils.event.SaltEvent.unpack(package)
log.debug(
'Minion of \'%s\' is handling eve... | [
"def",
"handle_event",
"(",
"self",
",",
"package",
")",
":",
"if",
"not",
"self",
".",
"ready",
":",
"raise",
"tornado",
".",
"gen",
".",
"Return",
"(",
")",
"tag",
",",
"data",
"=",
"salt",
".",
"utils",
".",
"event",
".",
"SaltEvent",
".",
"unpa... | Handle an event from the epull_sock (all local minion events) | [
"Handle",
"an",
"event",
"from",
"the",
"epull_sock",
"(",
"all",
"local",
"minion",
"events",
")"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2646-L2679 | train | Handle an event from the epull_sock | 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/minion.py | Minion._fallback_cleanups | def _fallback_cleanups(self):
'''
Fallback cleanup routines, attempting to fix leaked processes, threads, etc.
'''
# Add an extra fallback in case a forked process leaks through
multiprocessing.active_children()
# Cleanup Windows threads
if not salt.utils.platfor... | python | def _fallback_cleanups(self):
'''
Fallback cleanup routines, attempting to fix leaked processes, threads, etc.
'''
# Add an extra fallback in case a forked process leaks through
multiprocessing.active_children()
# Cleanup Windows threads
if not salt.utils.platfor... | [
"def",
"_fallback_cleanups",
"(",
"self",
")",
":",
"# Add an extra fallback in case a forked process leaks through",
"multiprocessing",
".",
"active_children",
"(",
")",
"# Cleanup Windows threads",
"if",
"not",
"salt",
".",
"utils",
".",
"platform",
".",
"is_windows",
"... | Fallback cleanup routines, attempting to fix leaked processes, threads, etc. | [
"Fallback",
"cleanup",
"routines",
"attempting",
"to",
"fix",
"leaked",
"processes",
"threads",
"etc",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2681-L2698 | train | Fallback cleanup routines attempting to fix leaked processes threads etc. | 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/minion.py | Minion._setup_core | def _setup_core(self):
'''
Set up the core minion attributes.
This is safe to call multiple times.
'''
if not self.ready:
# First call. Initialize.
self.functions, self.returners, self.function_errors, self.executors = self._load_modules()
self... | python | def _setup_core(self):
'''
Set up the core minion attributes.
This is safe to call multiple times.
'''
if not self.ready:
# First call. Initialize.
self.functions, self.returners, self.function_errors, self.executors = self._load_modules()
self... | [
"def",
"_setup_core",
"(",
"self",
")",
":",
"if",
"not",
"self",
".",
"ready",
":",
"# First call. Initialize.",
"self",
".",
"functions",
",",
"self",
".",
"returners",
",",
"self",
".",
"function_errors",
",",
"self",
".",
"executors",
"=",
"self",
".",... | Set up the core minion attributes.
This is safe to call multiple times. | [
"Set",
"up",
"the",
"core",
"minion",
"attributes",
".",
"This",
"is",
"safe",
"to",
"call",
"multiple",
"times",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2700-L2716 | train | Setup the core minion attributes. | 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/minion.py | Minion.setup_beacons | def setup_beacons(self, before_connect=False):
'''
Set up the beacons.
This is safe to call multiple times.
'''
self._setup_core()
loop_interval = self.opts['loop_interval']
new_periodic_callbacks = {}
if 'beacons' not in self.periodic_callbacks:
... | python | def setup_beacons(self, before_connect=False):
'''
Set up the beacons.
This is safe to call multiple times.
'''
self._setup_core()
loop_interval = self.opts['loop_interval']
new_periodic_callbacks = {}
if 'beacons' not in self.periodic_callbacks:
... | [
"def",
"setup_beacons",
"(",
"self",
",",
"before_connect",
"=",
"False",
")",
":",
"self",
".",
"_setup_core",
"(",
")",
"loop_interval",
"=",
"self",
".",
"opts",
"[",
"'loop_interval'",
"]",
"new_periodic_callbacks",
"=",
"{",
"}",
"if",
"'beacons'",
"not... | Set up the beacons.
This is safe to call multiple times. | [
"Set",
"up",
"the",
"beacons",
".",
"This",
"is",
"safe",
"to",
"call",
"multiple",
"times",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2718-L2755 | train | Setup the beacons. | 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/minion.py | Minion.setup_scheduler | def setup_scheduler(self, before_connect=False):
'''
Set up the scheduler.
This is safe to call multiple times.
'''
self._setup_core()
loop_interval = self.opts['loop_interval']
new_periodic_callbacks = {}
if 'schedule' not in self.periodic_callbacks:
... | python | def setup_scheduler(self, before_connect=False):
'''
Set up the scheduler.
This is safe to call multiple times.
'''
self._setup_core()
loop_interval = self.opts['loop_interval']
new_periodic_callbacks = {}
if 'schedule' not in self.periodic_callbacks:
... | [
"def",
"setup_scheduler",
"(",
"self",
",",
"before_connect",
"=",
"False",
")",
":",
"self",
".",
"_setup_core",
"(",
")",
"loop_interval",
"=",
"self",
".",
"opts",
"[",
"'loop_interval'",
"]",
"new_periodic_callbacks",
"=",
"{",
"}",
"if",
"'schedule'",
"... | Set up the scheduler.
This is safe to call multiple times. | [
"Set",
"up",
"the",
"scheduler",
".",
"This",
"is",
"safe",
"to",
"call",
"multiple",
"times",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2757-L2808 | train | Setup the scheduler for the current 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/minion.py | Minion.tune_in | def tune_in(self, start=True):
'''
Lock onto the publisher. This is the main event loop for the minion
:rtype : None
'''
self._pre_tune()
log.debug('Minion \'%s\' trying to tune in', self.opts['id'])
if start:
if self.opts.get('beacons_before_connect... | python | def tune_in(self, start=True):
'''
Lock onto the publisher. This is the main event loop for the minion
:rtype : None
'''
self._pre_tune()
log.debug('Minion \'%s\' trying to tune in', self.opts['id'])
if start:
if self.opts.get('beacons_before_connect... | [
"def",
"tune_in",
"(",
"self",
",",
"start",
"=",
"True",
")",
":",
"self",
".",
"_pre_tune",
"(",
")",
"log",
".",
"debug",
"(",
"'Minion \\'%s\\' trying to tune in'",
",",
"self",
".",
"opts",
"[",
"'id'",
"]",
")",
"if",
"start",
":",
"if",
"self",
... | Lock onto the publisher. This is the main event loop for the minion
:rtype : None | [
"Lock",
"onto",
"the",
"publisher",
".",
"This",
"is",
"the",
"main",
"event",
"loop",
"for",
"the",
"minion",
":",
"rtype",
":",
"None"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2811-L2883 | train | Start the minion tuning in. | 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/minion.py | Minion.destroy | def destroy(self):
'''
Tear down the minion
'''
if self._running is False:
return
self._running = False
if hasattr(self, 'schedule'):
del self.schedule
if hasattr(self, 'pub_channel') and self.pub_channel is not None:
self.pub_... | python | def destroy(self):
'''
Tear down the minion
'''
if self._running is False:
return
self._running = False
if hasattr(self, 'schedule'):
del self.schedule
if hasattr(self, 'pub_channel') and self.pub_channel is not None:
self.pub_... | [
"def",
"destroy",
"(",
"self",
")",
":",
"if",
"self",
".",
"_running",
"is",
"False",
":",
"return",
"self",
".",
"_running",
"=",
"False",
"if",
"hasattr",
"(",
"self",
",",
"'schedule'",
")",
":",
"del",
"self",
".",
"schedule",
"if",
"hasattr",
"... | Tear down the minion | [
"Tear",
"down",
"the",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2928-L2945 | train | Tear down 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/minion.py | Syndic._handle_decoded_payload | def _handle_decoded_payload(self, data):
'''
Override this method if you wish to handle the decoded data
differently.
'''
# TODO: even do this??
data['to'] = int(data.get('to', self.opts['timeout'])) - 1
# Only forward the command if it didn't originate from ourse... | python | def _handle_decoded_payload(self, data):
'''
Override this method if you wish to handle the decoded data
differently.
'''
# TODO: even do this??
data['to'] = int(data.get('to', self.opts['timeout'])) - 1
# Only forward the command if it didn't originate from ourse... | [
"def",
"_handle_decoded_payload",
"(",
"self",
",",
"data",
")",
":",
"# TODO: even do this??",
"data",
"[",
"'to'",
"]",
"=",
"int",
"(",
"data",
".",
"get",
"(",
"'to'",
",",
"self",
".",
"opts",
"[",
"'timeout'",
"]",
")",
")",
"-",
"1",
"# Only for... | Override this method if you wish to handle the decoded data
differently. | [
"Override",
"this",
"method",
"if",
"you",
"wish",
"to",
"handle",
"the",
"decoded",
"data",
"differently",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2969-L2978 | train | Handle the decoded payload. | 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/minion.py | Syndic.syndic_cmd | def syndic_cmd(self, data):
'''
Take the now clear load and forward it on to the client cmd
'''
# Set up default tgt_type
if 'tgt_type' not in data:
data['tgt_type'] = 'glob'
kwargs = {}
# optionally add a few fields to the publish data
for fi... | python | def syndic_cmd(self, data):
'''
Take the now clear load and forward it on to the client cmd
'''
# Set up default tgt_type
if 'tgt_type' not in data:
data['tgt_type'] = 'glob'
kwargs = {}
# optionally add a few fields to the publish data
for fi... | [
"def",
"syndic_cmd",
"(",
"self",
",",
"data",
")",
":",
"# Set up default tgt_type",
"if",
"'tgt_type'",
"not",
"in",
"data",
":",
"data",
"[",
"'tgt_type'",
"]",
"=",
"'glob'",
"kwargs",
"=",
"{",
"}",
"# optionally add a few fields to the publish data",
"for",
... | Take the now clear load and forward it on to the client cmd | [
"Take",
"the",
"now",
"clear",
"load",
"and",
"forward",
"it",
"on",
"to",
"the",
"client",
"cmd"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L2980-L3010 | train | Forward the load and forward it on to the client cmd
Take the now clear load and forward it on to the client cmd
Set up default tgt_type if not set | 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/minion.py | Syndic.tune_in_no_block | def tune_in_no_block(self):
'''
Executes the tune_in sequence but omits extra logging and the
management of the event bus assuming that these are handled outside
the tune_in sequence
'''
# Instantiate the local client
self.local = salt.client.get_local_client(
... | python | def tune_in_no_block(self):
'''
Executes the tune_in sequence but omits extra logging and the
management of the event bus assuming that these are handled outside
the tune_in sequence
'''
# Instantiate the local client
self.local = salt.client.get_local_client(
... | [
"def",
"tune_in_no_block",
"(",
"self",
")",
":",
"# Instantiate the local client",
"self",
".",
"local",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"self",
".",
"opts",
"[",
"'_minion_conf_file'",
"]",
",",
"io_loop",
"=",
"self",
".",
"io_loop... | Executes the tune_in sequence but omits extra logging and the
management of the event bus assuming that these are handled outside
the tune_in sequence | [
"Executes",
"the",
"tune_in",
"sequence",
"but",
"omits",
"extra",
"logging",
"and",
"the",
"management",
"of",
"the",
"event",
"bus",
"assuming",
"that",
"these",
"are",
"handled",
"outside",
"the",
"tune_in",
"sequence"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3034-L3045 | train | Executes the tune_in sequence but omits extra logging and the
management of the event bus assuming that these are handled outside the tune_in sequence | 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/minion.py | Syndic.destroy | def destroy(self):
'''
Tear down the syndic minion
'''
# We borrowed the local clients poller so give it back before
# it's destroyed. Reset the local poller reference.
super(Syndic, self).destroy()
if hasattr(self, 'local'):
del self.local
if... | python | def destroy(self):
'''
Tear down the syndic minion
'''
# We borrowed the local clients poller so give it back before
# it's destroyed. Reset the local poller reference.
super(Syndic, self).destroy()
if hasattr(self, 'local'):
del self.local
if... | [
"def",
"destroy",
"(",
"self",
")",
":",
"# We borrowed the local clients poller so give it back before",
"# it's destroyed. Reset the local poller reference.",
"super",
"(",
"Syndic",
",",
"self",
")",
".",
"destroy",
"(",
")",
"if",
"hasattr",
"(",
"self",
",",
"'loca... | Tear down the syndic minion | [
"Tear",
"down",
"the",
"syndic",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3074-L3085 | train | Tear down the syndic 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/minion.py | SyndicManager._spawn_syndics | def _spawn_syndics(self):
'''
Spawn all the coroutines which will sign in the syndics
'''
self._syndics = OrderedDict() # mapping of opts['master'] -> syndic
masters = self.opts['master']
if not isinstance(masters, list):
masters = [masters]
for maste... | python | def _spawn_syndics(self):
'''
Spawn all the coroutines which will sign in the syndics
'''
self._syndics = OrderedDict() # mapping of opts['master'] -> syndic
masters = self.opts['master']
if not isinstance(masters, list):
masters = [masters]
for maste... | [
"def",
"_spawn_syndics",
"(",
"self",
")",
":",
"self",
".",
"_syndics",
"=",
"OrderedDict",
"(",
")",
"# mapping of opts['master'] -> syndic",
"masters",
"=",
"self",
".",
"opts",
"[",
"'master'",
"]",
"if",
"not",
"isinstance",
"(",
"masters",
",",
"list",
... | Spawn all the coroutines which will sign in the syndics | [
"Spawn",
"all",
"the",
"coroutines",
"which",
"will",
"sign",
"in",
"the",
"syndics"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3142-L3153 | train | Spawn all the coroutines which will sign in the syndics
| 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/minion.py | SyndicManager._connect_syndic | def _connect_syndic(self, opts):
'''
Create a syndic, and asynchronously connect it to a master
'''
auth_wait = opts['acceptance_wait_time']
failed = False
while True:
if failed:
if auth_wait < self.max_auth_wait:
auth_wait ... | python | def _connect_syndic(self, opts):
'''
Create a syndic, and asynchronously connect it to a master
'''
auth_wait = opts['acceptance_wait_time']
failed = False
while True:
if failed:
if auth_wait < self.max_auth_wait:
auth_wait ... | [
"def",
"_connect_syndic",
"(",
"self",
",",
"opts",
")",
":",
"auth_wait",
"=",
"opts",
"[",
"'acceptance_wait_time'",
"]",
"failed",
"=",
"False",
"while",
"True",
":",
"if",
"failed",
":",
"if",
"auth_wait",
"<",
"self",
".",
"max_auth_wait",
":",
"auth_... | Create a syndic, and asynchronously connect it to a master | [
"Create",
"a",
"syndic",
"and",
"asynchronously",
"connect",
"it",
"to",
"a",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3156-L3210 | train | Connect to a master and wait for it to finish. | 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/minion.py | SyndicManager._mark_master_dead | def _mark_master_dead(self, master):
'''
Mark a master as dead. This will start the sign-in routine
'''
# if its connected, mark it dead
if self._syndics[master].done():
syndic = self._syndics[master].result() # pylint: disable=no-member
self._syndics[mas... | python | def _mark_master_dead(self, master):
'''
Mark a master as dead. This will start the sign-in routine
'''
# if its connected, mark it dead
if self._syndics[master].done():
syndic = self._syndics[master].result() # pylint: disable=no-member
self._syndics[mas... | [
"def",
"_mark_master_dead",
"(",
"self",
",",
"master",
")",
":",
"# if its connected, mark it dead",
"if",
"self",
".",
"_syndics",
"[",
"master",
"]",
".",
"done",
"(",
")",
":",
"syndic",
"=",
"self",
".",
"_syndics",
"[",
"master",
"]",
".",
"result",
... | Mark a master as dead. This will start the sign-in routine | [
"Mark",
"a",
"master",
"as",
"dead",
".",
"This",
"will",
"start",
"the",
"sign",
"-",
"in",
"routine"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3212-L3225 | train | Mark a master as dead. This will start the sign - in routine
. | 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/minion.py | SyndicManager._call_syndic | def _call_syndic(self, func, args=(), kwargs=None, master_id=None):
'''
Wrapper to call a given func on a syndic, best effort to get the one you asked for
'''
if kwargs is None:
kwargs = {}
successful = False
# Call for each master
for master, syndic_f... | python | def _call_syndic(self, func, args=(), kwargs=None, master_id=None):
'''
Wrapper to call a given func on a syndic, best effort to get the one you asked for
'''
if kwargs is None:
kwargs = {}
successful = False
# Call for each master
for master, syndic_f... | [
"def",
"_call_syndic",
"(",
"self",
",",
"func",
",",
"args",
"=",
"(",
")",
",",
"kwargs",
"=",
"None",
",",
"master_id",
"=",
"None",
")",
":",
"if",
"kwargs",
"is",
"None",
":",
"kwargs",
"=",
"{",
"}",
"successful",
"=",
"False",
"# Call for each... | Wrapper to call a given func on a syndic, best effort to get the one you asked for | [
"Wrapper",
"to",
"call",
"a",
"given",
"func",
"on",
"a",
"syndic",
"best",
"effort",
"to",
"get",
"the",
"one",
"you",
"asked",
"for"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3227-L3253 | train | Wrapper to call a given function on a syndic | 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/minion.py | SyndicManager._return_pub_syndic | def _return_pub_syndic(self, values, master_id=None):
'''
Wrapper to call the '_return_pub_multi' a syndic, best effort to get the one you asked for
'''
func = '_return_pub_multi'
for master, syndic_future in self.iter_master_options(master_id):
if not syndic_future.d... | python | def _return_pub_syndic(self, values, master_id=None):
'''
Wrapper to call the '_return_pub_multi' a syndic, best effort to get the one you asked for
'''
func = '_return_pub_multi'
for master, syndic_future in self.iter_master_options(master_id):
if not syndic_future.d... | [
"def",
"_return_pub_syndic",
"(",
"self",
",",
"values",
",",
"master_id",
"=",
"None",
")",
":",
"func",
"=",
"'_return_pub_multi'",
"for",
"master",
",",
"syndic_future",
"in",
"self",
".",
"iter_master_options",
"(",
"master_id",
")",
":",
"if",
"not",
"s... | Wrapper to call the '_return_pub_multi' a syndic, best effort to get the one you asked for | [
"Wrapper",
"to",
"call",
"the",
"_return_pub_multi",
"a",
"syndic",
"best",
"effort",
"to",
"get",
"the",
"one",
"you",
"asked",
"for"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3255-L3295 | train | Wrapper to call _return_pub_multi and return the master_id of the first available pub_id | 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/minion.py | SyndicManager.iter_master_options | def iter_master_options(self, master_id=None):
'''
Iterate (in order) over your options for master
'''
masters = list(self._syndics.keys())
if self.opts['syndic_failover'] == 'random':
shuffle(masters)
if master_id not in self._syndics:
master_id =... | python | def iter_master_options(self, master_id=None):
'''
Iterate (in order) over your options for master
'''
masters = list(self._syndics.keys())
if self.opts['syndic_failover'] == 'random':
shuffle(masters)
if master_id not in self._syndics:
master_id =... | [
"def",
"iter_master_options",
"(",
"self",
",",
"master_id",
"=",
"None",
")",
":",
"masters",
"=",
"list",
"(",
"self",
".",
"_syndics",
".",
"keys",
"(",
")",
")",
"if",
"self",
".",
"opts",
"[",
"'syndic_failover'",
"]",
"==",
"'random'",
":",
"shuf... | Iterate (in order) over your options for master | [
"Iterate",
"(",
"in",
"order",
")",
"over",
"your",
"options",
"for",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3297-L3313 | train | Iterate over the options for master_id. | 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/minion.py | SyndicManager.tune_in | def tune_in(self):
'''
Lock onto the publisher. This is the main event loop for the syndic
'''
self._spawn_syndics()
# Instantiate the local client
self.local = salt.client.get_local_client(
self.opts['_minion_conf_file'], io_loop=self.io_loop)
self.lo... | python | def tune_in(self):
'''
Lock onto the publisher. This is the main event loop for the syndic
'''
self._spawn_syndics()
# Instantiate the local client
self.local = salt.client.get_local_client(
self.opts['_minion_conf_file'], io_loop=self.io_loop)
self.lo... | [
"def",
"tune_in",
"(",
"self",
")",
":",
"self",
".",
"_spawn_syndics",
"(",
")",
"# Instantiate the local client",
"self",
".",
"local",
"=",
"salt",
".",
"client",
".",
"get_local_client",
"(",
"self",
".",
"opts",
"[",
"'_minion_conf_file'",
"]",
",",
"io... | Lock onto the publisher. This is the main event loop for the syndic | [
"Lock",
"onto",
"the",
"publisher",
".",
"This",
"is",
"the",
"main",
"event",
"loop",
"for",
"the",
"syndic"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3324-L3352 | train | Tune in the syndic. | 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/minion.py | ProxyMinion._post_master_init | def _post_master_init(self, master):
'''
Function to finish init after connecting to a master
This is primarily loading modules, pillars, etc. (since they need
to know which master they connected to)
If this function is changed, please check Minion._post_master_init
to ... | python | def _post_master_init(self, master):
'''
Function to finish init after connecting to a master
This is primarily loading modules, pillars, etc. (since they need
to know which master they connected to)
If this function is changed, please check Minion._post_master_init
to ... | [
"def",
"_post_master_init",
"(",
"self",
",",
"master",
")",
":",
"mp_call",
"=",
"_metaproxy_call",
"(",
"self",
".",
"opts",
",",
"'post_master_init'",
")",
"return",
"mp_call",
"(",
"self",
",",
"master",
")"
] | Function to finish init after connecting to a master
This is primarily loading modules, pillars, etc. (since they need
to know which master they connected to)
If this function is changed, please check Minion._post_master_init
to see if those changes need to be propagated.
Prox... | [
"Function",
"to",
"finish",
"init",
"after",
"connecting",
"to",
"a",
"master"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3471-L3486 | train | Function to finish init after connecting to a 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/minion.py | ProxyMinion._target_load | def _target_load(self, load):
'''
Verify that the publication is valid and applies to this minion
'''
mp_call = _metaproxy_call(self.opts, 'target_load')
return mp_call(self, load) | python | def _target_load(self, load):
'''
Verify that the publication is valid and applies to this minion
'''
mp_call = _metaproxy_call(self.opts, 'target_load')
return mp_call(self, load) | [
"def",
"_target_load",
"(",
"self",
",",
"load",
")",
":",
"mp_call",
"=",
"_metaproxy_call",
"(",
"self",
".",
"opts",
",",
"'target_load'",
")",
"return",
"mp_call",
"(",
"self",
",",
"load",
")"
] | Verify that the publication is valid and applies to this minion | [
"Verify",
"that",
"the",
"publication",
"is",
"valid",
"and",
"applies",
"to",
"this",
"minion"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3488-L3493 | train | Return the target load for this 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/minion.py | SProxyMinion.gen_modules | def gen_modules(self, initial_load=False):
'''
Tell the minion to reload the execution modules
CLI Example:
.. code-block:: bash
salt '*' sys.reload_modules
'''
self.opts['grains'] = salt.loader.grains(self.opts)
self.opts['pillar'] = salt.pillar.ge... | python | def gen_modules(self, initial_load=False):
'''
Tell the minion to reload the execution modules
CLI Example:
.. code-block:: bash
salt '*' sys.reload_modules
'''
self.opts['grains'] = salt.loader.grains(self.opts)
self.opts['pillar'] = salt.pillar.ge... | [
"def",
"gen_modules",
"(",
"self",
",",
"initial_load",
"=",
"False",
")",
":",
"self",
".",
"opts",
"[",
"'grains'",
"]",
"=",
"salt",
".",
"loader",
".",
"grains",
"(",
"self",
".",
"opts",
")",
"self",
".",
"opts",
"[",
"'pillar'",
"]",
"=",
"sa... | Tell the minion to reload the execution modules
CLI Example:
.. code-block:: bash
salt '*' sys.reload_modules | [
"Tell",
"the",
"minion",
"to",
"reload",
"the",
"execution",
"modules"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/minion.py#L3528-L3607 | train | Generate the modules for the current 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/states/pkg.py | _get_comparison_spec | def _get_comparison_spec(pkgver):
'''
Return a tuple containing the comparison operator and the version. If no
comparison operator was passed, the comparison is assumed to be an "equals"
comparison, and "==" will be the operator returned.
'''
oper, verstr = salt.utils.pkg.split_comparison(pkgver... | python | def _get_comparison_spec(pkgver):
'''
Return a tuple containing the comparison operator and the version. If no
comparison operator was passed, the comparison is assumed to be an "equals"
comparison, and "==" will be the operator returned.
'''
oper, verstr = salt.utils.pkg.split_comparison(pkgver... | [
"def",
"_get_comparison_spec",
"(",
"pkgver",
")",
":",
"oper",
",",
"verstr",
"=",
"salt",
".",
"utils",
".",
"pkg",
".",
"split_comparison",
"(",
"pkgver",
".",
"strip",
"(",
")",
")",
"if",
"oper",
"in",
"(",
"'='",
",",
"''",
")",
":",
"oper",
... | Return a tuple containing the comparison operator and the version. If no
comparison operator was passed, the comparison is assumed to be an "equals"
comparison, and "==" will be the operator returned. | [
"Return",
"a",
"tuple",
"containing",
"the",
"comparison",
"operator",
"and",
"the",
"version",
".",
"If",
"no",
"comparison",
"operator",
"was",
"passed",
"the",
"comparison",
"is",
"assumed",
"to",
"be",
"an",
"equals",
"comparison",
"and",
"==",
"will",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L153-L162 | train | Return a tuple containing the comparison operator and the version of the no
. | 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/pkg.py | _parse_version_string | def _parse_version_string(version_conditions_string):
'''
Returns a list of two-tuples containing (operator, version).
'''
result = []
version_conditions_string = version_conditions_string.strip()
if not version_conditions_string:
return result
for version_condition in version_condit... | python | def _parse_version_string(version_conditions_string):
'''
Returns a list of two-tuples containing (operator, version).
'''
result = []
version_conditions_string = version_conditions_string.strip()
if not version_conditions_string:
return result
for version_condition in version_condit... | [
"def",
"_parse_version_string",
"(",
"version_conditions_string",
")",
":",
"result",
"=",
"[",
"]",
"version_conditions_string",
"=",
"version_conditions_string",
".",
"strip",
"(",
")",
"if",
"not",
"version_conditions_string",
":",
"return",
"result",
"for",
"versi... | Returns a list of two-tuples containing (operator, version). | [
"Returns",
"a",
"list",
"of",
"two",
"-",
"tuples",
"containing",
"(",
"operator",
"version",
")",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L165-L176 | train | Returns a list of two - tuples containing operator and version. | 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/pkg.py | _fulfills_version_string | def _fulfills_version_string(installed_versions, version_conditions_string, ignore_epoch=False, allow_updates=False):
'''
Returns True if any of the installed versions match the specified version conditions,
otherwise returns False.
installed_versions
The installed versions
version_conditi... | python | def _fulfills_version_string(installed_versions, version_conditions_string, ignore_epoch=False, allow_updates=False):
'''
Returns True if any of the installed versions match the specified version conditions,
otherwise returns False.
installed_versions
The installed versions
version_conditi... | [
"def",
"_fulfills_version_string",
"(",
"installed_versions",
",",
"version_conditions_string",
",",
"ignore_epoch",
"=",
"False",
",",
"allow_updates",
"=",
"False",
")",
":",
"version_conditions",
"=",
"_parse_version_string",
"(",
"version_conditions_string",
")",
"for... | Returns True if any of the installed versions match the specified version conditions,
otherwise returns False.
installed_versions
The installed versions
version_conditions_string
The string containing all version conditions. E.G.
1.2.3-4
>=1.2.3-4
>=1.2.3-4, <2.3.4-... | [
"Returns",
"True",
"if",
"any",
"of",
"the",
"installed",
"versions",
"match",
"the",
"specified",
"version",
"conditions",
"otherwise",
"returns",
"False",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L179-L215 | train | Returns True if any of the installed versions match the specified version conditions string. | 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/pkg.py | _fulfills_version_spec | def _fulfills_version_spec(versions, oper, desired_version,
ignore_epoch=False):
'''
Returns True if any of the installed versions match the specified version,
otherwise returns False
'''
cmp_func = __salt__.get('pkg.version_cmp')
# stripping "with_origin" dict wrapper... | python | def _fulfills_version_spec(versions, oper, desired_version,
ignore_epoch=False):
'''
Returns True if any of the installed versions match the specified version,
otherwise returns False
'''
cmp_func = __salt__.get('pkg.version_cmp')
# stripping "with_origin" dict wrapper... | [
"def",
"_fulfills_version_spec",
"(",
"versions",
",",
"oper",
",",
"desired_version",
",",
"ignore_epoch",
"=",
"False",
")",
":",
"cmp_func",
"=",
"__salt__",
".",
"get",
"(",
"'pkg.version_cmp'",
")",
"# stripping \"with_origin\" dict wrapper",
"if",
"salt",
".",... | Returns True if any of the installed versions match the specified version,
otherwise returns False | [
"Returns",
"True",
"if",
"any",
"of",
"the",
"installed",
"versions",
"match",
"the",
"specified",
"version",
"otherwise",
"returns",
"False"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L218-L237 | train | Returns True if any of the installed versions match the specified version otherwise returns False | 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/pkg.py | _find_unpurge_targets | def _find_unpurge_targets(desired, **kwargs):
'''
Find packages which are marked to be purged but can't yet be removed
because they are dependencies for other installed packages. These are the
packages which will need to be 'unpurged' because they are part of
pkg.installed states. This really just a... | python | def _find_unpurge_targets(desired, **kwargs):
'''
Find packages which are marked to be purged but can't yet be removed
because they are dependencies for other installed packages. These are the
packages which will need to be 'unpurged' because they are part of
pkg.installed states. This really just a... | [
"def",
"_find_unpurge_targets",
"(",
"desired",
",",
"*",
"*",
"kwargs",
")",
":",
"return",
"[",
"x",
"for",
"x",
"in",
"desired",
"if",
"x",
"in",
"__salt__",
"[",
"'pkg.list_pkgs'",
"]",
"(",
"purge_desired",
"=",
"True",
",",
"*",
"*",
"kwargs",
")... | Find packages which are marked to be purged but can't yet be removed
because they are dependencies for other installed packages. These are the
packages which will need to be 'unpurged' because they are part of
pkg.installed states. This really just applies to Debian-based Linuxes. | [
"Find",
"packages",
"which",
"are",
"marked",
"to",
"be",
"purged",
"but",
"can",
"t",
"yet",
"be",
"removed",
"because",
"they",
"are",
"dependencies",
"for",
"other",
"installed",
"packages",
".",
"These",
"are",
"the",
"packages",
"which",
"will",
"need",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L240-L250 | train | Find packages which can t be purged but can t yet be removed. | 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/pkg.py | _find_download_targets | def _find_download_targets(name=None,
version=None,
pkgs=None,
normalize=True,
skip_suggestions=False,
ignore_epoch=False,
**kwargs):
'''
Inspect the ... | python | def _find_download_targets(name=None,
version=None,
pkgs=None,
normalize=True,
skip_suggestions=False,
ignore_epoch=False,
**kwargs):
'''
Inspect the ... | [
"def",
"_find_download_targets",
"(",
"name",
"=",
"None",
",",
"version",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"normalize",
"=",
"True",
",",
"skip_suggestions",
"=",
"False",
",",
"ignore_epoch",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
... | Inspect the arguments to pkg.downloaded and discover what packages need to
be downloaded. Return a dict of packages to download. | [
"Inspect",
"the",
"arguments",
"to",
"pkg",
".",
"downloaded",
"and",
"discover",
"what",
"packages",
"need",
"to",
"be",
"downloaded",
".",
"Return",
"a",
"dict",
"of",
"packages",
"to",
"download",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L253-L372 | train | Return a dict of packages to download. | 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/pkg.py | _find_advisory_targets | def _find_advisory_targets(name=None,
advisory_ids=None,
**kwargs):
'''
Inspect the arguments to pkg.patch_installed and discover what advisory
patches need to be installed. Return a dict of advisory patches to install.
'''
cur_patches = __salt__... | python | def _find_advisory_targets(name=None,
advisory_ids=None,
**kwargs):
'''
Inspect the arguments to pkg.patch_installed and discover what advisory
patches need to be installed. Return a dict of advisory patches to install.
'''
cur_patches = __salt__... | [
"def",
"_find_advisory_targets",
"(",
"name",
"=",
"None",
",",
"advisory_ids",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"cur_patches",
"=",
"__salt__",
"[",
"'pkg.list_installed_patches'",
"]",
"(",
"*",
"*",
"kwargs",
")",
"if",
"advisory_ids",
":",... | Inspect the arguments to pkg.patch_installed and discover what advisory
patches need to be installed. Return a dict of advisory patches to install. | [
"Inspect",
"the",
"arguments",
"to",
"pkg",
".",
"patch_installed",
"and",
"discover",
"what",
"advisory",
"patches",
"need",
"to",
"be",
"installed",
".",
"Return",
"a",
"dict",
"of",
"advisory",
"patches",
"to",
"install",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L375-L412 | train | Find the advisory patches that need to be installed. | 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/pkg.py | _find_remove_targets | def _find_remove_targets(name=None,
version=None,
pkgs=None,
normalize=True,
ignore_epoch=False,
**kwargs):
'''
Inspect the arguments to pkg.removed and discover what packages need to
... | python | def _find_remove_targets(name=None,
version=None,
pkgs=None,
normalize=True,
ignore_epoch=False,
**kwargs):
'''
Inspect the arguments to pkg.removed and discover what packages need to
... | [
"def",
"_find_remove_targets",
"(",
"name",
"=",
"None",
",",
"version",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"normalize",
"=",
"True",
",",
"ignore_epoch",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"__grains__",
"[",
"'os'",
"]",
... | Inspect the arguments to pkg.removed and discover what packages need to
be removed. Return a dict of packages to remove. | [
"Inspect",
"the",
"arguments",
"to",
"pkg",
".",
"removed",
"and",
"discover",
"what",
"packages",
"need",
"to",
"be",
"removed",
".",
"Return",
"a",
"dict",
"of",
"packages",
"to",
"remove",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L415-L493 | train | Find packages that need to be removed from the current version of the current version. | 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/pkg.py | _find_install_targets | def _find_install_targets(name=None,
version=None,
pkgs=None,
sources=None,
skip_suggestions=False,
pkg_verify=False,
normalize=True,
igno... | python | def _find_install_targets(name=None,
version=None,
pkgs=None,
sources=None,
skip_suggestions=False,
pkg_verify=False,
normalize=True,
igno... | [
"def",
"_find_install_targets",
"(",
"name",
"=",
"None",
",",
"version",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"sources",
"=",
"None",
",",
"skip_suggestions",
"=",
"False",
",",
"pkg_verify",
"=",
"False",
",",
"normalize",
"=",
"True",
",",
"ign... | Inspect the arguments to pkg.installed and discover what packages need to
be installed. Return a dict of desired packages | [
"Inspect",
"the",
"arguments",
"to",
"pkg",
".",
"installed",
"and",
"discover",
"what",
"packages",
"need",
"to",
"be",
"installed",
".",
"Return",
"a",
"dict",
"of",
"desired",
"packages"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L496-L837 | train | Find the packages that need to be installed and install them. | 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/pkg.py | _verify_install | def _verify_install(desired, new_pkgs, ignore_epoch=False, new_caps=None):
'''
Determine whether or not the installed packages match what was requested in
the SLS file.
'''
ok = []
failed = []
if not new_caps:
new_caps = dict()
for pkgname, pkgver in desired.items():
# Fr... | python | def _verify_install(desired, new_pkgs, ignore_epoch=False, new_caps=None):
'''
Determine whether or not the installed packages match what was requested in
the SLS file.
'''
ok = []
failed = []
if not new_caps:
new_caps = dict()
for pkgname, pkgver in desired.items():
# Fr... | [
"def",
"_verify_install",
"(",
"desired",
",",
"new_pkgs",
",",
"ignore_epoch",
"=",
"False",
",",
"new_caps",
"=",
"None",
")",
":",
"ok",
"=",
"[",
"]",
"failed",
"=",
"[",
"]",
"if",
"not",
"new_caps",
":",
"new_caps",
"=",
"dict",
"(",
")",
"for"... | Determine whether or not the installed packages match what was requested in
the SLS file. | [
"Determine",
"whether",
"or",
"not",
"the",
"installed",
"packages",
"match",
"what",
"was",
"requested",
"in",
"the",
"SLS",
"file",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L840-L884 | train | Verify that the installed packages match what was requested in the SLS 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/states/pkg.py | _get_desired_pkg | def _get_desired_pkg(name, desired):
'''
Helper function that retrieves and nicely formats the desired pkg (and
version if specified) so that helpful information can be printed in the
comment for the state.
'''
if not desired[name] or desired[name].startswith(('<', '>', '=')):
oper = ''
... | python | def _get_desired_pkg(name, desired):
'''
Helper function that retrieves and nicely formats the desired pkg (and
version if specified) so that helpful information can be printed in the
comment for the state.
'''
if not desired[name] or desired[name].startswith(('<', '>', '=')):
oper = ''
... | [
"def",
"_get_desired_pkg",
"(",
"name",
",",
"desired",
")",
":",
"if",
"not",
"desired",
"[",
"name",
"]",
"or",
"desired",
"[",
"name",
"]",
".",
"startswith",
"(",
"(",
"'<'",
",",
"'>'",
",",
"'='",
")",
")",
":",
"oper",
"=",
"''",
"else",
"... | Helper function that retrieves and nicely formats the desired pkg (and
version if specified) so that helpful information can be printed in the
comment for the state. | [
"Helper",
"function",
"that",
"retrieves",
"and",
"nicely",
"formats",
"the",
"desired",
"pkg",
"(",
"and",
"version",
"if",
"specified",
")",
"so",
"that",
"helpful",
"information",
"can",
"be",
"printed",
"in",
"the",
"comment",
"for",
"the",
"state",
"."
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L887-L898 | train | Helper function that retrieves and nicely formats the desired pkg | 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/pkg.py | _preflight_check | def _preflight_check(desired, fromrepo, **kwargs):
'''
Perform platform-specific checks on desired packages
'''
if 'pkg.check_db' not in __salt__:
return {}
ret = {'suggest': {}, 'no_suggest': []}
pkginfo = __salt__['pkg.check_db'](
*list(desired.keys()), fromrepo=fromrepo, **kwa... | python | def _preflight_check(desired, fromrepo, **kwargs):
'''
Perform platform-specific checks on desired packages
'''
if 'pkg.check_db' not in __salt__:
return {}
ret = {'suggest': {}, 'no_suggest': []}
pkginfo = __salt__['pkg.check_db'](
*list(desired.keys()), fromrepo=fromrepo, **kwa... | [
"def",
"_preflight_check",
"(",
"desired",
",",
"fromrepo",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'pkg.check_db'",
"not",
"in",
"__salt__",
":",
"return",
"{",
"}",
"ret",
"=",
"{",
"'suggest'",
":",
"{",
"}",
",",
"'no_suggest'",
":",
"[",
"]",
... | Perform platform-specific checks on desired packages | [
"Perform",
"platform",
"-",
"specific",
"checks",
"on",
"desired",
"packages"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L901-L917 | train | Perform platform - specific checks on desired packages
| 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/pkg.py | _nested_output | def _nested_output(obj):
'''
Serialize obj and format for output
'''
nested.__opts__ = __opts__
ret = nested.output(obj).rstrip()
return ret | python | def _nested_output(obj):
'''
Serialize obj and format for output
'''
nested.__opts__ = __opts__
ret = nested.output(obj).rstrip()
return ret | [
"def",
"_nested_output",
"(",
"obj",
")",
":",
"nested",
".",
"__opts__",
"=",
"__opts__",
"ret",
"=",
"nested",
".",
"output",
"(",
"obj",
")",
".",
"rstrip",
"(",
")",
"return",
"ret"
] | Serialize obj and format for output | [
"Serialize",
"obj",
"and",
"format",
"for",
"output"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L920-L926 | train | Serialize obj and format for output
| 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/pkg.py | _resolve_capabilities | def _resolve_capabilities(pkgs, refresh=False, **kwargs):
'''
Resolve capabilities in ``pkgs`` and exchange them with real package
names, when the result is distinct.
This feature can be turned on while setting the paramter
``resolve_capabilities`` to True.
Return the input dictionary with repl... | python | def _resolve_capabilities(pkgs, refresh=False, **kwargs):
'''
Resolve capabilities in ``pkgs`` and exchange them with real package
names, when the result is distinct.
This feature can be turned on while setting the paramter
``resolve_capabilities`` to True.
Return the input dictionary with repl... | [
"def",
"_resolve_capabilities",
"(",
"pkgs",
",",
"refresh",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"not",
"pkgs",
"or",
"'pkg.resolve_capabilities'",
"not",
"in",
"__salt__",
":",
"return",
"pkgs",
",",
"refresh",
"ret",
"=",
"__salt__",
"... | Resolve capabilities in ``pkgs`` and exchange them with real package
names, when the result is distinct.
This feature can be turned on while setting the paramter
``resolve_capabilities`` to True.
Return the input dictionary with replaced capability names and as
second return value a bool which say ... | [
"Resolve",
"capabilities",
"in",
"pkgs",
"and",
"exchange",
"them",
"with",
"real",
"package",
"names",
"when",
"the",
"result",
"is",
"distinct",
".",
"This",
"feature",
"can",
"be",
"turned",
"on",
"while",
"setting",
"the",
"paramter",
"resolve_capabilities",... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L929-L946 | train | Resolve capabilities in pkgs and exchange them with real package
names. | 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/pkg.py | installed | def installed(
name,
version=None,
refresh=None,
fromrepo=None,
skip_verify=False,
skip_suggestions=False,
pkgs=None,
sources=None,
allow_updates=False,
pkg_verify=False,
normalize=True,
ignore_epoch=False,
reinstall... | python | def installed(
name,
version=None,
refresh=None,
fromrepo=None,
skip_verify=False,
skip_suggestions=False,
pkgs=None,
sources=None,
allow_updates=False,
pkg_verify=False,
normalize=True,
ignore_epoch=False,
reinstall... | [
"def",
"installed",
"(",
"name",
",",
"version",
"=",
"None",
",",
"refresh",
"=",
"None",
",",
"fromrepo",
"=",
"None",
",",
"skip_verify",
"=",
"False",
",",
"skip_suggestions",
"=",
"False",
",",
"pkgs",
"=",
"None",
",",
"sources",
"=",
"None",
","... | Ensure that the package is installed, and that it is the correct version
(if specified).
:param str name:
The name of the package to be installed. This parameter is ignored if
either "pkgs" or "sources" is used. Additionally, please note that this
option can only be used to install pack... | [
"Ensure",
"that",
"the",
"package",
"is",
"installed",
"and",
"that",
"it",
"is",
"the",
"correct",
"version",
"(",
"if",
"specified",
")",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L949-L2023 | train | Ensure that the named package is installed and that it is compatible with the version number specified. | 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/pkg.py | downloaded | def downloaded(name,
version=None,
pkgs=None,
fromrepo=None,
ignore_epoch=None,
**kwargs):
'''
.. versionadded:: 2017.7.0
Ensure that the package is downloaded, and that it is the correct version
(if specified).
Currently s... | python | def downloaded(name,
version=None,
pkgs=None,
fromrepo=None,
ignore_epoch=None,
**kwargs):
'''
.. versionadded:: 2017.7.0
Ensure that the package is downloaded, and that it is the correct version
(if specified).
Currently s... | [
"def",
"downloaded",
"(",
"name",
",",
"version",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"fromrepo",
"=",
"None",
",",
"ignore_epoch",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":... | .. versionadded:: 2017.7.0
Ensure that the package is downloaded, and that it is the correct version
(if specified).
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypper>`
:param str name:
The name of the package to... | [
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L2026-L2181 | train | Download a specific version of a package from a software repository. | 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/pkg.py | patch_installed | def patch_installed(name, advisory_ids=None, downloadonly=None, **kwargs):
'''
.. versionadded:: 2017.7.0
Ensure that packages related to certain advisory ids are installed.
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypp... | python | def patch_installed(name, advisory_ids=None, downloadonly=None, **kwargs):
'''
.. versionadded:: 2017.7.0
Ensure that packages related to certain advisory ids are installed.
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypp... | [
"def",
"patch_installed",
"(",
"name",
",",
"advisory_ids",
"=",
"None",
",",
"downloadonly",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"None",
",",
... | .. versionadded:: 2017.7.0
Ensure that packages related to certain advisory ids are installed.
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypper>`
CLI Example:
.. code-block:: yaml
issue-foo-fixed:
pk... | [
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L2184-L2261 | train | Ensure that the named advisory patch is installed on the specified packages. | 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/pkg.py | patch_downloaded | def patch_downloaded(name, advisory_ids=None, **kwargs):
'''
.. versionadded:: 2017.7.0
Ensure that packages related to certain advisory ids are downloaded.
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypper>`
CLI Exa... | python | def patch_downloaded(name, advisory_ids=None, **kwargs):
'''
.. versionadded:: 2017.7.0
Ensure that packages related to certain advisory ids are downloaded.
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypper>`
CLI Exa... | [
"def",
"patch_downloaded",
"(",
"name",
",",
"advisory_ids",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"'pkg.list_patches'",
"not",
"in",
"__salt__",
":",
"return",
"{",
"'name'",
":",
"name",
",",
"'result'",
":",
"False",
",",
"'changes'",
... | .. versionadded:: 2017.7.0
Ensure that packages related to certain advisory ids are downloaded.
Currently supported for the following pkg providers:
:mod:`yumpkg <salt.modules.yumpkg>` and :mod:`zypper <salt.modules.zypper>`
CLI Example:
.. code-block:: yaml
preparing-to-fix-issues:
... | [
"..",
"versionadded",
"::",
"2017",
".",
"7",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L2264-L2295 | train | Patches the installed packages with the given advisory ids. | 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/pkg.py | _uninstall | def _uninstall(
action='remove',
name=None,
version=None,
pkgs=None,
normalize=True,
ignore_epoch=False,
**kwargs):
'''
Common function for package removal
'''
if action not in ('remove', 'purge'):
return {'name': name,
'changes': {},
'... | python | def _uninstall(
action='remove',
name=None,
version=None,
pkgs=None,
normalize=True,
ignore_epoch=False,
**kwargs):
'''
Common function for package removal
'''
if action not in ('remove', 'purge'):
return {'name': name,
'changes': {},
'... | [
"def",
"_uninstall",
"(",
"action",
"=",
"'remove'",
",",
"name",
"=",
"None",
",",
"version",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"normalize",
"=",
"True",
",",
"ignore_epoch",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"action",... | Common function for package removal | [
"Common",
"function",
"for",
"package",
"removal"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L2666-L2767 | train | Internal function to uninstall a single package from a single 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/states/pkg.py | purged | def purged(name,
version=None,
pkgs=None,
normalize=True,
ignore_epoch=False,
**kwargs):
'''
Verify that a package is not installed, calling ``pkg.purge`` if necessary
to purge the package. All configuration files are also removed.
name
The... | python | def purged(name,
version=None,
pkgs=None,
normalize=True,
ignore_epoch=False,
**kwargs):
'''
Verify that a package is not installed, calling ``pkg.purge`` if necessary
to purge the package. All configuration files are also removed.
name
The... | [
"def",
"purged",
"(",
"name",
",",
"version",
"=",
"None",
",",
"pkgs",
"=",
"None",
",",
"normalize",
"=",
"True",
",",
"ignore_epoch",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"kwargs",
"[",
"'saltenv'",
"]",
"=",
"__env__",
"try",
":",
"... | Verify that a package is not installed, calling ``pkg.purge`` if necessary
to purge the package. All configuration files are also removed.
name
The name of the package to be purged.
version
The version of the package that should be removed. Don't do anything if
the package is insta... | [
"Verify",
"that",
"a",
"package",
"is",
"not",
"installed",
"calling",
"pkg",
".",
"purge",
"if",
"necessary",
"to",
"purge",
"the",
"package",
".",
"All",
"configuration",
"files",
"are",
"also",
"removed",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L2876-L2979 | train | Purge the specified package and version. | 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/pkg.py | uptodate | def uptodate(name, refresh=False, pkgs=None, **kwargs):
'''
.. versionadded:: 2014.7.0
.. versionchanged:: 2018.3.0
Added support for the ``pkgin`` provider.
Verify that the system is completely up to date.
name
The name has no functional value and is only used as a tracking
... | python | def uptodate(name, refresh=False, pkgs=None, **kwargs):
'''
.. versionadded:: 2014.7.0
.. versionchanged:: 2018.3.0
Added support for the ``pkgin`` provider.
Verify that the system is completely up to date.
name
The name has no functional value and is only used as a tracking
... | [
"def",
"uptodate",
"(",
"name",
",",
"refresh",
"=",
"False",
",",
"pkgs",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
"... | .. versionadded:: 2014.7.0
.. versionchanged:: 2018.3.0
Added support for the ``pkgin`` provider.
Verify that the system is completely up to date.
name
The name has no functional value and is only used as a tracking
reference
refresh
refresh the package database befor... | [
"..",
"versionadded",
"::",
"2014",
".",
"7",
".",
"0",
"..",
"versionchanged",
"::",
"2018",
".",
"3",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L2982-L3089 | train | Return a new version of the named package in a new version of the system. | 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/pkg.py | group_installed | def group_installed(name, skip=None, include=None, **kwargs):
'''
.. versionadded:: 2015.8.0
.. versionchanged:: 2016.11.0
Added support in :mod:`pacman <salt.modules.pacman>`
Ensure that an entire package group is installed. This state is currently
only supported for the :mod:`yum <salt.m... | python | def group_installed(name, skip=None, include=None, **kwargs):
'''
.. versionadded:: 2015.8.0
.. versionchanged:: 2016.11.0
Added support in :mod:`pacman <salt.modules.pacman>`
Ensure that an entire package group is installed. This state is currently
only supported for the :mod:`yum <salt.m... | [
"def",
"group_installed",
"(",
"name",
",",
"skip",
"=",
"None",
",",
"include",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'... | .. versionadded:: 2015.8.0
.. versionchanged:: 2016.11.0
Added support in :mod:`pacman <salt.modules.pacman>`
Ensure that an entire package group is installed. This state is currently
only supported for the :mod:`yum <salt.modules.yumpkg>` and :mod:`pacman <salt.modules.pacman>`
package manage... | [
"..",
"versionadded",
"::",
"2015",
".",
"8",
".",
"0"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L3092-L3237 | train | Ensure that a group is installed for a specific item. | 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/pkg.py | mod_init | def mod_init(low):
'''
Set a flag to tell the install functions to refresh the package database.
This ensures that the package database is refreshed only once during
a state run significantly improving the speed of package management
during a state run.
It sets a flag for a number of reasons, p... | python | def mod_init(low):
'''
Set a flag to tell the install functions to refresh the package database.
This ensures that the package database is refreshed only once during
a state run significantly improving the speed of package management
during a state run.
It sets a flag for a number of reasons, p... | [
"def",
"mod_init",
"(",
"low",
")",
":",
"ret",
"=",
"True",
"if",
"'pkg.ex_mod_init'",
"in",
"__salt__",
":",
"ret",
"=",
"__salt__",
"[",
"'pkg.ex_mod_init'",
"]",
"(",
"low",
")",
"if",
"low",
"[",
"'fun'",
"]",
"==",
"'installed'",
"or",
"low",
"["... | Set a flag to tell the install functions to refresh the package database.
This ensures that the package database is refreshed only once during
a state run significantly improving the speed of package management
during a state run.
It sets a flag for a number of reasons, primarily due to timeline logic.... | [
"Set",
"a",
"flag",
"to",
"tell",
"the",
"install",
"functions",
"to",
"refresh",
"the",
"package",
"database",
".",
"This",
"ensures",
"that",
"the",
"package",
"database",
"is",
"refreshed",
"only",
"once",
"during",
"a",
"state",
"run",
"significantly",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L3240-L3266 | train | Initializes the package database. | 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/pkg.py | mod_watch | def mod_watch(name, **kwargs):
'''
Install/reinstall a package based on a watch requisite
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the stat... | python | def mod_watch(name, **kwargs):
'''
Install/reinstall a package based on a watch requisite
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the stat... | [
"def",
"mod_watch",
"(",
"name",
",",
"*",
"*",
"kwargs",
")",
":",
"sfun",
"=",
"kwargs",
".",
"pop",
"(",
"'sfun'",
",",
"None",
")",
"mapfun",
"=",
"{",
"'purged'",
":",
"purged",
",",
"'latest'",
":",
"latest",
",",
"'removed'",
":",
"removed",
... | Install/reinstall a package based on a watch requisite
.. note::
This state exists to support special handling of the ``watch``
:ref:`requisite <requisites>`. It should not be called directly.
Parameters for this function should be set by the state being triggered. | [
"Install",
"/",
"reinstall",
"a",
"package",
"based",
"on",
"a",
"watch",
"requisite"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/pkg.py#L3329-L3349 | train | This function is used to install or reinstall a package based on a watch requisite. | 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/openvswitch_port.py | present | def present(name, bridge, tunnel_type=None, id=None, remote=None, dst_port=None, internal=False):
'''
Ensures that the named port exists on bridge, eventually creates it.
Args:
name: The name of the port.
bridge: The name of the bridge.
tunnel_type: Optional type of interface to cre... | python | def present(name, bridge, tunnel_type=None, id=None, remote=None, dst_port=None, internal=False):
'''
Ensures that the named port exists on bridge, eventually creates it.
Args:
name: The name of the port.
bridge: The name of the bridge.
tunnel_type: Optional type of interface to cre... | [
"def",
"present",
"(",
"name",
",",
"bridge",
",",
"tunnel_type",
"=",
"None",
",",
"id",
"=",
"None",
",",
"remote",
"=",
"None",
",",
"dst_port",
"=",
"None",
",",
"internal",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
... | Ensures that the named port exists on bridge, eventually creates it.
Args:
name: The name of the port.
bridge: The name of the bridge.
tunnel_type: Optional type of interface to create, currently supports: vlan, vxlan and gre.
id: Optional tunnel's key.
remote: Remote endpoi... | [
"Ensures",
"that",
"the",
"named",
"port",
"exists",
"on",
"bridge",
"eventually",
"creates",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/openvswitch_port.py#L20-L271 | train | Ensures that the named port exists on the bridge. | 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/openvswitch_port.py | absent | def absent(name, bridge=None):
'''
Ensures that the named port exists on bridge, eventually deletes it.
If bridge is not set, port is removed from whatever bridge contains it.
Args:
name: The name of the port.
bridge: The name of the bridge.
'''
ret = {'name': name, 'changes':... | python | def absent(name, bridge=None):
'''
Ensures that the named port exists on bridge, eventually deletes it.
If bridge is not set, port is removed from whatever bridge contains it.
Args:
name: The name of the port.
bridge: The name of the bridge.
'''
ret = {'name': name, 'changes':... | [
"def",
"absent",
"(",
"name",
",",
"bridge",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
"}",
"bridge_exists",
"=",
"False",
"if",
"brid... | Ensures that the named port exists on bridge, eventually deletes it.
If bridge is not set, port is removed from whatever bridge contains it.
Args:
name: The name of the port.
bridge: The name of the bridge. | [
"Ensures",
"that",
"the",
"named",
"port",
"exists",
"on",
"bridge",
"eventually",
"deletes",
"it",
".",
"If",
"bridge",
"is",
"not",
"set",
"port",
"is",
"removed",
"from",
"whatever",
"bridge",
"contains",
"it",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/openvswitch_port.py#L274-L339 | train | Ensures that the named port does not exist on the named bridge. | 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/system_profiler.py | _call_system_profiler | def _call_system_profiler(datatype):
'''
Call out to system_profiler. Return a dictionary
of the stuff we are interested in.
'''
p = subprocess.Popen(
[PROFILER_BINARY, '-detailLevel', 'full',
'-xml', datatype], stdout=subprocess.PIPE)
(sysprofresults, sysprof_stderr) = p.comm... | python | def _call_system_profiler(datatype):
'''
Call out to system_profiler. Return a dictionary
of the stuff we are interested in.
'''
p = subprocess.Popen(
[PROFILER_BINARY, '-detailLevel', 'full',
'-xml', datatype], stdout=subprocess.PIPE)
(sysprofresults, sysprof_stderr) = p.comm... | [
"def",
"_call_system_profiler",
"(",
"datatype",
")",
":",
"p",
"=",
"subprocess",
".",
"Popen",
"(",
"[",
"PROFILER_BINARY",
",",
"'-detailLevel'",
",",
"'full'",
",",
"'-xml'",
",",
"datatype",
"]",
",",
"stdout",
"=",
"subprocess",
".",
"PIPE",
")",
"("... | Call out to system_profiler. Return a dictionary
of the stuff we are interested in. | [
"Call",
"out",
"to",
"system_profiler",
".",
"Return",
"a",
"dictionary",
"of",
"the",
"stuff",
"we",
"are",
"interested",
"in",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system_profiler.py#L34-L55 | train | Call out to system_profiler. Return a dictionary
of the stuff we are interested in. | 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/system_profiler.py | receipts | def receipts():
'''
Return the results of a call to
``system_profiler -xml -detail full SPInstallHistoryDataType``
as a dictionary. Top-level keys of the dictionary
are the names of each set of install receipts, since
there can be multiple receipts with the same name.
Contents of each key a... | python | def receipts():
'''
Return the results of a call to
``system_profiler -xml -detail full SPInstallHistoryDataType``
as a dictionary. Top-level keys of the dictionary
are the names of each set of install receipts, since
there can be multiple receipts with the same name.
Contents of each key a... | [
"def",
"receipts",
"(",
")",
":",
"apps",
"=",
"_call_system_profiler",
"(",
"'SPInstallHistoryDataType'",
")",
"appdict",
"=",
"{",
"}",
"for",
"a",
"in",
"apps",
":",
"details",
"=",
"dict",
"(",
"a",
")",
"details",
".",
"pop",
"(",
"'_name'",
")",
... | Return the results of a call to
``system_profiler -xml -detail full SPInstallHistoryDataType``
as a dictionary. Top-level keys of the dictionary
are the names of each set of install receipts, since
there can be multiple receipts with the same name.
Contents of each key are a list of dictionaries.
... | [
"Return",
"the",
"results",
"of",
"a",
"call",
"to",
"system_profiler",
"-",
"xml",
"-",
"detail",
"full",
"SPInstallHistoryDataType",
"as",
"a",
"dictionary",
".",
"Top",
"-",
"level",
"keys",
"of",
"the",
"dictionary",
"are",
"the",
"names",
"of",
"each",
... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/system_profiler.py#L58-L95 | train | Return the results of a call to system_profiler - xml - detail full SPInstallHistoryDataType | 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/solrcloud.py | alias | def alias(name, collections, **kwargs):
'''
Create alias and enforce collection list.
Use the solrcloud module to get alias members and set them.
You can pass additional arguments that will be forwarded to http.query
name
The collection name
collections
list of collections to ... | python | def alias(name, collections, **kwargs):
'''
Create alias and enforce collection list.
Use the solrcloud module to get alias members and set them.
You can pass additional arguments that will be forwarded to http.query
name
The collection name
collections
list of collections to ... | [
"def",
"alias",
"(",
"name",
",",
"collections",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
",",
"}",
"if",
"__salt__",
"... | Create alias and enforce collection list.
Use the solrcloud module to get alias members and set them.
You can pass additional arguments that will be forwarded to http.query
name
The collection name
collections
list of collections to include in the alias | [
"Create",
"alias",
"and",
"enforce",
"collection",
"list",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/solrcloud.py#L19-L75 | train | Create alias and enforce collection list. | 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/solrcloud.py | collection | def collection(name, options=None, **kwargs):
'''
Create collection and enforce options.
Use the solrcloud module to get collection parameters.
You can pass additional arguments that will be forwarded to http.query
name
The collection name
options : {}
options to ensure
''... | python | def collection(name, options=None, **kwargs):
'''
Create collection and enforce options.
Use the solrcloud module to get collection parameters.
You can pass additional arguments that will be forwarded to http.query
name
The collection name
options : {}
options to ensure
''... | [
"def",
"collection",
"(",
"name",
",",
"options",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"'name'",
":",
"name",
",",
"'changes'",
":",
"{",
"}",
",",
"'result'",
":",
"False",
",",
"'comment'",
":",
"''",
",",
"}",
"if",... | Create collection and enforce options.
Use the solrcloud module to get collection parameters.
You can pass additional arguments that will be forwarded to http.query
name
The collection name
options : {}
options to ensure | [
"Create",
"collection",
"and",
"enforce",
"options",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/solrcloud.py#L78-L159 | train | Create a new collection and enforce 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/consul.py | _query | def _query(function,
consul_url,
token=None,
method='GET',
api_version='v1',
data=None,
query_params=None):
'''
Consul object method function to construct and execute on the API URL.
:param api_url: The Consul api url.
:param api_ver... | python | def _query(function,
consul_url,
token=None,
method='GET',
api_version='v1',
data=None,
query_params=None):
'''
Consul object method function to construct and execute on the API URL.
:param api_url: The Consul api url.
:param api_ver... | [
"def",
"_query",
"(",
"function",
",",
"consul_url",
",",
"token",
"=",
"None",
",",
"method",
"=",
"'GET'",
",",
"api_version",
"=",
"'v1'",
",",
"data",
"=",
"None",
",",
"query_params",
"=",
"None",
")",
":",
"if",
"not",
"query_params",
":",
"query... | Consul object method function to construct and execute on the API URL.
:param api_url: The Consul api url.
:param api_version The Consul api version
:param function: The Consul api function to perform.
:param method: The HTTP method, e.g. GET or POST.
:param data: The data to be... | [
"Consul",
"object",
"method",
"function",
"to",
"construct",
"and",
"execute",
"on",
"the",
"API",
"URL",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L50-L113 | train | Query the object on the Consul API URL. | 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/consul.py | list_ | def list_(consul_url=None, token=None, key=None, **kwargs):
'''
List keys in Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:return: The list of keys.
CLI Example:
.. code-block:: bash
salt '*' consul.list
s... | python | def list_(consul_url=None, token=None, key=None, **kwargs):
'''
List keys in Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:return: The list of keys.
CLI Example:
.. code-block:: bash
salt '*' consul.list
s... | [
"def",
"list_",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"key",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if",
"not",
... | List keys in Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:return: The list of keys.
CLI Example:
.. code-block:: bash
salt '*' consul.list
salt '*' consul.list key='web' | [
"List",
"keys",
"in",
"Consul"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L116-L160 | train | List the keys in Consul | 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/consul.py | get | def get(consul_url=None, key=None, token=None, recurse=False, decode=False, raw=False):
'''
Get key from Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param recurse: Return values recursively beginning at the value of key.
:para... | python | def get(consul_url=None, key=None, token=None, recurse=False, decode=False, raw=False):
'''
Get key from Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param recurse: Return values recursively beginning at the value of key.
:para... | [
"def",
"get",
"(",
"consul_url",
"=",
"None",
",",
"key",
"=",
"None",
",",
"token",
"=",
"None",
",",
"recurse",
"=",
"False",
",",
"decode",
"=",
"False",
",",
"raw",
"=",
"False",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",... | Get key from Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param recurse: Return values recursively beginning at the value of key.
:param decode: By default values are stored as Base64 encoded values,
decode will retu... | [
"Get",
"key",
"from",
"Consul"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L163-L224 | train | Get the key from Consul. | 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/consul.py | put | def put(consul_url=None, token=None, key=None, value=None, **kwargs):
'''
Put values into Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param value: The value to set the key to.
:param flags: This can be used to specify an unsig... | python | def put(consul_url=None, token=None, key=None, value=None, **kwargs):
'''
Put values into Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param value: The value to set the key to.
:param flags: This can be used to specify an unsig... | [
"def",
"put",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"key",
"=",
"None",
",",
"value",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
... | Put values into Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param value: The value to set the key to.
:param flags: This can be used to specify an unsigned value
between 0 and 2^64-1. Clients can choose to use
... | [
"Put",
"values",
"into",
"Consul"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L227-L345 | train | Put values into Consul
WorkItem | 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/consul.py | delete | def delete(consul_url=None, token=None, key=None, **kwargs):
'''
Delete values from Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param recurse: Delete values recursively beginning at the value of key.
:param cas: This flag is u... | python | def delete(consul_url=None, token=None, key=None, **kwargs):
'''
Delete values from Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param recurse: Delete values recursively beginning at the value of key.
:param cas: This flag is u... | [
"def",
"delete",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"key",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if",
"not",
... | Delete values from Consul
:param consul_url: The Consul server URL.
:param key: The key to use as the starting point for the list.
:param recurse: Delete values recursively beginning at the value of key.
:param cas: This flag is used to turn the DELETE into
a Check-And-Set operation.
... | [
"Delete",
"values",
"from",
"Consul"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L348-L406 | train | Delete the value of a key in 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/consul.py | agent_checks | def agent_checks(consul_url=None, token=None):
'''
Returns the checks the local agent is managing
:param consul_url: The Consul server URL.
:return: Returns the checks the local agent is managing
CLI Example:
.. code-block:: bash
salt '*' consul.agent_checks
'''
ret = {}
... | python | def agent_checks(consul_url=None, token=None):
'''
Returns the checks the local agent is managing
:param consul_url: The Consul server URL.
:return: Returns the checks the local agent is managing
CLI Example:
.. code-block:: bash
salt '*' consul.agent_checks
'''
ret = {}
... | [
"def",
"agent_checks",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if",
"not",
"consul_url",
":",
"log",
".",
"error",
"(",
"'... | Returns the checks the local agent is managing
:param consul_url: The Consul server URL.
:return: Returns the checks the local agent is managing
CLI Example:
.. code-block:: bash
salt '*' consul.agent_checks | [
"Returns",
"the",
"checks",
"the",
"local",
"agent",
"is",
"managing"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L409-L437 | train | Returns the checks the local agent is managing
| 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/consul.py | agent_members | def agent_members(consul_url=None, token=None, **kwargs):
'''
Returns the members as seen by the local serf agent
:param consul_url: The Consul server URL.
:return: Returns the members as seen by the local serf agent
CLI Example:
.. code-block:: bash
salt '*' consul.agent_members
... | python | def agent_members(consul_url=None, token=None, **kwargs):
'''
Returns the members as seen by the local serf agent
:param consul_url: The Consul server URL.
:return: Returns the members as seen by the local serf agent
CLI Example:
.. code-block:: bash
salt '*' consul.agent_members
... | [
"def",
"agent_members",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"query_params",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if... | Returns the members as seen by the local serf agent
:param consul_url: The Consul server URL.
:return: Returns the members as seen by the local serf agent
CLI Example:
.. code-block:: bash
salt '*' consul.agent_members | [
"Returns",
"the",
"members",
"as",
"seen",
"by",
"the",
"local",
"serf",
"agent"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L471-L504 | train | Returns the members as seen by the local serf agent | 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/consul.py | agent_self | def agent_self(consul_url=None, token=None):
'''
Returns the local node configuration
:param consul_url: The Consul server URL.
:return: Returns the local node configuration
CLI Example:
.. code-block:: bash
salt '*' consul.agent_self
'''
ret = {}
query_params = {}
i... | python | def agent_self(consul_url=None, token=None):
'''
Returns the local node configuration
:param consul_url: The Consul server URL.
:return: Returns the local node configuration
CLI Example:
.. code-block:: bash
salt '*' consul.agent_self
'''
ret = {}
query_params = {}
i... | [
"def",
"agent_self",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"query_params",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if",
"not",
"consul_url",
":",
... | Returns the local node configuration
:param consul_url: The Consul server URL.
:return: Returns the local node configuration
CLI Example:
.. code-block:: bash
salt '*' consul.agent_self | [
"Returns",
"the",
"local",
"node",
"configuration"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L507-L537 | train | Returns the local node configuration | 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/consul.py | agent_maintenance | def agent_maintenance(consul_url=None, token=None, **kwargs):
'''
Manages node maintenance mode
:param consul_url: The Consul server URL.
:param enable: The enable flag is required.
Acceptable values are either true
(to enter maintenance mode) or
... | python | def agent_maintenance(consul_url=None, token=None, **kwargs):
'''
Manages node maintenance mode
:param consul_url: The Consul server URL.
:param enable: The enable flag is required.
Acceptable values are either true
(to enter maintenance mode) or
... | [
"def",
"agent_maintenance",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"query_params",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
... | Manages node maintenance mode
:param consul_url: The Consul server URL.
:param enable: The enable flag is required.
Acceptable values are either true
(to enter maintenance mode) or
false (to resume normal operation).
:param reason: If provided, its v... | [
"Manages",
"node",
"maintenance",
"mode"
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L540-L594 | train | This function is used to manage the node maintenance mode. | 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/consul.py | agent_leave | def agent_leave(consul_url=None, token=None, node=None):
'''
Used to instruct the agent to force a node into the left state.
:param consul_url: The Consul server URL.
:param node: The node the agent will force into left state
:return: Boolean and message indicating success or failure.
CLI Exam... | python | def agent_leave(consul_url=None, token=None, node=None):
'''
Used to instruct the agent to force a node into the left state.
:param consul_url: The Consul server URL.
:param node: The node the agent will force into left state
:return: Boolean and message indicating success or failure.
CLI Exam... | [
"def",
"agent_leave",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"node",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"query_params",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if"... | Used to instruct the agent to force a node into the left state.
:param consul_url: The Consul server URL.
:param node: The node the agent will force into left state
:return: Boolean and message indicating success or failure.
CLI Example:
.. code-block:: bash
salt '*' consul.agent_leave n... | [
"Used",
"to",
"instruct",
"the",
"agent",
"to",
"force",
"a",
"node",
"into",
"the",
"left",
"state",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L644-L684 | train | This function allows the agent to force a node into the left state. | 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/consul.py | agent_check_register | def agent_check_register(consul_url=None, token=None, **kwargs):
'''
The register endpoint is used to add a new check to the local agent.
:param consul_url: The Consul server URL.
:param name: The description of what the check is for.
:param id: The unique name to use for the check, if not
... | python | def agent_check_register(consul_url=None, token=None, **kwargs):
'''
The register endpoint is used to add a new check to the local agent.
:param consul_url: The Consul server URL.
:param name: The description of what the check is for.
:param id: The unique name to use for the check, if not
... | [
"def",
"agent_check_register",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"data",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if"... | The register endpoint is used to add a new check to the local agent.
:param consul_url: The Consul server URL.
:param name: The description of what the check is for.
:param id: The unique name to use for the check, if not
provided 'name' is used.
:param notes: Human readable description ... | [
"The",
"register",
"endpoint",
"is",
"used",
"to",
"add",
"a",
"new",
"check",
"to",
"the",
"local",
"agent",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L687-L772 | train | Register a new check in the local agent. | 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/consul.py | agent_check_deregister | def agent_check_deregister(consul_url=None, token=None, checkid=None):
'''
The agent will take care of deregistering the check from the Catalog.
:param consul_url: The Consul server URL.
:param checkid: The ID of the check to deregister from Consul.
:return: Boolean and message indicating success o... | python | def agent_check_deregister(consul_url=None, token=None, checkid=None):
'''
The agent will take care of deregistering the check from the Catalog.
:param consul_url: The Consul server URL.
:param checkid: The ID of the check to deregister from Consul.
:return: Boolean and message indicating success o... | [
"def",
"agent_check_deregister",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"checkid",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if",
"not",
"consul_url"... | The agent will take care of deregistering the check from the Catalog.
:param consul_url: The Consul server URL.
:param checkid: The ID of the check to deregister from Consul.
:return: Boolean and message indicating success or failure.
CLI Example:
.. code-block:: bash
salt '*' consul.age... | [
"The",
"agent",
"will",
"take",
"care",
"of",
"deregistering",
"the",
"check",
"from",
"the",
"Catalog",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L775-L813 | train | This function will take care of deregistering a check from the catalog. | 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/consul.py | agent_check_warn | def agent_check_warn(consul_url=None, token=None, checkid=None, **kwargs):
'''
This endpoint is used with a check that is of the TTL type. When this
is called, the status of the check is set to warning and the TTL
clock is reset.
:param consul_url: The Consul server URL.
:param checkid: The ID ... | python | def agent_check_warn(consul_url=None, token=None, checkid=None, **kwargs):
'''
This endpoint is used with a check that is of the TTL type. When this
is called, the status of the check is set to warning and the TTL
clock is reset.
:param consul_url: The Consul server URL.
:param checkid: The ID ... | [
"def",
"agent_check_warn",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"checkid",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"query_params",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"... | This endpoint is used with a check that is of the TTL type. When this
is called, the status of the check is set to warning and the TTL
clock is reset.
:param consul_url: The Consul server URL.
:param checkid: The ID of the check to deregister from Consul.
:param note: A human-readable message with ... | [
"This",
"endpoint",
"is",
"used",
"with",
"a",
"check",
"that",
"is",
"of",
"the",
"TTL",
"type",
".",
"When",
"this",
"is",
"called",
"the",
"status",
"of",
"the",
"check",
"is",
"set",
"to",
"warning",
"and",
"the",
"TTL",
"clock",
"is",
"reset",
"... | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L865-L911 | train | This endpoint is used to mark a check as warning. | 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/consul.py | agent_service_register | def agent_service_register(consul_url=None, token=None, **kwargs):
'''
The used to add a new service, with an optional
health check, to the local agent.
:param consul_url: The Consul server URL.
:param name: A name describing the service.
:param address: The address used by the service, default... | python | def agent_service_register(consul_url=None, token=None, **kwargs):
'''
The used to add a new service, with an optional
health check, to the local agent.
:param consul_url: The Consul server URL.
:param name: A name describing the service.
:param address: The address used by the service, default... | [
"def",
"agent_service_register",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"data",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"i... | The used to add a new service, with an optional
health check, to the local agent.
:param consul_url: The Consul server URL.
:param name: A name describing the service.
:param address: The address used by the service, defaults
to the address of the agent.
:param port: The port us... | [
"The",
"used",
"to",
"add",
"a",
"new",
"service",
"with",
"an",
"optional",
"health",
"check",
"to",
"the",
"local",
"agent",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L963-L1074 | train | This function is used to add a new service to the local agent. | 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/consul.py | agent_service_deregister | def agent_service_deregister(consul_url=None, token=None, serviceid=None):
'''
Used to remove a service.
:param consul_url: The Consul server URL.
:param serviceid: A serviceid describing the service.
:return: Boolean and message indicating success or failure.
CLI Example:
.. code-block::... | python | def agent_service_deregister(consul_url=None, token=None, serviceid=None):
'''
Used to remove a service.
:param consul_url: The Consul server URL.
:param serviceid: A serviceid describing the service.
:return: Boolean and message indicating success or failure.
CLI Example:
.. code-block::... | [
"def",
"agent_service_deregister",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"serviceid",
"=",
"None",
")",
":",
"ret",
"=",
"{",
"}",
"data",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
"... | Used to remove a service.
:param consul_url: The Consul server URL.
:param serviceid: A serviceid describing the service.
:return: Boolean and message indicating success or failure.
CLI Example:
.. code-block:: bash
salt '*' consul.agent_service_deregister serviceid='redis' | [
"Used",
"to",
"remove",
"a",
"service",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1077-L1117 | train | This function removes a service from 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/consul.py | agent_service_maintenance | def agent_service_maintenance(consul_url=None, token=None, serviceid=None, **kwargs):
'''
Used to place a service into maintenance mode.
:param consul_url: The Consul server URL.
:param serviceid: A name of the service.
:param enable: Whether the service should be enabled or disabled.
:param re... | python | def agent_service_maintenance(consul_url=None, token=None, serviceid=None, **kwargs):
'''
Used to place a service into maintenance mode.
:param consul_url: The Consul server URL.
:param serviceid: A name of the service.
:param enable: Whether the service should be enabled or disabled.
:param re... | [
"def",
"agent_service_maintenance",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"serviceid",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"query_params",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consu... | Used to place a service into maintenance mode.
:param consul_url: The Consul server URL.
:param serviceid: A name of the service.
:param enable: Whether the service should be enabled or disabled.
:param reason: A human readable message of why the service was
enabled or disabled.
... | [
"Used",
"to",
"place",
"a",
"service",
"into",
"maintenance",
"mode",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1120-L1175 | train | This function is used to set a service into maintenance mode. | 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/consul.py | session_create | def session_create(consul_url=None, token=None, **kwargs):
'''
Used to create a session.
:param consul_url: The Consul server URL.
:param lockdelay: Duration string using a "s" suffix for seconds.
The default is 15s.
:param node: Must refer to a node that is already registered... | python | def session_create(consul_url=None, token=None, **kwargs):
'''
Used to create a session.
:param consul_url: The Consul server URL.
:param lockdelay: Duration string using a "s" suffix for seconds.
The default is 15s.
:param node: Must refer to a node that is already registered... | [
"def",
"session_create",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"if",
"not",
"consul_url",
":",
"... | Used to create a session.
:param consul_url: The Consul server URL.
:param lockdelay: Duration string using a "s" suffix for seconds.
The default is 15s.
:param node: Must refer to a node that is already registered,
if specified. By default, the agent's own node
... | [
"Used",
"to",
"create",
"a",
"session",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1178-L1266 | train | This function creates a new session in a 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/consul.py | session_list | def session_list(consul_url=None, token=None, return_list=False, **kwargs):
'''
Used to list sessions.
:param consul_url: The Consul server URL.
:param dc: By default, the datacenter of the agent is queried;
however, the dc can be provided using the "dc" parameter.
:param return_list... | python | def session_list(consul_url=None, token=None, return_list=False, **kwargs):
'''
Used to list sessions.
:param consul_url: The Consul server URL.
:param dc: By default, the datacenter of the agent is queried;
however, the dc can be provided using the "dc" parameter.
:param return_list... | [
"def",
"session_list",
"(",
"consul_url",
"=",
"None",
",",
"token",
"=",
"None",
",",
"return_list",
"=",
"False",
",",
"*",
"*",
"kwargs",
")",
":",
"ret",
"=",
"{",
"}",
"if",
"not",
"consul_url",
":",
"consul_url",
"=",
"_get_config",
"(",
")",
"... | Used to list sessions.
:param consul_url: The Consul server URL.
:param dc: By default, the datacenter of the agent is queried;
however, the dc can be provided using the "dc" parameter.
:param return_list: By default, all information about the sessions is
returned, us... | [
"Used",
"to",
"list",
"sessions",
"."
] | e8541fd6e744ab0df786c0f76102e41631f45d46 | https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/consul.py#L1269-L1313 | train | This function returns a list of all available session IDs. | 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.