id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
75
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
36,500
saltstack/salt
salt/daemons/masterapi.py
init_git_pillar
def init_git_pillar(opts): ''' Clear out the ext pillar caches, used when the master starts ''' ret = [] for opts_dict in [x for x in opts.get('ext_pillar', [])]: if 'git' in opts_dict: try: pillar = salt.utils.gitfs.GitPillar( opts, ...
python
def init_git_pillar(opts): ''' Clear out the ext pillar caches, used when the master starts ''' ret = [] for opts_dict in [x for x in opts.get('ext_pillar', [])]: if 'git' in opts_dict: try: pillar = salt.utils.gitfs.GitPillar( opts, ...
[ "def", "init_git_pillar", "(", "opts", ")", ":", "ret", "=", "[", "]", "for", "opts_dict", "in", "[", "x", "for", "x", "in", "opts", ".", "get", "(", "'ext_pillar'", ",", "[", "]", ")", "]", ":", "if", "'git'", "in", "opts_dict", ":", "try", ":",...
Clear out the ext pillar caches, used when the master starts
[ "Clear", "out", "the", "ext", "pillar", "caches", "used", "when", "the", "master", "starts" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L68-L88
36,501
saltstack/salt
salt/daemons/masterapi.py
clean_fsbackend
def clean_fsbackend(opts): ''' Clean out the old fileserver backends ''' # Clear remote fileserver backend caches so they get recreated for backend in ('git', 'hg', 'svn'): if backend in opts['fileserver_backend']: env_cache = os.path.join( opts['cachedir'], ...
python
def clean_fsbackend(opts): ''' Clean out the old fileserver backends ''' # Clear remote fileserver backend caches so they get recreated for backend in ('git', 'hg', 'svn'): if backend in opts['fileserver_backend']: env_cache = os.path.join( opts['cachedir'], ...
[ "def", "clean_fsbackend", "(", "opts", ")", ":", "# Clear remote fileserver backend caches so they get recreated", "for", "backend", "in", "(", "'git'", ",", "'hg'", ",", "'svn'", ")", ":", "if", "backend", "in", "opts", "[", "'fileserver_backend'", "]", ":", "env...
Clean out the old fileserver backends
[ "Clean", "out", "the", "old", "fileserver", "backends" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L91-L130
36,502
saltstack/salt
salt/daemons/masterapi.py
clean_expired_tokens
def clean_expired_tokens(opts): ''' Clean expired tokens from the master ''' loadauth = salt.auth.LoadAuth(opts) for tok in loadauth.list_tokens(): token_data = loadauth.get_tok(tok) if 'expire' not in token_data or token_data.get('expire', 0) < time.time(): loadauth.rm_t...
python
def clean_expired_tokens(opts): ''' Clean expired tokens from the master ''' loadauth = salt.auth.LoadAuth(opts) for tok in loadauth.list_tokens(): token_data = loadauth.get_tok(tok) if 'expire' not in token_data or token_data.get('expire', 0) < time.time(): loadauth.rm_t...
[ "def", "clean_expired_tokens", "(", "opts", ")", ":", "loadauth", "=", "salt", ".", "auth", ".", "LoadAuth", "(", "opts", ")", "for", "tok", "in", "loadauth", ".", "list_tokens", "(", ")", ":", "token_data", "=", "loadauth", ".", "get_tok", "(", "tok", ...
Clean expired tokens from the master
[ "Clean", "expired", "tokens", "from", "the", "master" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L133-L141
36,503
saltstack/salt
salt/daemons/masterapi.py
clean_proc_dir
def clean_proc_dir(opts): ''' Clean out old tracked jobs running on the master Generally, anything tracking a job should remove the job once the job has finished. However, this will remove any jobs that for some reason were not properly removed when finished or errored. ''' serial = sal...
python
def clean_proc_dir(opts): ''' Clean out old tracked jobs running on the master Generally, anything tracking a job should remove the job once the job has finished. However, this will remove any jobs that for some reason were not properly removed when finished or errored. ''' serial = sal...
[ "def", "clean_proc_dir", "(", "opts", ")", ":", "serial", "=", "salt", ".", "payload", ".", "Serial", "(", "opts", ")", "proc_dir", "=", "os", ".", "path", ".", "join", "(", "opts", "[", "'cachedir'", "]", ",", "'proc'", ")", "for", "fn_", "in", "o...
Clean out old tracked jobs running on the master Generally, anything tracking a job should remove the job once the job has finished. However, this will remove any jobs that for some reason were not properly removed when finished or errored.
[ "Clean", "out", "old", "tracked", "jobs", "running", "on", "the", "master" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L178-L211
36,504
saltstack/salt
salt/daemons/masterapi.py
access_keys
def access_keys(opts): ''' A key needs to be placed in the filesystem with permissions 0400 so clients are required to run as root. ''' # TODO: Need a way to get all available users for systems not supported by pwd module. # For now users pattern matching will not work for publisher_acl. ...
python
def access_keys(opts): ''' A key needs to be placed in the filesystem with permissions 0400 so clients are required to run as root. ''' # TODO: Need a way to get all available users for systems not supported by pwd module. # For now users pattern matching will not work for publisher_acl. ...
[ "def", "access_keys", "(", "opts", ")", ":", "# TODO: Need a way to get all available users for systems not supported by pwd module.", "# For now users pattern matching will not work for publisher_acl.", "keys", "=", "{", "}", "publisher_acl", "=", "opts", "[", "'publisher_acl'...
A key needs to be placed in the filesystem with permissions 0400 so clients are required to run as root.
[ "A", "key", "needs", "to", "be", "placed", "in", "the", "filesystem", "with", "permissions", "0400", "so", "clients", "are", "required", "to", "run", "as", "root", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L259-L287
36,505
saltstack/salt
salt/daemons/masterapi.py
fileserver_update
def fileserver_update(fileserver): ''' Update the fileserver backends, requires that a salt.fileserver.Fileserver object be passed in ''' try: if not fileserver.servers: log.error( 'No fileservers loaded, the master will not be able to ' 'serve fil...
python
def fileserver_update(fileserver): ''' Update the fileserver backends, requires that a salt.fileserver.Fileserver object be passed in ''' try: if not fileserver.servers: log.error( 'No fileservers loaded, the master will not be able to ' 'serve fil...
[ "def", "fileserver_update", "(", "fileserver", ")", ":", "try", ":", "if", "not", "fileserver", ".", "servers", ":", "log", ".", "error", "(", "'No fileservers loaded, the master will not be able to '", "'serve files to minions'", ")", "raise", "salt", ".", "exception...
Update the fileserver backends, requires that a salt.fileserver.Fileserver object be passed in
[ "Update", "the", "fileserver", "backends", "requires", "that", "a", "salt", ".", "fileserver", ".", "Fileserver", "object", "be", "passed", "in" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L290-L307
36,506
saltstack/salt
salt/daemons/masterapi.py
AutoKey.check_permissions
def check_permissions(self, filename): ''' Check if the specified filename has correct permissions ''' if salt.utils.platform.is_windows(): return True # After we've ascertained we're not on windows groups = salt.utils.user.get_gid_list(self.opts['user'], inc...
python
def check_permissions(self, filename): ''' Check if the specified filename has correct permissions ''' if salt.utils.platform.is_windows(): return True # After we've ascertained we're not on windows groups = salt.utils.user.get_gid_list(self.opts['user'], inc...
[ "def", "check_permissions", "(", "self", ",", "filename", ")", ":", "if", "salt", ".", "utils", ".", "platform", ".", "is_windows", "(", ")", ":", "return", "True", "# After we've ascertained we're not on windows", "groups", "=", "salt", ".", "utils", ".", "us...
Check if the specified filename has correct permissions
[ "Check", "if", "the", "specified", "filename", "has", "correct", "permissions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L318-L342
36,507
saltstack/salt
salt/daemons/masterapi.py
AutoKey.check_signing_file
def check_signing_file(self, keyid, signing_file): ''' Check a keyid for membership in a signing file ''' if not signing_file or not os.path.exists(signing_file): return False if not self.check_permissions(signing_file): log.warning('Wrong permissions for...
python
def check_signing_file(self, keyid, signing_file): ''' Check a keyid for membership in a signing file ''' if not signing_file or not os.path.exists(signing_file): return False if not self.check_permissions(signing_file): log.warning('Wrong permissions for...
[ "def", "check_signing_file", "(", "self", ",", "keyid", ",", "signing_file", ")", ":", "if", "not", "signing_file", "or", "not", "os", ".", "path", ".", "exists", "(", "signing_file", ")", ":", "return", "False", "if", "not", "self", ".", "check_permission...
Check a keyid for membership in a signing file
[ "Check", "a", "keyid", "for", "membership", "in", "a", "signing", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L344-L363
36,508
saltstack/salt
salt/daemons/masterapi.py
AutoKey.check_autosign_dir
def check_autosign_dir(self, keyid): ''' Check a keyid for membership in a autosign directory. ''' autosign_dir = os.path.join(self.opts['pki_dir'], 'minions_autosign') # cleanup expired files expire_minutes = self.opts.get('autosign_timeout', 120) if expire_minu...
python
def check_autosign_dir(self, keyid): ''' Check a keyid for membership in a autosign directory. ''' autosign_dir = os.path.join(self.opts['pki_dir'], 'minions_autosign') # cleanup expired files expire_minutes = self.opts.get('autosign_timeout', 120) if expire_minu...
[ "def", "check_autosign_dir", "(", "self", ",", "keyid", ")", ":", "autosign_dir", "=", "os", ".", "path", ".", "join", "(", "self", ".", "opts", "[", "'pki_dir'", "]", ",", "'minions_autosign'", ")", "# cleanup expired files", "expire_minutes", "=", "self", ...
Check a keyid for membership in a autosign directory.
[ "Check", "a", "keyid", "for", "membership", "in", "a", "autosign", "directory", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L365-L387
36,509
saltstack/salt
salt/daemons/masterapi.py
AutoKey.check_autosign_grains
def check_autosign_grains(self, autosign_grains): ''' Check for matching grains in the autosign_grains_dir. ''' if not autosign_grains or 'autosign_grains_dir' not in self.opts: return False autosign_grains_dir = self.opts['autosign_grains_dir'] for root, dir...
python
def check_autosign_grains(self, autosign_grains): ''' Check for matching grains in the autosign_grains_dir. ''' if not autosign_grains or 'autosign_grains_dir' not in self.opts: return False autosign_grains_dir = self.opts['autosign_grains_dir'] for root, dir...
[ "def", "check_autosign_grains", "(", "self", ",", "autosign_grains", ")", ":", "if", "not", "autosign_grains", "or", "'autosign_grains_dir'", "not", "in", "self", ".", "opts", ":", "return", "False", "autosign_grains_dir", "=", "self", ".", "opts", "[", "'autosi...
Check for matching grains in the autosign_grains_dir.
[ "Check", "for", "matching", "grains", "in", "the", "autosign_grains_dir", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L389-L416
36,510
saltstack/salt
salt/daemons/masterapi.py
AutoKey.check_autosign
def check_autosign(self, keyid, autosign_grains=None): ''' Checks if the specified keyid should automatically be signed. ''' if self.opts['auto_accept']: return True if self.check_signing_file(keyid, self.opts.get('autosign_file', None)): return True ...
python
def check_autosign(self, keyid, autosign_grains=None): ''' Checks if the specified keyid should automatically be signed. ''' if self.opts['auto_accept']: return True if self.check_signing_file(keyid, self.opts.get('autosign_file', None)): return True ...
[ "def", "check_autosign", "(", "self", ",", "keyid", ",", "autosign_grains", "=", "None", ")", ":", "if", "self", ".", "opts", "[", "'auto_accept'", "]", ":", "return", "True", "if", "self", ".", "check_signing_file", "(", "keyid", ",", "self", ".", "opts...
Checks if the specified keyid should automatically be signed.
[ "Checks", "if", "the", "specified", "keyid", "should", "automatically", "be", "signed", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L427-L439
36,511
saltstack/salt
salt/daemons/masterapi.py
RemoteFuncs._master_opts
def _master_opts(self, load): ''' Return the master options to the minion ''' mopts = {} file_roots = {} envs = self._file_envs() for saltenv in envs: if saltenv not in file_roots: file_roots[saltenv] = [] mopts['file_roots'] = ...
python
def _master_opts(self, load): ''' Return the master options to the minion ''' mopts = {} file_roots = {} envs = self._file_envs() for saltenv in envs: if saltenv not in file_roots: file_roots[saltenv] = [] mopts['file_roots'] = ...
[ "def", "_master_opts", "(", "self", ",", "load", ")", ":", "mopts", "=", "{", "}", "file_roots", "=", "{", "}", "envs", "=", "self", ".", "_file_envs", "(", ")", "for", "saltenv", "in", "envs", ":", "if", "saltenv", "not", "in", "file_roots", ":", ...
Return the master options to the minion
[ "Return", "the", "master", "options", "to", "the", "minion" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L519-L547
36,512
saltstack/salt
salt/daemons/masterapi.py
RemoteFuncs._master_tops
def _master_tops(self, load, skip_verify=False): ''' Return the results from master_tops if configured ''' if not skip_verify: if 'id' not in load: log.error('Received call for external nodes without an id') return {} if not salt.ut...
python
def _master_tops(self, load, skip_verify=False): ''' Return the results from master_tops if configured ''' if not skip_verify: if 'id' not in load: log.error('Received call for external nodes without an id') return {} if not salt.ut...
[ "def", "_master_tops", "(", "self", ",", "load", ",", "skip_verify", "=", "False", ")", ":", "if", "not", "skip_verify", ":", "if", "'id'", "not", "in", "load", ":", "log", ".", "error", "(", "'Received call for external nodes without an id'", ")", "return", ...
Return the results from master_tops if configured
[ "Return", "the", "results", "from", "master_tops", "if", "configured" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L549-L580
36,513
saltstack/salt
salt/daemons/masterapi.py
RemoteFuncs._mine
def _mine(self, load, skip_verify=False): ''' Return the mine data ''' if not skip_verify: if 'id' not in load or 'data' not in load: return False if self.opts.get('minion_data_cache', False) or self.opts.get('enforce_mine_cache', False): c...
python
def _mine(self, load, skip_verify=False): ''' Return the mine data ''' if not skip_verify: if 'id' not in load or 'data' not in load: return False if self.opts.get('minion_data_cache', False) or self.opts.get('enforce_mine_cache', False): c...
[ "def", "_mine", "(", "self", ",", "load", ",", "skip_verify", "=", "False", ")", ":", "if", "not", "skip_verify", ":", "if", "'id'", "not", "in", "load", "or", "'data'", "not", "in", "load", ":", "return", "False", "if", "self", ".", "opts", ".", "...
Return the mine data
[ "Return", "the", "mine", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L660-L676
36,514
saltstack/salt
salt/daemons/masterapi.py
RemoteFuncs._return
def _return(self, load): ''' Handle the return data sent from the minions ''' # Generate EndTime endtime = salt.utils.jid.jid_to_time(salt.utils.jid.gen_jid(self.opts)) # If the return data is invalid, just ignore it if any(key not in load for key in ('return', 'j...
python
def _return(self, load): ''' Handle the return data sent from the minions ''' # Generate EndTime endtime = salt.utils.jid.jid_to_time(salt.utils.jid.gen_jid(self.opts)) # If the return data is invalid, just ignore it if any(key not in load for key in ('return', 'j...
[ "def", "_return", "(", "self", ",", "load", ")", ":", "# Generate EndTime", "endtime", "=", "salt", ".", "utils", ".", "jid", ".", "jid_to_time", "(", "salt", ".", "utils", ".", "jid", ".", "gen_jid", "(", "self", ".", "opts", ")", ")", "# If the retur...
Handle the return data sent from the minions
[ "Handle", "the", "return", "data", "sent", "from", "the", "minions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/daemons/masterapi.py#L817-L848
36,515
saltstack/salt
salt/engines/slack.py
start
def start(token, control=False, trigger='!', groups=None, groups_pillar_name=None, fire_all=False, tag='salt/engines/slack'): ''' Listen to slack events and forward them to salt, new version ''' if (not token) or (not token.startswith('xoxb'))...
python
def start(token, control=False, trigger='!', groups=None, groups_pillar_name=None, fire_all=False, tag='salt/engines/slack'): ''' Listen to slack events and forward them to salt, new version ''' if (not token) or (not token.startswith('xoxb'))...
[ "def", "start", "(", "token", ",", "control", "=", "False", ",", "trigger", "=", "'!'", ",", "groups", "=", "None", ",", "groups_pillar_name", "=", "None", ",", "fire_all", "=", "False", ",", "tag", "=", "'salt/engines/slack'", ")", ":", "if", "(", "no...
Listen to slack events and forward them to salt, new version
[ "Listen", "to", "slack", "events", "and", "forward", "them", "to", "salt", "new", "version" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L828-L849
36,516
saltstack/salt
salt/engines/slack.py
SlackClient.get_slack_users
def get_slack_users(self, token): ''' Get all users from Slack ''' ret = salt.utils.slack.query(function='users', api_key=token, opts=__opts__) users = {} if 'message' in ret: for item ...
python
def get_slack_users(self, token): ''' Get all users from Slack ''' ret = salt.utils.slack.query(function='users', api_key=token, opts=__opts__) users = {} if 'message' in ret: for item ...
[ "def", "get_slack_users", "(", "self", ",", "token", ")", ":", "ret", "=", "salt", ".", "utils", ".", "slack", ".", "query", "(", "function", "=", "'users'", ",", "api_key", "=", "token", ",", "opts", "=", "__opts__", ")", "users", "=", "{", "}", "...
Get all users from Slack
[ "Get", "all", "users", "from", "Slack" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L197-L212
36,517
saltstack/salt
salt/engines/slack.py
SlackClient.get_slack_channels
def get_slack_channels(self, token): ''' Get all channel names from Slack ''' ret = salt.utils.slack.query( function='rooms', api_key=token, # These won't be honored until https://github.com/saltstack/salt/pull/41187/files is merged opts={...
python
def get_slack_channels(self, token): ''' Get all channel names from Slack ''' ret = salt.utils.slack.query( function='rooms', api_key=token, # These won't be honored until https://github.com/saltstack/salt/pull/41187/files is merged opts={...
[ "def", "get_slack_channels", "(", "self", ",", "token", ")", ":", "ret", "=", "salt", ".", "utils", ".", "slack", ".", "query", "(", "function", "=", "'rooms'", ",", "api_key", "=", "token", ",", "# These won't be honored until https://github.com/saltstack/salt/pu...
Get all channel names from Slack
[ "Get", "all", "channel", "names", "from", "Slack" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L214-L231
36,518
saltstack/salt
salt/engines/slack.py
SlackClient.get_config_groups
def get_config_groups(self, groups_conf, groups_pillar_name): ''' get info from groups in config, and from the named pillar todo: add specification for the minion to use to recover pillar ''' # Get groups # Default to returning something that'll never match ret_g...
python
def get_config_groups(self, groups_conf, groups_pillar_name): ''' get info from groups in config, and from the named pillar todo: add specification for the minion to use to recover pillar ''' # Get groups # Default to returning something that'll never match ret_g...
[ "def", "get_config_groups", "(", "self", ",", "groups_conf", ",", "groups_pillar_name", ")", ":", "# Get groups", "# Default to returning something that'll never match", "ret_groups", "=", "{", "'default'", ":", "{", "'users'", ":", "set", "(", ")", ",", "'commands'",...
get info from groups in config, and from the named pillar todo: add specification for the minion to use to recover pillar
[ "get", "info", "from", "groups", "in", "config", "and", "from", "the", "named", "pillar" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L233-L286
36,519
saltstack/salt
salt/engines/slack.py
SlackClient.fire
def fire(self, tag, msg): ''' This replaces a function in main called 'fire' It fires an event into the salt bus. ''' if __opts__.get('__role') == 'master': fire_master = salt.utils.event.get_master_event( __opts__, __opts__['sock_dir'...
python
def fire(self, tag, msg): ''' This replaces a function in main called 'fire' It fires an event into the salt bus. ''' if __opts__.get('__role') == 'master': fire_master = salt.utils.event.get_master_event( __opts__, __opts__['sock_dir'...
[ "def", "fire", "(", "self", ",", "tag", ",", "msg", ")", ":", "if", "__opts__", ".", "get", "(", "'__role'", ")", "==", "'master'", ":", "fire_master", "=", "salt", ".", "utils", ".", "event", ".", "get_master_event", "(", "__opts__", ",", "__opts__", ...
This replaces a function in main called 'fire' It fires an event into the salt bus.
[ "This", "replaces", "a", "function", "in", "main", "called", "fire" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L308-L324
36,520
saltstack/salt
salt/engines/slack.py
SlackClient.commandline_to_list
def commandline_to_list(self, cmdline_str, trigger_string): ''' cmdline_str is the string of the command line trigger_string is the trigger string, to be removed ''' cmdline = salt.utils.args.shlex_split(cmdline_str[len(trigger_string):]) # Remove slack url parsing ...
python
def commandline_to_list(self, cmdline_str, trigger_string): ''' cmdline_str is the string of the command line trigger_string is the trigger string, to be removed ''' cmdline = salt.utils.args.shlex_split(cmdline_str[len(trigger_string):]) # Remove slack url parsing ...
[ "def", "commandline_to_list", "(", "self", ",", "cmdline_str", ",", "trigger_string", ")", ":", "cmdline", "=", "salt", ".", "utils", ".", "args", ".", "shlex_split", "(", "cmdline_str", "[", "len", "(", "trigger_string", ")", ":", "]", ")", "# Remove slack ...
cmdline_str is the string of the command line trigger_string is the trigger string, to be removed
[ "cmdline_str", "is", "the", "string", "of", "the", "command", "line", "trigger_string", "is", "the", "trigger", "string", "to", "be", "removed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L362-L380
36,521
saltstack/salt
salt/engines/slack.py
SlackClient.message_text
def message_text(self, m_data): ''' Raises ValueError if a value doesn't work out, and TypeError if this isn't a message type ''' if m_data.get('type') != 'message': raise TypeError('This is not a message') # Edited messages have text in message _text ...
python
def message_text(self, m_data): ''' Raises ValueError if a value doesn't work out, and TypeError if this isn't a message type ''' if m_data.get('type') != 'message': raise TypeError('This is not a message') # Edited messages have text in message _text ...
[ "def", "message_text", "(", "self", ",", "m_data", ")", ":", "if", "m_data", ".", "get", "(", "'type'", ")", "!=", "'message'", ":", "raise", "TypeError", "(", "'This is not a message'", ")", "# Edited messages have text in message", "_text", "=", "m_data", ".",...
Raises ValueError if a value doesn't work out, and TypeError if this isn't a message type
[ "Raises", "ValueError", "if", "a", "value", "doesn", "t", "work", "out", "and", "TypeError", "if", "this", "isn", "t", "a", "message", "type" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L426-L446
36,522
saltstack/salt
salt/engines/slack.py
SlackClient.get_jobs_from_runner
def get_jobs_from_runner(self, outstanding_jids): ''' Given a list of job_ids, return a dictionary of those job_ids that have completed and their results. Query the salt event bus via the jobs runner. jobs.list_job will show a job in progress, jobs.lookup_jid will return a job t...
python
def get_jobs_from_runner(self, outstanding_jids): ''' Given a list of job_ids, return a dictionary of those job_ids that have completed and their results. Query the salt event bus via the jobs runner. jobs.list_job will show a job in progress, jobs.lookup_jid will return a job t...
[ "def", "get_jobs_from_runner", "(", "self", ",", "outstanding_jids", ")", ":", "# Can't use the runner because of https://github.com/saltstack/salt/issues/40671", "runner", "=", "salt", ".", "runner", ".", "RunnerClient", "(", "__opts__", ")", "source", "=", "__opts__", "...
Given a list of job_ids, return a dictionary of those job_ids that have completed and their results. Query the salt event bus via the jobs runner. jobs.list_job will show a job in progress, jobs.lookup_jid will return a job that has completed. returns a dictionary of job id: re...
[ "Given", "a", "list", "of", "job_ids", "return", "a", "dictionary", "of", "those", "job_ids", "that", "have", "completed", "and", "their", "results", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/engines/slack.py#L676-L706
36,523
saltstack/salt
salt/returners/postgres.py
_get_serv
def _get_serv(ret=None, commit=False): ''' Return a Pg cursor ''' _options = _get_options(ret) try: conn = psycopg2.connect(host=_options.get('host'), user=_options.get('user'), password=_options.get('passwd'), ...
python
def _get_serv(ret=None, commit=False): ''' Return a Pg cursor ''' _options = _get_options(ret) try: conn = psycopg2.connect(host=_options.get('host'), user=_options.get('user'), password=_options.get('passwd'), ...
[ "def", "_get_serv", "(", "ret", "=", "None", ",", "commit", "=", "False", ")", ":", "_options", "=", "_get_options", "(", "ret", ")", "try", ":", "conn", "=", "psycopg2", ".", "connect", "(", "host", "=", "_options", ".", "get", "(", "'host'", ")", ...
Return a Pg cursor
[ "Return", "a", "Pg", "cursor" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/postgres.py#L190-L220
36,524
saltstack/salt
salt/states/zabbix_hostgroup.py
present
def present(name, **kwargs): ''' Ensures that the host group exists, eventually creates new host group. .. versionadded:: 2016.3.0 :param name: name of the host group :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connection_...
python
def present(name, **kwargs): ''' Ensures that the host group exists, eventually creates new host group. .. versionadded:: 2016.3.0 :param name: name of the host group :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connection_...
[ "def", "present", "(", "name", ",", "*", "*", "kwargs", ")", ":", "connection_args", "=", "{", "}", "if", "'_connection_user'", "in", "kwargs", ":", "connection_args", "[", "'_connection_user'", "]", "=", "kwargs", "[", "'_connection_user'", "]", "if", "'_co...
Ensures that the host group exists, eventually creates new host group. .. versionadded:: 2016.3.0 :param name: name of the host group :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connection_password: Optional - zabbix password (can...
[ "Ensures", "that", "the", "host", "group", "exists", "eventually", "creates", "new", "host", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_hostgroup.py#L24-L88
36,525
saltstack/salt
salt/states/zabbix_hostgroup.py
absent
def absent(name, **kwargs): ''' Ensures that the host group does not exist, eventually delete host group. .. versionadded:: 2016.3.0 :param name: name of the host group :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connectio...
python
def absent(name, **kwargs): ''' Ensures that the host group does not exist, eventually delete host group. .. versionadded:: 2016.3.0 :param name: name of the host group :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connectio...
[ "def", "absent", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "# Comment and change messages", "comment_hostgroup...
Ensures that the host group does not exist, eventually delete host group. .. versionadded:: 2016.3.0 :param name: name of the host group :param _connection_user: Optional - zabbix user (can also be set in opts or pillar, see module's docstring) :param _connection_password: Optional - zabbix password (...
[ "Ensures", "that", "the", "host", "group", "does", "not", "exist", "eventually", "delete", "host", "group", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/zabbix_hostgroup.py#L91-L162
36,526
saltstack/salt
salt/states/glassfish.py
_json_to_unicode
def _json_to_unicode(data): ''' Encode json values in unicode to match that of the API ''' ret = {} for key, value in data.items(): if not isinstance(value, six.text_type): if isinstance(value, dict): ret[key] = _json_to_unicode(value) else: ...
python
def _json_to_unicode(data): ''' Encode json values in unicode to match that of the API ''' ret = {} for key, value in data.items(): if not isinstance(value, six.text_type): if isinstance(value, dict): ret[key] = _json_to_unicode(value) else: ...
[ "def", "_json_to_unicode", "(", "data", ")", ":", "ret", "=", "{", "}", "for", "key", ",", "value", "in", "data", ".", "items", "(", ")", ":", "if", "not", "isinstance", "(", "value", ",", "six", ".", "text_type", ")", ":", "if", "isinstance", "(",...
Encode json values in unicode to match that of the API
[ "Encode", "json", "values", "in", "unicode", "to", "match", "that", "of", "the", "API" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L36-L49
36,527
saltstack/salt
salt/states/glassfish.py
_is_updated
def _is_updated(old_conf, new_conf): ''' Compare the API results to the current statefile data ''' changed = {} # Dirty json hacking to get parameters in the same format new_conf = _json_to_unicode(salt.utils.json.loads( salt.utils.json.dumps(new_conf, ensure_ascii=False))) old_conf...
python
def _is_updated(old_conf, new_conf): ''' Compare the API results to the current statefile data ''' changed = {} # Dirty json hacking to get parameters in the same format new_conf = _json_to_unicode(salt.utils.json.loads( salt.utils.json.dumps(new_conf, ensure_ascii=False))) old_conf...
[ "def", "_is_updated", "(", "old_conf", ",", "new_conf", ")", ":", "changed", "=", "{", "}", "# Dirty json hacking to get parameters in the same format", "new_conf", "=", "_json_to_unicode", "(", "salt", ".", "utils", ".", "json", ".", "loads", "(", "salt", ".", ...
Compare the API results to the current statefile data
[ "Compare", "the", "API", "results", "to", "the", "current", "statefile", "data" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L52-L71
36,528
saltstack/salt
salt/states/glassfish.py
_do_element_present
def _do_element_present(name, elem_type, data, server=None): ''' Generic function to create or update an element ''' ret = {'changes': {}, 'update': False, 'create': False, 'error': None} try: elements = __salt__['glassfish.enum_{0}'.format(elem_type)]() except requests.ConnectionError a...
python
def _do_element_present(name, elem_type, data, server=None): ''' Generic function to create or update an element ''' ret = {'changes': {}, 'update': False, 'create': False, 'error': None} try: elements = __salt__['glassfish.enum_{0}'.format(elem_type)]() except requests.ConnectionError a...
[ "def", "_do_element_present", "(", "name", ",", "elem_type", ",", "data", ",", "server", "=", "None", ")", ":", "ret", "=", "{", "'changes'", ":", "{", "}", ",", "'update'", ":", "False", ",", "'create'", ":", "False", ",", "'error'", ":", "None", "}...
Generic function to create or update an element
[ "Generic", "function", "to", "create", "or", "update", "an", "element" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L74-L110
36,529
saltstack/salt
salt/states/glassfish.py
_do_element_absent
def _do_element_absent(name, elem_type, data, server=None): ''' Generic function to delete an element ''' ret = {'delete': False, 'error': None} try: elements = __salt__['glassfish.enum_{0}'.format(elem_type)]() except requests.ConnectionError as error: if __opts__['test']: ...
python
def _do_element_absent(name, elem_type, data, server=None): ''' Generic function to delete an element ''' ret = {'delete': False, 'error': None} try: elements = __salt__['glassfish.enum_{0}'.format(elem_type)]() except requests.ConnectionError as error: if __opts__['test']: ...
[ "def", "_do_element_absent", "(", "name", ",", "elem_type", ",", "data", ",", "server", "=", "None", ")", ":", "ret", "=", "{", "'delete'", ":", "False", ",", "'error'", ":", "None", "}", "try", ":", "elements", "=", "__salt__", "[", "'glassfish.enum_{0}...
Generic function to delete an element
[ "Generic", "function", "to", "delete", "an", "element" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L113-L135
36,530
saltstack/salt
salt/states/glassfish.py
connection_factory_present
def connection_factory_present(name, restype='connection_factory', description='', enabled=True, min_size=1, max_size=250, resize_quan...
python
def connection_factory_present(name, restype='connection_factory', description='', enabled=True, min_size=1, max_size=250, resize_quan...
[ "def", "connection_factory_present", "(", "name", ",", "restype", "=", "'connection_factory'", ",", "description", "=", "''", ",", "enabled", "=", "True", ",", "min_size", "=", "1", ",", "max_size", "=", "250", ",", "resize_quantity", "=", "2", ",", "idle_ti...
Ensures that the Connection Factory is present name Name of the connection factory restype Type of the connection factory, can be either ``connection_factory``, ``queue_connection_factory` or ``topic_connection_factory``, defaults to ``connection_factory`` description ...
[ "Ensures", "that", "the", "Connection", "Factory", "is", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L138-L259
36,531
saltstack/salt
salt/states/glassfish.py
connection_factory_absent
def connection_factory_absent(name, both=True, server=None): ''' Ensures the transaction factory is absent. name Name of the connection factory both Delete both the pool and the resource, defaults to ``true`` ''' ret = {'name': name, 'result': None, 'comment': None, 'changes': ...
python
def connection_factory_absent(name, both=True, server=None): ''' Ensures the transaction factory is absent. name Name of the connection factory both Delete both the pool and the resource, defaults to ``true`` ''' ret = {'name': name, 'result': None, 'comment': None, 'changes': ...
[ "def", "connection_factory_absent", "(", "name", ",", "both", "=", "True", ",", "server", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "None", ",", "'comment'", ":", "None", ",", "'changes'", ":", "{", "}", "}"...
Ensures the transaction factory is absent. name Name of the connection factory both Delete both the pool and the resource, defaults to ``true``
[ "Ensures", "the", "transaction", "factory", "is", "absent", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L262-L288
36,532
saltstack/salt
salt/states/glassfish.py
destination_absent
def destination_absent(name, server=None): ''' Ensures that the JMS Destination doesn't exists name Name of the JMS Destination ''' ret = {'name': name, 'result': None, 'comment': None, 'changes': {}} jms_ret = _do_element_absent(name, 'admin_object_resource', {}, server) if not jms...
python
def destination_absent(name, server=None): ''' Ensures that the JMS Destination doesn't exists name Name of the JMS Destination ''' ret = {'name': name, 'result': None, 'comment': None, 'changes': {}} jms_ret = _do_element_absent(name, 'admin_object_resource', {}, server) if not jms...
[ "def", "destination_absent", "(", "name", ",", "server", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "None", ",", "'comment'", ":", "None", ",", "'changes'", ":", "{", "}", "}", "jms_ret", "=", "_do_element_abse...
Ensures that the JMS Destination doesn't exists name Name of the JMS Destination
[ "Ensures", "that", "the", "JMS", "Destination", "doesn", "t", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L356-L377
36,533
saltstack/salt
salt/states/glassfish.py
jdbc_datasource_absent
def jdbc_datasource_absent(name, both=True, server=None): ''' Ensures the JDBC Datasource doesn't exists name Name of the datasource both Delete both the pool and the resource, defaults to ``true`` ''' ret = {'name': name, 'result': None, 'comment': None, 'changes': {}} pool...
python
def jdbc_datasource_absent(name, both=True, server=None): ''' Ensures the JDBC Datasource doesn't exists name Name of the datasource both Delete both the pool and the resource, defaults to ``true`` ''' ret = {'name': name, 'result': None, 'comment': None, 'changes': {}} pool...
[ "def", "jdbc_datasource_absent", "(", "name", ",", "both", "=", "True", ",", "server", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'result'", ":", "None", ",", "'comment'", ":", "None", ",", "'changes'", ":", "{", "}", "}", ...
Ensures the JDBC Datasource doesn't exists name Name of the datasource both Delete both the pool and the resource, defaults to ``true``
[ "Ensures", "the", "JDBC", "Datasource", "doesn", "t", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L540-L564
36,534
saltstack/salt
salt/states/glassfish.py
system_properties_present
def system_properties_present(server=None, **kwargs): ''' Ensures that the system properties are present properties The system properties ''' ret = {'name': '', 'result': None, 'comment': None, 'changes': {}} del kwargs['name'] try: data = __salt__['glassfish.get_system_pro...
python
def system_properties_present(server=None, **kwargs): ''' Ensures that the system properties are present properties The system properties ''' ret = {'name': '', 'result': None, 'comment': None, 'changes': {}} del kwargs['name'] try: data = __salt__['glassfish.get_system_pro...
[ "def", "system_properties_present", "(", "server", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "''", ",", "'result'", ":", "None", ",", "'comment'", ":", "None", ",", "'changes'", ":", "{", "}", "}", "del", "kwargs...
Ensures that the system properties are present properties The system properties
[ "Ensures", "that", "the", "system", "properties", "are", "present" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L567-L608
36,535
saltstack/salt
salt/states/glassfish.py
system_properties_absent
def system_properties_absent(name, server=None): ''' Ensures that the system property doesn't exists name Name of the system property ''' ret = {'name': '', 'result': None, 'comment': None, 'changes': {}} try: data = __salt__['glassfish.get_system_properties'](server=server) ...
python
def system_properties_absent(name, server=None): ''' Ensures that the system property doesn't exists name Name of the system property ''' ret = {'name': '', 'result': None, 'comment': None, 'changes': {}} try: data = __salt__['glassfish.get_system_properties'](server=server) ...
[ "def", "system_properties_absent", "(", "name", ",", "server", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "''", ",", "'result'", ":", "None", ",", "'comment'", ":", "None", ",", "'changes'", ":", "{", "}", "}", "try", ":", "data", "=", ...
Ensures that the system property doesn't exists name Name of the system property
[ "Ensures", "that", "the", "system", "property", "doesn", "t", "exists" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/glassfish.py#L611-L647
36,536
saltstack/salt
salt/utils/minions.py
parse_target
def parse_target(target_expression): '''Parse `target_expressing` splitting it into `engine`, `delimiter`, `pattern` - returns a dict''' match = TARGET_REX.match(target_expression) if not match: log.warning('Unable to parse target "%s"', target_expression) ret = { 'engine':...
python
def parse_target(target_expression): '''Parse `target_expressing` splitting it into `engine`, `delimiter`, `pattern` - returns a dict''' match = TARGET_REX.match(target_expression) if not match: log.warning('Unable to parse target "%s"', target_expression) ret = { 'engine':...
[ "def", "parse_target", "(", "target_expression", ")", ":", "match", "=", "TARGET_REX", ".", "match", "(", "target_expression", ")", "if", "not", "match", ":", "log", ".", "warning", "(", "'Unable to parse target \"%s\"'", ",", "target_expression", ")", "ret", "=...
Parse `target_expressing` splitting it into `engine`, `delimiter`, `pattern` - returns a dict
[ "Parse", "target_expressing", "splitting", "it", "into", "engine", "delimiter", "pattern", "-", "returns", "a", "dict" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L50-L64
36,537
saltstack/salt
salt/utils/minions.py
nodegroup_comp
def nodegroup_comp(nodegroup, nodegroups, skip=None, first_call=True): ''' Recursively expand ``nodegroup`` from ``nodegroups``; ignore nodegroups in ``skip`` If a top-level (non-recursive) call finds no nodegroups, return the original nodegroup definition (for backwards compatibility). Keep track of r...
python
def nodegroup_comp(nodegroup, nodegroups, skip=None, first_call=True): ''' Recursively expand ``nodegroup`` from ``nodegroups``; ignore nodegroups in ``skip`` If a top-level (non-recursive) call finds no nodegroups, return the original nodegroup definition (for backwards compatibility). Keep track of r...
[ "def", "nodegroup_comp", "(", "nodegroup", ",", "nodegroups", ",", "skip", "=", "None", ",", "first_call", "=", "True", ")", ":", "expanded_nodegroup", "=", "False", "if", "skip", "is", "None", ":", "skip", "=", "set", "(", ")", "elif", "nodegroup", "in"...
Recursively expand ``nodegroup`` from ``nodegroups``; ignore nodegroups in ``skip`` If a top-level (non-recursive) call finds no nodegroups, return the original nodegroup definition (for backwards compatibility). Keep track of recursive calls via `first_call` argument
[ "Recursively", "expand", "nodegroup", "from", "nodegroups", ";", "ignore", "nodegroups", "in", "skip" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L91-L179
36,538
saltstack/salt
salt/utils/minions.py
CkMinions._check_nodegroup_minions
def _check_nodegroup_minions(self, expr, greedy): # pylint: disable=unused-argument ''' Return minions found by looking at nodegroups ''' return self._check_compound_minions(nodegroup_comp(expr, self.opts['nodegroups']), DEFAULT_TARGET_DELIM, greedy)
python
def _check_nodegroup_minions(self, expr, greedy): # pylint: disable=unused-argument ''' Return minions found by looking at nodegroups ''' return self._check_compound_minions(nodegroup_comp(expr, self.opts['nodegroups']), DEFAULT_TARGET_DELIM, greedy)
[ "def", "_check_nodegroup_minions", "(", "self", ",", "expr", ",", "greedy", ")", ":", "# pylint: disable=unused-argument", "return", "self", ".", "_check_compound_minions", "(", "nodegroup_comp", "(", "expr", ",", "self", ".", "opts", "[", "'nodegroups'", "]", ")"...
Return minions found by looking at nodegroups
[ "Return", "minions", "found", "by", "looking", "at", "nodegroups" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L201-L207
36,539
saltstack/salt
salt/utils/minions.py
CkMinions._check_list_minions
def _check_list_minions(self, expr, greedy, ignore_missing=False): # pylint: disable=unused-argument ''' Return the minions found by looking via a list ''' if isinstance(expr, six.string_types): expr = [m for m in expr.split(',') if m] minions = self._pki_minions() ...
python
def _check_list_minions(self, expr, greedy, ignore_missing=False): # pylint: disable=unused-argument ''' Return the minions found by looking via a list ''' if isinstance(expr, six.string_types): expr = [m for m in expr.split(',') if m] minions = self._pki_minions() ...
[ "def", "_check_list_minions", "(", "self", ",", "expr", ",", "greedy", ",", "ignore_missing", "=", "False", ")", ":", "# pylint: disable=unused-argument", "if", "isinstance", "(", "expr", ",", "six", ".", "string_types", ")", ":", "expr", "=", "[", "m", "for...
Return the minions found by looking via a list
[ "Return", "the", "minions", "found", "by", "looking", "via", "a", "list" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L216-L224
36,540
saltstack/salt
salt/utils/minions.py
CkMinions._check_pcre_minions
def _check_pcre_minions(self, expr, greedy): # pylint: disable=unused-argument ''' Return the minions found by looking via regular expressions ''' reg = re.compile(expr) return {'minions': [m for m in self._pki_minions() if reg.match(m)], 'missing': []}
python
def _check_pcre_minions(self, expr, greedy): # pylint: disable=unused-argument ''' Return the minions found by looking via regular expressions ''' reg = re.compile(expr) return {'minions': [m for m in self._pki_minions() if reg.match(m)], 'missing': []}
[ "def", "_check_pcre_minions", "(", "self", ",", "expr", ",", "greedy", ")", ":", "# pylint: disable=unused-argument", "reg", "=", "re", ".", "compile", "(", "expr", ")", "return", "{", "'minions'", ":", "[", "m", "for", "m", "in", "self", ".", "_pki_minion...
Return the minions found by looking via regular expressions
[ "Return", "the", "minions", "found", "by", "looking", "via", "regular", "expressions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L226-L232
36,541
saltstack/salt
salt/utils/minions.py
CkMinions._pki_minions
def _pki_minions(self): ''' Retreive complete minion list from PKI dir. Respects cache if configured ''' minions = [] pki_cache_fn = os.path.join(self.opts['pki_dir'], self.acc, '.key_cache') try: os.makedirs(os.path.dirname(pki_cache_fn)) exce...
python
def _pki_minions(self): ''' Retreive complete minion list from PKI dir. Respects cache if configured ''' minions = [] pki_cache_fn = os.path.join(self.opts['pki_dir'], self.acc, '.key_cache') try: os.makedirs(os.path.dirname(pki_cache_fn)) exce...
[ "def", "_pki_minions", "(", "self", ")", ":", "minions", "=", "[", "]", "pki_cache_fn", "=", "os", ".", "path", ".", "join", "(", "self", ".", "opts", "[", "'pki_dir'", "]", ",", "self", ".", "acc", ",", "'.key_cache'", ")", "try", ":", "os", ".", ...
Retreive complete minion list from PKI dir. Respects cache if configured
[ "Retreive", "complete", "minion", "list", "from", "PKI", "dir", ".", "Respects", "cache", "if", "configured" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L234-L264
36,542
saltstack/salt
salt/utils/minions.py
CkMinions._check_cache_minions
def _check_cache_minions(self, expr, delimiter, greedy, search_type, regex_match=False, exact_match=False): ''' Helper function to...
python
def _check_cache_minions(self, expr, delimiter, greedy, search_type, regex_match=False, exact_match=False): ''' Helper function to...
[ "def", "_check_cache_minions", "(", "self", ",", "expr", ",", "delimiter", ",", "greedy", ",", "search_type", ",", "regex_match", "=", "False", ",", "exact_match", "=", "False", ")", ":", "cache_enabled", "=", "self", ".", "opts", ".", "get", "(", "'minion...
Helper function to search for minions in master caches If 'greedy', then return accepted minions matched by the condition or those absent from the cache. If not 'greedy' return the only minions have cache data and matched by the condition.
[ "Helper", "function", "to", "search", "for", "minions", "in", "master", "caches", "If", "greedy", "then", "return", "accepted", "minions", "matched", "by", "the", "condition", "or", "those", "absent", "from", "the", "cache", ".", "If", "not", "greedy", "retu...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L266-L321
36,543
saltstack/salt
salt/utils/minions.py
CkMinions._check_grain_minions
def _check_grain_minions(self, expr, delimiter, greedy): ''' Return the minions found by looking via grains ''' return self._check_cache_minions(expr, delimiter, greedy, 'grains')
python
def _check_grain_minions(self, expr, delimiter, greedy): ''' Return the minions found by looking via grains ''' return self._check_cache_minions(expr, delimiter, greedy, 'grains')
[ "def", "_check_grain_minions", "(", "self", ",", "expr", ",", "delimiter", ",", "greedy", ")", ":", "return", "self", ".", "_check_cache_minions", "(", "expr", ",", "delimiter", ",", "greedy", ",", "'grains'", ")" ]
Return the minions found by looking via grains
[ "Return", "the", "minions", "found", "by", "looking", "via", "grains" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L323-L327
36,544
saltstack/salt
salt/utils/minions.py
CkMinions._check_grain_pcre_minions
def _check_grain_pcre_minions(self, expr, delimiter, greedy): ''' Return the minions found by looking via grains with PCRE ''' return self._check_cache_minions(expr, delimiter, greedy, ...
python
def _check_grain_pcre_minions(self, expr, delimiter, greedy): ''' Return the minions found by looking via grains with PCRE ''' return self._check_cache_minions(expr, delimiter, greedy, ...
[ "def", "_check_grain_pcre_minions", "(", "self", ",", "expr", ",", "delimiter", ",", "greedy", ")", ":", "return", "self", ".", "_check_cache_minions", "(", "expr", ",", "delimiter", ",", "greedy", ",", "'grains'", ",", "regex_match", "=", "True", ")" ]
Return the minions found by looking via grains with PCRE
[ "Return", "the", "minions", "found", "by", "looking", "via", "grains", "with", "PCRE" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L329-L337
36,545
saltstack/salt
salt/utils/minions.py
CkMinions._check_pillar_pcre_minions
def _check_pillar_pcre_minions(self, expr, delimiter, greedy): ''' Return the minions found by looking via pillar with PCRE ''' return self._check_cache_minions(expr, delimiter, greedy, ...
python
def _check_pillar_pcre_minions(self, expr, delimiter, greedy): ''' Return the minions found by looking via pillar with PCRE ''' return self._check_cache_minions(expr, delimiter, greedy, ...
[ "def", "_check_pillar_pcre_minions", "(", "self", ",", "expr", ",", "delimiter", ",", "greedy", ")", ":", "return", "self", ".", "_check_cache_minions", "(", "expr", ",", "delimiter", ",", "greedy", ",", "'pillar'", ",", "regex_match", "=", "True", ")" ]
Return the minions found by looking via pillar with PCRE
[ "Return", "the", "minions", "found", "by", "looking", "via", "pillar", "with", "PCRE" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L345-L353
36,546
saltstack/salt
salt/utils/minions.py
CkMinions._check_ipcidr_minions
def _check_ipcidr_minions(self, expr, greedy): ''' Return the minions found by looking via ipcidr ''' cache_enabled = self.opts.get('minion_data_cache', False) if greedy: minions = self._pki_minions() elif cache_enabled: minions = self.cache.list(...
python
def _check_ipcidr_minions(self, expr, greedy): ''' Return the minions found by looking via ipcidr ''' cache_enabled = self.opts.get('minion_data_cache', False) if greedy: minions = self._pki_minions() elif cache_enabled: minions = self.cache.list(...
[ "def", "_check_ipcidr_minions", "(", "self", ",", "expr", ",", "greedy", ")", ":", "cache_enabled", "=", "self", ".", "opts", ".", "get", "(", "'minion_data_cache'", ",", "False", ")", "if", "greedy", ":", "minions", "=", "self", ".", "_pki_minions", "(", ...
Return the minions found by looking via ipcidr
[ "Return", "the", "minions", "found", "by", "looking", "via", "ipcidr" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L365-L421
36,547
saltstack/salt
salt/utils/minions.py
CkMinions._check_range_minions
def _check_range_minions(self, expr, greedy): ''' Return the minions found by looking via range expression ''' if not HAS_RANGE: raise CommandExecutionError( 'Range matcher unavailable (unable to import seco.range, ' 'module most likely not ins...
python
def _check_range_minions(self, expr, greedy): ''' Return the minions found by looking via range expression ''' if not HAS_RANGE: raise CommandExecutionError( 'Range matcher unavailable (unable to import seco.range, ' 'module most likely not ins...
[ "def", "_check_range_minions", "(", "self", ",", "expr", ",", "greedy", ")", ":", "if", "not", "HAS_RANGE", ":", "raise", "CommandExecutionError", "(", "'Range matcher unavailable (unable to import seco.range, '", "'module most likely not installed)'", ")", "if", "not", "...
Return the minions found by looking via range expression
[ "Return", "the", "minions", "found", "by", "looking", "via", "range", "expression" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L423-L453
36,548
saltstack/salt
salt/utils/minions.py
CkMinions.connected_ids
def connected_ids(self, subset=None, show_ip=False, show_ipv4=None, include_localhost=None): ''' Return a set of all connected minion ids, optionally within a subset ''' if include_localhost is not None: salt.utils.versions.warn_until( 'Sodium', ...
python
def connected_ids(self, subset=None, show_ip=False, show_ipv4=None, include_localhost=None): ''' Return a set of all connected minion ids, optionally within a subset ''' if include_localhost is not None: salt.utils.versions.warn_until( 'Sodium', ...
[ "def", "connected_ids", "(", "self", ",", "subset", "=", "None", ",", "show_ip", "=", "False", ",", "show_ipv4", "=", "None", ",", "include_localhost", "=", "None", ")", ":", "if", "include_localhost", "is", "not", "None", ":", "salt", ".", "utils", ".",...
Return a set of all connected minion ids, optionally within a subset
[ "Return", "a", "set", "of", "all", "connected", "minion", "ids", "optionally", "within", "a", "subset" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L622-L681
36,549
saltstack/salt
salt/utils/minions.py
CkMinions._all_minions
def _all_minions(self, expr=None): ''' Return a list of all minions that have auth'd ''' mlist = [] for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(os.path.join(self.opts['pki_dir'], self.acc))): if not fn_.startswith('.') and os.path.isfile(os.path.join(self....
python
def _all_minions(self, expr=None): ''' Return a list of all minions that have auth'd ''' mlist = [] for fn_ in salt.utils.data.sorted_ignorecase(os.listdir(os.path.join(self.opts['pki_dir'], self.acc))): if not fn_.startswith('.') and os.path.isfile(os.path.join(self....
[ "def", "_all_minions", "(", "self", ",", "expr", "=", "None", ")", ":", "mlist", "=", "[", "]", "for", "fn_", "in", "salt", ".", "utils", ".", "data", ".", "sorted_ignorecase", "(", "os", ".", "listdir", "(", "os", ".", "path", ".", "join", "(", ...
Return a list of all minions that have auth'd
[ "Return", "a", "list", "of", "all", "minions", "that", "have", "auth", "d" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L683-L691
36,550
saltstack/salt
salt/utils/minions.py
CkMinions.check_minions
def check_minions(self, expr, tgt_type='glob', delimiter=DEFAULT_TARGET_DELIM, greedy=True): ''' Check the passed regex against the available minions' public keys stored for authentication. This should return...
python
def check_minions(self, expr, tgt_type='glob', delimiter=DEFAULT_TARGET_DELIM, greedy=True): ''' Check the passed regex against the available minions' public keys stored for authentication. This should return...
[ "def", "check_minions", "(", "self", ",", "expr", ",", "tgt_type", "=", "'glob'", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "greedy", "=", "True", ")", ":", "try", ":", "if", "expr", "is", "None", ":", "expr", "=", "''", "check_func", "=", "g...
Check the passed regex against the available minions' public keys stored for authentication. This should return a set of ids which match the regex, this will then be used to parse the returns to make sure everyone has checked back in.
[ "Check", "the", "passed", "regex", "against", "the", "available", "minions", "public", "keys", "stored", "for", "authentication", ".", "This", "should", "return", "a", "set", "of", "ids", "which", "match", "the", "regex", "this", "will", "then", "be", "used"...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L693-L731
36,551
saltstack/salt
salt/utils/minions.py
CkMinions.validate_tgt
def validate_tgt(self, valid, expr, tgt_type, minions=None, expr_form=None): ''' Return a Bool. This function returns if the expression sent in is within the scope of the valid expression ''' v_minions = set(self.check_minions(valid, 'compound').get('minions', [])) if mi...
python
def validate_tgt(self, valid, expr, tgt_type, minions=None, expr_form=None): ''' Return a Bool. This function returns if the expression sent in is within the scope of the valid expression ''' v_minions = set(self.check_minions(valid, 'compound').get('minions', [])) if mi...
[ "def", "validate_tgt", "(", "self", ",", "valid", ",", "expr", ",", "tgt_type", ",", "minions", "=", "None", ",", "expr_form", "=", "None", ")", ":", "v_minions", "=", "set", "(", "self", ".", "check_minions", "(", "valid", ",", "'compound'", ")", ".",...
Return a Bool. This function returns if the expression sent in is within the scope of the valid expression
[ "Return", "a", "Bool", ".", "This", "function", "returns", "if", "the", "expression", "sent", "in", "is", "within", "the", "scope", "of", "the", "valid", "expression" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L733-L748
36,552
saltstack/salt
salt/utils/minions.py
CkMinions.match_check
def match_check(self, regex, fun): ''' Validate a single regex to function comparison, the function argument can be a list of functions. It is all or nothing for a list of functions ''' vals = [] if isinstance(fun, six.string_types): fun = [fun] ...
python
def match_check(self, regex, fun): ''' Validate a single regex to function comparison, the function argument can be a list of functions. It is all or nothing for a list of functions ''' vals = [] if isinstance(fun, six.string_types): fun = [fun] ...
[ "def", "match_check", "(", "self", ",", "regex", ",", "fun", ")", ":", "vals", "=", "[", "]", "if", "isinstance", "(", "fun", ",", "six", ".", "string_types", ")", ":", "fun", "=", "[", "fun", "]", "for", "func", "in", "fun", ":", "try", ":", "...
Validate a single regex to function comparison, the function argument can be a list of functions. It is all or nothing for a list of functions
[ "Validate", "a", "single", "regex", "to", "function", "comparison", "the", "function", "argument", "can", "be", "a", "list", "of", "functions", ".", "It", "is", "all", "or", "nothing", "for", "a", "list", "of", "functions" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L750-L767
36,553
saltstack/salt
salt/utils/minions.py
CkMinions.any_auth
def any_auth(self, form, auth_list, fun, arg, tgt=None, tgt_type='glob'): ''' Read in the form and determine which auth check routine to execute ''' # This function is only called from salt.auth.Authorize(), which is also # deprecated and will be removed in Neon. salt.uti...
python
def any_auth(self, form, auth_list, fun, arg, tgt=None, tgt_type='glob'): ''' Read in the form and determine which auth check routine to execute ''' # This function is only called from salt.auth.Authorize(), which is also # deprecated and will be removed in Neon. salt.uti...
[ "def", "any_auth", "(", "self", ",", "form", ",", "auth_list", ",", "fun", ",", "arg", ",", "tgt", "=", "None", ",", "tgt_type", "=", "'glob'", ")", ":", "# This function is only called from salt.auth.Authorize(), which is also", "# deprecated and will be removed in Neo...
Read in the form and determine which auth check routine to execute
[ "Read", "in", "the", "form", "and", "determine", "which", "auth", "check", "routine", "to", "execute" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L769-L791
36,554
saltstack/salt
salt/utils/minions.py
CkMinions.auth_check
def auth_check(self, auth_list, funs, args, tgt, tgt_type='glob', groups=None, publish_validate=False, minions=None, whitelist=None): ''' ...
python
def auth_check(self, auth_list, funs, args, tgt, tgt_type='glob', groups=None, publish_validate=False, minions=None, whitelist=None): ''' ...
[ "def", "auth_check", "(", "self", ",", "auth_list", ",", "funs", ",", "args", ",", "tgt", ",", "tgt_type", "=", "'glob'", ",", "groups", "=", "None", ",", "publish_validate", "=", "False", ",", "minions", "=", "None", ",", "whitelist", "=", "None", ")"...
Returns a bool which defines if the requested function is authorized. Used to evaluate the standard structure under external master authentication interfaces, like eauth, peer, peer_run, etc.
[ "Returns", "a", "bool", "which", "defines", "if", "the", "requested", "function", "is", "authorized", ".", "Used", "to", "evaluate", "the", "standard", "structure", "under", "external", "master", "authentication", "interfaces", "like", "eauth", "peer", "peer_run",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/minions.py#L908-L979
36,555
saltstack/salt
salt/cloud/clouds/clc.py
get_server_alerts
def get_server_alerts(call=None, for_output=True, **kwargs): ''' Return a list of alerts from CLC as reported by their infra ''' for key, value in kwargs.items(): servername = "" if key == "servername": servername = value creds = get_creds() clc.v2.SetCredentials(cred...
python
def get_server_alerts(call=None, for_output=True, **kwargs): ''' Return a list of alerts from CLC as reported by their infra ''' for key, value in kwargs.items(): servername = "" if key == "servername": servername = value creds = get_creds() clc.v2.SetCredentials(cred...
[ "def", "get_server_alerts", "(", "call", "=", "None", ",", "for_output", "=", "True", ",", "*", "*", "kwargs", ")", ":", "for", "key", ",", "value", "in", "kwargs", ".", "items", "(", ")", ":", "servername", "=", "\"\"", "if", "key", "==", "\"servern...
Return a list of alerts from CLC as reported by their infra
[ "Return", "a", "list", "of", "alerts", "from", "CLC", "as", "reported", "by", "their", "infra" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/clc.py#L213-L224
36,556
saltstack/salt
salt/cloud/clouds/clc.py
avail_images
def avail_images(call=None): ''' returns a list of images available to you ''' all_servers = list_nodes_full() templates = {} for server in all_servers: if server["IsTemplate"]: templates.update({"Template Name": server["Name"]}) return templates
python
def avail_images(call=None): ''' returns a list of images available to you ''' all_servers = list_nodes_full() templates = {} for server in all_servers: if server["IsTemplate"]: templates.update({"Template Name": server["Name"]}) return templates
[ "def", "avail_images", "(", "call", "=", "None", ")", ":", "all_servers", "=", "list_nodes_full", "(", ")", "templates", "=", "{", "}", "for", "server", "in", "all_servers", ":", "if", "server", "[", "\"IsTemplate\"", "]", ":", "templates", ".", "update", ...
returns a list of images available to you
[ "returns", "a", "list", "of", "images", "available", "to", "you" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/clc.py#L256-L265
36,557
saltstack/salt
salt/cloud/clouds/clc.py
avail_locations
def avail_locations(call=None): ''' returns a list of locations available to you ''' creds = get_creds() clc.v1.SetCredentials(creds["token"], creds["token_pass"]) locations = clc.v1.Account.GetLocations() return locations
python
def avail_locations(call=None): ''' returns a list of locations available to you ''' creds = get_creds() clc.v1.SetCredentials(creds["token"], creds["token_pass"]) locations = clc.v1.Account.GetLocations() return locations
[ "def", "avail_locations", "(", "call", "=", "None", ")", ":", "creds", "=", "get_creds", "(", ")", "clc", ".", "v1", ".", "SetCredentials", "(", "creds", "[", "\"token\"", "]", ",", "creds", "[", "\"token_pass\"", "]", ")", "locations", "=", "clc", "."...
returns a list of locations available to you
[ "returns", "a", "list", "of", "locations", "available", "to", "you" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/clc.py#L268-L275
36,558
saltstack/salt
salt/cloud/clouds/clc.py
get_build_status
def get_build_status(req_id, nodename): ''' get the build status from CLC to make sure we dont return to early ''' counter = 0 req_id = six.text_type(req_id) while counter < 10: queue = clc.v1.Blueprint.GetStatus(request_id=(req_id)) if queue["PercentComplete"] == 100: ...
python
def get_build_status(req_id, nodename): ''' get the build status from CLC to make sure we dont return to early ''' counter = 0 req_id = six.text_type(req_id) while counter < 10: queue = clc.v1.Blueprint.GetStatus(request_id=(req_id)) if queue["PercentComplete"] == 100: ...
[ "def", "get_build_status", "(", "req_id", ",", "nodename", ")", ":", "counter", "=", "0", "req_id", "=", "six", ".", "text_type", "(", "req_id", ")", "while", "counter", "<", "10", ":", "queue", "=", "clc", ".", "v1", ".", "Blueprint", ".", "GetStatus"...
get the build status from CLC to make sure we dont return to early
[ "get", "the", "build", "status", "from", "CLC", "to", "make", "sure", "we", "dont", "return", "to", "early" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/clc.py#L285-L304
36,559
saltstack/salt
salt/cloud/clouds/clc.py
create
def create(vm_): ''' get the system build going ''' creds = get_creds() clc.v1.SetCredentials(creds["token"], creds["token_pass"]) cloud_profile = config.is_provider_configured( __opts__, __active_provider_name__ or __virtualname__, ('token',) ) group = config.get...
python
def create(vm_): ''' get the system build going ''' creds = get_creds() clc.v1.SetCredentials(creds["token"], creds["token_pass"]) cloud_profile = config.is_provider_configured( __opts__, __active_provider_name__ or __virtualname__, ('token',) ) group = config.get...
[ "def", "create", "(", "vm_", ")", ":", "creds", "=", "get_creds", "(", ")", "clc", ".", "v1", ".", "SetCredentials", "(", "creds", "[", "\"token\"", "]", ",", "creds", "[", "\"token_pass\"", "]", ")", "cloud_profile", "=", "config", ".", "is_provider_con...
get the system build going
[ "get", "the", "system", "build", "going" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/clouds/clc.py#L307-L366
36,560
saltstack/salt
salt/states/lvs_service.py
absent
def absent(name, protocol=None, service_address=None): ''' Ensure the LVS service is absent. name The name of the LVS service protocol The service protocol service_address The LVS service address ''' ret = {'name': name, 'changes': {}, 'result...
python
def absent(name, protocol=None, service_address=None): ''' Ensure the LVS service is absent. name The name of the LVS service protocol The service protocol service_address The LVS service address ''' ret = {'name': name, 'changes': {}, 'result...
[ "def", "absent", "(", "name", ",", "protocol", "=", "None", ",", "service_address", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "''", "}", "#ch...
Ensure the LVS service is absent. name The name of the LVS service protocol The service protocol service_address The LVS service address
[ "Ensure", "the", "LVS", "service", "is", "absent", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/lvs_service.py#L97-L136
36,561
saltstack/salt
salt/matchers/glob_match.py
match
def match(tgt, opts=None): ''' Returns true if the passed glob matches the id ''' if not opts: opts = __opts__ if not isinstance(tgt, six.string_types): return False return fnmatch.fnmatch(opts['id'], tgt)
python
def match(tgt, opts=None): ''' Returns true if the passed glob matches the id ''' if not opts: opts = __opts__ if not isinstance(tgt, six.string_types): return False return fnmatch.fnmatch(opts['id'], tgt)
[ "def", "match", "(", "tgt", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "if", "not", "isinstance", "(", "tgt", ",", "six", ".", "string_types", ")", ":", "return", "False", "return", "fnmatch", ".", "fnmatch...
Returns true if the passed glob matches the id
[ "Returns", "true", "if", "the", "passed", "glob", "matches", "the", "id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/glob_match.py#L11-L20
36,562
saltstack/salt
salt/runners/asam.py
remove_platform
def remove_platform(name, server_url): ''' To remove specified ASAM platform from the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.remove_platform my-test-vm prov1.domain.com ''' config = _get_asam_configuration(server_url) if not config: return Fa...
python
def remove_platform(name, server_url): ''' To remove specified ASAM platform from the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.remove_platform my-test-vm prov1.domain.com ''' config = _get_asam_configuration(server_url) if not config: return Fa...
[ "def", "remove_platform", "(", "name", ",", "server_url", ")", ":", "config", "=", "_get_asam_configuration", "(", "server_url", ")", "if", "not", "config", ":", "return", "False", "url", "=", "config", "[", "'platform_config_url'", "]", "data", "=", "{", "'...
To remove specified ASAM platform from the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.remove_platform my-test-vm prov1.domain.com
[ "To", "remove", "specified", "ASAM", "platform", "from", "the", "Novell", "Fan", "-", "Out", "Driver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/asam.py#L178-L233
36,563
saltstack/salt
salt/runners/asam.py
list_platforms
def list_platforms(server_url): ''' To list all ASAM platforms present on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.list_platforms prov1.domain.com ''' config = _get_asam_configuration(server_url) if not config: return False url = confi...
python
def list_platforms(server_url): ''' To list all ASAM platforms present on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.list_platforms prov1.domain.com ''' config = _get_asam_configuration(server_url) if not config: return False url = confi...
[ "def", "list_platforms", "(", "server_url", ")", ":", "config", "=", "_get_asam_configuration", "(", "server_url", ")", "if", "not", "config", ":", "return", "False", "url", "=", "config", "[", "'platform_config_url'", "]", "data", "=", "{", "'manual'", ":", ...
To list all ASAM platforms present on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.list_platforms prov1.domain.com
[ "To", "list", "all", "ASAM", "platforms", "present", "on", "the", "Novell", "Fan", "-", "Out", "Driver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/asam.py#L236-L274
36,564
saltstack/salt
salt/runners/asam.py
list_platform_sets
def list_platform_sets(server_url): ''' To list all ASAM platform sets present on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.list_platform_sets prov1.domain.com ''' config = _get_asam_configuration(server_url) if not config: return False ...
python
def list_platform_sets(server_url): ''' To list all ASAM platform sets present on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.list_platform_sets prov1.domain.com ''' config = _get_asam_configuration(server_url) if not config: return False ...
[ "def", "list_platform_sets", "(", "server_url", ")", ":", "config", "=", "_get_asam_configuration", "(", "server_url", ")", "if", "not", "config", ":", "return", "False", "url", "=", "config", "[", "'platformset_config_url'", "]", "data", "=", "{", "'manual'", ...
To list all ASAM platform sets present on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.list_platform_sets prov1.domain.com
[ "To", "list", "all", "ASAM", "platform", "sets", "present", "on", "the", "Novell", "Fan", "-", "Out", "Driver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/asam.py#L277-L315
36,565
saltstack/salt
salt/runners/asam.py
add_platform
def add_platform(name, platform_set, server_url): ''' To add an ASAM platform using the specified ASAM platform set on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.add_platform my-test-vm test-platform-set prov1.domain.com ''' config = _get_asam_config...
python
def add_platform(name, platform_set, server_url): ''' To add an ASAM platform using the specified ASAM platform set on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.add_platform my-test-vm test-platform-set prov1.domain.com ''' config = _get_asam_config...
[ "def", "add_platform", "(", "name", ",", "platform_set", ",", "server_url", ")", ":", "config", "=", "_get_asam_configuration", "(", "server_url", ")", "if", "not", "config", ":", "return", "False", "platforms", "=", "list_platforms", "(", "server_url", ")", "...
To add an ASAM platform using the specified ASAM platform set on the Novell Fan-Out Driver CLI Example: .. code-block:: bash salt-run asam.add_platform my-test-vm test-platform-set prov1.domain.com
[ "To", "add", "an", "ASAM", "platform", "using", "the", "specified", "ASAM", "platform", "set", "on", "the", "Novell", "Fan", "-", "Out", "Driver" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/asam.py#L318-L368
36,566
saltstack/salt
salt/renderers/jinja.py
render
def render(template_file, saltenv='base', sls='', argline='', context=None, tmplpath=None, **kws): ''' Render the template_file, passing the functions and grains into the Jinja rendering system. :rtype: string ''' from_str = argline == '-s' if not from_str and argl...
python
def render(template_file, saltenv='base', sls='', argline='', context=None, tmplpath=None, **kws): ''' Render the template_file, passing the functions and grains into the Jinja rendering system. :rtype: string ''' from_str = argline == '-s' if not from_str and argl...
[ "def", "render", "(", "template_file", ",", "saltenv", "=", "'base'", ",", "sls", "=", "''", ",", "argline", "=", "''", ",", "context", "=", "None", ",", "tmplpath", "=", "None", ",", "*", "*", "kws", ")", ":", "from_str", "=", "argline", "==", "'-...
Render the template_file, passing the functions and grains into the Jinja rendering system. :rtype: string
[ "Render", "the", "template_file", "passing", "the", "functions", "and", "grains", "into", "the", "Jinja", "rendering", "system", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/jinja.py#L45-L77
36,567
saltstack/salt
salt/spm/pkgfiles/local.py
init
def init(**kwargs): ''' Initialize the directories for the files ''' formula_path = __opts__['formula_path'] pillar_path = __opts__['pillar_path'] reactor_path = __opts__['reactor_path'] for dir_ in (formula_path, pillar_path, reactor_path): if not os.path.exists(dir_): o...
python
def init(**kwargs): ''' Initialize the directories for the files ''' formula_path = __opts__['formula_path'] pillar_path = __opts__['pillar_path'] reactor_path = __opts__['reactor_path'] for dir_ in (formula_path, pillar_path, reactor_path): if not os.path.exists(dir_): o...
[ "def", "init", "(", "*", "*", "kwargs", ")", ":", "formula_path", "=", "__opts__", "[", "'formula_path'", "]", "pillar_path", "=", "__opts__", "[", "'pillar_path'", "]", "reactor_path", "=", "__opts__", "[", "'reactor_path'", "]", "for", "dir_", "in", "(", ...
Initialize the directories for the files
[ "Initialize", "the", "directories", "for", "the", "files" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgfiles/local.py#L34-L48
36,568
saltstack/salt
salt/spm/pkgfiles/local.py
check_existing
def check_existing(package, pkg_files, formula_def, conn=None): ''' Check the filesystem for existing files ''' if conn is None: conn = init() node_type = six.text_type(__opts__.get('spm_node_type')) existing_files = [] for member in pkg_files: if member.isdir(): ...
python
def check_existing(package, pkg_files, formula_def, conn=None): ''' Check the filesystem for existing files ''' if conn is None: conn = init() node_type = six.text_type(__opts__.get('spm_node_type')) existing_files = [] for member in pkg_files: if member.isdir(): ...
[ "def", "check_existing", "(", "package", ",", "pkg_files", ",", "formula_def", ",", "conn", "=", "None", ")", ":", "if", "conn", "is", "None", ":", "conn", "=", "init", "(", ")", "node_type", "=", "six", ".", "text_type", "(", "__opts__", ".", "get", ...
Check the filesystem for existing files
[ "Check", "the", "filesystem", "for", "existing", "files" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgfiles/local.py#L51-L100
36,569
saltstack/salt
salt/spm/pkgfiles/local.py
install_file
def install_file(package, formula_tar, member, formula_def, conn=None): ''' Install a single file to the file system ''' if member.name == package: return False if conn is None: conn = init() node_type = six.text_type(__opts__.get('spm_node_type')) out_path = conn['formula...
python
def install_file(package, formula_tar, member, formula_def, conn=None): ''' Install a single file to the file system ''' if member.name == package: return False if conn is None: conn = init() node_type = six.text_type(__opts__.get('spm_node_type')) out_path = conn['formula...
[ "def", "install_file", "(", "package", ",", "formula_tar", ",", "member", ",", "formula_def", ",", "conn", "=", "None", ")", ":", "if", "member", ".", "name", "==", "package", ":", "return", "False", "if", "conn", "is", "None", ":", "conn", "=", "init"...
Install a single file to the file system
[ "Install", "a", "single", "file", "to", "the", "file", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgfiles/local.py#L103-L169
36,570
saltstack/salt
salt/spm/pkgfiles/local.py
remove_file
def remove_file(path, conn=None): ''' Remove a single file from the file system ''' if conn is None: conn = init() log.debug('Removing package file %s', path) os.remove(path)
python
def remove_file(path, conn=None): ''' Remove a single file from the file system ''' if conn is None: conn = init() log.debug('Removing package file %s', path) os.remove(path)
[ "def", "remove_file", "(", "path", ",", "conn", "=", "None", ")", ":", "if", "conn", "is", "None", ":", "conn", "=", "init", "(", ")", "log", ".", "debug", "(", "'Removing package file %s'", ",", "path", ")", "os", ".", "remove", "(", "path", ")" ]
Remove a single file from the file system
[ "Remove", "a", "single", "file", "from", "the", "file", "system" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgfiles/local.py#L172-L180
36,571
saltstack/salt
salt/spm/pkgfiles/local.py
hash_file
def hash_file(path, hashobj, conn=None): ''' Get the hexdigest hash value of a file ''' if os.path.isdir(path): return '' with salt.utils.files.fopen(path, 'r') as f: hashobj.update(salt.utils.stringutils.to_bytes(f.read())) return hashobj.hexdigest()
python
def hash_file(path, hashobj, conn=None): ''' Get the hexdigest hash value of a file ''' if os.path.isdir(path): return '' with salt.utils.files.fopen(path, 'r') as f: hashobj.update(salt.utils.stringutils.to_bytes(f.read())) return hashobj.hexdigest()
[ "def", "hash_file", "(", "path", ",", "hashobj", ",", "conn", "=", "None", ")", ":", "if", "os", ".", "path", ".", "isdir", "(", "path", ")", ":", "return", "''", "with", "salt", ".", "utils", ".", "files", ".", "fopen", "(", "path", ",", "'r'", ...
Get the hexdigest hash value of a file
[ "Get", "the", "hexdigest", "hash", "value", "of", "a", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/spm/pkgfiles/local.py#L183-L192
36,572
saltstack/salt
salt/utils/value.py
xor
def xor(*variables): ''' XOR definition for multiple variables ''' sum_ = False for value in variables: sum_ = sum_ ^ bool(value) return sum_
python
def xor(*variables): ''' XOR definition for multiple variables ''' sum_ = False for value in variables: sum_ = sum_ ^ bool(value) return sum_
[ "def", "xor", "(", "*", "variables", ")", ":", "sum_", "=", "False", "for", "value", "in", "variables", ":", "sum_", "=", "sum_", "^", "bool", "(", "value", ")", "return", "sum_" ]
XOR definition for multiple variables
[ "XOR", "definition", "for", "multiple", "variables" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/value.py#L12-L19
36,573
saltstack/salt
salt/modules/boto_apigateway.py
_convert_datetime_str
def _convert_datetime_str(response): ''' modify any key-value pair where value is a datetime object to a string. ''' if response: return dict([(k, '{0}'.format(v)) if isinstance(v, datetime.date) else (k, v) for k, v in six.iteritems(response)]) return None
python
def _convert_datetime_str(response): ''' modify any key-value pair where value is a datetime object to a string. ''' if response: return dict([(k, '{0}'.format(v)) if isinstance(v, datetime.date) else (k, v) for k, v in six.iteritems(response)]) return None
[ "def", "_convert_datetime_str", "(", "response", ")", ":", "if", "response", ":", "return", "dict", "(", "[", "(", "k", ",", "'{0}'", ".", "format", "(", "v", ")", ")", "if", "isinstance", "(", "v", ",", "datetime", ".", "date", ")", "else", "(", "...
modify any key-value pair where value is a datetime object to a string.
[ "modify", "any", "key", "-", "value", "pair", "where", "value", "is", "a", "datetime", "object", "to", "a", "string", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L133-L139
36,574
saltstack/salt
salt/modules/boto_apigateway.py
_multi_call
def _multi_call(function, contentkey, *args, **kwargs): ''' Retrieve full list of values for the contentkey from a boto3 ApiGateway client function that may be paged via 'position' ''' ret = function(*args, **kwargs) position = ret.get('position') while position: more = function(*ar...
python
def _multi_call(function, contentkey, *args, **kwargs): ''' Retrieve full list of values for the contentkey from a boto3 ApiGateway client function that may be paged via 'position' ''' ret = function(*args, **kwargs) position = ret.get('position') while position: more = function(*ar...
[ "def", "_multi_call", "(", "function", ",", "contentkey", ",", "*", "args", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "function", "(", "*", "args", ",", "*", "*", "kwargs", ")", "position", "=", "ret", ".", "get", "(", "'position'", ")", "whil...
Retrieve full list of values for the contentkey from a boto3 ApiGateway client function that may be paged via 'position'
[ "Retrieve", "full", "list", "of", "values", "for", "the", "contentkey", "from", "a", "boto3", "ApiGateway", "client", "function", "that", "may", "be", "paged", "via", "position" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L156-L168
36,575
saltstack/salt
salt/modules/boto_apigateway.py
describe_apis
def describe_apis(name=None, description=None, region=None, key=None, keyid=None, profile=None): ''' Returns all rest apis in the defined region. If optional parameter name is included, returns all rest apis matching the name in the defined region. CLI Example: .. code-block:: bash salt ...
python
def describe_apis(name=None, description=None, region=None, key=None, keyid=None, profile=None): ''' Returns all rest apis in the defined region. If optional parameter name is included, returns all rest apis matching the name in the defined region. CLI Example: .. code-block:: bash salt ...
[ "def", "describe_apis", "(", "name", "=", "None", ",", "description", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "name", ":", "return", "_find_apis_by_name",...
Returns all rest apis in the defined region. If optional parameter name is included, returns all rest apis matching the name in the defined region. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_apis salt myminion boto_apigateway.describe_apis name='api name' ...
[ "Returns", "all", "rest", "apis", "in", "the", "defined", "region", ".", "If", "optional", "parameter", "name", "is", "included", "returns", "all", "rest", "apis", "matching", "the", "name", "in", "the", "defined", "region", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L189-L211
36,576
saltstack/salt
salt/modules/boto_apigateway.py
api_exists
def api_exists(name, description=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if the given Rest API Name and optionally description exists. CLI Example: .. code-block:: bash salt myminion boto_apigateway.exists myapi_name ''' apis = _find_apis_by_name(name...
python
def api_exists(name, description=None, region=None, key=None, keyid=None, profile=None): ''' Check to see if the given Rest API Name and optionally description exists. CLI Example: .. code-block:: bash salt myminion boto_apigateway.exists myapi_name ''' apis = _find_apis_by_name(name...
[ "def", "api_exists", "(", "name", ",", "description", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "apis", "=", "_find_apis_by_name", "(", "name", ",", "description"...
Check to see if the given Rest API Name and optionally description exists. CLI Example: .. code-block:: bash salt myminion boto_apigateway.exists myapi_name
[ "Check", "to", "see", "if", "the", "given", "Rest", "API", "Name", "and", "optionally", "description", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L214-L227
36,577
saltstack/salt
salt/modules/boto_apigateway.py
create_api
def create_api(name, description, cloneFrom=None, region=None, key=None, keyid=None, profile=None): ''' Create a new REST API Service with the given name Returns {created: True} if the rest api was created and returns {created: False} if the rest api was not created. CLI Example: ...
python
def create_api(name, description, cloneFrom=None, region=None, key=None, keyid=None, profile=None): ''' Create a new REST API Service with the given name Returns {created: True} if the rest api was created and returns {created: False} if the rest api was not created. CLI Example: ...
[ "def", "create_api", "(", "name", ",", "description", ",", "cloneFrom", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "...
Create a new REST API Service with the given name Returns {created: True} if the rest api was created and returns {created: False} if the rest api was not created. CLI Example: .. code-block:: bash salt myminion boto_apigateway.create_api myapi_name api_description
[ "Create", "a", "new", "REST", "API", "Service", "with", "the", "given", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L230-L254
36,578
saltstack/salt
salt/modules/boto_apigateway.py
delete_api
def delete_api(name, description=None, region=None, key=None, keyid=None, profile=None): ''' Delete all REST API Service with the given name and an optional API description Returns {deleted: True, count: deleted_count} if apis were deleted, and returns {deleted: False} if error or not found. CLI E...
python
def delete_api(name, description=None, region=None, key=None, keyid=None, profile=None): ''' Delete all REST API Service with the given name and an optional API description Returns {deleted: True, count: deleted_count} if apis were deleted, and returns {deleted: False} if error or not found. CLI E...
[ "def", "delete_api", "(", "name", ",", "description", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn_params", "=", "dict", "(", "region", "=", "r...
Delete all REST API Service with the given name and an optional API description Returns {deleted: True, count: deleted_count} if apis were deleted, and returns {deleted: False} if error or not found. CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api myapi_name ...
[ "Delete", "all", "REST", "API", "Service", "with", "the", "given", "name", "and", "an", "optional", "API", "description" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L257-L285
36,579
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_resources
def describe_api_resources(restApiId, region=None, key=None, keyid=None, profile=None): ''' Given rest api id, return all resources for this api. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_resources myapi_id ''' try: conn = _get_conn(region=r...
python
def describe_api_resources(restApiId, region=None, key=None, keyid=None, profile=None): ''' Given rest api id, return all resources for this api. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_resources myapi_id ''' try: conn = _get_conn(region=r...
[ "def", "describe_api_resources", "(", "restApiId", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", ...
Given rest api id, return all resources for this api. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_resources myapi_id
[ "Given", "rest", "api", "id", "return", "all", "resources", "for", "this", "api", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L288-L306
36,580
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_resource
def describe_api_resource(restApiId, path, region=None, key=None, keyid=None, profile=None): ''' Given rest api id, and an absolute resource path, returns the resource id for the given path. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe...
python
def describe_api_resource(restApiId, path, region=None, key=None, keyid=None, profile=None): ''' Given rest api id, and an absolute resource path, returns the resource id for the given path. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe...
[ "def", "describe_api_resource", "(", "restApiId", ",", "path", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "r", "=", "describe_api_resources", "(", "restApiId", ",", "region", "="...
Given rest api id, and an absolute resource path, returns the resource id for the given path. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_resource myapi_id resource_path
[ "Given", "rest", "api", "id", "and", "an", "absolute", "resource", "path", "returns", "the", "resource", "id", "for", "the", "given", "path", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L309-L329
36,581
saltstack/salt
salt/modules/boto_apigateway.py
create_api_resources
def create_api_resources(restApiId, path, region=None, key=None, keyid=None, profile=None): ''' Given rest api id, and an absolute resource path, create all the resources and return all resources in the resourcepath, returns False on failure. CLI Example: .. code-block:: b...
python
def create_api_resources(restApiId, path, region=None, key=None, keyid=None, profile=None): ''' Given rest api id, and an absolute resource path, create all the resources and return all resources in the resourcepath, returns False on failure. CLI Example: .. code-block:: b...
[ "def", "create_api_resources", "(", "restApiId", ",", "path", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "path_parts", "=", "path", ".", "split", "(", "'/'", ")", "created", ...
Given rest api id, and an absolute resource path, create all the resources and return all resources in the resourcepath, returns False on failure. CLI Example: .. code-block:: bash salt myminion boto_apigateway.create_api_resources myapi_id resource_path
[ "Given", "rest", "api", "id", "and", "an", "absolute", "resource", "path", "create", "all", "the", "resources", "and", "return", "all", "resources", "in", "the", "resourcepath", "returns", "False", "on", "failure", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L332-L367
36,582
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_key
def describe_api_key(apiKey, region=None, key=None, keyid=None, profile=None): ''' Gets info about the given api key CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_key apigw_api_key ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, p...
python
def describe_api_key(apiKey, region=None, key=None, keyid=None, profile=None): ''' Gets info about the given api key CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_key apigw_api_key ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, p...
[ "def", "describe_api_key", "(", "apiKey", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "k...
Gets info about the given api key CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_key apigw_api_key
[ "Gets", "info", "about", "the", "given", "api", "key" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L427-L443
36,583
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_keys
def describe_api_keys(region=None, key=None, keyid=None, profile=None): ''' Gets information about the defined API Keys. Return list of apiKeys. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_keys ''' try: conn = _get_conn(region=region, key=key...
python
def describe_api_keys(region=None, key=None, keyid=None, profile=None): ''' Gets information about the defined API Keys. Return list of apiKeys. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_keys ''' try: conn = _get_conn(region=region, key=key...
[ "def", "describe_api_keys", "(", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "key...
Gets information about the defined API Keys. Return list of apiKeys. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_keys
[ "Gets", "information", "about", "the", "defined", "API", "Keys", ".", "Return", "list", "of", "apiKeys", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L446-L463
36,584
saltstack/salt
salt/modules/boto_apigateway.py
create_api_key
def create_api_key(name, description, enabled=True, stageKeys=None, region=None, key=None, keyid=None, profile=None): ''' Create an API key given name and description. An optional enabled argument can be provided. If provided, the valid values are True|False. This argument defaults...
python
def create_api_key(name, description, enabled=True, stageKeys=None, region=None, key=None, keyid=None, profile=None): ''' Create an API key given name and description. An optional enabled argument can be provided. If provided, the valid values are True|False. This argument defaults...
[ "def", "create_api_key", "(", "name", ",", "description", ",", "enabled", "=", "True", ",", "stageKeys", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", ...
Create an API key given name and description. An optional enabled argument can be provided. If provided, the valid values are True|False. This argument defaults to True. An optional stageKeys argument can be provided in the form of list of dictionary with 'restApiId' and 'stageName' as keys. CL...
[ "Create", "an", "API", "key", "given", "name", "and", "description", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L466-L501
36,585
saltstack/salt
salt/modules/boto_apigateway.py
delete_api_key
def delete_api_key(apiKey, region=None, key=None, keyid=None, profile=None): ''' Deletes a given apiKey CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_key apikeystring ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
python
def delete_api_key(apiKey, region=None, key=None, keyid=None, profile=None): ''' Deletes a given apiKey CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_key apikeystring ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
[ "def", "delete_api_key", "(", "apiKey", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key...
Deletes a given apiKey CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_key apikeystring
[ "Deletes", "a", "given", "apiKey" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L504-L520
36,586
saltstack/salt
salt/modules/boto_apigateway.py
_api_key_patch_replace
def _api_key_patch_replace(conn, apiKey, path, value): ''' the replace patch operation on an ApiKey resource ''' response = conn.update_api_key(apiKey=apiKey, patchOperations=[{'op': 'replace', 'path': path, 'value': value}]) return response
python
def _api_key_patch_replace(conn, apiKey, path, value): ''' the replace patch operation on an ApiKey resource ''' response = conn.update_api_key(apiKey=apiKey, patchOperations=[{'op': 'replace', 'path': path, 'value': value}]) return response
[ "def", "_api_key_patch_replace", "(", "conn", ",", "apiKey", ",", "path", ",", "value", ")", ":", "response", "=", "conn", ".", "update_api_key", "(", "apiKey", "=", "apiKey", ",", "patchOperations", "=", "[", "{", "'op'", ":", "'replace'", ",", "'path'", ...
the replace patch operation on an ApiKey resource
[ "the", "replace", "patch", "operation", "on", "an", "ApiKey", "resource" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L523-L529
36,587
saltstack/salt
salt/modules/boto_apigateway.py
update_api_key_description
def update_api_key_description(apiKey, description, region=None, key=None, keyid=None, profile=None): ''' update the given apiKey with the given description. CLI Example: .. code-block:: bash salt myminion boto_apigateway.update_api_key_description api_key description ''' try: ...
python
def update_api_key_description(apiKey, description, region=None, key=None, keyid=None, profile=None): ''' update the given apiKey with the given description. CLI Example: .. code-block:: bash salt myminion boto_apigateway.update_api_key_description api_key description ''' try: ...
[ "def", "update_api_key_description", "(", "apiKey", ",", "description", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "re...
update the given apiKey with the given description. CLI Example: .. code-block:: bash salt myminion boto_apigateway.update_api_key_description api_key description
[ "update", "the", "given", "apiKey", "with", "the", "given", "description", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L557-L573
36,588
saltstack/salt
salt/modules/boto_apigateway.py
enable_api_key
def enable_api_key(apiKey, region=None, key=None, keyid=None, profile=None): ''' enable the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.enable_api_key api_key ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
python
def enable_api_key(apiKey, region=None, key=None, keyid=None, profile=None): ''' enable the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.enable_api_key api_key ''' try: conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
[ "def", "enable_api_key", "(", "apiKey", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key...
enable the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.enable_api_key api_key
[ "enable", "the", "given", "apiKey", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L576-L592
36,589
saltstack/salt
salt/modules/boto_apigateway.py
associate_api_key_stagekeys
def associate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None): ''' associate the given stagekeyslist to the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.associate_stagekeys_api_key \\ api_key '["restapi...
python
def associate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None): ''' associate the given stagekeyslist to the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.associate_stagekeys_api_key \\ api_key '["restapi...
[ "def", "associate_api_key_stagekeys", "(", "apiKey", ",", "stagekeyslist", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", ...
associate the given stagekeyslist to the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.associate_stagekeys_api_key \\ api_key '["restapi id/stage name", ...]'
[ "associate", "the", "given", "stagekeyslist", "to", "the", "given", "apiKey", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L614-L632
36,590
saltstack/salt
salt/modules/boto_apigateway.py
disassociate_api_key_stagekeys
def disassociate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None): ''' disassociate the given stagekeyslist to the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.disassociate_stagekeys_api_key \\ api_key '...
python
def disassociate_api_key_stagekeys(apiKey, stagekeyslist, region=None, key=None, keyid=None, profile=None): ''' disassociate the given stagekeyslist to the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.disassociate_stagekeys_api_key \\ api_key '...
[ "def", "disassociate_api_key_stagekeys", "(", "apiKey", ",", "stagekeyslist", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=",...
disassociate the given stagekeyslist to the given apiKey. CLI Example: .. code-block:: bash salt myminion boto_apigateway.disassociate_stagekeys_api_key \\ api_key '["restapi id/stage name", ...]'
[ "disassociate", "the", "given", "stagekeyslist", "to", "the", "given", "apiKey", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L635-L653
36,591
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_deployments
def describe_api_deployments(restApiId, region=None, key=None, keyid=None, profile=None): ''' Gets information about the defined API Deployments. Return list of api deployments. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_deployments restApiId ''' tr...
python
def describe_api_deployments(restApiId, region=None, key=None, keyid=None, profile=None): ''' Gets information about the defined API Deployments. Return list of api deployments. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_deployments restApiId ''' tr...
[ "def", "describe_api_deployments", "(", "restApiId", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", ...
Gets information about the defined API Deployments. Return list of api deployments. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_deployments restApiId
[ "Gets", "information", "about", "the", "defined", "API", "Deployments", ".", "Return", "list", "of", "api", "deployments", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L656-L681
36,592
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_deployment
def describe_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Get API deployment for a given restApiId and deploymentId. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_deployent restApiId deploymentId ''' try:...
python
def describe_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Get API deployment for a given restApiId and deploymentId. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_deployent restApiId deploymentId ''' try:...
[ "def", "describe_api_deployment", "(", "restApiId", ",", "deploymentId", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "r...
Get API deployment for a given restApiId and deploymentId. CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_deployent restApiId deploymentId
[ "Get", "API", "deployment", "for", "a", "given", "restApiId", "and", "deploymentId", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L684-L700
36,593
saltstack/salt
salt/modules/boto_apigateway.py
activate_api_deployment
def activate_api_deployment(restApiId, stageName, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Activates previously deployed deployment for a given stage CLI Example: .. code-block:: bash salt myminion boto_apigateway.activate_api_deployent r...
python
def activate_api_deployment(restApiId, stageName, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Activates previously deployed deployment for a given stage CLI Example: .. code-block:: bash salt myminion boto_apigateway.activate_api_deployent r...
[ "def", "activate_api_deployment", "(", "restApiId", ",", "stageName", ",", "deploymentId", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", ...
Activates previously deployed deployment for a given stage CLI Example: .. code-block:: bash salt myminion boto_apigateway.activate_api_deployent restApiId stagename deploymentId
[ "Activates", "previously", "deployed", "deployment", "for", "a", "given", "stage" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L703-L723
36,594
saltstack/salt
salt/modules/boto_apigateway.py
create_api_deployment
def create_api_deployment(restApiId, stageName, stageDescription='', description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None): ''' Creates a new API deployment. CLI Example: ....
python
def create_api_deployment(restApiId, stageName, stageDescription='', description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None): ''' Creates a new API deployment. CLI Example: ....
[ "def", "create_api_deployment", "(", "restApiId", ",", "stageName", ",", "stageDescription", "=", "''", ",", "description", "=", "''", ",", "cacheClusterEnabled", "=", "False", ",", "cacheClusterSize", "=", "'0.5'", ",", "variables", "=", "None", ",", "region", ...
Creates a new API deployment. CLI Example: .. code-block:: bash salt myminion boto_apigateway.create_api_deployent restApiId stagename stageDescription='' \\ description='' cacheClusterEnabled=True|False cacheClusterSize=0.5 variables='{"name": "value"}'
[ "Creates", "a", "new", "API", "deployment", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L726-L750
36,595
saltstack/salt
salt/modules/boto_apigateway.py
delete_api_deployment
def delete_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Deletes API deployment for a given restApiId and deploymentID CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_deployent restApiId deploymentId ''' try: ...
python
def delete_api_deployment(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Deletes API deployment for a given restApiId and deploymentID CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_deployent restApiId deploymentId ''' try: ...
[ "def", "delete_api_deployment", "(", "restApiId", ",", "deploymentId", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "reg...
Deletes API deployment for a given restApiId and deploymentID CLI Example: .. code-block:: bash salt myminion boto_apigateway.delete_api_deployent restApiId deploymentId
[ "Deletes", "API", "deployment", "for", "a", "given", "restApiId", "and", "deploymentID" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L753-L769
36,596
saltstack/salt
salt/modules/boto_apigateway.py
overwrite_api_stage_variables
def overwrite_api_stage_variables(restApiId, stageName, variables, region=None, key=None, keyid=None, profile=None): ''' Overwrite the stage variables for the given restApiId and stage name with the given variables, variables must be in the form of a dictionary. Overwrite will always remove all the existin...
python
def overwrite_api_stage_variables(restApiId, stageName, variables, region=None, key=None, keyid=None, profile=None): ''' Overwrite the stage variables for the given restApiId and stage name with the given variables, variables must be in the form of a dictionary. Overwrite will always remove all the existin...
[ "def", "overwrite_api_stage_variables", "(", "restApiId", ",", "stageName", ",", "variables", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "res", "=", "describe_api_stage...
Overwrite the stage variables for the given restApiId and stage name with the given variables, variables must be in the form of a dictionary. Overwrite will always remove all the existing stage variables associated with the given restApiId and stage name, follow by the adding of all the variables specified...
[ "Overwrite", "the", "stage", "variables", "for", "the", "given", "restApiId", "and", "stage", "name", "with", "the", "given", "variables", "variables", "must", "be", "in", "the", "form", "of", "a", "dictionary", ".", "Overwrite", "will", "always", "remove", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L772-L815
36,597
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_stage
def describe_api_stage(restApiId, stageName, region=None, key=None, keyid=None, profile=None): ''' Get API stage for a given apiID and stage name CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_stage restApiId stageName ''' try: conn = _get_conn(r...
python
def describe_api_stage(restApiId, stageName, region=None, key=None, keyid=None, profile=None): ''' Get API stage for a given apiID and stage name CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_stage restApiId stageName ''' try: conn = _get_conn(r...
[ "def", "describe_api_stage", "(", "restApiId", ",", "stageName", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ...
Get API stage for a given apiID and stage name CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_stage restApiId stageName
[ "Get", "API", "stage", "for", "a", "given", "apiID", "and", "stage", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L818-L834
36,598
saltstack/salt
salt/modules/boto_apigateway.py
describe_api_stages
def describe_api_stages(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Get all API stages for a given apiID and deploymentID CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_stages restApiId deploymentId ''' try: con...
python
def describe_api_stages(restApiId, deploymentId, region=None, key=None, keyid=None, profile=None): ''' Get all API stages for a given apiID and deploymentID CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_stages restApiId deploymentId ''' try: con...
[ "def", "describe_api_stages", "(", "restApiId", ",", "deploymentId", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "regio...
Get all API stages for a given apiID and deploymentID CLI Example: .. code-block:: bash salt myminion boto_apigateway.describe_api_stages restApiId deploymentId
[ "Get", "all", "API", "stages", "for", "a", "given", "apiID", "and", "deploymentID" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L837-L853
36,599
saltstack/salt
salt/modules/boto_apigateway.py
create_api_stage
def create_api_stage(restApiId, stageName, deploymentId, description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None): ''' Creates a new API stage for a given restApiId and deploymentId. CLI Exa...
python
def create_api_stage(restApiId, stageName, deploymentId, description='', cacheClusterEnabled=False, cacheClusterSize='0.5', variables=None, region=None, key=None, keyid=None, profile=None): ''' Creates a new API stage for a given restApiId and deploymentId. CLI Exa...
[ "def", "create_api_stage", "(", "restApiId", ",", "stageName", ",", "deploymentId", ",", "description", "=", "''", ",", "cacheClusterEnabled", "=", "False", ",", "cacheClusterSize", "=", "'0.5'", ",", "variables", "=", "None", ",", "region", "=", "None", ",", ...
Creates a new API stage for a given restApiId and deploymentId. CLI Example: .. code-block:: bash salt myminion boto_apigateway.create_api_stage restApiId stagename deploymentId \\ description='' cacheClusterEnabled=True|False cacheClusterSize='0.5' variables='{"name": "value"}'
[ "Creates", "a", "new", "API", "stage", "for", "a", "given", "restApiId", "and", "deploymentId", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_apigateway.py#L856-L879