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/master.py
Maintenance.run
def run(self): ''' This is the general passive maintenance process controller for the Salt master. This is where any data that needs to be cleanly maintained from the master is maintained. ''' salt.utils.process.appendproctitle(self.__class__.__name__) #...
python
def run(self): ''' This is the general passive maintenance process controller for the Salt master. This is where any data that needs to be cleanly maintained from the master is maintained. ''' salt.utils.process.appendproctitle(self.__class__.__name__) #...
[ "def", "run", "(", "self", ")", ":", "salt", ".", "utils", ".", "process", ".", "appendproctitle", "(", "self", ".", "__class__", ".", "__name__", ")", "# init things that need to be done after the process is forked", "self", ".", "_post_fork_init", "(", ")", "# M...
This is the general passive maintenance process controller for the Salt master. This is where any data that needs to be cleanly maintained from the master is maintained.
[ "This", "is", "the", "general", "passive", "maintenance", "process", "controller", "for", "the", "Salt", "master", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L214-L245
train
This is the main loop for the passive maintenance process.
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/master.py
Maintenance.handle_key_cache
def handle_key_cache(self): ''' Evaluate accepted keys and create a msgpack file which contains a list ''' if self.opts['key_cache'] == 'sched': keys = [] #TODO DRY from CKMinions if self.opts['transport'] in ('zeromq', 'tcp'): ...
python
def handle_key_cache(self): ''' Evaluate accepted keys and create a msgpack file which contains a list ''' if self.opts['key_cache'] == 'sched': keys = [] #TODO DRY from CKMinions if self.opts['transport'] in ('zeromq', 'tcp'): ...
[ "def", "handle_key_cache", "(", "self", ")", ":", "if", "self", ".", "opts", "[", "'key_cache'", "]", "==", "'sched'", ":", "keys", "=", "[", "]", "#TODO DRY from CKMinions", "if", "self", ".", "opts", "[", "'transport'", "]", "in", "(", "'zeromq'", ",",...
Evaluate accepted keys and create a msgpack file which contains a list
[ "Evaluate", "accepted", "keys", "and", "create", "a", "msgpack", "file", "which", "contains", "a", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L247-L270
train
Evaluate accepted keys and create a msgpack file which contains a 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/master.py
Maintenance.handle_key_rotate
def handle_key_rotate(self, now): ''' Rotate the AES key rotation ''' to_rotate = False dfn = os.path.join(self.opts['cachedir'], '.dfn') try: stats = os.stat(dfn) # Basic Windows permissions don't distinguish between # user/group/all. ...
python
def handle_key_rotate(self, now): ''' Rotate the AES key rotation ''' to_rotate = False dfn = os.path.join(self.opts['cachedir'], '.dfn') try: stats = os.stat(dfn) # Basic Windows permissions don't distinguish between # user/group/all. ...
[ "def", "handle_key_rotate", "(", "self", ",", "now", ")", ":", "to_rotate", "=", "False", "dfn", "=", "os", ".", "path", ".", "join", "(", "self", ".", "opts", "[", "'cachedir'", "]", ",", "'.dfn'", ")", "try", ":", "stats", "=", "os", ".", "stat",...
Rotate the AES key rotation
[ "Rotate", "the", "AES", "key", "rotation" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L272-L310
train
Rotate the AES key rotation
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/master.py
Maintenance.handle_git_pillar
def handle_git_pillar(self): ''' Update git pillar ''' try: for pillar in self.git_pillar: pillar.fetch_remotes() except Exception as exc: log.error('Exception caught while updating git_pillar', exc_info=True)
python
def handle_git_pillar(self): ''' Update git pillar ''' try: for pillar in self.git_pillar: pillar.fetch_remotes() except Exception as exc: log.error('Exception caught while updating git_pillar', exc_info=True)
[ "def", "handle_git_pillar", "(", "self", ")", ":", "try", ":", "for", "pillar", "in", "self", ".", "git_pillar", ":", "pillar", ".", "fetch_remotes", "(", ")", "except", "Exception", "as", "exc", ":", "log", ".", "error", "(", "'Exception caught while updati...
Update git pillar
[ "Update", "git", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L312-L321
train
Update git pillar
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/master.py
Maintenance.handle_schedule
def handle_schedule(self): ''' Evaluate the scheduler ''' try: self.schedule.eval() # Check if scheduler requires lower loop interval than # the loop_interval setting if self.schedule.loop_interval < self.loop_interval: self...
python
def handle_schedule(self): ''' Evaluate the scheduler ''' try: self.schedule.eval() # Check if scheduler requires lower loop interval than # the loop_interval setting if self.schedule.loop_interval < self.loop_interval: self...
[ "def", "handle_schedule", "(", "self", ")", ":", "try", ":", "self", ".", "schedule", ".", "eval", "(", ")", "# Check if scheduler requires lower loop interval than", "# the loop_interval setting", "if", "self", ".", "schedule", ".", "loop_interval", "<", "self", "....
Evaluate the scheduler
[ "Evaluate", "the", "scheduler" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L323-L334
train
Evaluate the scheduler and update the loop_interval property
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/master.py
Maintenance.handle_presence
def handle_presence(self, old_present): ''' Fire presence events if enabled ''' # On the first run it may need more time for the EventPublisher # to come up and be ready. Set the timeout to account for this. if self.presence_events and self.event.connect_pull(timeout=3): ...
python
def handle_presence(self, old_present): ''' Fire presence events if enabled ''' # On the first run it may need more time for the EventPublisher # to come up and be ready. Set the timeout to account for this. if self.presence_events and self.event.connect_pull(timeout=3): ...
[ "def", "handle_presence", "(", "self", ",", "old_present", ")", ":", "# On the first run it may need more time for the EventPublisher", "# to come up and be ready. Set the timeout to account for this.", "if", "self", ".", "presence_events", "and", "self", ".", "event", ".", "co...
Fire presence events if enabled
[ "Fire", "presence", "events", "if", "enabled" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L336-L354
train
Fire presence events if enabled is True
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/master.py
FileserverUpdate.fill_buckets
def fill_buckets(self): ''' Get the configured backends and the intervals for any backend which supports them, and set up the update "buckets". There will be one bucket for each thing being updated at a given interval. ''' update_intervals = self.fileserver.update_interva...
python
def fill_buckets(self): ''' Get the configured backends and the intervals for any backend which supports them, and set up the update "buckets". There will be one bucket for each thing being updated at a given interval. ''' update_intervals = self.fileserver.update_interva...
[ "def", "fill_buckets", "(", "self", ")", ":", "update_intervals", "=", "self", ".", "fileserver", ".", "update_intervals", "(", ")", "self", ".", "buckets", "=", "{", "}", "for", "backend", "in", "self", ".", "fileserver", ".", "backends", "(", ")", ":",...
Get the configured backends and the intervals for any backend which supports them, and set up the update "buckets". There will be one bucket for each thing being updated at a given interval.
[ "Get", "the", "configured", "backends", "and", "the", "intervals", "for", "any", "backend", "which", "supports", "them", "and", "set", "up", "the", "update", "buckets", ".", "There", "will", "be", "one", "bucket", "for", "each", "thing", "being", "updated", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L385-L436
train
Get the configured backends and intervals and set up the update buckets.
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/master.py
FileserverUpdate.update_fileserver
def update_fileserver(self, interval, backends): ''' Threading target which handles all updates for a given wait interval ''' def _do_update(): log.debug( 'Performing fileserver updates for items with an update ' 'interval of %d', interval ...
python
def update_fileserver(self, interval, backends): ''' Threading target which handles all updates for a given wait interval ''' def _do_update(): log.debug( 'Performing fileserver updates for items with an update ' 'interval of %d', interval ...
[ "def", "update_fileserver", "(", "self", ",", "interval", ",", "backends", ")", ":", "def", "_do_update", "(", ")", ":", "log", ".", "debug", "(", "'Performing fileserver updates for items with an update '", "'interval of %d'", ",", "interval", ")", "for", "backend"...
Threading target which handles all updates for a given wait interval
[ "Threading", "target", "which", "handles", "all", "updates", "for", "a", "given", "wait", "interval" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L438-L477
train
Threading target which handles all updates for a given interval
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/master.py
FileserverUpdate.run
def run(self): ''' Start the update threads ''' salt.utils.process.appendproctitle(self.__class__.__name__) # Clean out the fileserver backend cache salt.daemons.masterapi.clean_fsbackend(self.opts) for interval in self.buckets: self.update_threads[in...
python
def run(self): ''' Start the update threads ''' salt.utils.process.appendproctitle(self.__class__.__name__) # Clean out the fileserver backend cache salt.daemons.masterapi.clean_fsbackend(self.opts) for interval in self.buckets: self.update_threads[in...
[ "def", "run", "(", "self", ")", ":", "salt", ".", "utils", ".", "process", ".", "appendproctitle", "(", "self", ".", "__class__", ".", "__name__", ")", "# Clean out the fileserver backend cache", "salt", ".", "daemons", ".", "masterapi", ".", "clean_fsbackend", ...
Start the update threads
[ "Start", "the", "update", "threads" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L479-L496
train
Start the update threads
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/master.py
Master._pre_flight
def _pre_flight(self): ''' Run pre flight checks. If anything in this method fails then the master should not start up. ''' errors = [] critical_errors = [] try: os.chdir('/') except OSError as err: errors.append( '...
python
def _pre_flight(self): ''' Run pre flight checks. If anything in this method fails then the master should not start up. ''' errors = [] critical_errors = [] try: os.chdir('/') except OSError as err: errors.append( '...
[ "def", "_pre_flight", "(", "self", ")", ":", "errors", "=", "[", "]", "critical_errors", "=", "[", "]", "try", ":", "os", ".", "chdir", "(", "'/'", ")", "except", "OSError", "as", "err", ":", "errors", ".", "append", "(", "'Cannot change to root director...
Run pre flight checks. If anything in this method fails then the master should not start up.
[ "Run", "pre", "flight", "checks", ".", "If", "anything", "in", "this", "method", "fails", "then", "the", "master", "should", "not", "start", "up", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L563-L644
train
Run pre flight checks.
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/master.py
Master.start
def start(self): ''' Turn on the master server components ''' self._pre_flight() log.info('salt-master is starting as user \'%s\'', salt.utils.user.get_user()) enable_sigusr1_handler() enable_sigusr2_handler() self.__set_max_open_files() # Reset...
python
def start(self): ''' Turn on the master server components ''' self._pre_flight() log.info('salt-master is starting as user \'%s\'', salt.utils.user.get_user()) enable_sigusr1_handler() enable_sigusr2_handler() self.__set_max_open_files() # Reset...
[ "def", "start", "(", "self", ")", ":", "self", ".", "_pre_flight", "(", ")", "log", ".", "info", "(", "'salt-master is starting as user \\'%s\\''", ",", "salt", ".", "utils", ".", "user", ".", "get_user", "(", ")", ")", "enable_sigusr1_handler", "(", ")", ...
Turn on the master server components
[ "Turn", "on", "the", "master", "server", "components" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L646-L774
train
Start 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/master.py
Halite.run
def run(self): ''' Fire up halite! ''' salt.utils.process.appendproctitle(self.__class__.__name__) halite.start(self.hopts)
python
def run(self): ''' Fire up halite! ''' salt.utils.process.appendproctitle(self.__class__.__name__) halite.start(self.hopts)
[ "def", "run", "(", "self", ")", ":", "salt", ".", "utils", ".", "process", ".", "appendproctitle", "(", "self", ".", "__class__", ".", "__name__", ")", "halite", ".", "start", "(", "self", ".", "hopts", ")" ]
Fire up halite!
[ "Fire", "up", "halite!" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L817-L822
train
Fire up halite!
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/master.py
ReqServer.__bind
def __bind(self): ''' Binds the reply server ''' if self.log_queue is not None: salt.log.setup.set_multiprocessing_logging_queue(self.log_queue) if self.log_queue_level is not None: salt.log.setup.set_multiprocessing_logging_level(self.log_queue_level) ...
python
def __bind(self): ''' Binds the reply server ''' if self.log_queue is not None: salt.log.setup.set_multiprocessing_logging_queue(self.log_queue) if self.log_queue_level is not None: salt.log.setup.set_multiprocessing_logging_level(self.log_queue_level) ...
[ "def", "__bind", "(", "self", ")", ":", "if", "self", ".", "log_queue", "is", "not", "None", ":", "salt", ".", "log", ".", "setup", ".", "set_multiprocessing_logging_queue", "(", "self", ".", "log_queue", ")", "if", "self", ".", "log_queue_level", "is", ...
Binds the reply server
[ "Binds", "the", "reply", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L876-L937
train
Binds the reply server to the master process manager.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/master.py
MWorker.__bind
def __bind(self): ''' Bind to the local port ''' # using ZMQIOLoop since we *might* need zmq in there install_zmq() self.io_loop = ZMQDefaultLoop() self.io_loop.make_current() for req_channel in self.req_channels: req_channel.post_fork(self._ha...
python
def __bind(self): ''' Bind to the local port ''' # using ZMQIOLoop since we *might* need zmq in there install_zmq() self.io_loop = ZMQDefaultLoop() self.io_loop.make_current() for req_channel in self.req_channels: req_channel.post_fork(self._ha...
[ "def", "__bind", "(", "self", ")", ":", "# using ZMQIOLoop since we *might* need zmq in there", "install_zmq", "(", ")", "self", ".", "io_loop", "=", "ZMQDefaultLoop", "(", ")", "self", ".", "io_loop", ".", "make_current", "(", ")", "for", "req_channel", "in", "...
Bind to the local port
[ "Bind", "to", "the", "local", "port" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1024-L1038
train
Bind to the local port
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/master.py
MWorker._handle_payload
def _handle_payload(self, payload): ''' The _handle_payload method is the key method used to figure out what needs to be done with communication to the server Example cleartext payload generated for 'salt myminion test.ping': {'enc': 'clear', 'load': {'arg': [], ...
python
def _handle_payload(self, payload): ''' The _handle_payload method is the key method used to figure out what needs to be done with communication to the server Example cleartext payload generated for 'salt myminion test.ping': {'enc': 'clear', 'load': {'arg': [], ...
[ "def", "_handle_payload", "(", "self", ",", "payload", ")", ":", "key", "=", "payload", "[", "'enc'", "]", "load", "=", "payload", "[", "'load'", "]", "ret", "=", "{", "'aes'", ":", "self", ".", "_handle_aes", ",", "'clear'", ":", "self", ".", "_hand...
The _handle_payload method is the key method used to figure out what needs to be done with communication to the server Example cleartext payload generated for 'salt myminion test.ping': {'enc': 'clear', 'load': {'arg': [], 'cmd': 'publish', 'fun': '...
[ "The", "_handle_payload", "method", "is", "the", "key", "method", "used", "to", "figure", "out", "what", "needs", "to", "be", "done", "with", "communication", "to", "the", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1041-L1066
train
This method is used to figure out what the key needs to be done with communication to the 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/master.py
MWorker._post_stats
def _post_stats(self, stats): ''' Fire events with stat info if it's time ''' end_time = time.time() if end_time - self.stat_clock > self.opts['master_stats_event_iter']: # Fire the event with the stats and wipe the tracker self.aes_funcs.event.fire_event(...
python
def _post_stats(self, stats): ''' Fire events with stat info if it's time ''' end_time = time.time() if end_time - self.stat_clock > self.opts['master_stats_event_iter']: # Fire the event with the stats and wipe the tracker self.aes_funcs.event.fire_event(...
[ "def", "_post_stats", "(", "self", ",", "stats", ")", ":", "end_time", "=", "time", ".", "time", "(", ")", "if", "end_time", "-", "self", ".", "stat_clock", ">", "self", ".", "opts", "[", "'master_stats_event_iter'", "]", ":", "# Fire the event with the stat...
Fire events with stat info if it's time
[ "Fire", "events", "with", "stat", "info", "if", "it", "s", "time" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1068-L1077
train
Fire events with stat info if it s time
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/master.py
MWorker._handle_clear
def _handle_clear(self, load): ''' Process a cleartext command :param dict load: Cleartext payload :return: The result of passing the load to a function in ClearFuncs corresponding to the command specified in the load's 'cmd' key. ''' log.trace('Clear pa...
python
def _handle_clear(self, load): ''' Process a cleartext command :param dict load: Cleartext payload :return: The result of passing the load to a function in ClearFuncs corresponding to the command specified in the load's 'cmd' key. ''' log.trace('Clear pa...
[ "def", "_handle_clear", "(", "self", ",", "load", ")", ":", "log", ".", "trace", "(", "'Clear payload received with command %s'", ",", "load", "[", "'cmd'", "]", ")", "cmd", "=", "load", "[", "'cmd'", "]", "if", "cmd", ".", "startswith", "(", "'__'", ")"...
Process a cleartext command :param dict load: Cleartext payload :return: The result of passing the load to a function in ClearFuncs corresponding to the command specified in the load's 'cmd' key.
[ "Process", "a", "cleartext", "command" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1079-L1097
train
Process a cleartext command and pass the load to a function in ClearFuncs corresponding to .
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/master.py
MWorker._handle_aes
def _handle_aes(self, data): ''' Process a command sent via an AES key :param str load: Encrypted payload :return: The result of passing the load to a function in AESFuncs corresponding to the command specified in the load's 'cmd' key. ''' if 'cmd' not i...
python
def _handle_aes(self, data): ''' Process a command sent via an AES key :param str load: Encrypted payload :return: The result of passing the load to a function in AESFuncs corresponding to the command specified in the load's 'cmd' key. ''' if 'cmd' not i...
[ "def", "_handle_aes", "(", "self", ",", "data", ")", ":", "if", "'cmd'", "not", "in", "data", ":", "log", ".", "error", "(", "'Received malformed command %s'", ",", "data", ")", "return", "{", "}", "cmd", "=", "data", "[", "'cmd'", "]", "log", ".", "...
Process a command sent via an AES key :param str load: Encrypted payload :return: The result of passing the load to a function in AESFuncs corresponding to the command specified in the load's 'cmd' key.
[ "Process", "a", "command", "sent", "via", "an", "AES", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1099-L1128
train
Process a command sent via an AES key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/master.py
MWorker.run
def run(self): ''' Start a Master Worker ''' salt.utils.process.appendproctitle(self.name) self.clear_funcs = ClearFuncs( self.opts, self.key, ) self.aes_funcs = AESFuncs(self.opts) salt.utils.crypt.reinit_crypto() self.__b...
python
def run(self): ''' Start a Master Worker ''' salt.utils.process.appendproctitle(self.name) self.clear_funcs = ClearFuncs( self.opts, self.key, ) self.aes_funcs = AESFuncs(self.opts) salt.utils.crypt.reinit_crypto() self.__b...
[ "def", "run", "(", "self", ")", ":", "salt", ".", "utils", ".", "process", ".", "appendproctitle", "(", "self", ".", "name", ")", "self", ".", "clear_funcs", "=", "ClearFuncs", "(", "self", ".", "opts", ",", "self", ".", "key", ",", ")", "self", "....
Start a Master Worker
[ "Start", "a", "Master", "Worker" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1130-L1141
train
Start a Master Worker
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/master.py
AESFuncs.__setup_fileserver
def __setup_fileserver(self): ''' Set the local file objects from the file server interface ''' # Avoid circular import import salt.fileserver self.fs_ = salt.fileserver.Fileserver(self.opts) self._serve_file = self.fs_.serve_file self._file_find = self.fs...
python
def __setup_fileserver(self): ''' Set the local file objects from the file server interface ''' # Avoid circular import import salt.fileserver self.fs_ = salt.fileserver.Fileserver(self.opts) self._serve_file = self.fs_.serve_file self._file_find = self.fs...
[ "def", "__setup_fileserver", "(", "self", ")", ":", "# Avoid circular import", "import", "salt", ".", "fileserver", "self", ".", "fs_", "=", "salt", ".", "fileserver", ".", "Fileserver", "(", "self", ".", "opts", ")", "self", ".", "_serve_file", "=", "self",...
Set the local file objects from the file server interface
[ "Set", "the", "local", "file", "objects", "from", "the", "file", "server", "interface" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1176-L1191
train
Setup the local file objects from the file server interface
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/master.py
AESFuncs.__verify_minion
def __verify_minion(self, id_, token): ''' Take a minion id and a string signed with the minion private key The string needs to verify as 'salt' with the minion public key :param str id_: A minion ID :param str token: A string signed with the minion private key :rtype: ...
python
def __verify_minion(self, id_, token): ''' Take a minion id and a string signed with the minion private key The string needs to verify as 'salt' with the minion public key :param str id_: A minion ID :param str token: A string signed with the minion private key :rtype: ...
[ "def", "__verify_minion", "(", "self", ",", "id_", ",", "token", ")", ":", "if", "not", "salt", ".", "utils", ".", "verify", ".", "valid_id", "(", "self", ".", "opts", ",", "id_", ")", ":", "return", "False", "pub_path", "=", "os", ".", "path", "."...
Take a minion id and a string signed with the minion private key The string needs to verify as 'salt' with the minion public key :param str id_: A minion ID :param str token: A string signed with the minion private key :rtype: bool :return: Boolean indicating whether or not the...
[ "Take", "a", "minion", "id", "and", "a", "string", "signed", "with", "the", "minion", "private", "key", "The", "string", "needs", "to", "verify", "as", "salt", "with", "the", "minion", "public", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1193-L1229
train
Verify a minion ID and a string signed with the minion private key
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/master.py
AESFuncs.__verify_minion_publish
def __verify_minion_publish(self, clear_load): ''' Verify that the passed information authorized a minion to execute :param dict clear_load: A publication load from a minion :rtype: bool :return: A boolean indicating if the minion is allowed to publish the command in the load ...
python
def __verify_minion_publish(self, clear_load): ''' Verify that the passed information authorized a minion to execute :param dict clear_load: A publication load from a minion :rtype: bool :return: A boolean indicating if the minion is allowed to publish the command in the load ...
[ "def", "__verify_minion_publish", "(", "self", ",", "clear_load", ")", ":", "# Verify that the load is valid", "if", "'peer'", "not", "in", "self", ".", "opts", ":", "return", "False", "if", "not", "isinstance", "(", "self", ".", "opts", "[", "'peer'", "]", ...
Verify that the passed information authorized a minion to execute :param dict clear_load: A publication load from a minion :rtype: bool :return: A boolean indicating if the minion is allowed to publish the command in the load
[ "Verify", "that", "the", "passed", "information", "authorized", "a", "minion", "to", "execute" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1244-L1294
train
Verify that the passed information authorized a minion to execute a publish command in the load
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/master.py
AESFuncs.__verify_load
def __verify_load(self, load, verify_keys): ''' A utility function to perform common verification steps. :param dict load: A payload received from a minion :param list verify_keys: A list of strings that should be present in a given load :rtype: bool :rtype: dic...
python
def __verify_load(self, load, verify_keys): ''' A utility function to perform common verification steps. :param dict load: A payload received from a minion :param list verify_keys: A list of strings that should be present in a given load :rtype: bool :rtype: dic...
[ "def", "__verify_load", "(", "self", ",", "load", ",", "verify_keys", ")", ":", "if", "any", "(", "key", "not", "in", "load", "for", "key", "in", "verify_keys", ")", ":", "return", "False", "if", "'tok'", "not", "in", "load", ":", "log", ".", "error"...
A utility function to perform common verification steps. :param dict load: A payload received from a minion :param list verify_keys: A list of strings that should be present in a given load :rtype: bool :rtype: dict :return: The original load (except for the token) if t...
[ "A", "utility", "function", "to", "perform", "common", "verification", "steps", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1296-L1326
train
This function is used to perform common verification steps.
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/master.py
AESFuncs._master_tops
def _master_tops(self, load): ''' Return the results from an external node classifier if one is specified :param dict load: A payload received from a minion :return: The results from an external node classifier ''' load = self.__verify_load(load, ('id', 'tok')) ...
python
def _master_tops(self, load): ''' Return the results from an external node classifier if one is specified :param dict load: A payload received from a minion :return: The results from an external node classifier ''' load = self.__verify_load(load, ('id', 'tok')) ...
[ "def", "_master_tops", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "return", "self", ".", "masterapi", "...
Return the results from an external node classifier if one is specified :param dict load: A payload received from a minion :return: The results from an external node classifier
[ "Return", "the", "results", "from", "an", "external", "node", "classifier", "if", "one", "is", "specified" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1328-L1339
train
Return the results from an external node classifier if one is 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/master.py
AESFuncs._mine_get
def _mine_get(self, load): ''' Gathers the data from the specified minions' mine :param dict load: A payload received from a minion :rtype: dict :return: Mine data from the specified minions ''' load = self.__verify_load(load, ('id', 'tgt', 'fun', 'tok')) ...
python
def _mine_get(self, load): ''' Gathers the data from the specified minions' mine :param dict load: A payload received from a minion :rtype: dict :return: Mine data from the specified minions ''' load = self.__verify_load(load, ('id', 'tgt', 'fun', 'tok')) ...
[ "def", "_mine_get", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'tgt'", ",", "'fun'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "else", ":...
Gathers the data from the specified minions' mine :param dict load: A payload received from a minion :rtype: dict :return: Mine data from the specified minions
[ "Gathers", "the", "data", "from", "the", "specified", "minions", "mine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1379-L1392
train
Gathers the data from the specified minions
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/master.py
AESFuncs._mine
def _mine(self, load): ''' Store the mine data :param dict load: A payload received from a minion :rtype: bool :return: True if the data has been stored in the mine ''' load = self.__verify_load(load, ('id', 'data', 'tok')) if load is False: ...
python
def _mine(self, load): ''' Store the mine data :param dict load: A payload received from a minion :rtype: bool :return: True if the data has been stored in the mine ''' load = self.__verify_load(load, ('id', 'data', 'tok')) if load is False: ...
[ "def", "_mine", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'data'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "return", "self", ".", "mas...
Store the mine data :param dict load: A payload received from a minion :rtype: bool :return: True if the data has been stored in the mine
[ "Store", "the", "mine", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1394-L1406
train
Store the mine data in the mine data store
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/master.py
AESFuncs._mine_delete
def _mine_delete(self, load): ''' Allow the minion to delete a specific function from its own mine :param dict load: A payload received from a minion :rtype: bool :return: Boolean indicating whether or not the given function was deleted from the mine ''' load = ...
python
def _mine_delete(self, load): ''' Allow the minion to delete a specific function from its own mine :param dict load: A payload received from a minion :rtype: bool :return: Boolean indicating whether or not the given function was deleted from the mine ''' load = ...
[ "def", "_mine_delete", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'fun'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "else", ":", "return", ...
Allow the minion to delete a specific function from its own mine :param dict load: A payload received from a minion :rtype: bool :return: Boolean indicating whether or not the given function was deleted from the mine
[ "Allow", "the", "minion", "to", "delete", "a", "specific", "function", "from", "its", "own", "mine" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1408-L1421
train
Allow the minion to delete a specific function from its own mine
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/master.py
AESFuncs._mine_flush
def _mine_flush(self, load): ''' Allow the minion to delete all of its own mine contents :param dict load: A payload received from a minion ''' load = self.__verify_load(load, ('id', 'tok')) if load is False: return {} else: return self.ma...
python
def _mine_flush(self, load): ''' Allow the minion to delete all of its own mine contents :param dict load: A payload received from a minion ''' load = self.__verify_load(load, ('id', 'tok')) if load is False: return {} else: return self.ma...
[ "def", "_mine_flush", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "else", ":", "return", "self", ".", ...
Allow the minion to delete all of its own mine contents :param dict load: A payload received from a minion
[ "Allow", "the", "minion", "to", "delete", "all", "of", "its", "own", "mine", "contents" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1423-L1433
train
Allow the minion to delete all of its own mine contents
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/master.py
AESFuncs._file_recv
def _file_recv(self, load): ''' Allows minions to send files to the master, files are sent to the master file cache ''' if any(key not in load for key in ('id', 'path', 'loc')): return False if not isinstance(load['path'], list): return False ...
python
def _file_recv(self, load): ''' Allows minions to send files to the master, files are sent to the master file cache ''' if any(key not in load for key in ('id', 'path', 'loc')): return False if not isinstance(load['path'], list): return False ...
[ "def", "_file_recv", "(", "self", ",", "load", ")", ":", "if", "any", "(", "key", "not", "in", "load", "for", "key", "in", "(", "'id'", ",", "'path'", ",", "'loc'", ")", ")", ":", "return", "False", "if", "not", "isinstance", "(", "load", "[", "'...
Allows minions to send files to the master, files are sent to the master file cache
[ "Allows", "minions", "to", "send", "files", "to", "the", "master", "files", "are", "sent", "to", "the", "master", "file", "cache" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1435-L1514
train
Internal method to send files to the master file cache
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/master.py
AESFuncs._pillar
def _pillar(self, load): ''' Return the pillar data for the minion :param dict load: Minion payload :rtype: dict :return: The pillar data for the minion ''' if any(key not in load for key in ('id', 'grains')): return False if not salt.utils.v...
python
def _pillar(self, load): ''' Return the pillar data for the minion :param dict load: Minion payload :rtype: dict :return: The pillar data for the minion ''' if any(key not in load for key in ('id', 'grains')): return False if not salt.utils.v...
[ "def", "_pillar", "(", "self", ",", "load", ")", ":", "if", "any", "(", "key", "not", "in", "load", "for", "key", "in", "(", "'id'", ",", "'grains'", ")", ")", ":", "return", "False", "if", "not", "salt", ".", "utils", ".", "verify", ".", "valid_...
Return the pillar data for the minion :param dict load: Minion payload :rtype: dict :return: The pillar data for the minion
[ "Return", "the", "pillar", "data", "for", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1516-L1549
train
Return the pillar data for 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/master.py
AESFuncs._minion_event
def _minion_event(self, load): ''' Receive an event from the minion and fire it on the master event interface :param dict load: The minion payload ''' load = self.__verify_load(load, ('id', 'tok')) if load is False: return {} # Route to master...
python
def _minion_event(self, load): ''' Receive an event from the minion and fire it on the master event interface :param dict load: The minion payload ''' load = self.__verify_load(load, ('id', 'tok')) if load is False: return {} # Route to master...
[ "def", "_minion_event", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "# Route to master event bus", "self", "...
Receive an event from the minion and fire it on the master event interface :param dict load: The minion payload
[ "Receive", "an", "event", "from", "the", "minion", "and", "fire", "it", "on", "the", "master", "event", "interface" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1551-L1564
train
Handle an event from the minion and fire it on the master event bus
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/master.py
AESFuncs._handle_minion_event
def _handle_minion_event(self, load): ''' Act on specific events from minions ''' id_ = load['id'] if load.get('tag', '') == '_salt_error': log.error( 'Received minion error from [%s]: %s', id_, load['data']['message'] ) ...
python
def _handle_minion_event(self, load): ''' Act on specific events from minions ''' id_ = load['id'] if load.get('tag', '') == '_salt_error': log.error( 'Received minion error from [%s]: %s', id_, load['data']['message'] ) ...
[ "def", "_handle_minion_event", "(", "self", ",", "load", ")", ":", "id_", "=", "load", "[", "'id'", "]", "if", "load", ".", "get", "(", "'tag'", ",", "''", ")", "==", "'_salt_error'", ":", "log", ".", "error", "(", "'Received minion error from [%s]: %s'", ...
Act on specific events from minions
[ "Act", "on", "specific", "events", "from", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1566-L1595
train
Handle a minion event from the minions cache
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/master.py
AESFuncs._return
def _return(self, load): ''' Handle the return data sent from the minions. Takes the return, verifies it and fires it on the master event bus. Typically, this event is consumed by the Salt CLI waiting on the other end of the event bus but could be heard by any listener on the bu...
python
def _return(self, load): ''' Handle the return data sent from the minions. Takes the return, verifies it and fires it on the master event bus. Typically, this event is consumed by the Salt CLI waiting on the other end of the event bus but could be heard by any listener on the bu...
[ "def", "_return", "(", "self", ",", "load", ")", ":", "if", "self", ".", "opts", "[", "'require_minion_sign_messages'", "]", "and", "'sig'", "not", "in", "load", ":", "log", ".", "critical", "(", "'_return: Master is requiring minions to sign their '", "'messages,...
Handle the return data sent from the minions. Takes the return, verifies it and fires it on the master event bus. Typically, this event is consumed by the Salt CLI waiting on the other end of the event bus but could be heard by any listener on the bus. :param dict load: The minion payl...
[ "Handle", "the", "return", "data", "sent", "from", "the", "minions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1597-L1636
train
Handle the return data sent from the master and returns 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/master.py
AESFuncs._syndic_return
def _syndic_return(self, load): ''' Receive a syndic minion return and format it to look like returns from individual minions. :param dict load: The minion payload ''' loads = load.get('load') if not isinstance(loads, list): loads = [load] # support ...
python
def _syndic_return(self, load): ''' Receive a syndic minion return and format it to look like returns from individual minions. :param dict load: The minion payload ''' loads = load.get('load') if not isinstance(loads, list): loads = [load] # support ...
[ "def", "_syndic_return", "(", "self", ",", "load", ")", ":", "loads", "=", "load", ".", "get", "(", "'load'", ")", "if", "not", "isinstance", "(", "loads", ",", "list", ")", ":", "loads", "=", "[", "load", "]", "# support old syndics not aggregating return...
Receive a syndic minion return and format it to look like returns from individual minions. :param dict load: The minion payload
[ "Receive", "a", "syndic", "minion", "return", "and", "format", "it", "to", "look", "like", "returns", "from", "individual", "minions", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1638-L1681
train
Receive a syndic minion return and format it to look like returns from individual minions.
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/master.py
AESFuncs.minion_runner
def minion_runner(self, clear_load): ''' Execute a runner from a minion, return the runner's function data :param dict clear_load: The minion payload :rtype: dict :return: The runner function data ''' load = self.__verify_load(clear_load, ('fun', 'arg', 'id', 't...
python
def minion_runner(self, clear_load): ''' Execute a runner from a minion, return the runner's function data :param dict clear_load: The minion payload :rtype: dict :return: The runner function data ''' load = self.__verify_load(clear_load, ('fun', 'arg', 'id', 't...
[ "def", "minion_runner", "(", "self", ",", "clear_load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "clear_load", ",", "(", "'fun'", ",", "'arg'", ",", "'id'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}"...
Execute a runner from a minion, return the runner's function data :param dict clear_load: The minion payload :rtype: dict :return: The runner function data
[ "Execute", "a", "runner", "from", "a", "minion", "return", "the", "runner", "s", "function", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1683-L1696
train
Execute a runner from a minion return the runner s function 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/master.py
AESFuncs.pub_ret
def pub_ret(self, load): ''' Request the return data from a specific jid, only allowed if the requesting minion also initialted the execution. :param dict load: The minion payload :rtype: dict :return: Return data corresponding to a given JID ''' load = ...
python
def pub_ret(self, load): ''' Request the return data from a specific jid, only allowed if the requesting minion also initialted the execution. :param dict load: The minion payload :rtype: dict :return: Return data corresponding to a given JID ''' load = ...
[ "def", "pub_ret", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'jid'", ",", "'id'", ",", "'tok'", ")", ")", "if", "load", "is", "False", ":", "return", "{", "}", "# Check that this minion can ac...
Request the return data from a specific jid, only allowed if the requesting minion also initialted the execution. :param dict load: The minion payload :rtype: dict :return: Return data corresponding to a given JID
[ "Request", "the", "return", "data", "from", "a", "specific", "jid", "only", "allowed", "if", "the", "requesting", "minion", "also", "initialted", "the", "execution", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1698-L1722
train
Request the return data from a specific jid only allowed
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/master.py
AESFuncs.minion_pub
def minion_pub(self, clear_load): ''' Publish a command initiated from a minion, this method executes minion restrictions so that the minion publication will only work if it is enabled in the config. The configuration on the master allows minions to be matched to salt fu...
python
def minion_pub(self, clear_load): ''' Publish a command initiated from a minion, this method executes minion restrictions so that the minion publication will only work if it is enabled in the config. The configuration on the master allows minions to be matched to salt fu...
[ "def", "minion_pub", "(", "self", ",", "clear_load", ")", ":", "if", "not", "self", ".", "__verify_minion_publish", "(", "clear_load", ")", ":", "return", "{", "}", "else", ":", "return", "self", ".", "masterapi", ".", "minion_pub", "(", "clear_load", ")" ...
Publish a command initiated from a minion, this method executes minion restrictions so that the minion publication will only work if it is enabled in the config. The configuration on the master allows minions to be matched to salt functions, so the minions can only publish allowed salt ...
[ "Publish", "a", "command", "initiated", "from", "a", "minion", "this", "method", "executes", "minion", "restrictions", "so", "that", "the", "minion", "publication", "will", "only", "work", "if", "it", "is", "enabled", "in", "the", "config", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1724-L1757
train
Publish a command initiated from a 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/master.py
AESFuncs.minion_publish
def minion_publish(self, clear_load): ''' Publish a command initiated from a minion, this method executes minion restrictions so that the minion publication will only work if it is enabled in the config. The configuration on the master allows minions to be matched to sal...
python
def minion_publish(self, clear_load): ''' Publish a command initiated from a minion, this method executes minion restrictions so that the minion publication will only work if it is enabled in the config. The configuration on the master allows minions to be matched to sal...
[ "def", "minion_publish", "(", "self", ",", "clear_load", ")", ":", "if", "not", "self", ".", "__verify_minion_publish", "(", "clear_load", ")", ":", "return", "{", "}", "else", ":", "return", "self", ".", "masterapi", ".", "minion_publish", "(", "clear_load"...
Publish a command initiated from a minion, this method executes minion restrictions so that the minion publication will only work if it is enabled in the config. The configuration on the master allows minions to be matched to salt functions, so the minions can only publish allowed salt ...
[ "Publish", "a", "command", "initiated", "from", "a", "minion", "this", "method", "executes", "minion", "restrictions", "so", "that", "the", "minion", "publication", "will", "only", "work", "if", "it", "is", "enabled", "in", "the", "config", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1759-L1792
train
Publish a command initiated from a 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/master.py
AESFuncs.revoke_auth
def revoke_auth(self, load): ''' Allow a minion to request revocation of its own key :param dict load: The minion payload :rtype: dict :return: If the load is invalid, it may be returned. No key operation is performed. :rtype: bool :return: True if key was revo...
python
def revoke_auth(self, load): ''' Allow a minion to request revocation of its own key :param dict load: The minion payload :rtype: dict :return: If the load is invalid, it may be returned. No key operation is performed. :rtype: bool :return: True if key was revo...
[ "def", "revoke_auth", "(", "self", ",", "load", ")", ":", "load", "=", "self", ".", "__verify_load", "(", "load", ",", "(", "'id'", ",", "'tok'", ")", ")", "if", "not", "self", ".", "opts", ".", "get", "(", "'allow_minion_key_revoke'", ",", "False", ...
Allow a minion to request revocation of its own key :param dict load: The minion payload :rtype: dict :return: If the load is invalid, it may be returned. No key operation is performed. :rtype: bool :return: True if key was revoked, False if not
[ "Allow", "a", "minion", "to", "request", "revocation", "of", "its", "own", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1794-L1818
train
Allow a minion to request revocation of its own key
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/master.py
AESFuncs.run_func
def run_func(self, func, load): ''' Wrapper for running functions executed with AES encryption :param function func: The function to run :return: The result of the master function that was called ''' # Don't honor private functions if func.startswith('__'): ...
python
def run_func(self, func, load): ''' Wrapper for running functions executed with AES encryption :param function func: The function to run :return: The result of the master function that was called ''' # Don't honor private functions if func.startswith('__'): ...
[ "def", "run_func", "(", "self", ",", "func", ",", "load", ")", ":", "# Don't honor private functions", "if", "func", ".", "startswith", "(", "'__'", ")", ":", "# TODO: return some error? Seems odd to return {}", "return", "{", "}", ",", "{", "'fun'", ":", "'send...
Wrapper for running functions executed with AES encryption :param function func: The function to run :return: The result of the master function that was called
[ "Wrapper", "for", "running", "functions", "executed", "with", "AES", "encryption" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1820-L1859
train
Wrapper for running functions that are not encrypted with AES encryption
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/master.py
ClearFuncs.runner
def runner(self, clear_load): ''' Send a master control function back to the runner system ''' # All runner ops pass through eauth auth_type, err_name, key, sensitive_load_keys = self._prep_auth_info(clear_load) # Authenticate auth_check = self.loadauth.check_aut...
python
def runner(self, clear_load): ''' Send a master control function back to the runner system ''' # All runner ops pass through eauth auth_type, err_name, key, sensitive_load_keys = self._prep_auth_info(clear_load) # Authenticate auth_check = self.loadauth.check_aut...
[ "def", "runner", "(", "self", ",", "clear_load", ")", ":", "# All runner ops pass through eauth", "auth_type", ",", "err_name", ",", "key", ",", "sensitive_load_keys", "=", "self", ".", "_prep_auth_info", "(", "clear_load", ")", "# Authenticate", "auth_check", "=", ...
Send a master control function back to the runner system
[ "Send", "a", "master", "control", "function", "back", "to", "the", "runner", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1894-L1947
train
Send a master control function back to the runner 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/master.py
ClearFuncs.wheel
def wheel(self, clear_load): ''' Send a master control function back to the wheel system ''' # All wheel ops pass through eauth auth_type, err_name, key, sensitive_load_keys = self._prep_auth_info(clear_load) # Authenticate auth_check = self.loadauth.check_authen...
python
def wheel(self, clear_load): ''' Send a master control function back to the wheel system ''' # All wheel ops pass through eauth auth_type, err_name, key, sensitive_load_keys = self._prep_auth_info(clear_load) # Authenticate auth_check = self.loadauth.check_authen...
[ "def", "wheel", "(", "self", ",", "clear_load", ")", ":", "# All wheel ops pass through eauth", "auth_type", ",", "err_name", ",", "key", ",", "sensitive_load_keys", "=", "self", ".", "_prep_auth_info", "(", "clear_load", ")", "# Authenticate", "auth_check", "=", ...
Send a master control function back to the wheel system
[ "Send", "a", "master", "control", "function", "back", "to", "the", "wheel", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L1949-L2018
train
Send a master control function back to the wheel 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/master.py
ClearFuncs.mk_token
def mk_token(self, clear_load): ''' Create and return an authentication token, the clear load needs to contain the eauth key and the needed authentication creds. ''' token = self.loadauth.mk_token(clear_load) if not token: log.warning('Authentication failure o...
python
def mk_token(self, clear_load): ''' Create and return an authentication token, the clear load needs to contain the eauth key and the needed authentication creds. ''' token = self.loadauth.mk_token(clear_load) if not token: log.warning('Authentication failure o...
[ "def", "mk_token", "(", "self", ",", "clear_load", ")", ":", "token", "=", "self", ".", "loadauth", ".", "mk_token", "(", "clear_load", ")", "if", "not", "token", ":", "log", ".", "warning", "(", "'Authentication failure of type \"eauth\" occurred.'", ")", "re...
Create and return an authentication token, the clear load needs to contain the eauth key and the needed authentication creds.
[ "Create", "and", "return", "an", "authentication", "token", "the", "clear", "load", "needs", "to", "contain", "the", "eauth", "key", "and", "the", "needed", "authentication", "creds", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L2020-L2029
train
Create and return an authentication token.
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/master.py
ClearFuncs.publish
def publish(self, clear_load): ''' This method sends out publications to the minions, it can only be used by the LocalClient. ''' extra = clear_load.get('kwargs', {}) publisher_acl = salt.acl.PublisherACL(self.opts['publisher_acl_blacklist']) if publisher_acl.us...
python
def publish(self, clear_load): ''' This method sends out publications to the minions, it can only be used by the LocalClient. ''' extra = clear_load.get('kwargs', {}) publisher_acl = salt.acl.PublisherACL(self.opts['publisher_acl_blacklist']) if publisher_acl.us...
[ "def", "publish", "(", "self", ",", "clear_load", ")", ":", "extra", "=", "clear_load", ".", "get", "(", "'kwargs'", ",", "{", "}", ")", "publisher_acl", "=", "salt", ".", "acl", ".", "PublisherACL", "(", "self", ".", "opts", "[", "'publisher_acl_blackli...
This method sends out publications to the minions, it can only be used by the LocalClient.
[ "This", "method", "sends", "out", "publications", "to", "the", "minions", "it", "can", "only", "be", "used", "by", "the", "LocalClient", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L2063-L2174
train
Sends out publications to the minions
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/master.py
ClearFuncs._prep_jid
def _prep_jid(self, clear_load, extra): ''' Return a jid for this publication ''' # the jid in clear_load can be None, '', or something else. this is an # attempt to clean up the value before passing to plugins passed_jid = clear_load['jid'] if clear_load.get('jid') else ...
python
def _prep_jid(self, clear_load, extra): ''' Return a jid for this publication ''' # the jid in clear_load can be None, '', or something else. this is an # attempt to clean up the value before passing to plugins passed_jid = clear_load['jid'] if clear_load.get('jid') else ...
[ "def", "_prep_jid", "(", "self", ",", "clear_load", ",", "extra", ")", ":", "# the jid in clear_load can be None, '', or something else. this is an", "# attempt to clean up the value before passing to plugins", "passed_jid", "=", "clear_load", "[", "'jid'", "]", "if", "clear_lo...
Return a jid for this publication
[ "Return", "a", "jid", "for", "this", "publication" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L2194-L2217
train
Prepare a jid for this publication
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/master.py
ClearFuncs._send_pub
def _send_pub(self, load): ''' Take a load and send it across the network to connected minions ''' for transport, opts in iter_transport_opts(self.opts): chan = salt.transport.server.PubServerChannel.factory(opts) chan.publish(load)
python
def _send_pub(self, load): ''' Take a load and send it across the network to connected minions ''' for transport, opts in iter_transport_opts(self.opts): chan = salt.transport.server.PubServerChannel.factory(opts) chan.publish(load)
[ "def", "_send_pub", "(", "self", ",", "load", ")", ":", "for", "transport", ",", "opts", "in", "iter_transport_opts", "(", "self", ".", "opts", ")", ":", "chan", "=", "salt", ".", "transport", ".", "server", ".", "PubServerChannel", ".", "factory", "(", ...
Take a load and send it across the network to connected minions
[ "Take", "a", "load", "and", "send", "it", "across", "the", "network", "to", "connected", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L2219-L2225
train
Send a load to all the minions that have been connected to
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/master.py
ClearFuncs._send_ssh_pub
def _send_ssh_pub(self, load, ssh_minions=False): ''' Take a load and send it across the network to ssh minions ''' if self.opts['enable_ssh_minions'] is True and ssh_minions is True: log.debug('Send payload to ssh minions') threading.Thread(target=self.ssh_client...
python
def _send_ssh_pub(self, load, ssh_minions=False): ''' Take a load and send it across the network to ssh minions ''' if self.opts['enable_ssh_minions'] is True and ssh_minions is True: log.debug('Send payload to ssh minions') threading.Thread(target=self.ssh_client...
[ "def", "_send_ssh_pub", "(", "self", ",", "load", ",", "ssh_minions", "=", "False", ")", ":", "if", "self", ".", "opts", "[", "'enable_ssh_minions'", "]", "is", "True", "and", "ssh_minions", "is", "True", ":", "log", ".", "debug", "(", "'Send payload to ss...
Take a load and send it across the network to ssh minions
[ "Take", "a", "load", "and", "send", "it", "across", "the", "network", "to", "ssh", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L2233-L2239
train
Send a load to the ssh 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/master.py
ClearFuncs._prep_pub
def _prep_pub(self, minions, jid, clear_load, extra, missing): ''' Take a given load and perform the necessary steps to prepare a publication. TODO: This is really only bound by temporal cohesion and thus should be refactored even further. ''' clear_load['jid'] =...
python
def _prep_pub(self, minions, jid, clear_load, extra, missing): ''' Take a given load and perform the necessary steps to prepare a publication. TODO: This is really only bound by temporal cohesion and thus should be refactored even further. ''' clear_load['jid'] =...
[ "def", "_prep_pub", "(", "self", ",", "minions", ",", "jid", ",", "clear_load", ",", "extra", ",", "missing", ")", ":", "clear_load", "[", "'jid'", "]", "=", "jid", "delimiter", "=", "clear_load", ".", "get", "(", "'kwargs'", ",", "{", "}", ")", ".",...
Take a given load and perform the necessary steps to prepare a publication. TODO: This is really only bound by temporal cohesion and thus should be refactored even further.
[ "Take", "a", "given", "load", "and", "perform", "the", "necessary", "steps", "to", "prepare", "a", "publication", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/master.py#L2241-L2378
train
Prepare a publication for a given load and perform the necessary steps to prepare a publication.
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/sqlite3.py
row_absent
def row_absent(name, db, table, where_sql, where_args=None): ''' Makes sure the specified row is absent in db. If multiple rows match where_sql, then the state will fail. name Only used as the unique ID db The database file name table The table name to check wher...
python
def row_absent(name, db, table, where_sql, where_args=None): ''' Makes sure the specified row is absent in db. If multiple rows match where_sql, then the state will fail. name Only used as the unique ID db The database file name table The table name to check wher...
[ "def", "row_absent", "(", "name", ",", "db", ",", "table", ",", "where_sql", ",", "where_args", "=", "None", ")", ":", "changes", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", ...
Makes sure the specified row is absent in db. If multiple rows match where_sql, then the state will fail. name Only used as the unique ID db The database file name table The table name to check where_sql The sql to select the row to check where_args ...
[ "Makes", "sure", "the", "specified", "row", "is", "absent", "in", "db", ".", "If", "multiple", "rows", "match", "where_sql", "then", "the", "state", "will", "fail", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/sqlite3.py#L117-L191
train
Make sure the specified row is absent in db.
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/sqlite3.py
row_present
def row_present(name, db, table, data, where_sql, where_args=None, update=False): ''' Checks to make sure the given row exists. If row exists and update is True then row will be updated with data. Otherwise it wi...
python
def row_present(name, db, table, data, where_sql, where_args=None, update=False): ''' Checks to make sure the given row exists. If row exists and update is True then row will be updated with data. Otherwise it wi...
[ "def", "row_present", "(", "name", ",", "db", ",", "table", ",", "data", ",", "where_sql", ",", "where_args", "=", "None", ",", "update", "=", "False", ")", ":", "changes", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'re...
Checks to make sure the given row exists. If row exists and update is True then row will be updated with data. Otherwise it will leave existing row unmodified and check it against data. If the existing data doesn't match data_check the state will fail. If the row doesn't exist then it will insert data ...
[ "Checks", "to", "make", "sure", "the", "given", "row", "exists", ".", "If", "row", "exists", "and", "update", "is", "True", "then", "row", "will", "be", "updated", "with", "data", ".", "Otherwise", "it", "will", "leave", "existing", "row", "unmodified", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/sqlite3.py#L194-L331
train
Checks to make sure the given row exists and is present in the given database table and data. If update is True the row will be updated with data. Otherwise it will fail.
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/sqlite3.py
table_absent
def table_absent(name, db): ''' Make sure the specified table does not exist name The name of the table db The name of the database file ''' changes = {'name': name, 'changes': {}, 'result': None, 'comment': ''} conn = None t...
python
def table_absent(name, db): ''' Make sure the specified table does not exist name The name of the table db The name of the database file ''' changes = {'name': name, 'changes': {}, 'result': None, 'comment': ''} conn = None t...
[ "def", "table_absent", "(", "name", ",", "db", ")", ":", "changes", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "conn", "=", "None", "try", ":", "conn", "=", "s...
Make sure the specified table does not exist name The name of the table db The name of the database file
[ "Make", "sure", "the", "specified", "table", "does", "not", "exist" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/sqlite3.py#L334-L380
train
Make sure the specified table does not exist in the specified 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/sqlite3.py
table_present
def table_present(name, db, schema, force=False): ''' Make sure the specified table exists with the specified schema name The name of the table db The name of the database file schema The dictionary containing the schema information force If the name of the ta...
python
def table_present(name, db, schema, force=False): ''' Make sure the specified table exists with the specified schema name The name of the table db The name of the database file schema The dictionary containing the schema information force If the name of the ta...
[ "def", "table_present", "(", "name", ",", "db", ",", "schema", ",", "force", "=", "False", ")", ":", "changes", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "conn"...
Make sure the specified table exists with the specified schema name The name of the table db The name of the database file schema The dictionary containing the schema information force If the name of the table exists and force is set to False, the state will f...
[ "Make", "sure", "the", "specified", "table", "exists", "with", "the", "specified", "schema" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/sqlite3.py#L383-L471
train
Ensure the specified table exists with the specified schema.
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/matchers/range_match.py
match
def match(tgt, opts=None): ''' Matches based on range cluster ''' if not opts: opts = __opts__ if HAS_RANGE: range_ = seco.range.Range(opts['range_server']) try: return opts['grains']['fqdn'] in range_.expand(tgt) except seco.range.RangeException as exc: ...
python
def match(tgt, opts=None): ''' Matches based on range cluster ''' if not opts: opts = __opts__ if HAS_RANGE: range_ = seco.range.Range(opts['range_server']) try: return opts['grains']['fqdn'] in range_.expand(tgt) except seco.range.RangeException as exc: ...
[ "def", "match", "(", "tgt", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "if", "HAS_RANGE", ":", "range_", "=", "seco", ".", "range", ".", "Range", "(", "opts", "[", "'range_server'", "]", ")", "try", ":", ...
Matches based on range cluster
[ "Matches", "based", "on", "range", "cluster" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/range_match.py#L19-L32
train
Matches based on range cluster Matches based on range cluster
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/returners/cassandra_return.py
returner
def returner(ret): ''' Return data to a Cassandra ColumnFamily ''' consistency_level = getattr(pycassa.ConsistencyLevel, __opts__['cassandra.consistency_level']) pool = pycassa.ConnectionPool(__opts__['cassandra.keyspace'], __opts__...
python
def returner(ret): ''' Return data to a Cassandra ColumnFamily ''' consistency_level = getattr(pycassa.ConsistencyLevel, __opts__['cassandra.consistency_level']) pool = pycassa.ConnectionPool(__opts__['cassandra.keyspace'], __opts__...
[ "def", "returner", "(", "ret", ")", ":", "consistency_level", "=", "getattr", "(", "pycassa", ".", "ConsistencyLevel", ",", "__opts__", "[", "'cassandra.consistency_level'", "]", ")", "pool", "=", "pycassa", ".", "ConnectionPool", "(", "__opts__", "[", "'cassand...
Return data to a Cassandra ColumnFamily
[ "Return", "data", "to", "a", "Cassandra", "ColumnFamily" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/cassandra_return.py#L54-L76
train
Return data to a Cassandra ColumnFamily
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/seed.py
prep_bootstrap
def prep_bootstrap(mpt): ''' Update and get the random script to a random place CLI Example: .. code-block:: bash salt '*' seed.prep_bootstrap /tmp ''' # Verify that the boostrap script is downloaded bs_ = __salt__['config.gather_bootstrap_script']() fpd_ = os.path.join(mpt, ...
python
def prep_bootstrap(mpt): ''' Update and get the random script to a random place CLI Example: .. code-block:: bash salt '*' seed.prep_bootstrap /tmp ''' # Verify that the boostrap script is downloaded bs_ = __salt__['config.gather_bootstrap_script']() fpd_ = os.path.join(mpt, ...
[ "def", "prep_bootstrap", "(", "mpt", ")", ":", "# Verify that the boostrap script is downloaded", "bs_", "=", "__salt__", "[", "'config.gather_bootstrap_script'", "]", "(", ")", "fpd_", "=", "os", ".", "path", ".", "join", "(", "mpt", ",", "'tmp'", ",", "\"{0}\"...
Update and get the random script to a random place CLI Example: .. code-block:: bash salt '*' seed.prep_bootstrap /tmp
[ "Update", "and", "get", "the", "random", "script", "to", "a", "random", "place" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/seed.py#L39-L61
train
Update and get the random script to a random place CLI Example
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/seed.py
apply_
def apply_(path, id_=None, config=None, approve_key=True, install=True, prep_install=False, pub_key=None, priv_key=None, mount_point=None): ''' Seed a location (disk image, directory, or block device) with the minion config, approve the minion's key, and/or install salt-minion. CLI Example: ...
python
def apply_(path, id_=None, config=None, approve_key=True, install=True, prep_install=False, pub_key=None, priv_key=None, mount_point=None): ''' Seed a location (disk image, directory, or block device) with the minion config, approve the minion's key, and/or install salt-minion. CLI Example: ...
[ "def", "apply_", "(", "path", ",", "id_", "=", "None", ",", "config", "=", "None", ",", "approve_key", "=", "True", ",", "install", "=", "True", ",", "prep_install", "=", "False", ",", "pub_key", "=", "None", ",", "priv_key", "=", "None", ",", "mount...
Seed a location (disk image, directory, or block device) with the minion config, approve the minion's key, and/or install salt-minion. CLI Example: .. code-block:: bash salt 'minion' seed.apply path id [config=config_data] \\ [gen_key=(true|false)] [approve_key=(true|false)] \\ ...
[ "Seed", "a", "location", "(", "disk", "image", "directory", "or", "block", "device", ")", "with", "the", "minion", "config", "approve", "the", "minion", "s", "key", "and", "/", "or", "install", "salt", "-", "minion", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/seed.py#L94-L187
train
Generate a new minion key and a new minion key.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/seed.py
mkconfig
def mkconfig(config=None, tmp=None, id_=None, approve_key=True, pub_key=None, priv_key=None): ''' Generate keys and config and put them in a tmp directory. pub_key absolute path or file content of an optional preseeded salt key p...
python
def mkconfig(config=None, tmp=None, id_=None, approve_key=True, pub_key=None, priv_key=None): ''' Generate keys and config and put them in a tmp directory. pub_key absolute path or file content of an optional preseeded salt key p...
[ "def", "mkconfig", "(", "config", "=", "None", ",", "tmp", "=", "None", ",", "id_", "=", "None", ",", "approve_key", "=", "True", ",", "pub_key", "=", "None", ",", "priv_key", "=", "None", ")", ":", "if", "tmp", "is", "None", ":", "tmp", "=", "te...
Generate keys and config and put them in a tmp directory. pub_key absolute path or file content of an optional preseeded salt key priv_key absolute path or file content of an optional preseeded salt key CLI Example: .. code-block:: bash salt 'minion' seed.mkconfig [config=co...
[ "Generate", "keys", "and", "config", "and", "put", "them", "in", "a", "tmp", "directory", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/seed.py#L190-L246
train
Generate keys and config and put them in a tmp directory.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/seed.py
_install
def _install(mpt): ''' Determine whether salt-minion is installed and, if not, install it. Return True if install is successful or already installed. ''' _check_resolv(mpt) boot_, tmppath = (prep_bootstrap(mpt) or salt.syspaths.BOOTSTRAP) # Exec the chroot command cmd = ...
python
def _install(mpt): ''' Determine whether salt-minion is installed and, if not, install it. Return True if install is successful or already installed. ''' _check_resolv(mpt) boot_, tmppath = (prep_bootstrap(mpt) or salt.syspaths.BOOTSTRAP) # Exec the chroot command cmd = ...
[ "def", "_install", "(", "mpt", ")", ":", "_check_resolv", "(", "mpt", ")", "boot_", ",", "tmppath", "=", "(", "prep_bootstrap", "(", "mpt", ")", "or", "salt", ".", "syspaths", ".", "BOOTSTRAP", ")", "# Exec the chroot command", "cmd", "=", "'if type salt-min...
Determine whether salt-minion is installed and, if not, install it. Return True if install is successful or already installed.
[ "Determine", "whether", "salt", "-", "minion", "is", "installed", "and", "if", "not", "install", "it", ".", "Return", "True", "if", "install", "is", "successful", "or", "already", "installed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/seed.py#L249-L261
train
Install salt - minion if not 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/modules/seed.py
_check_resolv
def _check_resolv(mpt): ''' Check that the resolv.conf is present and populated ''' resolv = os.path.join(mpt, 'etc/resolv.conf') replace = False if os.path.islink(resolv): resolv = os.path.realpath(resolv) if not os.path.isdir(os.path.dirname(resolv)): os.makedirs(os...
python
def _check_resolv(mpt): ''' Check that the resolv.conf is present and populated ''' resolv = os.path.join(mpt, 'etc/resolv.conf') replace = False if os.path.islink(resolv): resolv = os.path.realpath(resolv) if not os.path.isdir(os.path.dirname(resolv)): os.makedirs(os...
[ "def", "_check_resolv", "(", "mpt", ")", ":", "resolv", "=", "os", ".", "path", ".", "join", "(", "mpt", ",", "'etc/resolv.conf'", ")", "replace", "=", "False", "if", "os", ".", "path", ".", "islink", "(", "resolv", ")", ":", "resolv", "=", "os", "...
Check that the resolv.conf is present and populated
[ "Check", "that", "the", "resolv", ".", "conf", "is", "present", "and", "populated" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/seed.py#L264-L284
train
Check that the resolv. conf is present and populated
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
_netsh_file
def _netsh_file(content): ''' helper function to get the results of ``netsh -f content.txt`` Running ``netsh`` will drop you into a ``netsh`` prompt where you can issue ``netsh`` commands. You can put a series of commands in an external file and run them as if from a ``netsh`` prompt using the ``-f...
python
def _netsh_file(content): ''' helper function to get the results of ``netsh -f content.txt`` Running ``netsh`` will drop you into a ``netsh`` prompt where you can issue ``netsh`` commands. You can put a series of commands in an external file and run them as if from a ``netsh`` prompt using the ``-f...
[ "def", "_netsh_file", "(", "content", ")", ":", "with", "tempfile", ".", "NamedTemporaryFile", "(", "mode", "=", "'w'", ",", "prefix", "=", "'salt-'", ",", "suffix", "=", "'.netsh'", ",", "delete", "=", "False", ")", "as", "fp", ":", "fp", ".", "write"...
helper function to get the results of ``netsh -f content.txt`` Running ``netsh`` will drop you into a ``netsh`` prompt where you can issue ``netsh`` commands. You can put a series of commands in an external file and run them as if from a ``netsh`` prompt using the ``-f`` switch. That's what this functi...
[ "helper", "function", "to", "get", "the", "results", "of", "netsh", "-", "f", "content", ".", "txt" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L99-L126
train
helper function to get the results of netsh - f content. txt
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
get_settings
def get_settings(profile, section, store='local'): ''' Get the firewall property from the specified profile in the specified store as returned by ``netsh advfirewall``. Args: profile (str): The firewall profile to query. Valid options are: - domain - public...
python
def get_settings(profile, section, store='local'): ''' Get the firewall property from the specified profile in the specified store as returned by ``netsh advfirewall``. Args: profile (str): The firewall profile to query. Valid options are: - domain - public...
[ "def", "get_settings", "(", "profile", ",", "section", ",", "store", "=", "'local'", ")", ":", "# validate input", "if", "profile", ".", "lower", "(", ")", "not", "in", "(", "'domain'", ",", "'public'", ",", "'private'", ")", ":", "raise", "ValueError", ...
Get the firewall property from the specified profile in the specified store as returned by ``netsh advfirewall``. Args: profile (str): The firewall profile to query. Valid options are: - domain - public - private section (str): The ...
[ "Get", "the", "firewall", "property", "from", "the", "specified", "profile", "in", "the", "specified", "store", "as", "returned", "by", "netsh", "advfirewall", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L148-L224
train
Get the firewall properties for the specified profile in the specified store.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
get_all_settings
def get_all_settings(profile, store='local'): ''' Gets all the properties for the specified profile in the specified store Args: profile (str): The firewall profile to query. Valid options are: - domain - public - private store (str): ...
python
def get_all_settings(profile, store='local'): ''' Gets all the properties for the specified profile in the specified store Args: profile (str): The firewall profile to query. Valid options are: - domain - public - private store (str): ...
[ "def", "get_all_settings", "(", "profile", ",", "store", "=", "'local'", ")", ":", "ret", "=", "dict", "(", ")", "ret", ".", "update", "(", "get_settings", "(", "profile", "=", "profile", ",", "section", "=", "'state'", ",", "store", "=", "store", ")",...
Gets all the properties for the specified profile in the specified store Args: profile (str): The firewall profile to query. Valid options are: - domain - public - private store (str): The store to use. This is either the local firewall...
[ "Gets", "all", "the", "properties", "for", "the", "specified", "profile", "in", "the", "specified", "store" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L227-L257
train
Gets all the properties for the specified profile in the specified store
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
get_all_profiles
def get_all_profiles(store='local'): ''' Gets all properties for all profiles in the specified store Args: store (str): The store to use. This is either the local firewall policy or the policy defined by local group policy. Valid options are: - lgpo ...
python
def get_all_profiles(store='local'): ''' Gets all properties for all profiles in the specified store Args: store (str): The store to use. This is either the local firewall policy or the policy defined by local group policy. Valid options are: - lgpo ...
[ "def", "get_all_profiles", "(", "store", "=", "'local'", ")", ":", "return", "{", "'Domain Profile'", ":", "get_all_settings", "(", "profile", "=", "'domain'", ",", "store", "=", "store", ")", ",", "'Private Profile'", ":", "get_all_settings", "(", "profile", ...
Gets all properties for all profiles in the specified store Args: store (str): The store to use. This is either the local firewall policy or the policy defined by local group policy. Valid options are: - lgpo - local Default is ``local`` R...
[ "Gets", "all", "properties", "for", "all", "profiles", "in", "the", "specified", "store" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L260-L282
train
Gets all properties for all profiles in the specified store
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
set_firewall_settings
def set_firewall_settings(profile, inbound=None, outbound=None, store='local'): ''' Set the firewall inbound/outbound settings for the specified profile and store Args: profile (str): The firewall profile...
python
def set_firewall_settings(profile, inbound=None, outbound=None, store='local'): ''' Set the firewall inbound/outbound settings for the specified profile and store Args: profile (str): The firewall profile...
[ "def", "set_firewall_settings", "(", "profile", ",", "inbound", "=", "None", ",", "outbound", "=", "None", ",", "store", "=", "'local'", ")", ":", "# Input validation", "if", "profile", ".", "lower", "(", ")", "not", "in", "(", "'domain'", ",", "'public'",...
Set the firewall inbound/outbound settings for the specified profile and store Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private inbound (str): The inbound setting. If ``None`` is...
[ "Set", "the", "firewall", "inbound", "/", "outbound", "settings", "for", "the", "specified", "profile", "and", "store" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L285-L374
train
Set the firewall settings for the specified profile and store.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
set_logging_settings
def set_logging_settings(profile, setting, value, store='local'): ''' Configure logging settings for the Windows firewall. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private setting (str):...
python
def set_logging_settings(profile, setting, value, store='local'): ''' Configure logging settings for the Windows firewall. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private setting (str):...
[ "def", "set_logging_settings", "(", "profile", ",", "setting", ",", "value", ",", "store", "=", "'local'", ")", ":", "# Input validation", "if", "profile", ".", "lower", "(", ")", "not", "in", "(", "'domain'", ",", "'public'", ",", "'private'", ")", ":", ...
Configure logging settings for the Windows firewall. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private setting (str): The logging setting to configure. Valid options are: ...
[ "Configure", "logging", "settings", "for", "the", "Windows", "firewall", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L377-L470
train
Configure the logging settings for the Windows firewall.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
set_settings
def set_settings(profile, setting, value, store='local'): ''' Configure firewall settings. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private setting (str): The firewall settin...
python
def set_settings(profile, setting, value, store='local'): ''' Configure firewall settings. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private setting (str): The firewall settin...
[ "def", "set_settings", "(", "profile", ",", "setting", ",", "value", ",", "store", "=", "'local'", ")", ":", "# Input validation", "if", "profile", ".", "lower", "(", ")", "not", "in", "(", "'domain'", ",", "'public'", ",", "'private'", ")", ":", "raise"...
Configure firewall settings. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private setting (str): The firewall setting to configure. Valid options are: - localfirewallrules ...
[ "Configure", "firewall", "settings", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L473-L538
train
Configure firewall settings.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/win_lgpo_netsh.py
set_state
def set_state(profile, state, store='local'): ''' Configure the firewall state. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private state (str): The firewall state. Valid option...
python
def set_state(profile, state, store='local'): ''' Configure the firewall state. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private state (str): The firewall state. Valid option...
[ "def", "set_state", "(", "profile", ",", "state", ",", "store", "=", "'local'", ")", ":", "# Input validation", "if", "profile", ".", "lower", "(", ")", "not", "in", "(", "'domain'", ",", "'public'", ",", "'private'", ")", ":", "raise", "ValueError", "("...
Configure the firewall state. Args: profile (str): The firewall profile to configure. Valid options are: - domain - public - private state (str): The firewall state. Valid options are: - on - off - n...
[ "Configure", "the", "firewall", "state", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/win_lgpo_netsh.py#L541-L591
train
Configure the firewall state of the current node.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aliases.py
__parse_aliases
def __parse_aliases(): ''' Parse the aliases file, and return a list of line components: [ (alias1, target1, comment1), (alias2, target2, comment2), ] ''' afn = __get_aliases_filename() ret = [] if not os.path.isfile(afn): return ret with salt.utils.files.fopen(a...
python
def __parse_aliases(): ''' Parse the aliases file, and return a list of line components: [ (alias1, target1, comment1), (alias2, target2, comment2), ] ''' afn = __get_aliases_filename() ret = [] if not os.path.isfile(afn): return ret with salt.utils.files.fopen(a...
[ "def", "__parse_aliases", "(", ")", ":", "afn", "=", "__get_aliases_filename", "(", ")", "ret", "=", "[", "]", "if", "not", "os", ".", "path", ".", "isfile", "(", "afn", ")", ":", "return", "ret", "with", "salt", ".", "utils", ".", "files", ".", "f...
Parse the aliases file, and return a list of line components: [ (alias1, target1, comment1), (alias2, target2, comment2), ]
[ "Parse", "the", "aliases", "file", "and", "return", "a", "list", "of", "line", "components", ":" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aliases.py#L40-L61
train
Parse the aliases file and return a list of line components
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aliases.py
__write_aliases_file
def __write_aliases_file(lines): ''' Write a new copy of the aliases file. Lines is a list of lines as returned by __parse_aliases. ''' afn = __get_aliases_filename() adir = os.path.dirname(afn) out = tempfile.NamedTemporaryFile(dir=adir, delete=False) if not __opts__.get('integration...
python
def __write_aliases_file(lines): ''' Write a new copy of the aliases file. Lines is a list of lines as returned by __parse_aliases. ''' afn = __get_aliases_filename() adir = os.path.dirname(afn) out = tempfile.NamedTemporaryFile(dir=adir, delete=False) if not __opts__.get('integration...
[ "def", "__write_aliases_file", "(", "lines", ")", ":", "afn", "=", "__get_aliases_filename", "(", ")", "adir", "=", "os", ".", "path", ".", "dirname", "(", "afn", ")", "out", "=", "tempfile", ".", "NamedTemporaryFile", "(", "dir", "=", "adir", ",", "dele...
Write a new copy of the aliases file. Lines is a list of lines as returned by __parse_aliases.
[ "Write", "a", "new", "copy", "of", "the", "aliases", "file", ".", "Lines", "is", "a", "list", "of", "lines", "as", "returned", "by", "__parse_aliases", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aliases.py#L64-L106
train
Write a new copy of the aliases file.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aliases.py
list_aliases
def list_aliases(): ''' Return the aliases found in the aliases file in this format:: {'alias': 'target'} CLI Example: .. code-block:: bash salt '*' aliases.list_aliases ''' ret = dict((alias, target) for alias, target, comment in __parse_aliases() if alias) return ret
python
def list_aliases(): ''' Return the aliases found in the aliases file in this format:: {'alias': 'target'} CLI Example: .. code-block:: bash salt '*' aliases.list_aliases ''' ret = dict((alias, target) for alias, target, comment in __parse_aliases() if alias) return ret
[ "def", "list_aliases", "(", ")", ":", "ret", "=", "dict", "(", "(", "alias", ",", "target", ")", "for", "alias", ",", "target", ",", "comment", "in", "__parse_aliases", "(", ")", "if", "alias", ")", "return", "ret" ]
Return the aliases found in the aliases file in this format:: {'alias': 'target'} CLI Example: .. code-block:: bash salt '*' aliases.list_aliases
[ "Return", "the", "aliases", "found", "in", "the", "aliases", "file", "in", "this", "format", "::" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aliases.py#L109-L122
train
Return the aliases found in the aliases file in this format
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/aliases.py
has_target
def has_target(alias, target): ''' Return true if the alias/target is set CLI Example: .. code-block:: bash salt '*' aliases.has_target alias target ''' if target == '': raise SaltInvocationError('target can not be an empty string') aliases = list_aliases() if alias no...
python
def has_target(alias, target): ''' Return true if the alias/target is set CLI Example: .. code-block:: bash salt '*' aliases.has_target alias target ''' if target == '': raise SaltInvocationError('target can not be an empty string') aliases = list_aliases() if alias no...
[ "def", "has_target", "(", "alias", ",", "target", ")", ":", "if", "target", "==", "''", ":", "raise", "SaltInvocationError", "(", "'target can not be an empty string'", ")", "aliases", "=", "list_aliases", "(", ")", "if", "alias", "not", "in", "aliases", ":", ...
Return true if the alias/target is set CLI Example: .. code-block:: bash salt '*' aliases.has_target alias target
[ "Return", "true", "if", "the", "alias", "/", "target", "is", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aliases.py#L141-L158
train
Return true if the alias is set otherwise 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/modules/aliases.py
set_target
def set_target(alias, target): ''' Set the entry in the aliases file for the given alias, this will overwrite any previous entry for the given alias or create a new one if it does not exist. CLI Example: .. code-block:: bash salt '*' aliases.set_target alias target ''' if ali...
python
def set_target(alias, target): ''' Set the entry in the aliases file for the given alias, this will overwrite any previous entry for the given alias or create a new one if it does not exist. CLI Example: .. code-block:: bash salt '*' aliases.set_target alias target ''' if ali...
[ "def", "set_target", "(", "alias", ",", "target", ")", ":", "if", "alias", "==", "''", ":", "raise", "SaltInvocationError", "(", "'alias can not be an empty string'", ")", "if", "target", "==", "''", ":", "raise", "SaltInvocationError", "(", "'target can not be an...
Set the entry in the aliases file for the given alias, this will overwrite any previous entry for the given alias or create a new one if it does not exist. CLI Example: .. code-block:: bash salt '*' aliases.set_target alias target
[ "Set", "the", "entry", "in", "the", "aliases", "file", "for", "the", "given", "alias", "this", "will", "overwrite", "any", "previous", "entry", "for", "the", "given", "alias", "or", "create", "a", "new", "one", "if", "it", "does", "not", "exist", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aliases.py#L161-L197
train
Set the entry in the aliases file for the given alias to the given target.
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/aliases.py
rm_alias
def rm_alias(alias): ''' Remove an entry from the aliases file CLI Example: .. code-block:: bash salt '*' aliases.rm_alias alias ''' if not get_target(alias): return True lines = __parse_aliases() out = [] for (line_alias, line_target, line_comment) in lines: ...
python
def rm_alias(alias): ''' Remove an entry from the aliases file CLI Example: .. code-block:: bash salt '*' aliases.rm_alias alias ''' if not get_target(alias): return True lines = __parse_aliases() out = [] for (line_alias, line_target, line_comment) in lines: ...
[ "def", "rm_alias", "(", "alias", ")", ":", "if", "not", "get_target", "(", "alias", ")", ":", "return", "True", "lines", "=", "__parse_aliases", "(", ")", "out", "=", "[", "]", "for", "(", "line_alias", ",", "line_target", ",", "line_comment", ")", "in...
Remove an entry from the aliases file CLI Example: .. code-block:: bash salt '*' aliases.rm_alias alias
[ "Remove", "an", "entry", "from", "the", "aliases", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/aliases.py#L200-L220
train
Remove an entry from the aliases file CLI Example : bash CTYPE rm_alias alias
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/thorium/__init__.py
ThorState.gather_cache
def gather_cache(self): ''' Gather the specified data from the minion data cache ''' cache = {'grains': {}, 'pillar': {}} if self.grains or self.pillar: if self.opts.get('minion_data_cache'): minions = self.cache.list('minions') if not ...
python
def gather_cache(self): ''' Gather the specified data from the minion data cache ''' cache = {'grains': {}, 'pillar': {}} if self.grains or self.pillar: if self.opts.get('minion_data_cache'): minions = self.cache.list('minions') if not ...
[ "def", "gather_cache", "(", "self", ")", ":", "cache", "=", "{", "'grains'", ":", "{", "}", ",", "'pillar'", ":", "{", "}", "}", "if", "self", ".", "grains", "or", "self", ".", "pillar", ":", "if", "self", ".", "opts", ".", "get", "(", "'minion_d...
Gather the specified data from the minion data cache
[ "Gather", "the", "specified", "data", "from", "the", "minion", "data", "cache" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/__init__.py#L70-L102
train
Gather the specified data from the minion data cache
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/thorium/__init__.py
ThorState.start_runtime
def start_runtime(self): ''' Start the system! ''' while True: try: self.call_runtime() except Exception: log.error('Exception in Thorium: ', exc_info=True) time.sleep(self.opts['thorium_interval'])
python
def start_runtime(self): ''' Start the system! ''' while True: try: self.call_runtime() except Exception: log.error('Exception in Thorium: ', exc_info=True) time.sleep(self.opts['thorium_interval'])
[ "def", "start_runtime", "(", "self", ")", ":", "while", "True", ":", "try", ":", "self", ".", "call_runtime", "(", ")", "except", "Exception", ":", "log", ".", "error", "(", "'Exception in Thorium: '", ",", "exc_info", "=", "True", ")", "time", ".", "sle...
Start the system!
[ "Start", "the", "system!" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/__init__.py#L104-L113
train
Start 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/thorium/__init__.py
ThorState.get_chunks
def get_chunks(self, exclude=None, whitelist=None): ''' Compile the top file and return the lowstate for the thorium runtime to iterate over ''' ret = {} err = [] try: top = self.get_top() except SaltRenderError as err: return ret ...
python
def get_chunks(self, exclude=None, whitelist=None): ''' Compile the top file and return the lowstate for the thorium runtime to iterate over ''' ret = {} err = [] try: top = self.get_top() except SaltRenderError as err: return ret ...
[ "def", "get_chunks", "(", "self", ",", "exclude", "=", "None", ",", "whitelist", "=", "None", ")", ":", "ret", "=", "{", "}", "err", "=", "[", "]", "try", ":", "top", "=", "self", ".", "get_top", "(", ")", "except", "SaltRenderError", "as", "err", ...
Compile the top file and return the lowstate for the thorium runtime to iterate over
[ "Compile", "the", "top", "file", "and", "return", "the", "lowstate", "for", "the", "thorium", "runtime", "to", "iterate", "over" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/__init__.py#L115-L150
train
Compile the top file and return the lowstate for the thorium runtime to iterate over
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/thorium/__init__.py
ThorState.get_events
def get_events(self): ''' iterate over the available events and return a list of events ''' ret = [] while True: event = self.event.get_event(wait=1, full=True) if event is None: return ret ret.append(event)
python
def get_events(self): ''' iterate over the available events and return a list of events ''' ret = [] while True: event = self.event.get_event(wait=1, full=True) if event is None: return ret ret.append(event)
[ "def", "get_events", "(", "self", ")", ":", "ret", "=", "[", "]", "while", "True", ":", "event", "=", "self", ".", "event", ".", "get_event", "(", "wait", "=", "1", ",", "full", "=", "True", ")", "if", "event", "is", "None", ":", "return", "ret",...
iterate over the available events and return a list of events
[ "iterate", "over", "the", "available", "events", "and", "return", "a", "list", "of", "events" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/__init__.py#L152-L161
train
iterate over the available events and return a list of events
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/thorium/__init__.py
ThorState.call_runtime
def call_runtime(self): ''' Execute the runtime ''' cache = self.gather_cache() chunks = self.get_chunks() interval = self.opts['thorium_interval'] recompile = self.opts.get('thorium_recompile', 300) r_start = time.time() while True: ev...
python
def call_runtime(self): ''' Execute the runtime ''' cache = self.gather_cache() chunks = self.get_chunks() interval = self.opts['thorium_interval'] recompile = self.opts.get('thorium_recompile', 300) r_start = time.time() while True: ev...
[ "def", "call_runtime", "(", "self", ")", ":", "cache", "=", "self", ".", "gather_cache", "(", ")", "chunks", "=", "self", ".", "get_chunks", "(", ")", "interval", "=", "self", ".", "opts", "[", "'thorium_interval'", "]", "recompile", "=", "self", ".", ...
Execute the runtime
[ "Execute", "the", "runtime" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/thorium/__init__.py#L163-L190
train
Execute the runtime
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/container_resource.py
_validate
def _validate(wrapped): ''' Decorator for common function argument validation ''' @functools.wraps(wrapped) def wrapper(*args, **kwargs): container_type = kwargs.get('container_type') exec_driver = kwargs.get('exec_driver') valid_driver = { 'docker': ('lxc-attach'...
python
def _validate(wrapped): ''' Decorator for common function argument validation ''' @functools.wraps(wrapped) def wrapper(*args, **kwargs): container_type = kwargs.get('container_type') exec_driver = kwargs.get('exec_driver') valid_driver = { 'docker': ('lxc-attach'...
[ "def", "_validate", "(", "wrapped", ")", ":", "@", "functools", ".", "wraps", "(", "wrapped", ")", "def", "wrapper", "(", "*", "args", ",", "*", "*", "kwargs", ")", ":", "container_type", "=", "kwargs", ".", "get", "(", "'container_type'", ")", "exec_d...
Decorator for common function argument validation
[ "Decorator", "for", "common", "function", "argument", "validation" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/container_resource.py#L35-L64
train
Decorator for common function argument validation
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/container_resource.py
cache_file
def cache_file(source): ''' Wrapper for cp.cache_file which raises an error if the file was unable to be cached. CLI Example: .. code-block:: bash salt myminion container_resource.cache_file salt://foo/bar/baz.txt ''' try: # Don't just use cp.cache_file for this. Docker ha...
python
def cache_file(source): ''' Wrapper for cp.cache_file which raises an error if the file was unable to be cached. CLI Example: .. code-block:: bash salt myminion container_resource.cache_file salt://foo/bar/baz.txt ''' try: # Don't just use cp.cache_file for this. Docker ha...
[ "def", "cache_file", "(", "source", ")", ":", "try", ":", "# Don't just use cp.cache_file for this. Docker has its own code to", "# pull down images from the web.", "if", "source", ".", "startswith", "(", "'salt://'", ")", ":", "cached_source", "=", "__salt__", "[", "'cp....
Wrapper for cp.cache_file which raises an error if the file was unable to be cached. CLI Example: .. code-block:: bash salt myminion container_resource.cache_file salt://foo/bar/baz.txt
[ "Wrapper", "for", "cp", ".", "cache_file", "which", "raises", "an", "error", "if", "the", "file", "was", "unable", "to", "be", "cached", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/container_resource.py#L91-L114
train
Wrapper for cp. cache_file which raises an error if the file was unable to be cached.
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/container_resource.py
run
def run(name, cmd, container_type=None, exec_driver=None, output=None, no_start=False, stdin=None, python_shell=True, output_loglevel='debug', ignore_retcode=False, path=None, use_vt=False, keep_env=None): ''' Common...
python
def run(name, cmd, container_type=None, exec_driver=None, output=None, no_start=False, stdin=None, python_shell=True, output_loglevel='debug', ignore_retcode=False, path=None, use_vt=False, keep_env=None): ''' Common...
[ "def", "run", "(", "name", ",", "cmd", ",", "container_type", "=", "None", ",", "exec_driver", "=", "None", ",", "output", "=", "None", ",", "no_start", "=", "False", ",", "stdin", "=", "None", ",", "python_shell", "=", "True", ",", "output_loglevel", ...
Common logic for running shell commands in containers path path to the container parent (for LXC only) default: /var/lib/lxc (system default) CLI Example: .. code-block:: bash salt myminion container_resource.run mycontainer 'ps aux' container_type=docker exec_driver=nsenter outp...
[ "Common", "logic", "for", "running", "shell", "commands", "in", "containers" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/container_resource.py#L118-L266
train
Run a command in a container
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/modules/container_resource.py
copy_to
def copy_to(name, source, dest, container_type=None, path=None, exec_driver=None, overwrite=False, makedirs=False): ''' Common logic for copying files to containers path path to the container parent (for LXC only) ...
python
def copy_to(name, source, dest, container_type=None, path=None, exec_driver=None, overwrite=False, makedirs=False): ''' Common logic for copying files to containers path path to the container parent (for LXC only) ...
[ "def", "copy_to", "(", "name", ",", "source", ",", "dest", ",", "container_type", "=", "None", ",", "path", "=", "None", ",", "exec_driver", "=", "None", ",", "overwrite", "=", "False", ",", "makedirs", "=", "False", ")", ":", "# Get the appropriate functi...
Common logic for copying files to containers path path to the container parent (for LXC only) default: /var/lib/lxc (system default) CLI Example: .. code-block:: bash salt myminion container_resource.copy_to mycontainer /local/file/path /container/file/path container_type=docker ...
[ "Common", "logic", "for", "copying", "files", "to", "containers" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/container_resource.py#L270-L404
train
Copy a file from a local file to a local 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/executors/docker.py
execute
def execute(opts, data, func, args, kwargs): ''' Directly calls the given function with arguments ''' if data['fun'] == 'saltutil.find_job': return __executors__['direct_call.execute'](opts, data, func, args, kwargs) if data['fun'] in DOCKER_MOD_MAP: return __executors__['direct_call...
python
def execute(opts, data, func, args, kwargs): ''' Directly calls the given function with arguments ''' if data['fun'] == 'saltutil.find_job': return __executors__['direct_call.execute'](opts, data, func, args, kwargs) if data['fun'] in DOCKER_MOD_MAP: return __executors__['direct_call...
[ "def", "execute", "(", "opts", ",", "data", ",", "func", ",", "args", ",", "kwargs", ")", ":", "if", "data", "[", "'fun'", "]", "==", "'saltutil.find_job'", ":", "return", "__executors__", "[", "'direct_call.execute'", "]", "(", "opts", ",", "data", ",",...
Directly calls the given function with arguments
[ "Directly", "calls", "the", "given", "function", "with", "arguments" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/executors/docker.py#L28-L36
train
Execute a function on the 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/cli/salt.py
SaltCMD.run
def run(self): ''' Execute the salt command line ''' import salt.client self.parse_args() if self.config['log_level'] not in ('quiet', ): # Setup file logging! self.setup_logfile_logger() verify_log(self.config) try: ...
python
def run(self): ''' Execute the salt command line ''' import salt.client self.parse_args() if self.config['log_level'] not in ('quiet', ): # Setup file logging! self.setup_logfile_logger() verify_log(self.config) try: ...
[ "def", "run", "(", "self", ")", ":", "import", "salt", ".", "client", "self", ".", "parse_args", "(", ")", "if", "self", ".", "config", "[", "'log_level'", "]", "not", "in", "(", "'quiet'", ",", ")", ":", "# Setup file logging!", "self", ".", "setup_lo...
Execute the salt command line
[ "Execute", "the", "salt", "command", "line" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L36-L224
train
Execute the salt command line
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/salt.py
SaltCMD._print_returns_summary
def _print_returns_summary(self, ret): ''' Display returns summary ''' return_counter = 0 not_return_counter = 0 not_return_minions = [] not_response_minions = [] not_connected_minions = [] failed_minions = [] for each_minion in ret: ...
python
def _print_returns_summary(self, ret): ''' Display returns summary ''' return_counter = 0 not_return_counter = 0 not_return_minions = [] not_response_minions = [] not_connected_minions = [] failed_minions = [] for each_minion in ret: ...
[ "def", "_print_returns_summary", "(", "self", ",", "ret", ")", ":", "return_counter", "=", "0", "not_return_counter", "=", "0", "not_return_minions", "=", "[", "]", "not_response_minions", "=", "[", "]", "not_connected_minions", "=", "[", "]", "failed_minions", ...
Display returns summary
[ "Display", "returns", "summary" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L301-L344
train
Display returns summary
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/salt.py
SaltCMD._progress_ret
def _progress_ret(self, progress, out): ''' Print progress events ''' import salt.output # Get the progress bar if not hasattr(self, 'progress_bar'): try: self.progress_bar = salt.output.get_progress(self.config, out, progress) exce...
python
def _progress_ret(self, progress, out): ''' Print progress events ''' import salt.output # Get the progress bar if not hasattr(self, 'progress_bar'): try: self.progress_bar = salt.output.get_progress(self.config, out, progress) exce...
[ "def", "_progress_ret", "(", "self", ",", "progress", ",", "out", ")", ":", "import", "salt", ".", "output", "# Get the progress bar", "if", "not", "hasattr", "(", "self", ",", "'progress_bar'", ")", ":", "try", ":", "self", ".", "progress_bar", "=", "salt...
Print progress events
[ "Print", "progress", "events" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L350-L362
train
Update the progress bar and print the progress events
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/salt.py
SaltCMD._output_ret
def _output_ret(self, ret, out, retcode=0): ''' Print the output from a single return to the terminal ''' import salt.output # Handle special case commands if self.config['fun'] == 'sys.doc' and not isinstance(ret, Exception): self._print_docs(ret) els...
python
def _output_ret(self, ret, out, retcode=0): ''' Print the output from a single return to the terminal ''' import salt.output # Handle special case commands if self.config['fun'] == 'sys.doc' and not isinstance(ret, Exception): self._print_docs(ret) els...
[ "def", "_output_ret", "(", "self", ",", "ret", ",", "out", ",", "retcode", "=", "0", ")", ":", "import", "salt", ".", "output", "# Handle special case commands", "if", "self", ".", "config", "[", "'fun'", "]", "==", "'sys.doc'", "and", "not", "isinstance",...
Print the output from a single return to the terminal
[ "Print", "the", "output", "from", "a", "single", "return", "to", "the", "terminal" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L364-L380
train
Print the output from a single return to the terminal
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/salt.py
SaltCMD._format_ret
def _format_ret(self, full_ret): ''' Take the full return data and format it to simple output ''' ret = {} out = '' retcode = 0 for key, data in six.iteritems(full_ret): ret[key] = data['ret'] if 'out' in data: out = data['o...
python
def _format_ret(self, full_ret): ''' Take the full return data and format it to simple output ''' ret = {} out = '' retcode = 0 for key, data in six.iteritems(full_ret): ret[key] = data['ret'] if 'out' in data: out = data['o...
[ "def", "_format_ret", "(", "self", ",", "full_ret", ")", ":", "ret", "=", "{", "}", "out", "=", "''", "retcode", "=", "0", "for", "key", ",", "data", "in", "six", ".", "iteritems", "(", "full_ret", ")", ":", "ret", "[", "key", "]", "=", "data", ...
Take the full return data and format it to simple output
[ "Take", "the", "full", "return", "data", "and", "format", "it", "to", "simple", "output" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L382-L396
train
Take the full return data and format it to simple 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/cli/salt.py
SaltCMD._get_retcode
def _get_retcode(self, ret): ''' Determine a retcode for a given return ''' retcode = 0 # if there is a dict with retcode, use that if isinstance(ret, dict) and ret.get('retcode', 0) != 0: if isinstance(ret.get('retcode', 0), dict): return max(...
python
def _get_retcode(self, ret): ''' Determine a retcode for a given return ''' retcode = 0 # if there is a dict with retcode, use that if isinstance(ret, dict) and ret.get('retcode', 0) != 0: if isinstance(ret.get('retcode', 0), dict): return max(...
[ "def", "_get_retcode", "(", "self", ",", "ret", ")", ":", "retcode", "=", "0", "# if there is a dict with retcode, use that", "if", "isinstance", "(", "ret", ",", "dict", ")", "and", "ret", ".", "get", "(", "'retcode'", ",", "0", ")", "!=", "0", ":", "if...
Determine a retcode for a given return
[ "Determine", "a", "retcode", "for", "a", "given", "return" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L398-L411
train
Determine a retcode for a given return
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/cli/salt.py
SaltCMD._print_docs
def _print_docs(self, ret): ''' Print out the docstrings for all of the functions on the minions ''' import salt.output docs = {} if not ret: self.exit(2, 'No minions found to gather docs from\n') if isinstance(ret, six.string_types): self....
python
def _print_docs(self, ret): ''' Print out the docstrings for all of the functions on the minions ''' import salt.output docs = {} if not ret: self.exit(2, 'No minions found to gather docs from\n') if isinstance(ret, six.string_types): self....
[ "def", "_print_docs", "(", "self", ",", "ret", ")", ":", "import", "salt", ".", "output", "docs", "=", "{", "}", "if", "not", "ret", ":", "self", ".", "exit", "(", "2", ",", "'No minions found to gather docs from\\n'", ")", "if", "isinstance", "(", "ret"...
Print out the docstrings for all of the functions on the minions
[ "Print", "out", "the", "docstrings", "for", "all", "of", "the", "functions", "on", "the", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/salt.py#L418-L443
train
Print out the docstrings for all of the functions on the minions
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/yamlencoding.py
yaml_dquote
def yaml_dquote(text): ''' Make text into a double-quoted YAML string with correct escaping for special characters. Includes the opening and closing double quote characters. ''' with io.StringIO() as ostream: yemitter = yaml.emitter.Emitter(ostream, width=six.MAXSIZE) yemitter.w...
python
def yaml_dquote(text): ''' Make text into a double-quoted YAML string with correct escaping for special characters. Includes the opening and closing double quote characters. ''' with io.StringIO() as ostream: yemitter = yaml.emitter.Emitter(ostream, width=six.MAXSIZE) yemitter.w...
[ "def", "yaml_dquote", "(", "text", ")", ":", "with", "io", ".", "StringIO", "(", ")", "as", "ostream", ":", "yemitter", "=", "yaml", ".", "emitter", ".", "Emitter", "(", "ostream", ",", "width", "=", "six", ".", "MAXSIZE", ")", "yemitter", ".", "writ...
Make text into a double-quoted YAML string with correct escaping for special characters. Includes the opening and closing double quote characters.
[ "Make", "text", "into", "a", "double", "-", "quoted", "YAML", "string", "with", "correct", "escaping", "for", "special", "characters", ".", "Includes", "the", "opening", "and", "closing", "double", "quote", "characters", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/yamlencoding.py#L19-L28
train
Make text into a double - quoted YAML string with correct escaping for special characters.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/yamlencoding.py
yaml_squote
def yaml_squote(text): ''' Make text into a single-quoted YAML string with correct escaping for special characters. Includes the opening and closing single quote characters. ''' with io.StringIO() as ostream: yemitter = yaml.emitter.Emitter(ostream, width=six.MAXSIZE) yemitter.w...
python
def yaml_squote(text): ''' Make text into a single-quoted YAML string with correct escaping for special characters. Includes the opening and closing single quote characters. ''' with io.StringIO() as ostream: yemitter = yaml.emitter.Emitter(ostream, width=six.MAXSIZE) yemitter.w...
[ "def", "yaml_squote", "(", "text", ")", ":", "with", "io", ".", "StringIO", "(", ")", "as", "ostream", ":", "yemitter", "=", "yaml", ".", "emitter", ".", "Emitter", "(", "ostream", ",", "width", "=", "six", ".", "MAXSIZE", ")", "yemitter", ".", "writ...
Make text into a single-quoted YAML string with correct escaping for special characters. Includes the opening and closing single quote characters.
[ "Make", "text", "into", "a", "single", "-", "quoted", "YAML", "string", "with", "correct", "escaping", "for", "special", "characters", ".", "Includes", "the", "opening", "and", "closing", "single", "quote", "characters", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/yamlencoding.py#L32-L41
train
Make text into a single - quoted YAML string with correct escaping for special characters.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/utils/yamlencoding.py
yaml_encode
def yaml_encode(data): ''' A simple YAML encode that can take a single-element datatype and return a string representation. ''' yrepr = yaml.representer.SafeRepresenter() ynode = yrepr.represent_data(data) if not isinstance(ynode, yaml.ScalarNode): raise TypeError( "yaml_...
python
def yaml_encode(data): ''' A simple YAML encode that can take a single-element datatype and return a string representation. ''' yrepr = yaml.representer.SafeRepresenter() ynode = yrepr.represent_data(data) if not isinstance(ynode, yaml.ScalarNode): raise TypeError( "yaml_...
[ "def", "yaml_encode", "(", "data", ")", ":", "yrepr", "=", "yaml", ".", "representer", ".", "SafeRepresenter", "(", ")", "ynode", "=", "yrepr", ".", "represent_data", "(", "data", ")", "if", "not", "isinstance", "(", "ynode", ",", "yaml", ".", "ScalarNod...
A simple YAML encode that can take a single-element datatype and return a string representation.
[ "A", "simple", "YAML", "encode", "that", "can", "take", "a", "single", "-", "element", "datatype", "and", "return", "a", "string", "representation", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/yamlencoding.py#L45-L64
train
A simple YAML encode that can take a single - element datatype and return a string representation.
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/renderers/nacl.py
_decrypt_object
def _decrypt_object(obj, **kwargs): ''' Recursively try to decrypt any object. If the object is a six.string_types (string or unicode), and it contains a valid NACLENC pretext, decrypt it, otherwise keep going until a string is found. ''' if salt.utils.stringio.is_readable(obj): return _...
python
def _decrypt_object(obj, **kwargs): ''' Recursively try to decrypt any object. If the object is a six.string_types (string or unicode), and it contains a valid NACLENC pretext, decrypt it, otherwise keep going until a string is found. ''' if salt.utils.stringio.is_readable(obj): return _...
[ "def", "_decrypt_object", "(", "obj", ",", "*", "*", "kwargs", ")", ":", "if", "salt", ".", "utils", ".", "stringio", ".", "is_readable", "(", "obj", ")", ":", "return", "_decrypt_object", "(", "obj", ".", "getvalue", "(", ")", ",", "*", "*", "kwargs...
Recursively try to decrypt any object. If the object is a six.string_types (string or unicode), and it contains a valid NACLENC pretext, decrypt it, otherwise keep going until a string is found.
[ "Recursively", "try", "to", "decrypt", "any", "object", ".", "If", "the", "object", "is", "a", "six", ".", "string_types", "(", "string", "or", "unicode", ")", "and", "it", "contains", "a", "valid", "NACLENC", "pretext", "decrypt", "it", "otherwise", "keep...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/nacl.py#L71-L93
train
Recursively try to decrypt any object in the object tree
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/mysql.py
ext_pillar
def ext_pillar(minion_id, pillar, *args, **kwargs): ''' Execute queries against MySQL, merge and return as a dict ''' return MySQLExtPillar().fetch(minion_id, pillar, *args, **kwargs)
python
def ext_pillar(minion_id, pillar, *args, **kwargs): ''' Execute queries against MySQL, merge and return as a dict ''' return MySQLExtPillar().fetch(minion_id, pillar, *args, **kwargs)
[ "def", "ext_pillar", "(", "minion_id", ",", "pillar", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "return", "MySQLExtPillar", "(", ")", ".", "fetch", "(", "minion_id", ",", "pillar", ",", "*", "args", ",", "*", "*", "kwargs", ")" ]
Execute queries against MySQL, merge and return as a dict
[ "Execute", "queries", "against", "MySQL", "merge", "and", "return", "as", "a", "dict" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/mysql.py#L140-L147
train
Execute queries against MySQL merge and return as a dict
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/mysql.py
MySQLExtPillar._get_options
def _get_options(self): ''' Returns options used for the MySQL connection. ''' defaults = {'host': 'localhost', 'user': 'salt', 'pass': 'salt', 'db': 'salt', 'port': 3306, 'ssl': {}} ...
python
def _get_options(self): ''' Returns options used for the MySQL connection. ''' defaults = {'host': 'localhost', 'user': 'salt', 'pass': 'salt', 'db': 'salt', 'port': 3306, 'ssl': {}} ...
[ "def", "_get_options", "(", "self", ")", ":", "defaults", "=", "{", "'host'", ":", "'localhost'", ",", "'user'", ":", "'salt'", ",", "'pass'", ":", "'salt'", ",", "'db'", ":", "'salt'", ",", "'port'", ":", "3306", ",", "'ssl'", ":", "{", "}", "}", ...
Returns options used for the MySQL connection.
[ "Returns", "options", "used", "for", "the", "MySQL", "connection", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/mysql.py#L93-L111
train
Returns options used for the MySQL connection.
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/mysql.py
MySQLExtPillar._get_cursor
def _get_cursor(self): ''' Yield a MySQL cursor ''' _options = self._get_options() conn = MySQLdb.connect(host=_options['host'], user=_options['user'], passwd=_options['pass'], db=_option...
python
def _get_cursor(self): ''' Yield a MySQL cursor ''' _options = self._get_options() conn = MySQLdb.connect(host=_options['host'], user=_options['user'], passwd=_options['pass'], db=_option...
[ "def", "_get_cursor", "(", "self", ")", ":", "_options", "=", "self", ".", "_get_options", "(", ")", "conn", "=", "MySQLdb", ".", "connect", "(", "host", "=", "_options", "[", "'host'", "]", ",", "user", "=", "_options", "[", "'user'", "]", ",", "pas...
Yield a MySQL cursor
[ "Yield", "a", "MySQL", "cursor" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/mysql.py#L114-L130
train
Yield a MySQL cursor
Pu7Z6IJCgH3a,vcEHXBQXuDuh,sHOWSIAKtU58,ZVWAAMjVVHHl,qRin5pdYOdbB,IySsVMyKT3tF,FwEHNICjJCy0,yISIa0MMKKfB,GAtvbI59wr0o,OmNM6rT0Sgul,gu1MSKhYvigU,S2TTo9DhhiSh,aaLV7ZjAfkcR,ker4pIJmdvxf,WaQEaQCVMQ03,xV97BFGi0hY9,YnM1HtHE4j7G,X5FyJb4ToTo6,jLmadlzMdunT,GGFwFLsDF9Fv,prtR0Uw1GMh5,oNamnshN4dFG,QZzQeAYvsoum,VHAt7CcYKC2T,cKsTbNGL...
saltstack/salt
salt/pillar/mysql.py
MySQLExtPillar.extract_queries
def extract_queries(self, args, kwargs): ''' This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts. ''' return super(MySQLExtPillar, self).extract_queries(args, kwargs)
python
def extract_queries(self, args, kwargs): ''' This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts. ''' return super(MySQLExtPillar, self).extract_queries(args, kwargs)
[ "def", "extract_queries", "(", "self", ",", "args", ",", "kwargs", ")", ":", "return", "super", "(", "MySQLExtPillar", ",", "self", ")", ".", "extract_queries", "(", "args", ",", "kwargs", ")" ]
This function normalizes the config block into a set of queries we can use. The return is a list of consistently laid out dicts.
[ "This", "function", "normalizes", "the", "config", "block", "into", "a", "set", "of", "queries", "we", "can", "use", ".", "The", "return", "is", "a", "list", "of", "consistently", "laid", "out", "dicts", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/mysql.py#L132-L137
train
This function normalizes the config block into a set of queries we can use.
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/client/ssh/wrapper/config.py
merge
def merge(value, default='', omit_opts=False, omit_master=False, omit_pillar=False): ''' Retrieves an option based on key, merging all matches. Same as ``option()`` except that it merges all matches, rather than taking the first match. CLI Example: .. c...
python
def merge(value, default='', omit_opts=False, omit_master=False, omit_pillar=False): ''' Retrieves an option based on key, merging all matches. Same as ``option()`` except that it merges all matches, rather than taking the first match. CLI Example: .. c...
[ "def", "merge", "(", "value", ",", "default", "=", "''", ",", "omit_opts", "=", "False", ",", "omit_master", "=", "False", ",", "omit_pillar", "=", "False", ")", ":", "ret", "=", "None", "if", "not", "omit_opts", ":", "if", "value", "in", "__opts__", ...
Retrieves an option based on key, merging all matches. Same as ``option()`` except that it merges all matches, rather than taking the first match. CLI Example: .. code-block:: bash salt '*' config.merge schedule
[ "Retrieves", "an", "option", "based", "on", "key", "merging", "all", "matches", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/ssh/wrapper/config.py#L134-L185
train
Returns an option based on key merging all matches.
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/client/ssh/wrapper/config.py
get
def get(key, default=''): ''' .. versionadded: 0.14.0 Attempt to retrieve the named value from opts, pillar, grains of the master config, if the named value is not available return the passed default. The default return is an empty string. The value can also represent a value in a nested dict ...
python
def get(key, default=''): ''' .. versionadded: 0.14.0 Attempt to retrieve the named value from opts, pillar, grains of the master config, if the named value is not available return the passed default. The default return is an empty string. The value can also represent a value in a nested dict ...
[ "def", "get", "(", "key", ",", "default", "=", "''", ")", ":", "ret", "=", "salt", ".", "utils", ".", "data", ".", "traverse_dict_and_list", "(", "__opts__", ",", "key", ",", "'_|-'", ")", "if", "ret", "!=", "'_|-'", ":", "return", "ret", "ret", "=...
.. versionadded: 0.14.0 Attempt to retrieve the named value from opts, pillar, grains of the master config, if the named value is not available return the passed default. The default return is an empty string. The value can also represent a value in a nested dict using a ":" delimiter for the dict...
[ "..", "versionadded", ":", "0", ".", "14", ".", "0" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/client/ssh/wrapper/config.py#L188-L231
train
Get a named value from the master config
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...