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,300
saltstack/salt
salt/modules/rh_service.py
missing
def missing(name, limit=''): ''' The inverse of service.available. Return True if the named service is not available. Use the ``limit`` param to restrict results to services of that type. CLI Examples: .. code-block:: bash salt '*' service.missing sshd salt '*' service.missin...
python
def missing(name, limit=''): ''' The inverse of service.available. Return True if the named service is not available. Use the ``limit`` param to restrict results to services of that type. CLI Examples: .. code-block:: bash salt '*' service.missing sshd salt '*' service.missin...
[ "def", "missing", "(", "name", ",", "limit", "=", "''", ")", ":", "if", "limit", "==", "'upstart'", ":", "return", "not", "_service_is_upstart", "(", "name", ")", "elif", "limit", "==", "'sysvinit'", ":", "return", "not", "_service_is_sysv", "(", "name", ...
The inverse of service.available. Return True if the named service is not available. Use the ``limit`` param to restrict results to services of that type. CLI Examples: .. code-block:: bash salt '*' service.missing sshd salt '*' service.missing sshd limit=upstart salt '*' ser...
[ "The", "inverse", "of", "service", ".", "available", ".", "Return", "True", "if", "the", "named", "service", "is", "not", "available", ".", "Use", "the", "limit", "param", "to", "restrict", "results", "to", "services", "of", "that", "type", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/rh_service.py#L385-L407
36,301
saltstack/salt
salt/modules/debuild_pkgbuild.py
_check_repo_sign_utils_support
def _check_repo_sign_utils_support(name): ''' Check for specified command name in search path ''' if salt.utils.path.which(name): return True else: raise CommandExecutionError( 'utility \'{0}\' needs to be installed or made available in search path'.format(name) )
python
def _check_repo_sign_utils_support(name): ''' Check for specified command name in search path ''' if salt.utils.path.which(name): return True else: raise CommandExecutionError( 'utility \'{0}\' needs to be installed or made available in search path'.format(name) )
[ "def", "_check_repo_sign_utils_support", "(", "name", ")", ":", "if", "salt", ".", "utils", ".", "path", ".", "which", "(", "name", ")", ":", "return", "True", "else", ":", "raise", "CommandExecutionError", "(", "'utility \\'{0}\\' needs to be installed or made avai...
Check for specified command name in search path
[ "Check", "for", "specified", "command", "name", "in", "search", "path" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debuild_pkgbuild.py#L73-L82
36,302
saltstack/salt
salt/modules/debuild_pkgbuild.py
_get_build_env
def _get_build_env(env): ''' Get build environment overrides dictionary to use in build process ''' env_override = '' if env is None: return env_override if not isinstance(env, dict): raise SaltInvocationError( '\'env\' must be a Python dictionary' ) for k...
python
def _get_build_env(env): ''' Get build environment overrides dictionary to use in build process ''' env_override = '' if env is None: return env_override if not isinstance(env, dict): raise SaltInvocationError( '\'env\' must be a Python dictionary' ) for k...
[ "def", "_get_build_env", "(", "env", ")", ":", "env_override", "=", "''", "if", "env", "is", "None", ":", "return", "env_override", "if", "not", "isinstance", "(", "env", ",", "dict", ")", ":", "raise", "SaltInvocationError", "(", "'\\'env\\' must be a Python ...
Get build environment overrides dictionary to use in build process
[ "Get", "build", "environment", "overrides", "dictionary", "to", "use", "in", "build", "process" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debuild_pkgbuild.py#L98-L112
36,303
saltstack/salt
salt/modules/debuild_pkgbuild.py
_get_repo_options_env
def _get_repo_options_env(env): ''' Get repo environment overrides dictionary to use in repo options process env A dictionary of variables to define the repository options Example: .. code-block:: yaml - env: - OPTIONS : 'ask-passphrase' .. war...
python
def _get_repo_options_env(env): ''' Get repo environment overrides dictionary to use in repo options process env A dictionary of variables to define the repository options Example: .. code-block:: yaml - env: - OPTIONS : 'ask-passphrase' .. war...
[ "def", "_get_repo_options_env", "(", "env", ")", ":", "env_options", "=", "''", "if", "env", "is", "None", ":", "return", "env_options", "if", "not", "isinstance", "(", "env", ",", "dict", ")", ":", "raise", "SaltInvocationError", "(", "'\\'env\\' must be a Py...
Get repo environment overrides dictionary to use in repo options process env A dictionary of variables to define the repository options Example: .. code-block:: yaml - env: - OPTIONS : 'ask-passphrase' .. warning:: The above illustrates a ...
[ "Get", "repo", "environment", "overrides", "dictionary", "to", "use", "in", "repo", "options", "process" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debuild_pkgbuild.py#L115-L147
36,304
saltstack/salt
salt/modules/debuild_pkgbuild.py
_get_repo_dists_env
def _get_repo_dists_env(env): ''' Get repo environment overrides dictionary to use in repo distributions process env A dictionary of variables to define the repository distributions Example: .. code-block:: yaml - env: - ORIGIN : 'jessie' ...
python
def _get_repo_dists_env(env): ''' Get repo environment overrides dictionary to use in repo distributions process env A dictionary of variables to define the repository distributions Example: .. code-block:: yaml - env: - ORIGIN : 'jessie' ...
[ "def", "_get_repo_dists_env", "(", "env", ")", ":", "# env key with tuple of control information for handling input env dictionary", "# 0 | M - Mandatory, O - Optional, I - Ignore", "# 1 | 'text string for repo field'", "# 2 | 'default value'", "dflts_dict", "=", "{", "'OPTIONS'", ":", ...
Get repo environment overrides dictionary to use in repo distributions process env A dictionary of variables to define the repository distributions Example: .. code-block:: yaml - env: - ORIGIN : 'jessie' - LABEL : 'salt debian' ...
[ "Get", "repo", "environment", "overrides", "dictionary", "to", "use", "in", "repo", "distributions", "process" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debuild_pkgbuild.py#L150-L231
36,305
saltstack/salt
salt/modules/debuild_pkgbuild.py
_create_pbuilders
def _create_pbuilders(env, runas='root'): ''' Create the .pbuilder family of files in user's home directory env A list or dictionary of environment variables to be set prior to execution. Example: .. code-block:: yaml - env: - DEB_BUILD_OPTIONS: 'noche...
python
def _create_pbuilders(env, runas='root'): ''' Create the .pbuilder family of files in user's home directory env A list or dictionary of environment variables to be set prior to execution. Example: .. code-block:: yaml - env: - DEB_BUILD_OPTIONS: 'noche...
[ "def", "_create_pbuilders", "(", "env", ",", "runas", "=", "'root'", ")", ":", "home", "=", "os", ".", "path", ".", "expanduser", "(", "'~{0}'", ".", "format", "(", "runas", ")", ")", "pbuilderrc", "=", "os", ".", "path", ".", "join", "(", "home", ...
Create the .pbuilder family of files in user's home directory env A list or dictionary of environment variables to be set prior to execution. Example: .. code-block:: yaml - env: - DEB_BUILD_OPTIONS: 'nocheck' .. warning:: The above illus...
[ "Create", "the", ".", "pbuilder", "family", "of", "files", "in", "user", "s", "home", "directory" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debuild_pkgbuild.py#L234-L283
36,306
saltstack/salt
salt/modules/debuild_pkgbuild.py
_get_src
def _get_src(tree_base, source, saltenv='base'): ''' Get the named sources and place them into the tree_base ''' parsed = _urlparse(source) sbase = os.path.basename(source) dest = os.path.join(tree_base, sbase) if parsed.scheme: __salt__['cp.get_url'](source, dest, saltenv=saltenv) ...
python
def _get_src(tree_base, source, saltenv='base'): ''' Get the named sources and place them into the tree_base ''' parsed = _urlparse(source) sbase = os.path.basename(source) dest = os.path.join(tree_base, sbase) if parsed.scheme: __salt__['cp.get_url'](source, dest, saltenv=saltenv) ...
[ "def", "_get_src", "(", "tree_base", ",", "source", ",", "saltenv", "=", "'base'", ")", ":", "parsed", "=", "_urlparse", "(", "source", ")", "sbase", "=", "os", ".", "path", ".", "basename", "(", "source", ")", "dest", "=", "os", ".", "path", ".", ...
Get the named sources and place them into the tree_base
[ "Get", "the", "named", "sources", "and", "place", "them", "into", "the", "tree_base" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/debuild_pkgbuild.py#L305-L315
36,307
saltstack/salt
salt/runners/vault.py
generate_token
def generate_token(minion_id, signature, impersonated_by_master=False): ''' Generate a Vault token for minion minion_id minion_id The id of the minion that requests a token signature Cryptographic signature which validates that the request is indeed sent by the minion (or the m...
python
def generate_token(minion_id, signature, impersonated_by_master=False): ''' Generate a Vault token for minion minion_id minion_id The id of the minion that requests a token signature Cryptographic signature which validates that the request is indeed sent by the minion (or the m...
[ "def", "generate_token", "(", "minion_id", ",", "signature", ",", "impersonated_by_master", "=", "False", ")", ":", "log", ".", "debug", "(", "'Token generation request for %s (impersonated by master: %s)'", ",", "minion_id", ",", "impersonated_by_master", ")", "_validate...
Generate a Vault token for minion minion_id minion_id The id of the minion that requests a token signature Cryptographic signature which validates that the request is indeed sent by the minion (or the master, see impersonated_by_master). impersonated_by_master If the maste...
[ "Generate", "a", "Vault", "token", "for", "minion", "minion_id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L28-L96
36,308
saltstack/salt
salt/runners/vault.py
unseal
def unseal(): ''' Unseal Vault server This function uses the 'keys' from the 'vault' configuration to unseal vault server vault: keys: - n63/TbrQuL3xaIW7ZZpuXj/tIfnK1/MbVxO4vT3wYD2A - S9OwCvMRhErEA4NVVELYBs6w/Me6+urgUr24xGK44Uy3 - F1j4b7JKq850NS6Kboiy5laJ0xY8dWJvB3fcwA+Sr...
python
def unseal(): ''' Unseal Vault server This function uses the 'keys' from the 'vault' configuration to unseal vault server vault: keys: - n63/TbrQuL3xaIW7ZZpuXj/tIfnK1/MbVxO4vT3wYD2A - S9OwCvMRhErEA4NVVELYBs6w/Me6+urgUr24xGK44Uy3 - F1j4b7JKq850NS6Kboiy5laJ0xY8dWJvB3fcwA+Sr...
[ "def", "unseal", "(", ")", ":", "for", "key", "in", "__opts__", "[", "'vault'", "]", "[", "'keys'", "]", ":", "ret", "=", "__utils__", "[", "'vault.make_request'", "]", "(", "'PUT'", ",", "'v1/sys/unseal'", ",", "data", "=", "json", ".", "dumps", "(", ...
Unseal Vault server This function uses the 'keys' from the 'vault' configuration to unseal vault server vault: keys: - n63/TbrQuL3xaIW7ZZpuXj/tIfnK1/MbVxO4vT3wYD2A - S9OwCvMRhErEA4NVVELYBs6w/Me6+urgUr24xGK44Uy3 - F1j4b7JKq850NS6Kboiy5laJ0xY8dWJvB3fcwA+SraYl - 1cYtvjKJNDVa...
[ "Unseal", "Vault", "server" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L99-L126
36,309
saltstack/salt
salt/runners/vault.py
_validate_signature
def _validate_signature(minion_id, signature, impersonated_by_master): ''' Validate that either minion with id minion_id, or the master, signed the request ''' pki_dir = __opts__['pki_dir'] if impersonated_by_master: public_key = '{0}/master.pub'.format(pki_dir) else: public_...
python
def _validate_signature(minion_id, signature, impersonated_by_master): ''' Validate that either minion with id minion_id, or the master, signed the request ''' pki_dir = __opts__['pki_dir'] if impersonated_by_master: public_key = '{0}/master.pub'.format(pki_dir) else: public_...
[ "def", "_validate_signature", "(", "minion_id", ",", "signature", ",", "impersonated_by_master", ")", ":", "pki_dir", "=", "__opts__", "[", "'pki_dir'", "]", "if", "impersonated_by_master", ":", "public_key", "=", "'{0}/master.pub'", ".", "format", "(", "pki_dir", ...
Validate that either minion with id minion_id, or the master, signed the request
[ "Validate", "that", "either", "minion", "with", "id", "minion_id", "or", "the", "master", "signed", "the", "request" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L146-L163
36,310
saltstack/salt
salt/runners/vault.py
_get_policies
def _get_policies(minion_id, config): ''' Get the policies that should be applied to a token for minion_id ''' _, grains, _ = salt.utils.minions.get_minion_data(minion_id, __opts__) policy_patterns = config.get( 'policies', ['saltstac...
python
def _get_policies(minion_id, config): ''' Get the policies that should be applied to a token for minion_id ''' _, grains, _ = salt.utils.minions.get_minion_data(minion_id, __opts__) policy_patterns = config.get( 'policies', ['saltstac...
[ "def", "_get_policies", "(", "minion_id", ",", "config", ")", ":", "_", ",", "grains", ",", "_", "=", "salt", ".", "utils", ".", "minions", ".", "get_minion_data", "(", "minion_id", ",", "__opts__", ")", "policy_patterns", "=", "config", ".", "get", "(",...
Get the policies that should be applied to a token for minion_id
[ "Get", "the", "policies", "that", "should", "be", "applied", "to", "a", "token", "for", "minion_id" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L166-L189
36,311
saltstack/salt
salt/runners/vault.py
_expand_pattern_lists
def _expand_pattern_lists(pattern, **mappings): ''' Expands the pattern for any list-valued mappings, such that for any list of length N in the mappings present in the pattern, N copies of the pattern are returned, each with an element of the list substituted. pattern: A pattern to expand, ...
python
def _expand_pattern_lists(pattern, **mappings): ''' Expands the pattern for any list-valued mappings, such that for any list of length N in the mappings present in the pattern, N copies of the pattern are returned, each with an element of the list substituted. pattern: A pattern to expand, ...
[ "def", "_expand_pattern_lists", "(", "pattern", ",", "*", "*", "mappings", ")", ":", "expanded_patterns", "=", "[", "]", "f", "=", "string", ".", "Formatter", "(", ")", "'''\n This function uses a string.Formatter to get all the formatting tokens from\n the pattern, t...
Expands the pattern for any list-valued mappings, such that for any list of length N in the mappings present in the pattern, N copies of the pattern are returned, each with an element of the list substituted. pattern: A pattern to expand, for example ``by-role/{grains[roles]}`` mappings: ...
[ "Expands", "the", "pattern", "for", "any", "list", "-", "valued", "mappings", "such", "that", "for", "any", "list", "of", "length", "N", "in", "the", "mappings", "present", "in", "the", "pattern", "N", "copies", "of", "the", "pattern", "are", "returned", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L192-L239
36,312
saltstack/salt
salt/runners/vault.py
_selftoken_expired
def _selftoken_expired(): ''' Validate the current token exists and is still valid ''' try: verify = __opts__['vault'].get('verify', None) url = '{0}/v1/auth/token/lookup-self'.format(__opts__['vault']['url']) if 'token' not in __opts__['vault']['auth']: return True ...
python
def _selftoken_expired(): ''' Validate the current token exists and is still valid ''' try: verify = __opts__['vault'].get('verify', None) url = '{0}/v1/auth/token/lookup-self'.format(__opts__['vault']['url']) if 'token' not in __opts__['vault']['auth']: return True ...
[ "def", "_selftoken_expired", "(", ")", ":", "try", ":", "verify", "=", "__opts__", "[", "'vault'", "]", ".", "get", "(", "'verify'", ",", "None", ")", "url", "=", "'{0}/v1/auth/token/lookup-self'", ".", "format", "(", "__opts__", "[", "'vault'", "]", "[", ...
Validate the current token exists and is still valid
[ "Validate", "the", "current", "token", "exists", "and", "is", "still", "valid" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L242-L259
36,313
saltstack/salt
salt/runners/vault.py
_get_token_create_url
def _get_token_create_url(config): ''' Create Vault url for token creation ''' role_name = config.get('role_name', None) auth_path = '/v1/auth/token/create' base_url = config['url'] return '/'.join(x.strip('/') for x in (base_url, auth_path, role_name) if x)
python
def _get_token_create_url(config): ''' Create Vault url for token creation ''' role_name = config.get('role_name', None) auth_path = '/v1/auth/token/create' base_url = config['url'] return '/'.join(x.strip('/') for x in (base_url, auth_path, role_name) if x)
[ "def", "_get_token_create_url", "(", "config", ")", ":", "role_name", "=", "config", ".", "get", "(", "'role_name'", ",", "None", ")", "auth_path", "=", "'/v1/auth/token/create'", "base_url", "=", "config", "[", "'url'", "]", "return", "'/'", ".", "join", "(...
Create Vault url for token creation
[ "Create", "Vault", "url", "for", "token", "creation" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/runners/vault.py#L262-L269
36,314
saltstack/salt
salt/modules/boto_lambda.py
_find_function
def _find_function(name, region=None, key=None, keyid=None, profile=None): ''' Given function name, find and return matching Lambda information. ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) for funcs in __utils__['boto3.paged_call'](conn.list_functio...
python
def _find_function(name, region=None, key=None, keyid=None, profile=None): ''' Given function name, find and return matching Lambda information. ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) for funcs in __utils__['boto3.paged_call'](conn.list_functio...
[ "def", "_find_function", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid...
Given function name, find and return matching Lambda information.
[ "Given", "function", "name", "find", "and", "return", "matching", "Lambda", "information", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L138-L149
36,315
saltstack/salt
salt/modules/boto_lambda.py
function_exists
def function_exists(FunctionName, region=None, key=None, keyid=None, profile=None): ''' Given a function name, check to see if the given function name exists. Returns True if the given function exists and returns False if the given function does not exist. CLI Example: .. ...
python
def function_exists(FunctionName, region=None, key=None, keyid=None, profile=None): ''' Given a function name, check to see if the given function name exists. Returns True if the given function exists and returns False if the given function does not exist. CLI Example: .. ...
[ "def", "function_exists", "(", "FunctionName", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "func", "=", "_find_function", "(", "FunctionName", ",", "region", "=", "r...
Given a function name, check to see if the given function name exists. Returns True if the given function exists and returns False if the given function does not exist. CLI Example: .. code-block:: bash salt myminion boto_lambda.function_exists myfunction
[ "Given", "a", "function", "name", "check", "to", "see", "if", "the", "given", "function", "name", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L152-L173
36,316
saltstack/salt
salt/modules/boto_lambda.py
delete_function
def delete_function(FunctionName, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Given a function name and optional version qualifier, delete it. Returns {deleted: true} if the function was deleted and returns {deleted: false} if the function was not deleted. CLI Example: ...
python
def delete_function(FunctionName, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Given a function name and optional version qualifier, delete it. Returns {deleted: true} if the function was deleted and returns {deleted: false} if the function was not deleted. CLI Example: ...
[ "def", "delete_function", "(", "FunctionName", ",", "Qualifier", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", ...
Given a function name and optional version qualifier, delete it. Returns {deleted: true} if the function was deleted and returns {deleted: false} if the function was not deleted. CLI Example: .. code-block:: bash salt myminion boto_lambda.delete_function myfunction
[ "Given", "a", "function", "name", "and", "optional", "version", "qualifier", "delete", "it", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L311-L335
36,317
saltstack/salt
salt/modules/boto_lambda.py
describe_function
def describe_function(FunctionName, region=None, key=None, keyid=None, profile=None): ''' Given a function name describe its properties. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_lambda.describe_function myf...
python
def describe_function(FunctionName, region=None, key=None, keyid=None, profile=None): ''' Given a function name describe its properties. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_lambda.describe_function myf...
[ "def", "describe_function", "(", "FunctionName", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "func", "=", "_find_function", "(", "FunctionName", ",", "region", "=", ...
Given a function name describe its properties. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_lambda.describe_function myfunction
[ "Given", "a", "function", "name", "describe", "its", "properties", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L338-L364
36,318
saltstack/salt
salt/modules/boto_lambda.py
update_function_code
def update_function_code(FunctionName, ZipFile=None, S3Bucket=None, S3Key=None, S3ObjectVersion=None, Publish=False, region=None, key=None, keyid=None, profile=None): ''' Upload the given code to the named lambda function. Returns {updated: true} if the fun...
python
def update_function_code(FunctionName, ZipFile=None, S3Bucket=None, S3Key=None, S3ObjectVersion=None, Publish=False, region=None, key=None, keyid=None, profile=None): ''' Upload the given code to the named lambda function. Returns {updated: true} if the fun...
[ "def", "update_function_code", "(", "FunctionName", ",", "ZipFile", "=", "None", ",", "S3Bucket", "=", "None", ",", "S3Key", "=", "None", ",", "S3ObjectVersion", "=", "None", ",", "Publish", "=", "False", ",", "region", "=", "None", ",", "key", "=", "Non...
Upload the given code to the named lambda function. Returns {updated: true} if the function was updated and returns {updated: False} if the function was not updated. CLI Example: .. code-block:: bash salt myminion boto_lamba.update_function_code my_function ZipFile=function.zip
[ "Upload", "the", "given", "code", "to", "the", "named", "lambda", "function", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L448-L495
36,319
saltstack/salt
salt/modules/boto_lambda.py
add_permission
def add_permission(FunctionName, StatementId, Action, Principal, SourceArn=None, SourceAccount=None, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Add a permission to a lambda function. Returns {added: true} if the permission was added and retur...
python
def add_permission(FunctionName, StatementId, Action, Principal, SourceArn=None, SourceAccount=None, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Add a permission to a lambda function. Returns {added: true} if the permission was added and retur...
[ "def", "add_permission", "(", "FunctionName", ",", "StatementId", ",", "Action", ",", "Principal", ",", "SourceArn", "=", "None", ",", "SourceAccount", "=", "None", ",", "Qualifier", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", ...
Add a permission to a lambda function. Returns {added: true} if the permission was added and returns {added: False} if the permission was not added. CLI Example: .. code-block:: bash salt myminion boto_lamba.add_permission my_function my_id "lambda:*" \\ s3.amazona...
[ "Add", "a", "permission", "to", "a", "lambda", "function", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L498-L528
36,320
saltstack/salt
salt/modules/boto_lambda.py
remove_permission
def remove_permission(FunctionName, StatementId, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Remove a permission from a lambda function. Returns {removed: true} if the permission was removed and returns {removed: False} if the permission was not removed. ...
python
def remove_permission(FunctionName, StatementId, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Remove a permission from a lambda function. Returns {removed: true} if the permission was removed and returns {removed: False} if the permission was not removed. ...
[ "def", "remove_permission", "(", "FunctionName", ",", "StatementId", ",", "Qualifier", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_co...
Remove a permission from a lambda function. Returns {removed: true} if the permission was removed and returns {removed: False} if the permission was not removed. CLI Example: .. code-block:: bash salt myminion boto_lamba.remove_permission my_function my_id
[ "Remove", "a", "permission", "from", "a", "lambda", "function", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L531-L556
36,321
saltstack/salt
salt/modules/boto_lambda.py
get_permissions
def get_permissions(FunctionName, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Get resource permissions for the given lambda function Returns dictionary of permissions, by statement ID CLI Example: .. code-block:: bash salt myminion boto_lamba...
python
def get_permissions(FunctionName, Qualifier=None, region=None, key=None, keyid=None, profile=None): ''' Get resource permissions for the given lambda function Returns dictionary of permissions, by statement ID CLI Example: .. code-block:: bash salt myminion boto_lamba...
[ "def", "get_permissions", "(", "FunctionName", ",", "Qualifier", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", ...
Get resource permissions for the given lambda function Returns dictionary of permissions, by statement ID CLI Example: .. code-block:: bash salt myminion boto_lamba.get_permissions my_function permissions: {...}
[ "Get", "resource", "permissions", "for", "the", "given", "lambda", "function" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L559-L613
36,322
saltstack/salt
salt/modules/boto_lambda.py
list_functions
def list_functions(region=None, key=None, keyid=None, profile=None): ''' List all Lambda functions visible in the current scope. CLI Example: .. code-block:: bash salt myminion boto_lambda.list_functions ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
python
def list_functions(region=None, key=None, keyid=None, profile=None): ''' List all Lambda functions visible in the current scope. CLI Example: .. code-block:: bash salt myminion boto_lambda.list_functions ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) ...
[ "def", "list_functions", "(", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid", "=", "keyi...
List all Lambda functions visible in the current scope. CLI Example: .. code-block:: bash salt myminion boto_lambda.list_functions
[ "List", "all", "Lambda", "functions", "visible", "in", "the", "current", "scope", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L616-L632
36,323
saltstack/salt
salt/modules/boto_lambda.py
list_function_versions
def list_function_versions(FunctionName, region=None, key=None, keyid=None, profile=None): ''' List the versions available for the given function. Returns list of function versions CLI Example: .. code-block:: yaml versions: - {...} - {...} ...
python
def list_function_versions(FunctionName, region=None, key=None, keyid=None, profile=None): ''' List the versions available for the given function. Returns list of function versions CLI Example: .. code-block:: yaml versions: - {...} - {...} ...
[ "def", "list_function_versions", "(", "FunctionName", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key",...
List the versions available for the given function. Returns list of function versions CLI Example: .. code-block:: yaml versions: - {...} - {...}
[ "List", "the", "versions", "available", "for", "the", "given", "function", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L635-L661
36,324
saltstack/salt
salt/modules/boto_lambda.py
create_alias
def create_alias(FunctionName, Name, FunctionVersion, Description="", region=None, key=None, keyid=None, profile=None): ''' Given a valid config, create an alias to a function. Returns {created: true} if the alias was created and returns {created: False} if the alias was not created. ...
python
def create_alias(FunctionName, Name, FunctionVersion, Description="", region=None, key=None, keyid=None, profile=None): ''' Given a valid config, create an alias to a function. Returns {created: true} if the alias was created and returns {created: False} if the alias was not created. ...
[ "def", "create_alias", "(", "FunctionName", ",", "Name", ",", "FunctionVersion", ",", "Description", "=", "\"\"", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn",...
Given a valid config, create an alias to a function. Returns {created: true} if the alias was created and returns {created: False} if the alias was not created. CLI Example: .. code-block:: bash salt myminion boto_lamba.create_alias my_function my_alias $LATEST "An alias"
[ "Given", "a", "valid", "config", "create", "an", "alias", "to", "a", "function", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L664-L691
36,325
saltstack/salt
salt/modules/boto_lambda.py
_find_alias
def _find_alias(FunctionName, Name, FunctionVersion=None, region=None, key=None, keyid=None, profile=None): ''' Given function name and alias name, find and return matching alias information. ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) args = { ...
python
def _find_alias(FunctionName, Name, FunctionVersion=None, region=None, key=None, keyid=None, profile=None): ''' Given function name and alias name, find and return matching alias information. ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) args = { ...
[ "def", "_find_alias", "(", "FunctionName", ",", "Name", ",", "FunctionVersion", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region",...
Given function name and alias name, find and return matching alias information.
[ "Given", "function", "name", "and", "alias", "name", "find", "and", "return", "matching", "alias", "information", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L717-L734
36,326
saltstack/salt
salt/modules/boto_lambda.py
alias_exists
def alias_exists(FunctionName, Name, region=None, key=None, keyid=None, profile=None): ''' Given a function name and alias name, check to see if the given alias exists. Returns True if the given alias exists and returns False if the given alias does not exist. CLI Example: .....
python
def alias_exists(FunctionName, Name, region=None, key=None, keyid=None, profile=None): ''' Given a function name and alias name, check to see if the given alias exists. Returns True if the given alias exists and returns False if the given alias does not exist. CLI Example: .....
[ "def", "alias_exists", "(", "FunctionName", ",", "Name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "alias", "=", "_find_alias", "(", "FunctionName", ",", "Name", ...
Given a function name and alias name, check to see if the given alias exists. Returns True if the given alias exists and returns False if the given alias does not exist. CLI Example: .. code-block:: bash salt myminion boto_lambda.alias_exists myfunction myalias
[ "Given", "a", "function", "name", "and", "alias", "name", "check", "to", "see", "if", "the", "given", "alias", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L737-L758
36,327
saltstack/salt
salt/modules/boto_lambda.py
describe_alias
def describe_alias(FunctionName, Name, region=None, key=None, keyid=None, profile=None): ''' Given a function name and alias name describe the properties of the alias. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_...
python
def describe_alias(FunctionName, Name, region=None, key=None, keyid=None, profile=None): ''' Given a function name and alias name describe the properties of the alias. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_...
[ "def", "describe_alias", "(", "FunctionName", ",", "Name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "alias", "=", "_find_alias", "(", "FunctionName", ",", "Name",...
Given a function name and alias name describe the properties of the alias. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_lambda.describe_alias myalias
[ "Given", "a", "function", "name", "and", "alias", "name", "describe", "the", "properties", "of", "the", "alias", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L761-L785
36,328
saltstack/salt
salt/modules/boto_lambda.py
update_alias
def update_alias(FunctionName, Name, FunctionVersion=None, Description=None, region=None, key=None, keyid=None, profile=None): ''' Update the named alias to the configuration. Returns {updated: true} if the alias was updated and returns {updated: False} if the alias was not updated. ...
python
def update_alias(FunctionName, Name, FunctionVersion=None, Description=None, region=None, key=None, keyid=None, profile=None): ''' Update the named alias to the configuration. Returns {updated: true} if the alias was updated and returns {updated: False} if the alias was not updated. ...
[ "def", "update_alias", "(", "FunctionName", ",", "Name", ",", "FunctionVersion", "=", "None", ",", "Description", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try",...
Update the named alias to the configuration. Returns {updated: true} if the alias was updated and returns {updated: False} if the alias was not updated. CLI Example: .. code-block:: bash salt myminion boto_lamba.update_alias my_lambda my_alias $LATEST
[ "Update", "the", "named", "alias", "to", "the", "configuration", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L788-L819
36,329
saltstack/salt
salt/modules/boto_lambda.py
create_event_source_mapping
def create_event_source_mapping(EventSourceArn, FunctionName, StartingPosition, Enabled=True, BatchSize=100, region=None, key=None, keyid=None, profile=None): ''' Identifies a stream as an event source for a Lambda function. It can be either an...
python
def create_event_source_mapping(EventSourceArn, FunctionName, StartingPosition, Enabled=True, BatchSize=100, region=None, key=None, keyid=None, profile=None): ''' Identifies a stream as an event source for a Lambda function. It can be either an...
[ "def", "create_event_source_mapping", "(", "EventSourceArn", ",", "FunctionName", ",", "StartingPosition", ",", "Enabled", "=", "True", ",", "BatchSize", "=", "100", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profil...
Identifies a stream as an event source for a Lambda function. It can be either an Amazon Kinesis stream or an Amazon DynamoDB stream. AWS Lambda invokes the specified function when records are posted to the stream. Returns {created: true} if the event source mapping was created and returns {created: Fa...
[ "Identifies", "a", "stream", "as", "an", "event", "source", "for", "a", "Lambda", "function", ".", "It", "can", "be", "either", "an", "Amazon", "Kinesis", "stream", "or", "an", "Amazon", "DynamoDB", "stream", ".", "AWS", "Lambda", "invokes", "the", "specif...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L822-L855
36,330
saltstack/salt
salt/modules/boto_lambda.py
get_event_source_mapping_ids
def get_event_source_mapping_ids(EventSourceArn, FunctionName, region=None, key=None, keyid=None, profile=None): ''' Given an event source and function name, return a list of mapping IDs CLI Example: .. code-block:: bash salt myminion boto_lambda.get_event_sou...
python
def get_event_source_mapping_ids(EventSourceArn, FunctionName, region=None, key=None, keyid=None, profile=None): ''' Given an event source and function name, return a list of mapping IDs CLI Example: .. code-block:: bash salt myminion boto_lambda.get_event_sou...
[ "def", "get_event_source_mapping_ids", "(", "EventSourceArn", ",", "FunctionName", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region"...
Given an event source and function name, return a list of mapping IDs CLI Example: .. code-block:: bash salt myminion boto_lambda.get_event_source_mapping_ids arn:::: myfunction
[ "Given", "an", "event", "source", "and", "function", "name", "return", "a", "list", "of", "mapping", "IDs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L858-L881
36,331
saltstack/salt
salt/modules/boto_lambda.py
delete_event_source_mapping
def delete_event_source_mapping(UUID=None, EventSourceArn=None, FunctionName=None, region=None, key=None, keyid=None, profile=None): ''' Given an event source mapping ID or an event source ARN and FunctionName, delete the event source mapping Returns {deleted: true} if t...
python
def delete_event_source_mapping(UUID=None, EventSourceArn=None, FunctionName=None, region=None, key=None, keyid=None, profile=None): ''' Given an event source mapping ID or an event source ARN and FunctionName, delete the event source mapping Returns {deleted: true} if t...
[ "def", "delete_event_source_mapping", "(", "UUID", "=", "None", ",", "EventSourceArn", "=", "None", ",", "FunctionName", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
Given an event source mapping ID or an event source ARN and FunctionName, delete the event source mapping Returns {deleted: true} if the mapping was deleted and returns {deleted: false} if the mapping was not deleted. CLI Example: .. code-block:: bash salt myminion boto_lambda.delete_eve...
[ "Given", "an", "event", "source", "mapping", "ID", "or", "an", "event", "source", "ARN", "and", "FunctionName", "delete", "the", "event", "source", "mapping" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L900-L924
36,332
saltstack/salt
salt/modules/boto_lambda.py
event_source_mapping_exists
def event_source_mapping_exists(UUID=None, EventSourceArn=None, FunctionName=None, region=None, key=None, keyid=None, profile=None): ''' Given an event source mapping ID or an event source ARN and FunctionName, check whether the mapping exists....
python
def event_source_mapping_exists(UUID=None, EventSourceArn=None, FunctionName=None, region=None, key=None, keyid=None, profile=None): ''' Given an event source mapping ID or an event source ARN and FunctionName, check whether the mapping exists....
[ "def", "event_source_mapping_exists", "(", "UUID", "=", "None", ",", "EventSourceArn", "=", "None", ",", "FunctionName", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
Given an event source mapping ID or an event source ARN and FunctionName, check whether the mapping exists. Returns True if the given alias exists and returns False if the given alias does not exist. CLI Example: .. code-block:: bash salt myminion boto_lambda.alias_exists myfunction myal...
[ "Given", "an", "event", "source", "mapping", "ID", "or", "an", "event", "source", "ARN", "and", "FunctionName", "check", "whether", "the", "mapping", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L927-L952
36,333
saltstack/salt
salt/modules/boto_lambda.py
describe_event_source_mapping
def describe_event_source_mapping(UUID=None, EventSourceArn=None, FunctionName=None, region=None, key=None, keyid=None, profile=None): ''' Given an event source mapping ID or an event source ARN and FunctionName, obtain the current settings...
python
def describe_event_source_mapping(UUID=None, EventSourceArn=None, FunctionName=None, region=None, key=None, keyid=None, profile=None): ''' Given an event source mapping ID or an event source ARN and FunctionName, obtain the current settings...
[ "def", "describe_event_source_mapping", "(", "UUID", "=", "None", ",", "EventSourceArn", "=", "None", ",", "FunctionName", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":",...
Given an event source mapping ID or an event source ARN and FunctionName, obtain the current settings of that mapping. Returns a dictionary of interesting properties. CLI Example: .. code-block:: bash salt myminion boto_lambda.describe_event_source_mapping uuid
[ "Given", "an", "event", "source", "mapping", "ID", "or", "an", "event", "source", "ARN", "and", "FunctionName", "obtain", "the", "current", "settings", "of", "that", "mapping", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L955-L989
36,334
saltstack/salt
salt/modules/boto_lambda.py
update_event_source_mapping
def update_event_source_mapping(UUID, FunctionName=None, Enabled=None, BatchSize=None, region=None, key=None, keyid=None, profile=None): ''' Update the event source mapping identified by the UUID. Returns {updated: true} if the alias was updat...
python
def update_event_source_mapping(UUID, FunctionName=None, Enabled=None, BatchSize=None, region=None, key=None, keyid=None, profile=None): ''' Update the event source mapping identified by the UUID. Returns {updated: true} if the alias was updat...
[ "def", "update_event_source_mapping", "(", "UUID", ",", "FunctionName", "=", "None", ",", "Enabled", "=", "None", ",", "BatchSize", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ...
Update the event source mapping identified by the UUID. Returns {updated: true} if the alias was updated and returns {updated: False} if the alias was not updated. CLI Example: .. code-block:: bash salt myminion boto_lamba.update_event_source_mapping uuid FunctionName=new_function
[ "Update", "the", "event", "source", "mapping", "identified", "by", "the", "UUID", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_lambda.py#L992-L1028
36,335
saltstack/salt
salt/fileserver/s3fs.py
update
def update(): ''' Update the cache file for the bucket. ''' metadata = _init() if S3_SYNC_ON_UPDATE: # sync the buckets to the local cache log.info('Syncing local cache from S3...') for saltenv, env_meta in six.iteritems(metadata): for bucket_files in _find_file...
python
def update(): ''' Update the cache file for the bucket. ''' metadata = _init() if S3_SYNC_ON_UPDATE: # sync the buckets to the local cache log.info('Syncing local cache from S3...') for saltenv, env_meta in six.iteritems(metadata): for bucket_files in _find_file...
[ "def", "update", "(", ")", ":", "metadata", "=", "_init", "(", ")", "if", "S3_SYNC_ON_UPDATE", ":", "# sync the buckets to the local cache", "log", ".", "info", "(", "'Syncing local cache from S3...'", ")", "for", "saltenv", ",", "env_meta", "in", "six", ".", "i...
Update the cache file for the bucket.
[ "Update", "the", "cache", "file", "for", "the", "bucket", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L121-L141
36,336
saltstack/salt
salt/fileserver/s3fs.py
find_file
def find_file(path, saltenv='base', **kwargs): ''' Look through the buckets cache file for a match. If the field is found, it is retrieved from S3 only if its cached version is missing, or if the MD5 does not match. ''' if 'env' in kwargs: # "env" is not supported; Use "saltenv". ...
python
def find_file(path, saltenv='base', **kwargs): ''' Look through the buckets cache file for a match. If the field is found, it is retrieved from S3 only if its cached version is missing, or if the MD5 does not match. ''' if 'env' in kwargs: # "env" is not supported; Use "saltenv". ...
[ "def", "find_file", "(", "path", ",", "saltenv", "=", "'base'", ",", "*", "*", "kwargs", ")", ":", "if", "'env'", "in", "kwargs", ":", "# \"env\" is not supported; Use \"saltenv\".", "kwargs", ".", "pop", "(", "'env'", ")", "fnd", "=", "{", "'bucket'", ":"...
Look through the buckets cache file for a match. If the field is found, it is retrieved from S3 only if its cached version is missing, or if the MD5 does not match.
[ "Look", "through", "the", "buckets", "cache", "file", "for", "a", "match", ".", "If", "the", "field", "is", "found", "it", "is", "retrieved", "from", "S3", "only", "if", "its", "cached", "version", "is", "missing", "or", "if", "the", "MD5", "does", "no...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L144-L185
36,337
saltstack/salt
salt/fileserver/s3fs.py
file_hash
def file_hash(load, fnd): ''' Return an MD5 file hash ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') ret = {} if 'saltenv' not in load: return ret if 'path' not in fnd or 'bucket' not in fnd or not fnd['path']: return ret ...
python
def file_hash(load, fnd): ''' Return an MD5 file hash ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') ret = {} if 'saltenv' not in load: return ret if 'path' not in fnd or 'bucket' not in fnd or not fnd['path']: return ret ...
[ "def", "file_hash", "(", "load", ",", "fnd", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "ret", "=", "{", "}", "if", "'saltenv'", "not", "in", "load", ":", "return", "...
Return an MD5 file hash
[ "Return", "an", "MD5", "file", "hash" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L188-L213
36,338
saltstack/salt
salt/fileserver/s3fs.py
dir_list
def dir_list(load): ''' Return a list of all directories on the master ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') ret = [] if 'saltenv' not in load: return ret saltenv = load['saltenv'] metadata = _init() if not metadata...
python
def dir_list(load): ''' Return a list of all directories on the master ''' if 'env' in load: # "env" is not supported; Use "saltenv". load.pop('env') ret = [] if 'saltenv' not in load: return ret saltenv = load['saltenv'] metadata = _init() if not metadata...
[ "def", "dir_list", "(", "load", ")", ":", "if", "'env'", "in", "load", ":", "# \"env\" is not supported; Use \"saltenv\".", "load", ".", "pop", "(", "'env'", ")", "ret", "=", "[", "]", "if", "'saltenv'", "not", "in", "load", ":", "return", "ret", "saltenv"...
Return a list of all directories on the master
[ "Return", "a", "list", "of", "all", "directories", "on", "the", "master" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L291-L318
36,339
saltstack/salt
salt/fileserver/s3fs.py
_get_s3_key
def _get_s3_key(): ''' Get AWS keys from pillar or config ''' key = __opts__['s3.key'] if 's3.key' in __opts__ else None keyid = __opts__['s3.keyid'] if 's3.keyid' in __opts__ else None service_url = __opts__['s3.service_url'] \ if 's3.service_url' in __opts__ \ else None ve...
python
def _get_s3_key(): ''' Get AWS keys from pillar or config ''' key = __opts__['s3.key'] if 's3.key' in __opts__ else None keyid = __opts__['s3.keyid'] if 's3.keyid' in __opts__ else None service_url = __opts__['s3.service_url'] \ if 's3.service_url' in __opts__ \ else None ve...
[ "def", "_get_s3_key", "(", ")", ":", "key", "=", "__opts__", "[", "'s3.key'", "]", "if", "'s3.key'", "in", "__opts__", "else", "None", "keyid", "=", "__opts__", "[", "'s3.keyid'", "]", "if", "'s3.keyid'", "in", "__opts__", "else", "None", "service_url", "=...
Get AWS keys from pillar or config
[ "Get", "AWS", "keys", "from", "pillar", "or", "config" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L321-L345
36,340
saltstack/salt
salt/fileserver/s3fs.py
_get_cached_file_name
def _get_cached_file_name(bucket_name, saltenv, path): ''' Return the cached file name for a bucket path file ''' file_path = os.path.join(_get_cache_dir(), saltenv, bucket_name, path) # make sure bucket and saltenv directories exist if not os.path.exists(os.path.dirname(file_path)): o...
python
def _get_cached_file_name(bucket_name, saltenv, path): ''' Return the cached file name for a bucket path file ''' file_path = os.path.join(_get_cache_dir(), saltenv, bucket_name, path) # make sure bucket and saltenv directories exist if not os.path.exists(os.path.dirname(file_path)): o...
[ "def", "_get_cached_file_name", "(", "bucket_name", ",", "saltenv", ",", "path", ")", ":", "file_path", "=", "os", ".", "path", ".", "join", "(", "_get_cache_dir", "(", ")", ",", "saltenv", ",", "bucket_name", ",", "path", ")", "# make sure bucket and saltenv ...
Return the cached file name for a bucket path file
[ "Return", "the", "cached", "file", "name", "for", "a", "bucket", "path", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L380-L391
36,341
saltstack/salt
salt/fileserver/s3fs.py
_find_dirs
def _find_dirs(metadata): ''' Looks for all the directories in the S3 bucket cache metadata. Supports trailing '/' keys (as created by S3 console) as well as directories discovered in the path of file keys. ''' ret = [] found = {} for bucket_dict in metadata: for bucket_name, ...
python
def _find_dirs(metadata): ''' Looks for all the directories in the S3 bucket cache metadata. Supports trailing '/' keys (as created by S3 console) as well as directories discovered in the path of file keys. ''' ret = [] found = {} for bucket_dict in metadata: for bucket_name, ...
[ "def", "_find_dirs", "(", "metadata", ")", ":", "ret", "=", "[", "]", "found", "=", "{", "}", "for", "bucket_dict", "in", "metadata", ":", "for", "bucket_name", ",", "data", "in", "six", ".", "iteritems", "(", "bucket_dict", ")", ":", "dirpaths", "=", ...
Looks for all the directories in the S3 bucket cache metadata. Supports trailing '/' keys (as created by S3 console) as well as directories discovered in the path of file keys.
[ "Looks", "for", "all", "the", "directories", "in", "the", "S3", "bucket", "cache", "metadata", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L596-L625
36,342
saltstack/salt
salt/fileserver/s3fs.py
_find_file_meta
def _find_file_meta(metadata, bucket_name, saltenv, path): ''' Looks for a file's metadata in the S3 bucket cache file ''' env_meta = metadata[saltenv] if saltenv in metadata else {} bucket_meta = {} for bucket in env_meta: if bucket_name in bucket: bucket_meta = bucket[bucke...
python
def _find_file_meta(metadata, bucket_name, saltenv, path): ''' Looks for a file's metadata in the S3 bucket cache file ''' env_meta = metadata[saltenv] if saltenv in metadata else {} bucket_meta = {} for bucket in env_meta: if bucket_name in bucket: bucket_meta = bucket[bucke...
[ "def", "_find_file_meta", "(", "metadata", ",", "bucket_name", ",", "saltenv", ",", "path", ")", ":", "env_meta", "=", "metadata", "[", "saltenv", "]", "if", "saltenv", "in", "metadata", "else", "{", "}", "bucket_meta", "=", "{", "}", "for", "bucket", "i...
Looks for a file's metadata in the S3 bucket cache file
[ "Looks", "for", "a", "file", "s", "metadata", "in", "the", "S3", "bucket", "cache", "file" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L628-L646
36,343
saltstack/salt
salt/fileserver/s3fs.py
_trim_env_off_path
def _trim_env_off_path(paths, saltenv, trim_slash=False): ''' Return a list of file paths with the saltenv directory removed ''' env_len = None if _is_env_per_bucket() else len(saltenv) + 1 slash_len = -1 if trim_slash else None return [d[env_len:slash_len] for d in paths]
python
def _trim_env_off_path(paths, saltenv, trim_slash=False): ''' Return a list of file paths with the saltenv directory removed ''' env_len = None if _is_env_per_bucket() else len(saltenv) + 1 slash_len = -1 if trim_slash else None return [d[env_len:slash_len] for d in paths]
[ "def", "_trim_env_off_path", "(", "paths", ",", "saltenv", ",", "trim_slash", "=", "False", ")", ":", "env_len", "=", "None", "if", "_is_env_per_bucket", "(", ")", "else", "len", "(", "saltenv", ")", "+", "1", "slash_len", "=", "-", "1", "if", "trim_slas...
Return a list of file paths with the saltenv directory removed
[ "Return", "a", "list", "of", "file", "paths", "with", "the", "saltenv", "directory", "removed" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L739-L746
36,344
saltstack/salt
salt/fileserver/s3fs.py
_is_env_per_bucket
def _is_env_per_bucket(): ''' Return the configuration mode, either buckets per environment or a list of buckets that have environment dirs in their root ''' buckets = _get_buckets() if isinstance(buckets, dict): return True elif isinstance(buckets, list): return False e...
python
def _is_env_per_bucket(): ''' Return the configuration mode, either buckets per environment or a list of buckets that have environment dirs in their root ''' buckets = _get_buckets() if isinstance(buckets, dict): return True elif isinstance(buckets, list): return False e...
[ "def", "_is_env_per_bucket", "(", ")", ":", "buckets", "=", "_get_buckets", "(", ")", "if", "isinstance", "(", "buckets", ",", "dict", ")", ":", "return", "True", "elif", "isinstance", "(", "buckets", ",", "list", ")", ":", "return", "False", "else", ":"...
Return the configuration mode, either buckets per environment or a list of buckets that have environment dirs in their root
[ "Return", "the", "configuration", "mode", "either", "buckets", "per", "environment", "or", "a", "list", "of", "buckets", "that", "have", "environment", "dirs", "in", "their", "root" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/fileserver/s3fs.py#L749-L761
36,345
saltstack/salt
salt/modules/boto3_route53.py
find_hosted_zone
def find_hosted_zone(Id=None, Name=None, PrivateZone=None, region=None, key=None, keyid=None, profile=None): ''' Find a hosted zone with the given characteristics. Id The unique Zone Identifier for the Hosted Zone. Exclusive with Name. Name The domain name associa...
python
def find_hosted_zone(Id=None, Name=None, PrivateZone=None, region=None, key=None, keyid=None, profile=None): ''' Find a hosted zone with the given characteristics. Id The unique Zone Identifier for the Hosted Zone. Exclusive with Name. Name The domain name associa...
[ "def", "find_hosted_zone", "(", "Id", "=", "None", ",", "Name", "=", "None", ",", "PrivateZone", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exac...
Find a hosted zone with the given characteristics. Id The unique Zone Identifier for the Hosted Zone. Exclusive with Name. Name The domain name associated with the Hosted Zone. Exclusive with Id. Note this has the potential to match more then one hosted zone (e.g. a public and a priv...
[ "Find", "a", "hosted", "zone", "with", "the", "given", "characteristics", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L132-L184
36,346
saltstack/salt
salt/modules/boto3_route53.py
get_hosted_zone
def get_hosted_zone(Id, region=None, key=None, keyid=None, profile=None): ''' Return detailed info about the given zone. Id The unique Zone Identifier for the Hosted Zone. region Region to connect to. key Secret key to be used. keyid Access key to be used. ...
python
def get_hosted_zone(Id, region=None, key=None, keyid=None, profile=None): ''' Return detailed info about the given zone. Id The unique Zone Identifier for the Hosted Zone. region Region to connect to. key Secret key to be used. keyid Access key to be used. ...
[ "def", "get_hosted_zone", "(", "Id", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid"...
Return detailed info about the given zone. Id The unique Zone Identifier for the Hosted Zone. region Region to connect to. key Secret key to be used. keyid Access key to be used. profile Dict, or pillar key pointing to a dict, containing AWS region/key/ke...
[ "Return", "detailed", "info", "about", "the", "given", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L187-L215
36,347
saltstack/salt
salt/modules/boto3_route53.py
get_hosted_zones_by_domain
def get_hosted_zones_by_domain(Name, region=None, key=None, keyid=None, profile=None): ''' Find any zones with the given domain name and return detailed info about them. Note that this can return multiple Route53 zones, since a domain name can be used in both public and private zones. Name ...
python
def get_hosted_zones_by_domain(Name, region=None, key=None, keyid=None, profile=None): ''' Find any zones with the given domain name and return detailed info about them. Note that this can return multiple Route53 zones, since a domain name can be used in both public and private zones. Name ...
[ "def", "get_hosted_zones_by_domain", "(", "Name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", "...
Find any zones with the given domain name and return detailed info about them. Note that this can return multiple Route53 zones, since a domain name can be used in both public and private zones. Name The domain name associated with the Hosted Zone(s). region Region to connect to. ...
[ "Find", "any", "zones", "with", "the", "given", "domain", "name", "and", "return", "detailed", "info", "about", "them", ".", "Note", "that", "this", "can", "return", "multiple", "Route53", "zones", "since", "a", "domain", "name", "can", "be", "used", "in",...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L218-L252
36,348
saltstack/salt
salt/modules/boto3_route53.py
list_hosted_zones
def list_hosted_zones(DelegationSetId=None, region=None, key=None, keyid=None, profile=None): ''' Return detailed info about all zones in the bound account. DelegationSetId If you're using reusable delegation sets and you want to list all of the hosted zones that are associated with a reusa...
python
def list_hosted_zones(DelegationSetId=None, region=None, key=None, keyid=None, profile=None): ''' Return detailed info about all zones in the bound account. DelegationSetId If you're using reusable delegation sets and you want to list all of the hosted zones that are associated with a reusa...
[ "def", "list_hosted_zones", "(", "DelegationSetId", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", ...
Return detailed info about all zones in the bound account. DelegationSetId If you're using reusable delegation sets and you want to list all of the hosted zones that are associated with a reusable delegation set, specify the ID of that delegation set. region Region to connect to. ...
[ "Return", "detailed", "info", "about", "all", "zones", "in", "the", "bound", "account", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L255-L284
36,349
saltstack/salt
salt/modules/boto3_route53.py
update_hosted_zone_comment
def update_hosted_zone_comment(Id=None, Name=None, Comment=None, PrivateZone=None, region=None, key=None, keyid=None, profile=None): ''' Update the comment on an existing Route 53 hosted zone. Id The unique Zone Identifier for the Hosted Zone. Name The do...
python
def update_hosted_zone_comment(Id=None, Name=None, Comment=None, PrivateZone=None, region=None, key=None, keyid=None, profile=None): ''' Update the comment on an existing Route 53 hosted zone. Id The unique Zone Identifier for the Hosted Zone. Name The do...
[ "def", "update_hosted_zone_comment", "(", "Id", "=", "None", ",", "Name", "=", "None", ",", "Comment", "=", "None", ",", "PrivateZone", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", ...
Update the comment on an existing Route 53 hosted zone. Id The unique Zone Identifier for the Hosted Zone. Name The domain name associated with the Hosted Zone(s). Comment Any comments you want to include about the hosted zone. PrivateZone Boolean - Set to True if cha...
[ "Update", "the", "comment", "on", "an", "existing", "Route", "53", "hosted", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L415-L462
36,350
saltstack/salt
salt/modules/boto3_route53.py
associate_vpc_with_hosted_zone
def associate_vpc_with_hosted_zone(HostedZoneId=None, Name=None, VPCId=None, VPCName=None, VPCRegion=None, Comment=None, region=None, key=None, keyid=None, profile=None): ''' Associates an Amazon VPC with a private hosted zone. To perfor...
python
def associate_vpc_with_hosted_zone(HostedZoneId=None, Name=None, VPCId=None, VPCName=None, VPCRegion=None, Comment=None, region=None, key=None, keyid=None, profile=None): ''' Associates an Amazon VPC with a private hosted zone. To perfor...
[ "def", "associate_vpc_with_hosted_zone", "(", "HostedZoneId", "=", "None", ",", "Name", "=", "None", ",", "VPCId", "=", "None", ",", "VPCName", "=", "None", ",", "VPCRegion", "=", "None", ",", "Comment", "=", "None", ",", "region", "=", "None", ",", "key...
Associates an Amazon VPC with a private hosted zone. To perform the association, the VPC and the private hosted zone must already exist. You can't convert a public hosted zone into a private hosted zone. If you want to associate a VPC from one AWS account with a zone from a another, the AWS account owning...
[ "Associates", "an", "Amazon", "VPC", "with", "a", "private", "hosted", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L465-L567
36,351
saltstack/salt
salt/modules/boto3_route53.py
delete_hosted_zone_by_domain
def delete_hosted_zone_by_domain(Name, PrivateZone=None, region=None, key=None, keyid=None, profile=None): ''' Delete a Route53 hosted zone by domain name, and PrivateZone status if provided. CLI Example:: salt myminion boto3_route53.delete_hosted_zone_by_domain ex...
python
def delete_hosted_zone_by_domain(Name, PrivateZone=None, region=None, key=None, keyid=None, profile=None): ''' Delete a Route53 hosted zone by domain name, and PrivateZone status if provided. CLI Example:: salt myminion boto3_route53.delete_hosted_zone_by_domain ex...
[ "def", "delete_hosted_zone_by_domain", "(", "Name", ",", "PrivateZone", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "args", "=", "{", "'Name'", ":", "Name", ",", ...
Delete a Route53 hosted zone by domain name, and PrivateZone status if provided. CLI Example:: salt myminion boto3_route53.delete_hosted_zone_by_domain example.org.
[ "Delete", "a", "Route53", "hosted", "zone", "by", "domain", "name", "and", "PrivateZone", "status", "if", "provided", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L703-L721
36,352
saltstack/salt
salt/modules/boto3_route53.py
_aws_encode_changebatch
def _aws_encode_changebatch(o): ''' helper method to process a change batch & encode the bits which need encoding. ''' change_idx = 0 while change_idx < len(o['Changes']): o['Changes'][change_idx]['ResourceRecordSet']['Name'] = aws_encode(o['Changes'][change_idx]['ResourceRecordSet']['Name']...
python
def _aws_encode_changebatch(o): ''' helper method to process a change batch & encode the bits which need encoding. ''' change_idx = 0 while change_idx < len(o['Changes']): o['Changes'][change_idx]['ResourceRecordSet']['Name'] = aws_encode(o['Changes'][change_idx]['ResourceRecordSet']['Name']...
[ "def", "_aws_encode_changebatch", "(", "o", ")", ":", "change_idx", "=", "0", "while", "change_idx", "<", "len", "(", "o", "[", "'Changes'", "]", ")", ":", "o", "[", "'Changes'", "]", "[", "change_idx", "]", "[", "'ResourceRecordSet'", "]", "[", "'Name'"...
helper method to process a change batch & encode the bits which need encoding.
[ "helper", "method", "to", "process", "a", "change", "batch", "&", "encode", "the", "bits", "which", "need", "encoding", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto3_route53.py#L757-L772
36,353
saltstack/salt
salt/utils/sanitizers.py
mask_args_value
def mask_args_value(data, mask): ''' Mask a line in the data, which matches "mask". This can be used for cases where values in your roster file may contain sensitive data such as IP addresses, passwords, user names, etc. Note that this works only when ``data`` is a single string (i.e. when the ...
python
def mask_args_value(data, mask): ''' Mask a line in the data, which matches "mask". This can be used for cases where values in your roster file may contain sensitive data such as IP addresses, passwords, user names, etc. Note that this works only when ``data`` is a single string (i.e. when the ...
[ "def", "mask_args_value", "(", "data", ",", "mask", ")", ":", "if", "not", "mask", ":", "return", "data", "out", "=", "[", "]", "for", "line", "in", "data", ".", "split", "(", "os", ".", "linesep", ")", ":", "if", "fnmatch", ".", "fnmatch", "(", ...
Mask a line in the data, which matches "mask". This can be used for cases where values in your roster file may contain sensitive data such as IP addresses, passwords, user names, etc. Note that this works only when ``data`` is a single string (i.e. when the data in the roster is formatted as ``key: va...
[ "Mask", "a", "line", "in", "the", "data", "which", "matches", "mask", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/sanitizers.py#L69-L95
36,354
saltstack/salt
salt/utils/sanitizers.py
InputSanitizer.filename
def filename(value): ''' Remove everything that would affect paths in the filename :param value: :return: ''' return re.sub('[^a-zA-Z0-9.-_ ]', '', os.path.basename(InputSanitizer.trim(value)))
python
def filename(value): ''' Remove everything that would affect paths in the filename :param value: :return: ''' return re.sub('[^a-zA-Z0-9.-_ ]', '', os.path.basename(InputSanitizer.trim(value)))
[ "def", "filename", "(", "value", ")", ":", "return", "re", ".", "sub", "(", "'[^a-zA-Z0-9.-_ ]'", ",", "''", ",", "os", ".", "path", ".", "basename", "(", "InputSanitizer", ".", "trim", "(", "value", ")", ")", ")" ]
Remove everything that would affect paths in the filename :param value: :return:
[ "Remove", "everything", "that", "would", "affect", "paths", "in", "the", "filename" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/sanitizers.py#L44-L51
36,355
saltstack/salt
salt/modules/boto_ec2.py
get_all_eip_addresses
def get_all_eip_addresses(addresses=None, allocation_ids=None, region=None, key=None, keyid=None, profile=None): ''' Get public addresses of some, or all EIPs associated with the current account. addresses (list) - Optional list of addresses. If provided, only the addres...
python
def get_all_eip_addresses(addresses=None, allocation_ids=None, region=None, key=None, keyid=None, profile=None): ''' Get public addresses of some, or all EIPs associated with the current account. addresses (list) - Optional list of addresses. If provided, only the addres...
[ "def", "get_all_eip_addresses", "(", "addresses", "=", "None", ",", "allocation_ids", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "[", "x", ".", "public_i...
Get public addresses of some, or all EIPs associated with the current account. addresses (list) - Optional list of addresses. If provided, only the addresses associated with those in the list will be returned. allocation_ids (list) - Optional list of allocation IDs. If provided, only ...
[ "Get", "public", "addresses", "of", "some", "or", "all", "EIPs", "associated", "with", "the", "current", "account", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L123-L147
36,356
saltstack/salt
salt/modules/boto_ec2.py
get_unassociated_eip_address
def get_unassociated_eip_address(domain='standard', region=None, key=None, keyid=None, profile=None): ''' Return the first unassociated EIP domain Indicates whether the address is an EC2 address or a VPC address (standard|vpc). CLI Example: .. code...
python
def get_unassociated_eip_address(domain='standard', region=None, key=None, keyid=None, profile=None): ''' Return the first unassociated EIP domain Indicates whether the address is an EC2 address or a VPC address (standard|vpc). CLI Example: .. code...
[ "def", "get_unassociated_eip_address", "(", "domain", "=", "'standard'", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "eip", "=", "None", "for", "address", "in", "get_all_eip_address...
Return the first unassociated EIP domain Indicates whether the address is an EC2 address or a VPC address (standard|vpc). CLI Example: .. code-block:: bash salt-call boto_ec2.get_unassociated_eip_address .. versionadded:: 2016.3.0
[ "Return", "the", "first", "unassociated", "EIP" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L150-L194
36,357
saltstack/salt
salt/modules/boto_ec2.py
get_eip_address_info
def get_eip_address_info(addresses=None, allocation_ids=None, region=None, key=None, keyid=None, profile=None): ''' Get 'interesting' info about some, or all EIPs associated with the current account. addresses (list) - Optional list of addresses. If provided, only the addr...
python
def get_eip_address_info(addresses=None, allocation_ids=None, region=None, key=None, keyid=None, profile=None): ''' Get 'interesting' info about some, or all EIPs associated with the current account. addresses (list) - Optional list of addresses. If provided, only the addr...
[ "def", "get_eip_address_info", "(", "addresses", "=", "None", ",", "allocation_ids", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "type", "(", "addresses", ")"...
Get 'interesting' info about some, or all EIPs associated with the current account. addresses (list) - Optional list of addresses. If provided, only the addresses associated with those in the list will be returned. allocation_ids (list) - Optional list of allocation IDs. If provided, ...
[ "Get", "interesting", "info", "about", "some", "or", "all", "EIPs", "associated", "with", "the", "current", "account", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L197-L232
36,358
saltstack/salt
salt/modules/boto_ec2.py
release_eip_address
def release_eip_address(public_ip=None, allocation_id=None, region=None, key=None, keyid=None, profile=None): ''' Free an Elastic IP address. Pass either a public IP address to release an EC2 Classic EIP, or an AllocationId to release a VPC EIP. public_ip (string) - The...
python
def release_eip_address(public_ip=None, allocation_id=None, region=None, key=None, keyid=None, profile=None): ''' Free an Elastic IP address. Pass either a public IP address to release an EC2 Classic EIP, or an AllocationId to release a VPC EIP. public_ip (string) - The...
[ "def", "release_eip_address", "(", "public_ip", "=", "None", ",", "allocation_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "salt", ".", "utils", ...
Free an Elastic IP address. Pass either a public IP address to release an EC2 Classic EIP, or an AllocationId to release a VPC EIP. public_ip (string) - The public IP address - for EC2 elastic IPs. allocation_id (string) - The Allocation ID - for VPC elastic IPs. returns (bool...
[ "Free", "an", "Elastic", "IP", "address", ".", "Pass", "either", "a", "public", "IP", "address", "to", "release", "an", "EC2", "Classic", "EIP", "or", "an", "AllocationId", "to", "release", "a", "VPC", "EIP", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L275-L307
36,359
saltstack/salt
salt/modules/boto_ec2.py
assign_private_ip_addresses
def assign_private_ip_addresses(network_interface_name=None, network_interface_id=None, private_ip_addresses=None, secondary_private_ip_address_count=None, allow_reassignment=False, region=None, key=None, keyid=None, profile...
python
def assign_private_ip_addresses(network_interface_name=None, network_interface_id=None, private_ip_addresses=None, secondary_private_ip_address_count=None, allow_reassignment=False, region=None, key=None, keyid=None, profile...
[ "def", "assign_private_ip_addresses", "(", "network_interface_name", "=", "None", ",", "network_interface_id", "=", "None", ",", "private_ip_addresses", "=", "None", ",", "secondary_private_ip_address_count", "=", "None", ",", "allow_reassignment", "=", "False", ",", "r...
Assigns one or more secondary private IP addresses to a network interface. network_interface_id (string) - ID of the network interface to associate the IP with (exclusive with 'network_interface_name') network_interface_name (string) - Name of the network interface to associate the IP with (exc...
[ "Assigns", "one", "or", "more", "secondary", "private", "IP", "addresses", "to", "a", "network", "interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L428-L485
36,360
saltstack/salt
salt/modules/boto_ec2.py
get_zones
def get_zones(region=None, key=None, keyid=None, profile=None): ''' Get a list of AZs for the configured region. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_zones ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) return [z.name for z in c...
python
def get_zones(region=None, key=None, keyid=None, profile=None): ''' Get a list of AZs for the configured region. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_zones ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) return [z.name for z in c...
[ "def", "get_zones", "(", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid", "=", "keyid", ...
Get a list of AZs for the configured region. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_zones
[ "Get", "a", "list", "of", "AZs", "for", "the", "configured", "region", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L540-L552
36,361
saltstack/salt
salt/modules/boto_ec2.py
find_instances
def find_instances(instance_id=None, name=None, tags=None, region=None, key=None, keyid=None, profile=None, return_objs=False, in_states=None, filters=None): ''' Given instance properties, find and return matching instance ids CLI Examples: .. code-block:: bash ...
python
def find_instances(instance_id=None, name=None, tags=None, region=None, key=None, keyid=None, profile=None, return_objs=False, in_states=None, filters=None): ''' Given instance properties, find and return matching instance ids CLI Examples: .. code-block:: bash ...
[ "def", "find_instances", "(", "instance_id", "=", "None", ",", "name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "return_objs", "=", "False...
Given instance properties, find and return matching instance ids CLI Examples: .. code-block:: bash salt myminion boto_ec2.find_instances # Lists all instances salt myminion boto_ec2.find_instances name=myinstance salt myminion boto_ec2.find_instances tags='{"mytag": "value"}' ...
[ "Given", "instance", "properties", "find", "and", "return", "matching", "instance", "ids" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L555-L609
36,362
saltstack/salt
salt/modules/boto_ec2.py
create_image
def create_image(ami_name, instance_id=None, instance_name=None, tags=None, region=None, key=None, keyid=None, profile=None, description=None, no_reboot=False, dry_run=False, filters=None): ''' Given instance properties that define exactly one instance, create AMI and return AM...
python
def create_image(ami_name, instance_id=None, instance_name=None, tags=None, region=None, key=None, keyid=None, profile=None, description=None, no_reboot=False, dry_run=False, filters=None): ''' Given instance properties that define exactly one instance, create AMI and return AM...
[ "def", "create_image", "(", "ami_name", ",", "instance_id", "=", "None", ",", "instance_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "d...
Given instance properties that define exactly one instance, create AMI and return AMI-id. CLI Examples: .. code-block:: bash salt myminion boto_ec2.create_image ami_name instance_name=myinstance salt myminion boto_ec2.create_image another_ami_name tags='{"mytag": "value"}' description='this i...
[ "Given", "instance", "properties", "that", "define", "exactly", "one", "instance", "create", "AMI", "and", "return", "AMI", "-", "id", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L612-L644
36,363
saltstack/salt
salt/modules/boto_ec2.py
find_images
def find_images(ami_name=None, executable_by=None, owners=None, image_ids=None, tags=None, region=None, key=None, keyid=None, profile=None, return_objs=False): ''' Given image properties, find and return matching AMI ids CLI Examples: .. code-block:: bash salt myminion boto_e...
python
def find_images(ami_name=None, executable_by=None, owners=None, image_ids=None, tags=None, region=None, key=None, keyid=None, profile=None, return_objs=False): ''' Given image properties, find and return matching AMI ids CLI Examples: .. code-block:: bash salt myminion boto_e...
[ "def", "find_images", "(", "ami_name", "=", "None", ",", "executable_by", "=", "None", ",", "owners", "=", "None", ",", "image_ids", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None"...
Given image properties, find and return matching AMI ids CLI Examples: .. code-block:: bash salt myminion boto_ec2.find_images tags='{"mytag": "value"}'
[ "Given", "image", "properties", "find", "and", "return", "matching", "AMI", "ids" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L647-L693
36,364
saltstack/salt
salt/modules/boto_ec2.py
terminate
def terminate(instance_id=None, name=None, region=None, key=None, keyid=None, profile=None, filters=None): ''' Terminate the instance described by instance_id or name. CLI Example: .. code-block:: bash salt myminion boto_ec2.terminate name=myinstance salt myminion boto_e...
python
def terminate(instance_id=None, name=None, region=None, key=None, keyid=None, profile=None, filters=None): ''' Terminate the instance described by instance_id or name. CLI Example: .. code-block:: bash salt myminion boto_ec2.terminate name=myinstance salt myminion boto_e...
[ "def", "terminate", "(", "instance_id", "=", "None", ",", "name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "filters", "=", "None", ")", ":", "instances", "=", "fi...
Terminate the instance described by instance_id or name. CLI Example: .. code-block:: bash salt myminion boto_ec2.terminate name=myinstance salt myminion boto_ec2.terminate instance_id=i-a46b9f
[ "Terminate", "the", "instance", "described", "by", "instance_id", "or", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L696-L720
36,365
saltstack/salt
salt/modules/boto_ec2.py
get_id
def get_id(name=None, tags=None, region=None, key=None, keyid=None, profile=None, in_states=None, filters=None): ''' Given instance properties, return the instance id if it exists. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_id myinstance ''' instance_ids...
python
def get_id(name=None, tags=None, region=None, key=None, keyid=None, profile=None, in_states=None, filters=None): ''' Given instance properties, return the instance id if it exists. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_id myinstance ''' instance_ids...
[ "def", "get_id", "(", "name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "in_states", "=", "None", ",", "filters", "=", "None", ")", ":"...
Given instance properties, return the instance id if it exists. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_id myinstance
[ "Given", "instance", "properties", "return", "the", "instance", "id", "if", "it", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L723-L748
36,366
saltstack/salt
salt/modules/boto_ec2.py
get_tags
def get_tags(instance_id=None, keyid=None, key=None, profile=None, region=None): ''' Given an instance_id, return a list of tags associated with that instance. returns (list) - list of tags as key/value pairs CLI Example: .. code-block:: bash salt myminion boto_ec2.g...
python
def get_tags(instance_id=None, keyid=None, key=None, profile=None, region=None): ''' Given an instance_id, return a list of tags associated with that instance. returns (list) - list of tags as key/value pairs CLI Example: .. code-block:: bash salt myminion boto_ec2.g...
[ "def", "get_tags", "(", "instance_id", "=", "None", ",", "keyid", "=", "None", ",", "key", "=", "None", ",", "profile", "=", "None", ",", "region", "=", "None", ")", ":", "tags", "=", "[", "]", "client", "=", "_get_conn", "(", "key", "=", "key", ...
Given an instance_id, return a list of tags associated with that instance. returns (list) - list of tags as key/value pairs CLI Example: .. code-block:: bash salt myminion boto_ec2.get_tags instance_id
[ "Given", "an", "instance_id", "return", "a", "list", "of", "tags", "associated", "with", "that", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L751-L773
36,367
saltstack/salt
salt/modules/boto_ec2.py
exists
def exists(instance_id=None, name=None, tags=None, region=None, key=None, keyid=None, profile=None, in_states=None, filters=None): ''' Given an instance id, check to see if the given instance id exists. Returns True if the given instance with the given id, name, or tags exists; otherwise, Fa...
python
def exists(instance_id=None, name=None, tags=None, region=None, key=None, keyid=None, profile=None, in_states=None, filters=None): ''' Given an instance id, check to see if the given instance id exists. Returns True if the given instance with the given id, name, or tags exists; otherwise, Fa...
[ "def", "exists", "(", "instance_id", "=", "None", ",", "name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "in_states", "=", "None", ",", ...
Given an instance id, check to see if the given instance id exists. Returns True if the given instance with the given id, name, or tags exists; otherwise, False is returned. CLI Example: .. code-block:: bash salt myminion boto_ec2.exists myinstance
[ "Given", "an", "instance", "id", "check", "to", "see", "if", "the", "given", "instance", "id", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L776-L798
36,368
saltstack/salt
salt/modules/boto_ec2.py
create_key
def create_key(key_name, save_path, region=None, key=None, keyid=None, profile=None): ''' Creates a key and saves it to a given path. Returns the private key. CLI Example: .. code-block:: bash salt myminion boto_ec2.create_key mykey /root/ ''' conn = _get_conn(regio...
python
def create_key(key_name, save_path, region=None, key=None, keyid=None, profile=None): ''' Creates a key and saves it to a given path. Returns the private key. CLI Example: .. code-block:: bash salt myminion boto_ec2.create_key mykey /root/ ''' conn = _get_conn(regio...
[ "def", "create_key", "(", "key_name", ",", "save_path", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", ...
Creates a key and saves it to a given path. Returns the private key. CLI Example: .. code-block:: bash salt myminion boto_ec2.create_key mykey /root/
[ "Creates", "a", "key", "and", "saves", "it", "to", "a", "given", "path", ".", "Returns", "the", "private", "key", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1107-L1128
36,369
saltstack/salt
salt/modules/boto_ec2.py
delete_key
def delete_key(key_name, region=None, key=None, keyid=None, profile=None): ''' Deletes a key. Always returns True CLI Example: .. code-block:: bash salt myminion boto_ec2.delete_key mykey ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: key ...
python
def delete_key(key_name, region=None, key=None, keyid=None, profile=None): ''' Deletes a key. Always returns True CLI Example: .. code-block:: bash salt myminion boto_ec2.delete_key mykey ''' conn = _get_conn(region=region, key=key, keyid=keyid, profile=profile) try: key ...
[ "def", "delete_key", "(", "key_name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ",", "keyid...
Deletes a key. Always returns True CLI Example: .. code-block:: bash salt myminion boto_ec2.delete_key mykey
[ "Deletes", "a", "key", ".", "Always", "returns", "True" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1159-L1177
36,370
saltstack/salt
salt/modules/boto_ec2.py
get_attribute
def get_attribute(attribute, instance_name=None, instance_id=None, region=None, key=None, keyid=None, profile=None, filters=None): ''' Get an EC2 instance attribute. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_attribute sourceDestCheck instance_name=my_insta...
python
def get_attribute(attribute, instance_name=None, instance_id=None, region=None, key=None, keyid=None, profile=None, filters=None): ''' Get an EC2 instance attribute. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_attribute sourceDestCheck instance_name=my_insta...
[ "def", "get_attribute", "(", "attribute", ",", "instance_name", "=", "None", ",", "instance_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "filters", "=", "None", ")",...
Get an EC2 instance attribute. CLI Example: .. code-block:: bash salt myminion boto_ec2.get_attribute sourceDestCheck instance_name=my_instance Available attributes: * instanceType * kernel * ramdisk * userData * disableApiTermination * instanceIni...
[ "Get", "an", "EC2", "instance", "attribute", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1213-L1268
36,371
saltstack/salt
salt/modules/boto_ec2.py
set_attribute
def set_attribute(attribute, attribute_value, instance_name=None, instance_id=None, region=None, key=None, keyid=None, profile=None, filters=None): ''' Set an EC2 instance attribute. Returns whether the operation succeeded or not. CLI Example: .. code-block:: bash salt m...
python
def set_attribute(attribute, attribute_value, instance_name=None, instance_id=None, region=None, key=None, keyid=None, profile=None, filters=None): ''' Set an EC2 instance attribute. Returns whether the operation succeeded or not. CLI Example: .. code-block:: bash salt m...
[ "def", "set_attribute", "(", "attribute", ",", "attribute_value", ",", "instance_name", "=", "None", ",", "instance_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "filte...
Set an EC2 instance attribute. Returns whether the operation succeeded or not. CLI Example: .. code-block:: bash salt myminion boto_ec2.set_attribute sourceDestCheck False instance_name=my_instance Available attributes: * instanceType * kernel * ramdisk * user...
[ "Set", "an", "EC2", "instance", "attribute", ".", "Returns", "whether", "the", "operation", "succeeded", "or", "not", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1271-L1322
36,372
saltstack/salt
salt/modules/boto_ec2.py
get_network_interface_id
def get_network_interface_id(name, region=None, key=None, keyid=None, profile=None): ''' Get an Elastic Network Interface id from its name tag. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.get_network_interface_id name=m...
python
def get_network_interface_id(name, region=None, key=None, keyid=None, profile=None): ''' Get an Elastic Network Interface id from its name tag. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.get_network_interface_id name=m...
[ "def", "get_network_interface_id", "(", "name", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key", ","...
Get an Elastic Network Interface id from its name tag. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.get_network_interface_id name=my_eni
[ "Get", "an", "Elastic", "Network", "Interface", "id", "from", "its", "name", "tag", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1325-L1351
36,373
saltstack/salt
salt/modules/boto_ec2.py
get_network_interface
def get_network_interface(name=None, network_interface_id=None, region=None, key=None, keyid=None, profile=None): ''' Get an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.get_network_interface name...
python
def get_network_interface(name=None, network_interface_id=None, region=None, key=None, keyid=None, profile=None): ''' Get an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.get_network_interface name...
[ "def", "get_network_interface", "(", "name", "=", "None", ",", "network_interface_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "r...
Get an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.get_network_interface name=my_eni
[ "Get", "an", "Elastic", "Network", "Interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1354-L1377
36,374
saltstack/salt
salt/modules/boto_ec2.py
attach_network_interface
def attach_network_interface(device_index, name=None, network_interface_id=None, instance_name=None, instance_id=None, region=None, key=None, keyid=None, profile=None): ''' Attach an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Exa...
python
def attach_network_interface(device_index, name=None, network_interface_id=None, instance_name=None, instance_id=None, region=None, key=None, keyid=None, profile=None): ''' Attach an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Exa...
[ "def", "attach_network_interface", "(", "device_index", ",", "name", "=", "None", ",", "network_interface_id", "=", "None", ",", "instance_name", "=", "None", ",", "instance_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid",...
Attach an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.attach_network_interface my_eni instance_name=salt-master device_index=0
[ "Attach", "an", "Elastic", "Network", "Interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1531-L1584
36,375
saltstack/salt
salt/modules/boto_ec2.py
modify_network_interface_attribute
def modify_network_interface_attribute( name=None, network_interface_id=None, attr=None, value=None, region=None, key=None, keyid=None, profile=None): ''' Modify an attribute of an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash sal...
python
def modify_network_interface_attribute( name=None, network_interface_id=None, attr=None, value=None, region=None, key=None, keyid=None, profile=None): ''' Modify an attribute of an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash sal...
[ "def", "modify_network_interface_attribute", "(", "name", "=", "None", ",", "network_interface_id", "=", "None", ",", "attr", "=", "None", ",", "value", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "pr...
Modify an attribute of an Elastic Network Interface. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt myminion boto_ec2.modify_network_interface_attribute my_eni attr=description value='example description'
[ "Modify", "an", "attribute", "of", "an", "Elastic", "Network", "Interface", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1626-L1694
36,376
saltstack/salt
salt/modules/boto_ec2.py
get_all_volumes
def get_all_volumes(volume_ids=None, filters=None, return_objs=False, region=None, key=None, keyid=None, profile=None): ''' Get a list of all EBS volumes, optionally filtered by provided 'filters' param .. versionadded:: 2016.11.0 volume_ids (list) - Optional list of volume...
python
def get_all_volumes(volume_ids=None, filters=None, return_objs=False, region=None, key=None, keyid=None, profile=None): ''' Get a list of all EBS volumes, optionally filtered by provided 'filters' param .. versionadded:: 2016.11.0 volume_ids (list) - Optional list of volume...
[ "def", "get_all_volumes", "(", "volume_ids", "=", "None", ",", "filters", "=", "None", ",", "return_objs", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=...
Get a list of all EBS volumes, optionally filtered by provided 'filters' param .. versionadded:: 2016.11.0 volume_ids (list) - Optional list of volume_ids. If provided, only the volumes associated with those in the list will be returned. filters (dict) - Additional constraints on ...
[ "Get", "a", "list", "of", "all", "EBS", "volumes", "optionally", "filtered", "by", "provided", "filters", "param" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1697-L1749
36,377
saltstack/salt
salt/modules/boto_ec2.py
get_all_tags
def get_all_tags(filters=None, region=None, key=None, keyid=None, profile=None): ''' Describe all tags matching the filter criteria, or all tags in the account otherwise. .. versionadded:: 2018.3.0 filters (dict) - Additional constraints on which volumes to return. Note that valid filters var...
python
def get_all_tags(filters=None, region=None, key=None, keyid=None, profile=None): ''' Describe all tags matching the filter criteria, or all tags in the account otherwise. .. versionadded:: 2018.3.0 filters (dict) - Additional constraints on which volumes to return. Note that valid filters var...
[ "def", "get_all_tags", "(", "filters", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "key", "=", "key...
Describe all tags matching the filter criteria, or all tags in the account otherwise. .. versionadded:: 2018.3.0 filters (dict) - Additional constraints on which volumes to return. Note that valid filters vary extensively depending on the resource type. When in doubt, search first without a ...
[ "Describe", "all", "tags", "matching", "the", "filter", "criteria", "or", "all", "tags", "in", "the", "account", "otherwise", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L1879-L1909
36,378
saltstack/salt
salt/modules/boto_ec2.py
attach_volume
def attach_volume(volume_id, instance_id, device, region=None, key=None, keyid=None, profile=None): ''' Attach an EBS volume to an EC2 instance. .. volume_id (string) – The ID of the EBS volume to be attached. instance_id (string) – The ID of the EC2 instance to at...
python
def attach_volume(volume_id, instance_id, device, region=None, key=None, keyid=None, profile=None): ''' Attach an EBS volume to an EC2 instance. .. volume_id (string) – The ID of the EBS volume to be attached. instance_id (string) – The ID of the EC2 instance to at...
[ "def", "attach_volume", "(", "volume_id", ",", "instance_id", ",", "device", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ...
Attach an EBS volume to an EC2 instance. .. volume_id (string) – The ID of the EBS volume to be attached. instance_id (string) – The ID of the EC2 instance to attach the volume to. device (string) – The device on the instance through which the volume is exposed (e.g. /dev/sdh) ...
[ "Attach", "an", "EBS", "volume", "to", "an", "EC2", "instance", ".", ".." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L2079-L2107
36,379
saltstack/salt
salt/modules/boto_ec2.py
create_volume
def create_volume(zone_name, size=None, snapshot_id=None, volume_type=None, iops=None, encrypted=False, kms_key_id=None, wait_for_creation=False, region=None, key=None, keyid=None, profile=None): ''' Create an EBS volume to an availability zone. .. zone_name ...
python
def create_volume(zone_name, size=None, snapshot_id=None, volume_type=None, iops=None, encrypted=False, kms_key_id=None, wait_for_creation=False, region=None, key=None, keyid=None, profile=None): ''' Create an EBS volume to an availability zone. .. zone_name ...
[ "def", "create_volume", "(", "zone_name", ",", "size", "=", "None", ",", "snapshot_id", "=", "None", ",", "volume_type", "=", "None", ",", "iops", "=", "None", ",", "encrypted", "=", "False", ",", "kms_key_id", "=", "None", ",", "wait_for_creation", "=", ...
Create an EBS volume to an availability zone. .. zone_name (string) – The Availability zone name of the EBS volume to be created. size (int) – The size of the new volume, in GiB. If you're creating the volume from a snapshot and don't specify a volume size, the ...
[ "Create", "an", "EBS", "volume", "to", "an", "availability", "zone", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_ec2.py#L2110-L2169
36,380
saltstack/salt
salt/modules/hg.py
describe
def describe(cwd, rev='tip', user=None): ''' Mimic git describe and return an identifier for the given revision cwd The path to the Mercurial repository rev: tip The path to the archive tarball user : None Run hg as a user other than what the minion runs as CLI Exampl...
python
def describe(cwd, rev='tip', user=None): ''' Mimic git describe and return an identifier for the given revision cwd The path to the Mercurial repository rev: tip The path to the archive tarball user : None Run hg as a user other than what the minion runs as CLI Exampl...
[ "def", "describe", "(", "cwd", ",", "rev", "=", "'tip'", ",", "user", "=", "None", ")", ":", "cmd", "=", "[", "'hg'", ",", "'log'", ",", "'-r'", ",", "'{0}'", ".", "format", "(", "rev", ")", ",", "'--template'", ",", "\"'{{latesttag}}-{{latesttagdistan...
Mimic git describe and return an identifier for the given revision cwd The path to the Mercurial repository rev: tip The path to the archive tarball user : None Run hg as a user other than what the minion runs as CLI Example: .. code-block:: bash salt '*' hg.des...
[ "Mimic", "git", "describe", "and", "return", "an", "identifier", "for", "the", "given", "revision" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/hg.py#L75-L108
36,381
saltstack/salt
salt/modules/hg.py
archive
def archive(cwd, output, rev='tip', fmt=None, prefix=None, user=None): ''' Export a tarball from the repository cwd The path to the Mercurial repository output The path to the archive tarball rev: tip The revision to create an archive from fmt: None Format of ...
python
def archive(cwd, output, rev='tip', fmt=None, prefix=None, user=None): ''' Export a tarball from the repository cwd The path to the Mercurial repository output The path to the archive tarball rev: tip The revision to create an archive from fmt: None Format of ...
[ "def", "archive", "(", "cwd", ",", "output", ",", "rev", "=", "'tip'", ",", "fmt", "=", "None", ",", "prefix", "=", "None", ",", "user", "=", "None", ")", ":", "cmd", "=", "[", "'hg'", ",", "'archive'", ",", "'{0}'", ".", "format", "(", "output",...
Export a tarball from the repository cwd The path to the Mercurial repository output The path to the archive tarball rev: tip The revision to create an archive from fmt: None Format of the resulting archive. Mercurial supports: tar, tbz2, tgz, zip, uzip, and f...
[ "Export", "a", "tarball", "from", "the", "repository" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/hg.py#L111-L156
36,382
saltstack/salt
salt/modules/hg.py
pull
def pull(cwd, opts=None, user=None, identity=None, repository=None): ''' Perform a pull on the given repository cwd The path to the Mercurial repository repository : None Perform pull from the repository different from .hg/hgrc:[paths]:default opts : None Any additional op...
python
def pull(cwd, opts=None, user=None, identity=None, repository=None): ''' Perform a pull on the given repository cwd The path to the Mercurial repository repository : None Perform pull from the repository different from .hg/hgrc:[paths]:default opts : None Any additional op...
[ "def", "pull", "(", "cwd", ",", "opts", "=", "None", ",", "user", "=", "None", ",", "identity", "=", "None", ",", "repository", "=", "None", ")", ":", "cmd", "=", "[", "'hg'", ",", "'pull'", "]", "if", "identity", ":", "cmd", ".", "extend", "(", ...
Perform a pull on the given repository cwd The path to the Mercurial repository repository : None Perform pull from the repository different from .hg/hgrc:[paths]:default opts : None Any additional options to add to the command line user : None Run hg as a user other ...
[ "Perform", "a", "pull", "on", "the", "given", "repository" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/hg.py#L159-L201
36,383
saltstack/salt
salt/modules/hg.py
update
def update(cwd, rev, force=False, user=None): ''' Update to a given revision cwd The path to the Mercurial repository rev The revision to update to force : False Force an update user : None Run hg as a user other than what the minion runs as CLI Example: ...
python
def update(cwd, rev, force=False, user=None): ''' Update to a given revision cwd The path to the Mercurial repository rev The revision to update to force : False Force an update user : None Run hg as a user other than what the minion runs as CLI Example: ...
[ "def", "update", "(", "cwd", ",", "rev", ",", "force", "=", "False", ",", "user", "=", "None", ")", ":", "cmd", "=", "[", "'hg'", ",", "'update'", ",", "'{0}'", ".", "format", "(", "rev", ")", "]", "if", "force", ":", "cmd", ".", "append", "(",...
Update to a given revision cwd The path to the Mercurial repository rev The revision to update to force : False Force an update user : None Run hg as a user other than what the minion runs as CLI Example: .. code-block:: bash salt devserver1 hg.upda...
[ "Update", "to", "a", "given", "revision" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/hg.py#L204-L236
36,384
saltstack/salt
salt/modules/hg.py
status
def status(cwd, opts=None, user=None): ''' Show changed files of the given repository cwd The path to the Mercurial repository opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: ...
python
def status(cwd, opts=None, user=None): ''' Show changed files of the given repository cwd The path to the Mercurial repository opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: ...
[ "def", "status", "(", "cwd", ",", "opts", "=", "None", ",", "user", "=", "None", ")", ":", "def", "_status", "(", "cwd", ")", ":", "cmd", "=", "[", "'hg'", ",", "'status'", "]", "if", "opts", ":", "for", "opt", "in", "opts", ".", "split", "(", ...
Show changed files of the given repository cwd The path to the Mercurial repository opts : None Any additional options to add to the command line user : None Run hg as a user other than what the minion runs as CLI Example: .. code-block:: bash salt '*' hg.status...
[ "Show", "changed", "files", "of", "the", "given", "repository" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/hg.py#L282-L329
36,385
saltstack/salt
salt/beacons/network_settings.py
_copy_interfaces_info
def _copy_interfaces_info(interfaces): ''' Return a dictionary with a copy of each interface attributes in ATTRS ''' ret = {} for interface in interfaces: _interface_attrs_cpy = set() for attr in ATTRS: if attr in interfaces[interface]: attr_dict = Hashab...
python
def _copy_interfaces_info(interfaces): ''' Return a dictionary with a copy of each interface attributes in ATTRS ''' ret = {} for interface in interfaces: _interface_attrs_cpy = set() for attr in ATTRS: if attr in interfaces[interface]: attr_dict = Hashab...
[ "def", "_copy_interfaces_info", "(", "interfaces", ")", ":", "ret", "=", "{", "}", "for", "interface", "in", "interfaces", ":", "_interface_attrs_cpy", "=", "set", "(", ")", "for", "attr", "in", "ATTRS", ":", "if", "attr", "in", "interfaces", "[", "interfa...
Return a dictionary with a copy of each interface attributes in ATTRS
[ "Return", "a", "dictionary", "with", "a", "copy", "of", "each", "interface", "attributes", "in", "ATTRS" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/network_settings.py#L76-L91
36,386
saltstack/salt
salt/beacons/network_settings.py
beacon
def beacon(config): ''' Watch for changes on network settings By default, the beacon will emit when there is a value change on one of the settings on watch. The config also support the onvalue parameter for each setting, which instruct the beacon to only emit if the setting changed to the value...
python
def beacon(config): ''' Watch for changes on network settings By default, the beacon will emit when there is a value change on one of the settings on watch. The config also support the onvalue parameter for each setting, which instruct the beacon to only emit if the setting changed to the value...
[ "def", "beacon", "(", "config", ")", ":", "_config", "=", "{", "}", "list", "(", "map", "(", "_config", ".", "update", ",", "config", ")", ")", "ret", "=", "[", "]", "interfaces", "=", "[", "]", "expanded_config", "=", "{", "}", "global", "LAST_STA...
Watch for changes on network settings By default, the beacon will emit when there is a value change on one of the settings on watch. The config also support the onvalue parameter for each setting, which instruct the beacon to only emit if the setting changed to the value defined. Example Config ...
[ "Watch", "for", "changes", "on", "network", "settings" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/beacons/network_settings.py#L94-L213
36,387
saltstack/salt
salt/sdb/memcached.py
get
def get(key, profile=None): ''' Get a value from memcached ''' conn = salt.utils.memcached.get_conn(profile) return salt.utils.memcached.get(conn, key)
python
def get(key, profile=None): ''' Get a value from memcached ''' conn = salt.utils.memcached.get_conn(profile) return salt.utils.memcached.get(conn, key)
[ "def", "get", "(", "key", ",", "profile", "=", "None", ")", ":", "conn", "=", "salt", ".", "utils", ".", "memcached", ".", "get_conn", "(", "profile", ")", "return", "salt", ".", "utils", ".", "memcached", ".", "get", "(", "conn", ",", "key", ")" ]
Get a value from memcached
[ "Get", "a", "value", "from", "memcached" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/sdb/memcached.py#L71-L76
36,388
saltstack/salt
salt/modules/saltsupport.py
SaltSupportModule._get_archive_name
def _get_archive_name(self, archname=None): ''' Create default archive name. :return: ''' archname = re.sub('[^a-z0-9]', '', (archname or '').lower()) or 'support' for grain in ['fqdn', 'host', 'localhost', 'nodename']: host = __grains__.get(grain) ...
python
def _get_archive_name(self, archname=None): ''' Create default archive name. :return: ''' archname = re.sub('[^a-z0-9]', '', (archname or '').lower()) or 'support' for grain in ['fqdn', 'host', 'localhost', 'nodename']: host = __grains__.get(grain) ...
[ "def", "_get_archive_name", "(", "self", ",", "archname", "=", "None", ")", ":", "archname", "=", "re", ".", "sub", "(", "'[^a-z0-9]'", ",", "''", ",", "(", "archname", "or", "''", ")", ".", "lower", "(", ")", ")", "or", "'support'", "for", "grain", ...
Create default archive name. :return:
[ "Create", "default", "archive", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/saltsupport.py#L109-L127
36,389
saltstack/salt
salt/modules/saltsupport.py
SaltSupportModule.format_sync_stats
def format_sync_stats(self, cnt): ''' Format stats of the sync output. :param cnt: :return: ''' stats = salt.utils.odict.OrderedDict() if cnt.get('retcode') == salt.defaults.exitcodes.EX_OK: for line in cnt.get('stdout', '').split(os.linesep): ...
python
def format_sync_stats(self, cnt): ''' Format stats of the sync output. :param cnt: :return: ''' stats = salt.utils.odict.OrderedDict() if cnt.get('retcode') == salt.defaults.exitcodes.EX_OK: for line in cnt.get('stdout', '').split(os.linesep): ...
[ "def", "format_sync_stats", "(", "self", ",", "cnt", ")", ":", "stats", "=", "salt", ".", "utils", ".", "odict", ".", "OrderedDict", "(", ")", "if", "cnt", ".", "get", "(", "'retcode'", ")", "==", "salt", ".", "defaults", ".", "exitcodes", ".", "EX_O...
Format stats of the sync output. :param cnt: :return:
[ "Format", "stats", "of", "the", "sync", "output", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/saltsupport.py#L195-L219
36,390
saltstack/salt
salt/modules/saltsupport.py
SaltSupportModule.sync
def sync(self, group, name=None, host=None, location=None, move=False, all=False): ''' Sync the latest archive to the host on given location. CLI Example: .. code-block:: bash salt '*' support.sync group=test salt '*' support.sync group=test name=/tmp/myspecial...
python
def sync(self, group, name=None, host=None, location=None, move=False, all=False): ''' Sync the latest archive to the host on given location. CLI Example: .. code-block:: bash salt '*' support.sync group=test salt '*' support.sync group=test name=/tmp/myspecial...
[ "def", "sync", "(", "self", ",", "group", ",", "name", "=", "None", ",", "host", "=", "None", ",", "location", "=", "None", ",", "move", "=", "False", ",", "all", "=", "False", ")", ":", "tfh", ",", "tfn", "=", "tempfile", ".", "mkstemp", "(", ...
Sync the latest archive to the host on given location. CLI Example: .. code-block:: bash salt '*' support.sync group=test salt '*' support.sync group=test name=/tmp/myspecial-12345-67890.bz2 salt '*' support.sync group=test name=/tmp/myspecial-12345-67890.bz2 host=...
[ "Sync", "the", "latest", "archive", "to", "the", "host", "on", "given", "location", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/saltsupport.py#L223-L298
36,391
saltstack/salt
salt/modules/saltsupport.py
SaltSupportModule.run
def run(self, profile='default', pillar=None, archive=None, output='nested'): ''' Run Salt Support on the minion. profile Set available profile name. Default is "default". pillar Set available profile from the pillars. archive Override archi...
python
def run(self, profile='default', pillar=None, archive=None, output='nested'): ''' Run Salt Support on the minion. profile Set available profile name. Default is "default". pillar Set available profile from the pillars. archive Override archi...
[ "def", "run", "(", "self", ",", "profile", "=", "'default'", ",", "pillar", "=", "None", ",", "archive", "=", "None", ",", "output", "=", "'nested'", ")", ":", "class", "outputswitch", "(", "object", ")", ":", "'''\n Output switcher on context\n ...
Run Salt Support on the minion. profile Set available profile name. Default is "default". pillar Set available profile from the pillars. archive Override archive name. Default is "support". This results to "hostname-support-YYYYMMDD-hhmmss.bz2". ou...
[ "Run", "Salt", "Support", "on", "the", "minion", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/saltsupport.py#L301-L350
36,392
saltstack/salt
salt/utils/filebuffer.py
BufferedReader.next
def next(self): ''' Return the next iteration by popping `chunk_size` from the left and appending `chunk_size` to the right if there's info on the file left to be read. ''' if self.__buffered is None: # Use floor division to force multiplier to an integer ...
python
def next(self): ''' Return the next iteration by popping `chunk_size` from the left and appending `chunk_size` to the right if there's info on the file left to be read. ''' if self.__buffered is None: # Use floor division to force multiplier to an integer ...
[ "def", "next", "(", "self", ")", ":", "if", "self", ".", "__buffered", "is", "None", ":", "# Use floor division to force multiplier to an integer", "multiplier", "=", "self", ".", "__max_in_mem", "//", "self", ".", "__chunk_size", "self", ".", "__buffered", "=", ...
Return the next iteration by popping `chunk_size` from the left and appending `chunk_size` to the right if there's info on the file left to be read.
[ "Return", "the", "next", "iteration", "by", "popping", "chunk_size", "from", "the", "left", "and", "appending", "chunk_size", "to", "the", "right", "if", "there", "s", "info", "on", "the", "file", "left", "to", "be", "read", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/filebuffer.py#L74-L99
36,393
saltstack/salt
salt/pillar/vmware_pillar.py
_recurse_config_to_dict
def _recurse_config_to_dict(t_data): ''' helper function to recurse through a vim object and attempt to return all child objects ''' if not isinstance(t_data, type(None)): if isinstance(t_data, list): t_list = [] for i in t_data: t_list.append(_recurse_con...
python
def _recurse_config_to_dict(t_data): ''' helper function to recurse through a vim object and attempt to return all child objects ''' if not isinstance(t_data, type(None)): if isinstance(t_data, list): t_list = [] for i in t_data: t_list.append(_recurse_con...
[ "def", "_recurse_config_to_dict", "(", "t_data", ")", ":", "if", "not", "isinstance", "(", "t_data", ",", "type", "(", "None", ")", ")", ":", "if", "isinstance", "(", "t_data", ",", "list", ")", ":", "t_list", "=", "[", "]", "for", "i", "in", "t_data...
helper function to recurse through a vim object and attempt to return all child objects
[ "helper", "function", "to", "recurse", "through", "a", "vim", "object", "and", "attempt", "to", "return", "all", "child", "objects" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/vmware_pillar.py#L473-L492
36,394
saltstack/salt
salt/pillar/vmware_pillar.py
_crawl_attribute
def _crawl_attribute(this_data, this_attr): ''' helper function to crawl an attribute specified for retrieval ''' if isinstance(this_data, list): t_list = [] for d in this_data: t_list.append(_crawl_attribute(d, this_attr)) return t_list else: if isinstanc...
python
def _crawl_attribute(this_data, this_attr): ''' helper function to crawl an attribute specified for retrieval ''' if isinstance(this_data, list): t_list = [] for d in this_data: t_list.append(_crawl_attribute(d, this_attr)) return t_list else: if isinstanc...
[ "def", "_crawl_attribute", "(", "this_data", ",", "this_attr", ")", ":", "if", "isinstance", "(", "this_data", ",", "list", ")", ":", "t_list", "=", "[", "]", "for", "d", "in", "this_data", ":", "t_list", ".", "append", "(", "_crawl_attribute", "(", "d",...
helper function to crawl an attribute specified for retrieval
[ "helper", "function", "to", "crawl", "an", "attribute", "specified", "for", "retrieval" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/vmware_pillar.py#L495-L517
36,395
saltstack/salt
salt/pillar/vmware_pillar.py
_serializer
def _serializer(obj): ''' helper function to serialize some objects for prettier return ''' import datetime if isinstance(obj, datetime.datetime): if obj.utcoffset() is not None: obj = obj - obj.utcoffset() return obj.__str__() return obj
python
def _serializer(obj): ''' helper function to serialize some objects for prettier return ''' import datetime if isinstance(obj, datetime.datetime): if obj.utcoffset() is not None: obj = obj - obj.utcoffset() return obj.__str__() return obj
[ "def", "_serializer", "(", "obj", ")", ":", "import", "datetime", "if", "isinstance", "(", "obj", ",", "datetime", ".", "datetime", ")", ":", "if", "obj", ".", "utcoffset", "(", ")", "is", "not", "None", ":", "obj", "=", "obj", "-", "obj", ".", "ut...
helper function to serialize some objects for prettier return
[ "helper", "function", "to", "serialize", "some", "objects", "for", "prettier", "return" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/pillar/vmware_pillar.py#L520-L529
36,396
saltstack/salt
salt/modules/sqlite3.py
tables
def tables(db=None): ''' Show all tables in the database CLI Example: .. code-block:: bash salt '*' sqlite3.tables /root/test.db ''' cur = _connect(db) if not cur: return False cur.execute( "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;" ...
python
def tables(db=None): ''' Show all tables in the database CLI Example: .. code-block:: bash salt '*' sqlite3.tables /root/test.db ''' cur = _connect(db) if not cur: return False cur.execute( "SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;" ...
[ "def", "tables", "(", "db", "=", "None", ")", ":", "cur", "=", "_connect", "(", "db", ")", "if", "not", "cur", ":", "return", "False", "cur", ".", "execute", "(", "\"SELECT name FROM sqlite_master WHERE type='table' ORDER BY name;\"", ")", "rows", "=", "cur", ...
Show all tables in the database CLI Example: .. code-block:: bash salt '*' sqlite3.tables /root/test.db
[ "Show", "all", "tables", "in", "the", "database" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/sqlite3.py#L97-L116
36,397
saltstack/salt
salt/modules/sqlite3.py
indices
def indices(db=None): ''' Show all indices in the database CLI Example: .. code-block:: bash salt '*' sqlite3.indices /root/test.db ''' cur = _connect(db) if not cur: return False cur.execute( "SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;"...
python
def indices(db=None): ''' Show all indices in the database CLI Example: .. code-block:: bash salt '*' sqlite3.indices /root/test.db ''' cur = _connect(db) if not cur: return False cur.execute( "SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;"...
[ "def", "indices", "(", "db", "=", "None", ")", ":", "cur", "=", "_connect", "(", "db", ")", "if", "not", "cur", ":", "return", "False", "cur", ".", "execute", "(", "\"SELECT name FROM sqlite_master WHERE type='index' ORDER BY name;\"", ")", "rows", "=", "cur",...
Show all indices in the database CLI Example: .. code-block:: bash salt '*' sqlite3.indices /root/test.db
[ "Show", "all", "indices", "in", "the", "database" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/sqlite3.py#L119-L138
36,398
saltstack/salt
salt/roster/cache.py
targets
def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613 ''' Return the targets from the Salt Masters' minion cache. All targets and matchers are supported. The resulting roster can be configured using ``roster_order`` and ``roster_default``. ''' minions = salt.utils.minions.CkMini...
python
def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613 ''' Return the targets from the Salt Masters' minion cache. All targets and matchers are supported. The resulting roster can be configured using ``roster_order`` and ``roster_default``. ''' minions = salt.utils.minions.CkMini...
[ "def", "targets", "(", "tgt", ",", "tgt_type", "=", "'glob'", ",", "*", "*", "kwargs", ")", ":", "# pylint: disable=W0613", "minions", "=", "salt", ".", "utils", ".", "minions", ".", "CkMinions", "(", "__opts__", ")", "_res", "=", "minions", ".", "check_...
Return the targets from the Salt Masters' minion cache. All targets and matchers are supported. The resulting roster can be configured using ``roster_order`` and ``roster_default``.
[ "Return", "the", "targets", "from", "the", "Salt", "Masters", "minion", "cache", ".", "All", "targets", "and", "matchers", "are", "supported", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/roster/cache.py#L113-L159
36,399
saltstack/salt
salt/renderers/gpg.py
_get_key_dir
def _get_key_dir(): ''' return the location of the GPG key directory ''' gpg_keydir = None if 'config.get' in __salt__: gpg_keydir = __salt__['config.get']('gpg_keydir') if not gpg_keydir: gpg_keydir = __opts__.get( 'gpg_keydir', os.path.join( ...
python
def _get_key_dir(): ''' return the location of the GPG key directory ''' gpg_keydir = None if 'config.get' in __salt__: gpg_keydir = __salt__['config.get']('gpg_keydir') if not gpg_keydir: gpg_keydir = __opts__.get( 'gpg_keydir', os.path.join( ...
[ "def", "_get_key_dir", "(", ")", ":", "gpg_keydir", "=", "None", "if", "'config.get'", "in", "__salt__", ":", "gpg_keydir", "=", "__salt__", "[", "'config.get'", "]", "(", "'gpg_keydir'", ")", "if", "not", "gpg_keydir", ":", "gpg_keydir", "=", "__opts__", "....
return the location of the GPG key directory
[ "return", "the", "location", "of", "the", "GPG", "key", "directory" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/renderers/gpg.py#L307-L326