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
33,300
saltstack/salt
salt/utils/aws.py
creds
def creds(provider): ''' Return the credentials for AWS signing. This could be just the id and key specified in the provider configuration, or if the id or key is set to the literal string 'use-instance-role-credentials' creds will pull the instance role credentials from the meta data, cache them, ...
python
def creds(provider): ''' Return the credentials for AWS signing. This could be just the id and key specified in the provider configuration, or if the id or key is set to the literal string 'use-instance-role-credentials' creds will pull the instance role credentials from the meta data, cache them, ...
[ "def", "creds", "(", "provider", ")", ":", "# Declare globals", "global", "__AccessKeyId__", ",", "__SecretAccessKey__", ",", "__Token__", ",", "__Expiration__", "ret_credentials", "=", "(", ")", "# if id or key is 'use-instance-role-credentials', pull them from meta-data", "...
Return the credentials for AWS signing. This could be just the id and key specified in the provider configuration, or if the id or key is set to the literal string 'use-instance-role-credentials' creds will pull the instance role credentials from the meta data, cache them, and provide them instead.
[ "Return", "the", "credentials", "for", "AWS", "signing", ".", "This", "could", "be", "just", "the", "id", "and", "key", "specified", "in", "the", "provider", "configuration", "or", "if", "the", "id", "or", "key", "is", "set", "to", "the", "literal", "str...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/aws.py#L81-L141
33,301
saltstack/salt
salt/utils/aws.py
get_region_from_metadata
def get_region_from_metadata(): ''' Try to get region from instance identity document and cache it .. versionadded:: 2015.5.6 ''' global __Location__ if __Location__ == 'do-not-get-from-metadata': log.debug('Previously failed to get AWS region from metadata. Not trying again.') ...
python
def get_region_from_metadata(): ''' Try to get region from instance identity document and cache it .. versionadded:: 2015.5.6 ''' global __Location__ if __Location__ == 'do-not-get-from-metadata': log.debug('Previously failed to get AWS region from metadata. Not trying again.') ...
[ "def", "get_region_from_metadata", "(", ")", ":", "global", "__Location__", "if", "__Location__", "==", "'do-not-get-from-metadata'", ":", "log", ".", "debug", "(", "'Previously failed to get AWS region from metadata. Not trying again.'", ")", "return", "None", "# Cached regi...
Try to get region from instance identity document and cache it .. versionadded:: 2015.5.6
[ "Try", "to", "get", "region", "from", "instance", "identity", "document", "and", "cache", "it" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/aws.py#L543-L579
33,302
saltstack/salt
salt/modules/ciscoconfparse_mod.py
find_objects
def find_objects(config=None, config_path=None, regex=None, saltenv='base'): ''' Return all the line objects that match the expression in the ``regex`` argument. .. warning:: This function is mostly valuable when invoked from other Salt components (i.e., execution modules, states, templ...
python
def find_objects(config=None, config_path=None, regex=None, saltenv='base'): ''' Return all the line objects that match the expression in the ``regex`` argument. .. warning:: This function is mostly valuable when invoked from other Salt components (i.e., execution modules, states, templ...
[ "def", "find_objects", "(", "config", "=", "None", ",", "config_path", "=", "None", ",", "regex", "=", "None", ",", "saltenv", "=", "'base'", ")", ":", "ccp", "=", "_get_ccp", "(", "config", "=", "config", ",", "config_path", "=", "config_path", ",", "...
Return all the line objects that match the expression in the ``regex`` argument. .. warning:: This function is mostly valuable when invoked from other Salt components (i.e., execution modules, states, templates etc.). For CLI usage, please consider using :py:func:`ciscoconfparse...
[ "Return", "all", "the", "line", "objects", "that", "match", "the", "expression", "in", "the", "regex", "argument", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/ciscoconfparse_mod.py#L71-L111
33,303
saltstack/salt
salt/states/tuned.py
profile
def profile(name): ''' This state module allows you to modify system tuned parameters Example tuned.sls file to set profile to virtual-guest tuned: tuned: - profile - name: virtual-guest name tuned profile name to set the system to To see a valid list of states ...
python
def profile(name): ''' This state module allows you to modify system tuned parameters Example tuned.sls file to set profile to virtual-guest tuned: tuned: - profile - name: virtual-guest name tuned profile name to set the system to To see a valid list of states ...
[ "def", "profile", "(", "name", ")", ":", "# create data-structure to return with default value", "ret", "=", "{", "'name'", ":", "''", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "False", ",", "'comment'", ":", "''", "}", "ret", "[", "name", "]"...
This state module allows you to modify system tuned parameters Example tuned.sls file to set profile to virtual-guest tuned: tuned: - profile - name: virtual-guest name tuned profile name to set the system to To see a valid list of states call execution module: ...
[ "This", "state", "module", "allows", "you", "to", "modify", "system", "tuned", "parameters" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/tuned.py#L18-L86
33,304
saltstack/salt
salt/returners/couchbase_return.py
returner
def returner(load): ''' Return data to couchbase bucket ''' cb_ = _get_connection() hn_key = '{0}/{1}'.format(load['jid'], load['id']) try: ret_doc = {'return': load['return'], 'full_ret': salt.utils.json.dumps(load)} cb_.add(hn_key, ret_doc, ...
python
def returner(load): ''' Return data to couchbase bucket ''' cb_ = _get_connection() hn_key = '{0}/{1}'.format(load['jid'], load['id']) try: ret_doc = {'return': load['return'], 'full_ret': salt.utils.json.dumps(load)} cb_.add(hn_key, ret_doc, ...
[ "def", "returner", "(", "load", ")", ":", "cb_", "=", "_get_connection", "(", ")", "hn_key", "=", "'{0}/{1}'", ".", "format", "(", "load", "[", "'jid'", "]", ",", "load", "[", "'id'", "]", ")", "try", ":", "ret_doc", "=", "{", "'return'", ":", "loa...
Return data to couchbase bucket
[ "Return", "data", "to", "couchbase", "bucket" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L188-L208
33,305
saltstack/salt
salt/returners/couchbase_return.py
_format_jid_instance
def _format_jid_instance(jid, job): ''' Return a properly formatted jid dict ''' ret = _format_job_instance(job) ret.update({'StartTime': salt.utils.jid.jid_to_time(jid)}) return ret
python
def _format_jid_instance(jid, job): ''' Return a properly formatted jid dict ''' ret = _format_job_instance(job) ret.update({'StartTime': salt.utils.jid.jid_to_time(jid)}) return ret
[ "def", "_format_jid_instance", "(", "jid", ",", "job", ")", ":", "ret", "=", "_format_job_instance", "(", "job", ")", "ret", ".", "update", "(", "{", "'StartTime'", ":", "salt", ".", "utils", ".", "jid", ".", "jid_to_time", "(", "jid", ")", "}", ")", ...
Return a properly formatted jid dict
[ "Return", "a", "properly", "formatted", "jid", "dict" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/returners/couchbase_return.py#L332-L338
33,306
saltstack/salt
salt/cache/redis_cache.py
_get_redis_server
def _get_redis_server(opts=None): ''' Return the Redis server instance. Caching the object instance. ''' global REDIS_SERVER if REDIS_SERVER: return REDIS_SERVER if not opts: opts = _get_redis_cache_opts() if opts['cluster_mode']: REDIS_SERVER = StrictRedisCluste...
python
def _get_redis_server(opts=None): ''' Return the Redis server instance. Caching the object instance. ''' global REDIS_SERVER if REDIS_SERVER: return REDIS_SERVER if not opts: opts = _get_redis_cache_opts() if opts['cluster_mode']: REDIS_SERVER = StrictRedisCluste...
[ "def", "_get_redis_server", "(", "opts", "=", "None", ")", ":", "global", "REDIS_SERVER", "if", "REDIS_SERVER", ":", "return", "REDIS_SERVER", "if", "not", "opts", ":", "opts", "=", "_get_redis_cache_opts", "(", ")", "if", "opts", "[", "'cluster_mode'", "]", ...
Return the Redis server instance. Caching the object instance.
[ "Return", "the", "Redis", "server", "instance", ".", "Caching", "the", "object", "instance", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L221-L241
33,307
saltstack/salt
salt/cache/redis_cache.py
_get_redis_keys_opts
def _get_redis_keys_opts(): ''' Build the key opts based on the user options. ''' return { 'bank_prefix': __opts__.get('cache.redis.bank_prefix', _BANK_PREFIX), 'bank_keys_prefix': __opts__.get('cache.redis.bank_keys_prefix', _BANK_KEYS_PREFIX), 'key_prefix': __opts__.get('cache....
python
def _get_redis_keys_opts(): ''' Build the key opts based on the user options. ''' return { 'bank_prefix': __opts__.get('cache.redis.bank_prefix', _BANK_PREFIX), 'bank_keys_prefix': __opts__.get('cache.redis.bank_keys_prefix', _BANK_KEYS_PREFIX), 'key_prefix': __opts__.get('cache....
[ "def", "_get_redis_keys_opts", "(", ")", ":", "return", "{", "'bank_prefix'", ":", "__opts__", ".", "get", "(", "'cache.redis.bank_prefix'", ",", "_BANK_PREFIX", ")", ",", "'bank_keys_prefix'", ":", "__opts__", ".", "get", "(", "'cache.redis.bank_keys_prefix'", ",",...
Build the key opts based on the user options.
[ "Build", "the", "key", "opts", "based", "on", "the", "user", "options", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L244-L253
33,308
saltstack/salt
salt/cache/redis_cache.py
_get_bank_redis_key
def _get_bank_redis_key(bank): ''' Return the Redis key for the bank given the name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_prefix'], separator=opts['separator'], bank=bank )
python
def _get_bank_redis_key(bank): ''' Return the Redis key for the bank given the name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_prefix'], separator=opts['separator'], bank=bank )
[ "def", "_get_bank_redis_key", "(", "bank", ")", ":", "opts", "=", "_get_redis_keys_opts", "(", ")", "return", "'{prefix}{separator}{bank}'", ".", "format", "(", "prefix", "=", "opts", "[", "'bank_prefix'", "]", ",", "separator", "=", "opts", "[", "'separator'", ...
Return the Redis key for the bank given the name.
[ "Return", "the", "Redis", "key", "for", "the", "bank", "given", "the", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L256-L265
33,309
saltstack/salt
salt/cache/redis_cache.py
_get_key_redis_key
def _get_key_redis_key(bank, key): ''' Return the Redis key given the bank name and the key name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}/{key}'.format( prefix=opts['key_prefix'], separator=opts['separator'], bank=bank, key=key )
python
def _get_key_redis_key(bank, key): ''' Return the Redis key given the bank name and the key name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}/{key}'.format( prefix=opts['key_prefix'], separator=opts['separator'], bank=bank, key=key )
[ "def", "_get_key_redis_key", "(", "bank", ",", "key", ")", ":", "opts", "=", "_get_redis_keys_opts", "(", ")", "return", "'{prefix}{separator}{bank}/{key}'", ".", "format", "(", "prefix", "=", "opts", "[", "'key_prefix'", "]", ",", "separator", "=", "opts", "[...
Return the Redis key given the bank name and the key name.
[ "Return", "the", "Redis", "key", "given", "the", "bank", "name", "and", "the", "key", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L268-L278
33,310
saltstack/salt
salt/cache/redis_cache.py
_get_bank_keys_redis_key
def _get_bank_keys_redis_key(bank): ''' Return the Redis key for the SET of keys under a certain bank, given the bank name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_keys_prefix'], separator=opts['separator'], bank=bank ...
python
def _get_bank_keys_redis_key(bank): ''' Return the Redis key for the SET of keys under a certain bank, given the bank name. ''' opts = _get_redis_keys_opts() return '{prefix}{separator}{bank}'.format( prefix=opts['bank_keys_prefix'], separator=opts['separator'], bank=bank ...
[ "def", "_get_bank_keys_redis_key", "(", "bank", ")", ":", "opts", "=", "_get_redis_keys_opts", "(", ")", "return", "'{prefix}{separator}{bank}'", ".", "format", "(", "prefix", "=", "opts", "[", "'bank_keys_prefix'", "]", ",", "separator", "=", "opts", "[", "'sep...
Return the Redis key for the SET of keys under a certain bank, given the bank name.
[ "Return", "the", "Redis", "key", "for", "the", "SET", "of", "keys", "under", "a", "certain", "bank", "given", "the", "bank", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L281-L290
33,311
saltstack/salt
salt/cache/redis_cache.py
_build_bank_hier
def _build_bank_hier(bank, redis_pipe): ''' Build the bank hierarchy from the root of the tree. If already exists, it won't rewrite. It's using the Redis pipeline, so there will be only one interaction with the remote server. ''' bank_list = bank.split('/') parent_bank_path = bank_list[0...
python
def _build_bank_hier(bank, redis_pipe): ''' Build the bank hierarchy from the root of the tree. If already exists, it won't rewrite. It's using the Redis pipeline, so there will be only one interaction with the remote server. ''' bank_list = bank.split('/') parent_bank_path = bank_list[0...
[ "def", "_build_bank_hier", "(", "bank", ",", "redis_pipe", ")", ":", "bank_list", "=", "bank", ".", "split", "(", "'/'", ")", "parent_bank_path", "=", "bank_list", "[", "0", "]", "for", "bank_name", "in", "bank_list", "[", "1", ":", "]", ":", "prev_bank_...
Build the bank hierarchy from the root of the tree. If already exists, it won't rewrite. It's using the Redis pipeline, so there will be only one interaction with the remote server.
[ "Build", "the", "bank", "hierarchy", "from", "the", "root", "of", "the", "tree", ".", "If", "already", "exists", "it", "won", "t", "rewrite", ".", "It", "s", "using", "the", "Redis", "pipeline", "so", "there", "will", "be", "only", "one", "interaction", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L293-L310
33,312
saltstack/salt
salt/cache/redis_cache.py
_get_banks_to_remove
def _get_banks_to_remove(redis_server, bank, path=''): ''' A simple tree tarversal algorithm that builds the list of banks to remove, starting from an arbitrary node in the tree. ''' current_path = bank if not path else '{path}/{bank}'.format(path=path, bank=bank) bank_paths_to_remove = [current...
python
def _get_banks_to_remove(redis_server, bank, path=''): ''' A simple tree tarversal algorithm that builds the list of banks to remove, starting from an arbitrary node in the tree. ''' current_path = bank if not path else '{path}/{bank}'.format(path=path, bank=bank) bank_paths_to_remove = [current...
[ "def", "_get_banks_to_remove", "(", "redis_server", ",", "bank", ",", "path", "=", "''", ")", ":", "current_path", "=", "bank", "if", "not", "path", "else", "'{path}/{bank}'", ".", "format", "(", "path", "=", "path", ",", "bank", "=", "bank", ")", "bank_...
A simple tree tarversal algorithm that builds the list of banks to remove, starting from an arbitrary node in the tree.
[ "A", "simple", "tree", "tarversal", "algorithm", "that", "builds", "the", "list", "of", "banks", "to", "remove", "starting", "from", "an", "arbitrary", "node", "in", "the", "tree", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L313-L330
33,313
saltstack/salt
salt/cache/redis_cache.py
store
def store(bank, key, data): ''' Store the data in a Redis key. ''' redis_server = _get_redis_server() redis_pipe = redis_server.pipeline() redis_key = _get_key_redis_key(bank, key) redis_bank_keys = _get_bank_keys_redis_key(bank) try: _build_bank_hier(bank, redis_pipe) va...
python
def store(bank, key, data): ''' Store the data in a Redis key. ''' redis_server = _get_redis_server() redis_pipe = redis_server.pipeline() redis_key = _get_key_redis_key(bank, key) redis_bank_keys = _get_bank_keys_redis_key(bank) try: _build_bank_hier(bank, redis_pipe) va...
[ "def", "store", "(", "bank", ",", "key", ",", "data", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "redis_pipe", "=", "redis_server", ".", "pipeline", "(", ")", "redis_key", "=", "_get_key_redis_key", "(", "bank", ",", "key", ")", "redis_b...
Store the data in a Redis key.
[ "Store", "the", "data", "in", "a", "Redis", "key", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L337-L357
33,314
saltstack/salt
salt/cache/redis_cache.py
fetch
def fetch(bank, key): ''' Fetch data from the Redis cache. ''' redis_server = _get_redis_server() redis_key = _get_key_redis_key(bank, key) redis_value = None try: redis_value = redis_server.get(redis_key) except (RedisConnectionError, RedisResponseError) as rerr: mesg = ...
python
def fetch(bank, key): ''' Fetch data from the Redis cache. ''' redis_server = _get_redis_server() redis_key = _get_key_redis_key(bank, key) redis_value = None try: redis_value = redis_server.get(redis_key) except (RedisConnectionError, RedisResponseError) as rerr: mesg = ...
[ "def", "fetch", "(", "bank", ",", "key", ")", ":", "redis_server", "=", "_get_redis_server", "(", ")", "redis_key", "=", "_get_key_redis_key", "(", "bank", ",", "key", ")", "redis_value", "=", "None", "try", ":", "redis_value", "=", "redis_server", ".", "g...
Fetch data from the Redis cache.
[ "Fetch", "data", "from", "the", "Redis", "cache", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cache/redis_cache.py#L360-L376
33,315
saltstack/salt
salt/modules/boto_vpc.py
check_vpc
def check_vpc(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check whether a VPC with the given name or id exists. Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if...
python
def check_vpc(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check whether a VPC with the given name or id exists. Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if...
[ "def", "check_vpc", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exactly_one", "(", "(", "vpc_name", ...
Check whether a VPC with the given name or id exists. Returns the vpc_id or None. Raises SaltInvocationError if both vpc_id and vpc_name are None. Optionally raise a CommandExecutionError if the VPC does not exist. .. versionadded:: 2016.3.0 CLI Example: .. code-block:: bash salt mym...
[ "Check", "whether", "a", "VPC", "with", "the", "given", "name", "or", "id", "exists", ".", "Returns", "the", "vpc_id", "or", "None", ".", "Raises", "SaltInvocationError", "if", "both", "vpc_id", "and", "vpc_name", "are", "None", ".", "Optionally", "raise", ...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L201-L228
33,316
saltstack/salt
salt/modules/boto_vpc.py
_create_resource
def _create_resource(resource, name=None, tags=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Create a VPC resource. Returns the resource id if created, or False if not created. ''' try: try: conn = _get_conn(region=region, key=key, ke...
python
def _create_resource(resource, name=None, tags=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Create a VPC resource. Returns the resource id if created, or False if not created. ''' try: try: conn = _get_conn(region=region, key=key, ke...
[ "def", "_create_resource", "(", "resource", ",", "name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "*", "*", "kwargs", ")", ":", "try", ...
Create a VPC resource. Returns the resource id if created, or False if not created.
[ "Create", "a", "VPC", "resource", ".", "Returns", "the", "resource", "id", "if", "created", "or", "False", "if", "not", "created", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L231-L278
33,317
saltstack/salt
salt/modules/boto_vpc.py
_delete_resource
def _delete_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Delete a VPC resource. Returns True if successful, otherwise False. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationError('One (but ...
python
def _delete_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None, **kwargs): ''' Delete a VPC resource. Returns True if successful, otherwise False. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationError('One (but ...
[ "def", "_delete_resource", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "*", "*", "kwargs", ")", ":", "...
Delete a VPC resource. Returns True if successful, otherwise False.
[ "Delete", "a", "VPC", "resource", ".", "Returns", "True", "if", "successful", "otherwise", "False", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L281-L322
33,318
saltstack/salt
salt/modules/boto_vpc.py
_get_resource
def _get_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None): ''' Get a VPC resource based on resource type and name or id. Cache the id if name was provided. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationErr...
python
def _get_resource(resource, name=None, resource_id=None, region=None, key=None, keyid=None, profile=None): ''' Get a VPC resource based on resource type and name or id. Cache the id if name was provided. ''' if not _exactly_one((name, resource_id)): raise SaltInvocationErr...
[ "def", "_get_resource", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exactly_one", "(...
Get a VPC resource based on resource type and name or id. Cache the id if name was provided.
[ "Get", "a", "VPC", "resource", "based", "on", "resource", "type", "and", "name", "or", "id", ".", "Cache", "the", "id", "if", "name", "was", "provided", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L325-L370
33,319
saltstack/salt
salt/modules/boto_vpc.py
_find_resources
def _find_resources(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Get VPC resources based on resource type and name, id, or tags. ''' if all((resource_id, name)): raise SaltInvocationError('Only one of name or id may ...
python
def _find_resources(resource, name=None, resource_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Get VPC resources based on resource type and name, id, or tags. ''' if all((resource_id, name)): raise SaltInvocationError('Only one of name or id may ...
[ "def", "_find_resources", "(", "resource", ",", "name", "=", "None", ",", "resource_id", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "...
Get VPC resources based on resource type and name, id, or tags.
[ "Get", "VPC", "resources", "based", "on", "resource", "type", "and", "name", "id", "or", "tags", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L373-L409
33,320
saltstack/salt
salt/modules/boto_vpc.py
exists
def exists(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID, check to see if the given VPC ID exists. Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist. CLI Example: .. code...
python
def exists(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID, check to see if the given VPC ID exists. Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist. CLI Example: .. code...
[ "def", "exists", "(", "vpc_id", "=", "None", ",", "name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "t...
Given a VPC ID, check to see if the given VPC ID exists. Returns True if the given VPC ID exists and returns False if the given VPC ID does not exist. CLI Example: .. code-block:: bash salt myminion boto_vpc.exists myvpc
[ "Given", "a", "VPC", "ID", "check", "to", "see", "if", "the", "given", "VPC", "ID", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L572-L598
33,321
saltstack/salt
salt/modules/boto_vpc.py
create
def create(cidr_block, instance_tenancy=None, vpc_name=None, enable_dns_support=None, enable_dns_hostnames=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid CIDR block, create a VPC. An optional instance_tenancy argument can be provided. If provided,...
python
def create(cidr_block, instance_tenancy=None, vpc_name=None, enable_dns_support=None, enable_dns_hostnames=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a valid CIDR block, create a VPC. An optional instance_tenancy argument can be provided. If provided,...
[ "def", "create", "(", "cidr_block", ",", "instance_tenancy", "=", "None", ",", "vpc_name", "=", "None", ",", "enable_dns_support", "=", "None", ",", "enable_dns_hostnames", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=",...
Given a valid CIDR block, create a VPC. An optional instance_tenancy argument can be provided. If provided, the valid values are 'default' or 'dedicated' An optional vpc_name argument can be provided. Returns {created: true} if the VPC was created and returns {created: False} if the VPC was not c...
[ "Given", "a", "valid", "CIDR", "block", "create", "a", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L601-L642
33,322
saltstack/salt
salt/modules/boto_vpc.py
delete
def delete(vpc_id=None, name=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or VPC name, delete the VPC. Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted. CLI Example: .. cod...
python
def delete(vpc_id=None, name=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or VPC name, delete the VPC. Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted. CLI Example: .. cod...
[ "def", "delete", "(", "vpc_id", "=", "None", ",", "name", "=", "None", ",", "vpc_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", ...
Given a VPC ID or VPC name, delete the VPC. Returns {deleted: true} if the VPC was deleted and returns {deleted: false} if the VPC was not deleted. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete vpc_id='vpc-6b1fe402' salt myminion boto_vpc.delete name='myvpc'
[ "Given", "a", "VPC", "ID", "or", "VPC", "name", "delete", "the", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L645-L692
33,323
saltstack/salt
salt/modules/boto_vpc.py
describe
def describe(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID describe its properties. Returns a dictionary of interesting properties. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example: .. code-block:: bash ...
python
def describe(vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID describe its properties. Returns a dictionary of interesting properties. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example: .. code-block:: bash ...
[ "def", "describe", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "any", "(", "(", "vpc_id", ",", "vpc_...
Given a VPC ID describe its properties. Returns a dictionary of interesting properties. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example: .. code-block:: bash salt myminion boto_vpc.describe vpc_id=vpc-123456 salt myminion boto_vpc.describe vpc_name=myvpc
[ "Given", "a", "VPC", "ID", "describe", "its", "properties", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L695-L747
33,324
saltstack/salt
salt/modules/boto_vpc.py
describe_vpcs
def describe_vpcs(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Describe all VPCs, matching the filter criteria if provided. Returns a list of dictionaries with interesting properties. .. versionadded:: 2015.8.0 CLI Example: ...
python
def describe_vpcs(vpc_id=None, name=None, cidr=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Describe all VPCs, matching the filter criteria if provided. Returns a list of dictionaries with interesting properties. .. versionadded:: 2015.8.0 CLI Example: ...
[ "def", "describe_vpcs", "(", "vpc_id", "=", "None", ",", "name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":...
Describe all VPCs, matching the filter criteria if provided. Returns a list of dictionaries with interesting properties. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_vpcs
[ "Describe", "all", "VPCs", "matching", "the", "filter", "criteria", "if", "provided", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L750-L805
33,325
saltstack/salt
salt/modules/boto_vpc.py
_find_subnets
def _find_subnets(subnet_name=None, vpc_id=None, cidr=None, tags=None, conn=None): ''' Given subnet properties, find and return matching subnet ids ''' if not any([subnet_name, tags, cidr]): raise SaltInvocationError('At least one of the following must be ' 'sp...
python
def _find_subnets(subnet_name=None, vpc_id=None, cidr=None, tags=None, conn=None): ''' Given subnet properties, find and return matching subnet ids ''' if not any([subnet_name, tags, cidr]): raise SaltInvocationError('At least one of the following must be ' 'sp...
[ "def", "_find_subnets", "(", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "conn", "=", "None", ")", ":", "if", "not", "any", "(", "[", "subnet_name", ",", "tags", ",", "cidr", "]",...
Given subnet properties, find and return matching subnet ids
[ "Given", "subnet", "properties", "find", "and", "return", "matching", "subnet", "ids" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L808-L839
33,326
saltstack/salt
salt/modules/boto_vpc.py
create_subnet
def create_subnet(vpc_id=None, cidr_block=None, vpc_name=None, availability_zone=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None, auto_assign_public_ipv4=False): ''' Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC....
python
def create_subnet(vpc_id=None, cidr_block=None, vpc_name=None, availability_zone=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None, auto_assign_public_ipv4=False): ''' Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC....
[ "def", "create_subnet", "(", "vpc_id", "=", "None", ",", "cidr_block", "=", "None", ",", "vpc_name", "=", "None", ",", "availability_zone", "=", "None", ",", "subnet_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", ...
Given a valid VPC ID or Name and a CIDR block, create a subnet for the VPC. An optional availability zone argument can be provided. Returns True if the VPC subnet was created and returns False if the VPC subnet was not created. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Example...
[ "Given", "a", "valid", "VPC", "ID", "or", "Name", "and", "a", "CIDR", "block", "create", "a", "subnet", "for", "the", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L842-L880
33,327
saltstack/salt
salt/modules/boto_vpc.py
delete_subnet
def delete_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID or name, delete the subnet. Returns True if the subnet was deleted and returns False if the subnet was not deleted. .. versionchanged:: 2015.8.0 Added s...
python
def delete_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID or name, delete the subnet. Returns True if the subnet was deleted and returns False if the subnet was not deleted. .. versionchanged:: 2015.8.0 Added s...
[ "def", "delete_subnet", "(", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_resource", "(", "resource", ...
Given a subnet ID or name, delete the subnet. Returns True if the subnet was deleted and returns False if the subnet was not deleted. .. versionchanged:: 2015.8.0 Added subnet_name argument CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_subnet 'subnet-6a1fe403'
[ "Given", "a", "subnet", "ID", "or", "name", "delete", "the", "subnet", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L883-L903
33,328
saltstack/salt
salt/modules/boto_vpc.py
subnet_exists
def subnet_exists(subnet_id=None, name=None, subnet_name=None, cidr=None, tags=None, zones=None, region=None, key=None, keyid=None, profile=None): ''' Check if a subnet exists. Returns True if the subnet exists, otherwise returns False. .. versionchanged:: 2015.8.0 ...
python
def subnet_exists(subnet_id=None, name=None, subnet_name=None, cidr=None, tags=None, zones=None, region=None, key=None, keyid=None, profile=None): ''' Check if a subnet exists. Returns True if the subnet exists, otherwise returns False. .. versionchanged:: 2015.8.0 ...
[ "def", "subnet_exists", "(", "subnet_id", "=", "None", ",", "name", "=", "None", ",", "subnet_name", "=", "None", ",", "cidr", "=", "None", ",", "tags", "=", "None", ",", "zones", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",...
Check if a subnet exists. Returns True if the subnet exists, otherwise returns False. .. versionchanged:: 2015.8.0 Added subnet_name argument Deprecated name argument CLI Example: .. code-block:: bash salt myminion boto_vpc.subnet_exists subnet_id='subnet-6a1fe403'
[ "Check", "if", "a", "subnet", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L906-L969
33,329
saltstack/salt
salt/modules/boto_vpc.py
describe_subnet
def describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet id or name, describe its properties. Returns a dictionary of interesting properties. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash ...
python
def describe_subnet(subnet_id=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet id or name, describe its properties. Returns a dictionary of interesting properties. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash ...
[ "def", "describe_subnet", "(", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "subnet", "=", "_get_resource",...
Given a subnet id or name, describe its properties. Returns a dictionary of interesting properties. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash salt myminion boto_vpc.describe_subnet subnet_id=subnet-123456 salt myminion boto_vpc.describe_subnet subnet_name=mysubne...
[ "Given", "a", "subnet", "id", "or", "name", "describe", "its", "properties", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1018-L1053
33,330
saltstack/salt
salt/modules/boto_vpc.py
describe_subnets
def describe_subnets(subnet_ids=None, subnet_names=None, vpc_id=None, cidr=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided. If a s...
python
def describe_subnets(subnet_ids=None, subnet_names=None, vpc_id=None, cidr=None, region=None, key=None, keyid=None, profile=None): ''' Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided. If a s...
[ "def", "describe_subnets", "(", "subnet_ids", "=", "None", ",", "subnet_names", "=", "None", ",", "vpc_id", "=", "None", ",", "cidr", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "N...
Given a VPC ID or subnet CIDR, returns a list of associated subnets and their details. Return all subnets if VPC ID or CIDR are not provided. If a subnet id or CIDR is provided, only its associated subnet details will be returned. .. versionadded:: 2015.8.0 CLI Examples: .. code-block:: bash ...
[ "Given", "a", "VPC", "ID", "or", "subnet", "CIDR", "returns", "a", "list", "of", "associated", "subnets", "and", "their", "details", ".", "Return", "all", "subnets", "if", "VPC", "ID", "or", "CIDR", "are", "not", "provided", ".", "If", "a", "subnet", "...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1056-L1120
33,331
saltstack/salt
salt/modules/boto_vpc.py
create_internet_gateway
def create_internet_gateway(internet_gateway_name=None, vpc_id=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an Internet Gateway, optionally attaching it to an existing VPC. Returns the internet gateway i...
python
def create_internet_gateway(internet_gateway_name=None, vpc_id=None, vpc_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Create an Internet Gateway, optionally attaching it to an existing VPC. Returns the internet gateway i...
[ "def", "create_internet_gateway", "(", "internet_gateway_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile...
Create an Internet Gateway, optionally attaching it to an existing VPC. Returns the internet gateway id if the internet gateway was created and returns False if the internet gateways was not created. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.cre...
[ "Create", "an", "Internet", "Gateway", "optionally", "attaching", "it", "to", "an", "existing", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1123-L1162
33,332
saltstack/salt
salt/modules/boto_vpc.py
_find_nat_gateways
def _find_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Given gateway properties, find and return matching nat gateways ''' ...
python
def _find_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Given gateway properties, find and return matching nat gateways ''' ...
[ "def", "_find_nat_gateways", "(", "nat_gateway_id", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "states", "=", "(", "'pending'", ",", "'available'", ")", ",", ...
Given gateway properties, find and return matching nat gateways
[ "Given", "gateway", "properties", "find", "and", "return", "matching", "nat", "gateways" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1219-L1269
33,333
saltstack/salt
salt/modules/boto_vpc.py
nat_gateway_exists
def nat_gateway_exists(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Checks if a nat gateway exists. This function...
python
def nat_gateway_exists(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Checks if a nat gateway exists. This function...
[ "def", "nat_gateway_exists", "(", "nat_gateway_id", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "states", "=", "(", "'pending'", ",", "'available'", ")", ",", ...
Checks if a nat gateway exists. This function requires boto3 to be installed. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.nat_gateway_exists nat_gateway_id='nat-03b02643b43216fe7' salt myminion boto_vpc.nat_gateway_exists subnet_id='subnet-5b...
[ "Checks", "if", "a", "nat", "gateway", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1272-L1299
33,334
saltstack/salt
salt/modules/boto_vpc.py
describe_nat_gateways
def describe_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Return a description of nat gateways matching t...
python
def describe_nat_gateways(nat_gateway_id=None, subnet_id=None, subnet_name=None, vpc_id=None, vpc_name=None, states=('pending', 'available'), region=None, key=None, keyid=None, profile=None): ''' Return a description of nat gateways matching t...
[ "def", "describe_nat_gateways", "(", "nat_gateway_id", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "states", "=", "(", "'pending'", ",", "'available'", ")", ","...
Return a description of nat gateways matching the selection criteria This function requires boto3 to be installed. CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_nat_gateways nat_gateway_id='nat-03b02643b43216fe7' salt myminion boto_vpc.describe_nat_gateways subnet_id=...
[ "Return", "a", "description", "of", "nat", "gateways", "matching", "the", "selection", "criteria" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1302-L1327
33,335
saltstack/salt
salt/modules/boto_vpc.py
create_nat_gateway
def create_nat_gateway(subnet_id=None, subnet_name=None, allocation_id=None, region=None, key=None, keyid=None, profile=None): ''' Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated w...
python
def create_nat_gateway(subnet_id=None, subnet_name=None, allocation_id=None, region=None, key=None, keyid=None, profile=None): ''' Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated w...
[ "def", "create_nat_gateway", "(", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "allocation_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try"...
Create a NAT Gateway within an existing subnet. If allocation_id is specified, the elastic IP address it references is associated with the gateway. Otherwise, a new allocation_id is created and used. This function requires boto3 to be installed. Returns the nat gateway id if the nat gateway was create...
[ "Create", "a", "NAT", "Gateway", "within", "an", "existing", "subnet", ".", "If", "allocation_id", "is", "specified", "the", "elastic", "IP", "address", "it", "references", "is", "associated", "with", "the", "gateway", ".", "Otherwise", "a", "new", "allocation...
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1330-L1380
33,336
saltstack/salt
salt/modules/boto_vpc.py
delete_customer_gateway
def delete_customer_gateway(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID or name, delete the customer gateway. Returns True if the customer gateway was deleted and returns False if the cus...
python
def delete_customer_gateway(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID or name, delete the customer gateway. Returns True if the customer gateway was deleted and returns False if the cus...
[ "def", "delete_customer_gateway", "(", "customer_gateway_id", "=", "None", ",", "customer_gateway_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_re...
Given a customer gateway ID or name, delete the customer gateway. Returns True if the customer gateway was deleted and returns False if the customer gateway was not deleted. .. versionchanged:: 2015.8.0 Added customer_gateway_name argument CLI Example: .. code-block:: bash salt mymi...
[ "Given", "a", "customer", "gateway", "ID", "or", "name", "delete", "the", "customer", "gateway", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1485-L1507
33,337
saltstack/salt
salt/modules/boto_vpc.py
customer_gateway_exists
def customer_gateway_exists(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID, check if the customer gateway ID exists. Returns True if the customer gateway ID exists; Returns False otherwise. ...
python
def customer_gateway_exists(customer_gateway_id=None, customer_gateway_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a customer gateway ID, check if the customer gateway ID exists. Returns True if the customer gateway ID exists; Returns False otherwise. ...
[ "def", "customer_gateway_exists", "(", "customer_gateway_id", "=", "None", ",", "customer_gateway_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "resource_e...
Given a customer gateway ID, check if the customer gateway ID exists. Returns True if the customer gateway ID exists; Returns False otherwise. CLI Example: .. code-block:: bash salt myminion boto_vpc.customer_gateway_exists cgw-b6a247df salt myminion boto_vpc.customer_gateway_exists cust...
[ "Given", "a", "customer", "gateway", "ID", "check", "if", "the", "customer", "gateway", "ID", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1510-L1528
33,338
saltstack/salt
salt/modules/boto_vpc.py
create_dhcp_options
def create_dhcp_options(domain_name=None, domain_name_servers=None, ntp_servers=None, netbios_name_servers=None, netbios_node_type=None, dhcp_options_name=None, tags=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)...
python
def create_dhcp_options(domain_name=None, domain_name_servers=None, ntp_servers=None, netbios_name_servers=None, netbios_node_type=None, dhcp_options_name=None, tags=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None)...
[ "def", "create_dhcp_options", "(", "domain_name", "=", "None", ",", "domain_name_servers", "=", "None", ",", "ntp_servers", "=", "None", ",", "netbios_name_servers", "=", "None", ",", "netbios_node_type", "=", "None", ",", "dhcp_options_name", "=", "None", ",", ...
Given valid DHCP options, create a DHCP options record, optionally associating it with an existing VPC. Returns True if the DHCP options record was created and returns False if the DHCP options record was not deleted. .. versionchanged:: 2015.8.0 Added vpc_name and vpc_id arguments CLI Exampl...
[ "Given", "valid", "DHCP", "options", "create", "a", "DHCP", "options", "record", "optionally", "associating", "it", "with", "an", "existing", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1531-L1577
33,339
saltstack/salt
salt/modules/boto_vpc.py
get_dhcp_options
def get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None): ''' Return a dict with the current values of the requested DHCP options set CLI Example: .. code-block:: bash salt myminion boto_vpc.get_dhcp_options 'myfu...
python
def get_dhcp_options(dhcp_options_name=None, dhcp_options_id=None, region=None, key=None, keyid=None, profile=None): ''' Return a dict with the current values of the requested DHCP options set CLI Example: .. code-block:: bash salt myminion boto_vpc.get_dhcp_options 'myfu...
[ "def", "get_dhcp_options", "(", "dhcp_options_name", "=", "None", ",", "dhcp_options_id", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "any", "(", "(", ...
Return a dict with the current values of the requested DHCP options set CLI Example: .. code-block:: bash salt myminion boto_vpc.get_dhcp_options 'myfunnydhcpoptionsname' .. versionadded:: 2016.3.0
[ "Return", "a", "dict", "with", "the", "current", "values", "of", "the", "requested", "DHCP", "options", "set" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1580-L1616
33,340
saltstack/salt
salt/modules/boto_vpc.py
delete_dhcp_options
def delete_dhcp_options(dhcp_options_id=None, dhcp_options_name=None, region=None, key=None, keyid=None, profile=None): ''' Delete dhcp options by id or name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_dhcp_options '...
python
def delete_dhcp_options(dhcp_options_id=None, dhcp_options_name=None, region=None, key=None, keyid=None, profile=None): ''' Delete dhcp options by id or name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_dhcp_options '...
[ "def", "delete_dhcp_options", "(", "dhcp_options_id", "=", "None", ",", "dhcp_options_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_resource", "...
Delete dhcp options by id or name. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_dhcp_options 'dopt-b6a247df'
[ "Delete", "dhcp", "options", "by", "id", "or", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1619-L1638
33,341
saltstack/salt
salt/modules/boto_vpc.py
associate_dhcp_options_to_vpc
def associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were...
python
def associate_dhcp_options_to_vpc(dhcp_options_id, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were...
[ "def", "associate_dhcp_options_to_vpc", "(", "dhcp_options_id", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", ...
Given valid DHCP options id and a valid VPC id, associate the DHCP options record with the VPC. Returns True if the DHCP options record were associated and returns False if the DHCP options record was not associated. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_dhcp_options...
[ "Given", "valid", "DHCP", "options", "id", "and", "a", "valid", "VPC", "id", "associate", "the", "DHCP", "options", "record", "with", "the", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1641-L1671
33,342
saltstack/salt
salt/modules/boto_vpc.py
dhcp_options_exists
def dhcp_options_exists(dhcp_options_id=None, name=None, dhcp_options_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check if a dhcp option exists. Returns True if the dhcp option exists; Returns False otherwise. CLI Example: .. code-block:: ba...
python
def dhcp_options_exists(dhcp_options_id=None, name=None, dhcp_options_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Check if a dhcp option exists. Returns True if the dhcp option exists; Returns False otherwise. CLI Example: .. code-block:: ba...
[ "def", "dhcp_options_exists", "(", "dhcp_options_id", "=", "None", ",", "name", "=", "None", ",", "dhcp_options_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", ...
Check if a dhcp option exists. Returns True if the dhcp option exists; Returns False otherwise. CLI Example: .. code-block:: bash salt myminion boto_vpc.dhcp_options_exists dhcp_options_id='dhcp-a0bl34pp'
[ "Check", "if", "a", "dhcp", "option", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1674-L1697
33,343
saltstack/salt
salt/modules/boto_vpc.py
create_network_acl
def create_network_acl(vpc_id=None, vpc_name=None, network_acl_name=None, subnet_id=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a vpc_id, creates a network acl. Returns the network acl id if successful, otherwi...
python
def create_network_acl(vpc_id=None, vpc_name=None, network_acl_name=None, subnet_id=None, subnet_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given a vpc_id, creates a network acl. Returns the network acl id if successful, otherwi...
[ "def", "create_network_acl", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "network_acl_name", "=", "None", ",", "subnet_id", "=", "None", ",", "subnet_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key",...
Given a vpc_id, creates a network acl. Returns the network acl id if successful, otherwise returns False. .. versionchanged:: 2015.8.0 Added vpc_name, subnet_id, and subnet_name arguments CLI Example: .. code-block:: bash salt myminion boto_vpc.create_network_acl 'vpc-6b1fe402'
[ "Given", "a", "vpc_id", "creates", "a", "network", "acl", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1700-L1757
33,344
saltstack/salt
salt/modules/boto_vpc.py
delete_network_acl
def delete_network_acl(network_acl_id=None, network_acl_name=None, disassociate=False, region=None, key=None, keyid=None, profile=None): ''' Delete a network acl based on the network_acl_id or network_acl_name provided. CLI Examples: .. code-block:: bash salt myminion b...
python
def delete_network_acl(network_acl_id=None, network_acl_name=None, disassociate=False, region=None, key=None, keyid=None, profile=None): ''' Delete a network acl based on the network_acl_id or network_acl_name provided. CLI Examples: .. code-block:: bash salt myminion b...
[ "def", "delete_network_acl", "(", "network_acl_id", "=", "None", ",", "network_acl_name", "=", "None", ",", "disassociate", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":...
Delete a network acl based on the network_acl_id or network_acl_name provided. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_network_acl network_acl_id='acl-5fb85d36' \\ disassociate=false .. code-block:: bash salt myminion boto_vpc.delete_network_acl ...
[ "Delete", "a", "network", "acl", "based", "on", "the", "network_acl_id", "or", "network_acl_name", "provided", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1760-L1793
33,345
saltstack/salt
salt/modules/boto_vpc.py
network_acl_exists
def network_acl_exists(network_acl_id=None, name=None, network_acl_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a network acl exists. Returns True if the network acl exists or returns False if it doesn't exist. CLI ...
python
def network_acl_exists(network_acl_id=None, name=None, network_acl_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a network acl exists. Returns True if the network acl exists or returns False if it doesn't exist. CLI ...
[ "def", "network_acl_exists", "(", "network_acl_id", "=", "None", ",", "name", "=", "None", ",", "network_acl_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "...
Checks if a network acl exists. Returns True if the network acl exists or returns False if it doesn't exist. CLI Example: .. code-block:: bash salt myminion boto_vpc.network_acl_exists network_acl_id='acl-5fb85d36'
[ "Checks", "if", "a", "network", "acl", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1796-L1819
33,346
saltstack/salt
salt/modules/boto_vpc.py
associate_network_acl_to_subnet
def associate_network_acl_to_subnet(network_acl_id=None, subnet_id=None, network_acl_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a network acl and subnet ids o...
python
def associate_network_acl_to_subnet(network_acl_id=None, subnet_id=None, network_acl_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a network acl and subnet ids o...
[ "def", "associate_network_acl_to_subnet", "(", "network_acl_id", "=", "None", ",", "subnet_id", "=", "None", ",", "network_acl_name", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None"...
Given a network acl and subnet ids or names, associate a network acl to a subnet. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_network_acl_to_subnet \\ network_acl_id='acl-5fb85d36' subnet_id='subnet-6a1fe403' .. code-block:: bash salt myminion boto...
[ "Given", "a", "network", "acl", "and", "subnet", "ids", "or", "names", "associate", "a", "network", "acl", "to", "a", "subnet", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1822-L1870
33,347
saltstack/salt
salt/modules/boto_vpc.py
disassociate_network_acl
def disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID, disassociates a network acl. CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_n...
python
def disassociate_network_acl(subnet_id=None, vpc_id=None, subnet_name=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a subnet ID, disassociates a network acl. CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_n...
[ "def", "disassociate_network_acl", "(", "subnet_id", "=", "None", ",", "vpc_id", "=", "None", ",", "subnet_name", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", ...
Given a subnet ID, disassociates a network acl. CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_network_acl 'subnet-6a1fe403'
[ "Given", "a", "subnet", "ID", "disassociates", "a", "network", "acl", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1873-L1909
33,348
saltstack/salt
salt/modules/boto_vpc.py
create_network_acl_entry
def create_network_acl_entry(network_acl_id=None, rule_number=None, protocol=None, rule_action=None, cidr_block=None, egress=None, network_acl_name=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None, ...
python
def create_network_acl_entry(network_acl_id=None, rule_number=None, protocol=None, rule_action=None, cidr_block=None, egress=None, network_acl_name=None, icmp_code=None, icmp_type=None, port_range_from=None, port_range_to=None, ...
[ "def", "create_network_acl_entry", "(", "network_acl_id", "=", "None", ",", "rule_number", "=", "None", ",", "protocol", "=", "None", ",", "rule_action", "=", "None", ",", "cidr_block", "=", "None", ",", "egress", "=", "None", ",", "network_acl_name", "=", "...
Creates a network acl entry. CLI Example: .. code-block:: bash salt myminion boto_vpc.create_network_acl_entry 'acl-5fb85d36' '32767' \\ 'all' 'deny' '0.0.0.0/0' egress=true
[ "Creates", "a", "network", "acl", "entry", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L1965-L1983
33,349
saltstack/salt
salt/modules/boto_vpc.py
delete_network_acl_entry
def delete_network_acl_entry(network_acl_id=None, rule_number=None, egress=None, network_acl_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a network acl entry. CLI Example: .. code-block:: bash salt myminion ...
python
def delete_network_acl_entry(network_acl_id=None, rule_number=None, egress=None, network_acl_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a network acl entry. CLI Example: .. code-block:: bash salt myminion ...
[ "def", "delete_network_acl_entry", "(", "network_acl_id", "=", "None", ",", "rule_number", "=", "None", ",", "egress", "=", "None", ",", "network_acl_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", ...
Deletes a network acl entry. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_network_acl_entry 'acl-5fb85d36' '32767'
[ "Deletes", "a", "network", "acl", "entry", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2008-L2045
33,350
saltstack/salt
salt/modules/boto_vpc.py
create_route_table
def create_route_table(vpc_id=None, vpc_name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Creates a route table. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Examples: .. code-block:: bash salt my...
python
def create_route_table(vpc_id=None, vpc_name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Creates a route table. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Examples: .. code-block:: bash salt my...
[ "def", "create_route_table", "(", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "route_table_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", ...
Creates a route table. .. versionchanged:: 2015.8.0 Added vpc_name argument CLI Examples: .. code-block:: bash salt myminion boto_vpc.create_route_table vpc_id='vpc-6b1fe402' \\ route_table_name='myroutetable' salt myminion boto_vpc.create_route_table vpc_name='my...
[ "Creates", "a", "route", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2048-L2071
33,351
saltstack/salt
salt/modules/boto_vpc.py
delete_route_table
def delete_route_table(route_table_id=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route table. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt mymini...
python
def delete_route_table(route_table_id=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route table. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt mymini...
[ "def", "delete_route_table", "(", "route_table_id", "=", "None", ",", "route_table_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "return", "_delete_resource", "(",...
Deletes a route table. CLI Examples: .. code-block:: bash salt myminion boto_vpc.delete_route_table route_table_id='rtb-1f382e7d' salt myminion boto_vpc.delete_route_table route_table_name='myroutetable'
[ "Deletes", "a", "route", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2074-L2089
33,352
saltstack/salt
salt/modules/boto_vpc.py
route_table_exists
def route_table_exists(route_table_id=None, name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a route table exists. CLI Example: .. code-block:: bash salt myminion boto_vpc.route_table_exists route_table_id='rtb...
python
def route_table_exists(route_table_id=None, name=None, route_table_name=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Checks if a route table exists. CLI Example: .. code-block:: bash salt myminion boto_vpc.route_table_exists route_table_id='rtb...
[ "def", "route_table_exists", "(", "route_table_id", "=", "None", ",", "name", "=", "None", ",", "route_table_name", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "...
Checks if a route table exists. CLI Example: .. code-block:: bash salt myminion boto_vpc.route_table_exists route_table_id='rtb-1f382e7d'
[ "Checks", "if", "a", "route", "table", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2092-L2113
33,353
saltstack/salt
salt/modules/boto_vpc.py
route_exists
def route_exists(destination_cidr_block, route_table_name=None, route_table_id=None, gateway_id=None, instance_id=None, interface_id=None, tags=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Checks if a route exists. .. versiona...
python
def route_exists(destination_cidr_block, route_table_name=None, route_table_id=None, gateway_id=None, instance_id=None, interface_id=None, tags=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Checks if a route exists. .. versiona...
[ "def", "route_exists", "(", "destination_cidr_block", ",", "route_table_name", "=", "None", ",", "route_table_id", "=", "None", ",", "gateway_id", "=", "None", ",", "instance_id", "=", "None", ",", "interface_id", "=", "None", ",", "tags", "=", "None", ",", ...
Checks if a route exists. .. versionadded:: 2015.8.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.route_exists destination_cidr_block='10.0.0.0/20' gateway_id='local' route_table_name='test'
[ "Checks", "if", "a", "route", "exists", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2116-L2181
33,354
saltstack/salt
salt/modules/boto_vpc.py
associate_route_table
def associate_route_table(route_table_id=None, subnet_id=None, route_table_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a route table and subnet name or id, associates the route table with t...
python
def associate_route_table(route_table_id=None, subnet_id=None, route_table_name=None, subnet_name=None, region=None, key=None, keyid=None, profile=None): ''' Given a route table and subnet name or id, associates the route table with t...
[ "def", "associate_route_table", "(", "route_table_id", "=", "None", ",", "subnet_id", "=", "None", ",", "route_table_name", "=", "None", ",", "subnet_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", ...
Given a route table and subnet name or id, associates the route table with the subnet. CLI Example: .. code-block:: bash salt myminion boto_vpc.associate_route_table 'rtb-1f382e7d' 'subnet-6a1fe403' .. code-block:: bash salt myminion boto_vpc.associate_route_table route_table_name='myrt...
[ "Given", "a", "route", "table", "and", "subnet", "name", "or", "id", "associates", "the", "route", "table", "with", "the", "subnet", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2184-L2233
33,355
saltstack/salt
salt/modules/boto_vpc.py
disassociate_route_table
def disassociate_route_table(association_id, region=None, key=None, keyid=None, profile=None): ''' Dissassociates a route table. association_id The Route Table Association ID to disassociate CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_route_table 'rtbass...
python
def disassociate_route_table(association_id, region=None, key=None, keyid=None, profile=None): ''' Dissassociates a route table. association_id The Route Table Association ID to disassociate CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_route_table 'rtbass...
[ "def", "disassociate_route_table", "(", "association_id", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "region", "=", "region", ",", "k...
Dissassociates a route table. association_id The Route Table Association ID to disassociate CLI Example: .. code-block:: bash salt myminion boto_vpc.disassociate_route_table 'rtbassoc-d8ccddba'
[ "Dissassociates", "a", "route", "table", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2236-L2260
33,356
saltstack/salt
salt/modules/boto_vpc.py
replace_route_table_association
def replace_route_table_association(association_id, route_table_id, region=None, key=None, keyid=None, profile=None): ''' Replaces a route table association. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d' ''' ...
python
def replace_route_table_association(association_id, route_table_id, region=None, key=None, keyid=None, profile=None): ''' Replaces a route table association. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d' ''' ...
[ "def", "replace_route_table_association", "(", "association_id", ",", "route_table_id", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "try", ":", "conn", "=", "_get_conn", "(", "regio...
Replaces a route table association. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route_table_association 'rtbassoc-d8ccddba' 'rtb-1f382e7d'
[ "Replaces", "a", "route", "table", "association", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2263-L2282
33,357
saltstack/salt
salt/modules/boto_vpc.py
delete_route
def delete_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'...
python
def delete_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, region=None, key=None, keyid=None, profile=None): ''' Deletes a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'...
[ "def", "delete_route", "(", "route_table_id", "=", "None", ",", "destination_cidr_block", "=", "None", ",", "route_table_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ...
Deletes a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.delete_route 'rtb-1f382e7d' '10.0.0.0/16'
[ "Deletes", "a", "route", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2382-L2417
33,358
saltstack/salt
salt/modules/boto_vpc.py
replace_route
def replace_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, instance_id=None, interface_id=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Replaces ...
python
def replace_route(route_table_id=None, destination_cidr_block=None, route_table_name=None, gateway_id=None, instance_id=None, interface_id=None, region=None, key=None, keyid=None, profile=None, vpc_peering_connection_id=None): ''' Replaces ...
[ "def", "replace_route", "(", "route_table_id", "=", "None", ",", "destination_cidr_block", "=", "None", ",", "route_table_name", "=", "None", ",", "gateway_id", "=", "None", ",", "instance_id", "=", "None", ",", "interface_id", "=", "None", ",", "region", "=",...
Replaces a route. CLI Example: .. code-block:: bash salt myminion boto_vpc.replace_route 'rtb-1f382e7d' '10.0.0.0/16' gateway_id='vgw-a1b2c3'
[ "Replaces", "a", "route", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2420-L2468
33,359
saltstack/salt
salt/modules/boto_vpc.py
describe_route_tables
def describe_route_tables(route_table_id=None, route_table_name=None, vpc_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given route table properties, return details of all matching route tables. This func...
python
def describe_route_tables(route_table_id=None, route_table_name=None, vpc_id=None, tags=None, region=None, key=None, keyid=None, profile=None): ''' Given route table properties, return details of all matching route tables. This func...
[ "def", "describe_route_tables", "(", "route_table_id", "=", "None", ",", "route_table_name", "=", "None", ",", "vpc_id", "=", "None", ",", "tags", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile"...
Given route table properties, return details of all matching route tables. This function requires boto3 to be installed. .. versionadded:: 2016.11.0 CLI Example: .. code-block:: bash salt myminion boto_vpc.describe_route_tables vpc_id='vpc-a6a9efc3'
[ "Given", "route", "table", "properties", "return", "details", "of", "all", "matching", "route", "tables", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2532-L2615
33,360
saltstack/salt
salt/modules/boto_vpc.py
_get_subnet_explicit_route_table
def _get_subnet_explicit_route_table(subnet_id, vpc_id, conn=None, region=None, key=None, keyid=None, profile=None): ''' helper function to find subnet explicit route table associations .. versionadded:: 2016.11.0 ''' if not conn: conn = _get_conn(region=region, key=key, keyid=keyid, profil...
python
def _get_subnet_explicit_route_table(subnet_id, vpc_id, conn=None, region=None, key=None, keyid=None, profile=None): ''' helper function to find subnet explicit route table associations .. versionadded:: 2016.11.0 ''' if not conn: conn = _get_conn(region=region, key=key, keyid=keyid, profil...
[ "def", "_get_subnet_explicit_route_table", "(", "subnet_id", ",", "vpc_id", ",", "conn", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "conn", ":", "conn...
helper function to find subnet explicit route table associations .. versionadded:: 2016.11.0
[ "helper", "function", "to", "find", "subnet", "explicit", "route", "table", "associations" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2694-L2708
33,361
saltstack/salt
salt/modules/boto_vpc.py
_vpc_peering_conn_id_for_name
def _vpc_peering_conn_id_for_name(name, conn): ''' Get the ID associated with this name ''' log.debug('Retrieving VPC peering connection id') ids = _get_peering_connection_ids(name, conn) if not ids: ids = [None] # Let callers handle the case where we have no id elif len(ids) > 1: ...
python
def _vpc_peering_conn_id_for_name(name, conn): ''' Get the ID associated with this name ''' log.debug('Retrieving VPC peering connection id') ids = _get_peering_connection_ids(name, conn) if not ids: ids = [None] # Let callers handle the case where we have no id elif len(ids) > 1: ...
[ "def", "_vpc_peering_conn_id_for_name", "(", "name", ",", "conn", ")", ":", "log", ".", "debug", "(", "'Retrieving VPC peering connection id'", ")", "ids", "=", "_get_peering_connection_ids", "(", "name", ",", "conn", ")", "if", "not", "ids", ":", "ids", "=", ...
Get the ID associated with this name
[ "Get", "the", "ID", "associated", "with", "this", "name" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2956-L2972
33,362
saltstack/salt
salt/modules/boto_vpc.py
delete_vpc_peering_connection
def delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None, dry_run=False): ''' Delete a VPC peering connection. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. ...
python
def delete_vpc_peering_connection(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None, dry_run=False): ''' Delete a VPC peering connection. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. ...
[ "def", "delete_vpc_peering_connection", "(", "conn_id", "=", "None", ",", "conn_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ",", "dry_run", "=", "False", ")", ":", "if...
Delete a VPC peering connection. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. conn_name The connection name to check. Exclusive with conn_id. region Region to connect to. key Secret key to be used. keyid ...
[ "Delete", "a", "VPC", "peering", "connection", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L2975-L3033
33,363
saltstack/salt
salt/modules/boto_vpc.py
is_peering_connection_pending
def is_peering_connection_pending(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with con...
python
def is_peering_connection_pending(conn_id=None, conn_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with con...
[ "def", "is_peering_connection_pending", "(", "conn_id", "=", "None", ",", "conn_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "None", ")", ":", "if", "not", "_exactly_one", "(", ...
Check if a VPC peering connection is in the pending state. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. conn_name The connection name to check. Exclusive with conn_id. region Region to connect to. key Secret key to b...
[ "Check", "if", "a", "VPC", "peering", "connection", "is", "in", "the", "pending", "state", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L3036-L3094
33,364
saltstack/salt
salt/modules/boto_vpc.py
peering_connection_pending_from_vpc
def peering_connection_pending_from_vpc(conn_id=None, conn_name=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state, and requested from th...
python
def peering_connection_pending_from_vpc(conn_id=None, conn_name=None, vpc_id=None, vpc_name=None, region=None, key=None, keyid=None, profile=None): ''' Check if a VPC peering connection is in the pending state, and requested from th...
[ "def", "peering_connection_pending_from_vpc", "(", "conn_id", "=", "None", ",", "conn_name", "=", "None", ",", "vpc_id", "=", "None", ",", "vpc_name", "=", "None", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "prof...
Check if a VPC peering connection is in the pending state, and requested from the given VPC. .. versionadded:: 2016.11.0 conn_id The connection ID to check. Exclusive with conn_name. conn_name The connection name to check. Exclusive with conn_id. vpc_id Is this the ID of th...
[ "Check", "if", "a", "VPC", "peering", "connection", "is", "in", "the", "pending", "state", "and", "requested", "from", "the", "given", "VPC", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/boto_vpc.py#L3097-L3168
33,365
saltstack/salt
salt/utils/botomod.py
cache_id
def cache_id(service, name, sub_resource=None, resource_id=None, invalidate=False, region=None, key=None, keyid=None, profile=None): ''' Cache, invalidate, or retrieve an AWS resource id keyed by name. .. code-block:: python __utils__['boto.cache_id']('ec2', 'myinstance',...
python
def cache_id(service, name, sub_resource=None, resource_id=None, invalidate=False, region=None, key=None, keyid=None, profile=None): ''' Cache, invalidate, or retrieve an AWS resource id keyed by name. .. code-block:: python __utils__['boto.cache_id']('ec2', 'myinstance',...
[ "def", "cache_id", "(", "service", ",", "name", ",", "sub_resource", "=", "None", ",", "resource_id", "=", "None", ",", "invalidate", "=", "False", ",", "region", "=", "None", ",", "key", "=", "None", ",", "keyid", "=", "None", ",", "profile", "=", "...
Cache, invalidate, or retrieve an AWS resource id keyed by name. .. code-block:: python __utils__['boto.cache_id']('ec2', 'myinstance', 'i-a1b2c3', profile='custom_profile')
[ "Cache", "invalidate", "or", "retrieve", "an", "AWS", "resource", "id", "keyed", "by", "name", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/botomod.py#L115-L150
33,366
saltstack/salt
salt/matchers/ipcidr_match.py
match
def match(tgt, opts=None): ''' Matches based on IP address or CIDR notation ''' if not opts: opts = __opts__ try: # Target is an address? tgt = ipaddress.ip_address(tgt) except: # pylint: disable=bare-except try: # Target is a network? tg...
python
def match(tgt, opts=None): ''' Matches based on IP address or CIDR notation ''' if not opts: opts = __opts__ try: # Target is an address? tgt = ipaddress.ip_address(tgt) except: # pylint: disable=bare-except try: # Target is a network? tg...
[ "def", "match", "(", "tgt", ",", "opts", "=", "None", ")", ":", "if", "not", "opts", ":", "opts", "=", "__opts__", "try", ":", "# Target is an address?", "tgt", "=", "ipaddress", ".", "ip_address", "(", "tgt", ")", "except", ":", "# pylint: disable=bare-ex...
Matches based on IP address or CIDR notation
[ "Matches", "based", "on", "IP", "address", "or", "CIDR", "notation" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/matchers/ipcidr_match.py#L20-L48
33,367
saltstack/salt
salt/utils/dictupdate.py
ensure_dict_key
def ensure_dict_key( in_dict, keys, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. :param dict in_dict: The dict to work with. :param str keys: The delimited string with one or more key...
python
def ensure_dict_key( in_dict, keys, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. :param dict in_dict: The dict to work with. :param str keys: The delimited string with one or more key...
[ "def", "ensure_dict_key", "(", "in_dict", ",", "keys", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "ordered_dict", "=", "False", ")", ":", "if", "delimiter", "in", "keys", ":", "a_keys", "=", "keys", ".", "split", "(", "delimiter", ")", "else", ":"...
Ensures that in_dict contains the series of recursive keys defined in keys. :param dict in_dict: The dict to work with. :param str keys: The delimited string with one or more keys. :param str delimiter: The delimiter to use in `keys`. Defaults to ':'. :param bool ordered_dict: Create OrderedDicts if ke...
[ "Ensures", "that", "in_dict", "contains", "the", "series", "of", "recursive", "keys", "defined", "in", "keys", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictupdate.py#L142-L166
33,368
saltstack/salt
salt/utils/dictupdate.py
set_dict_key_value
def set_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also sets whatever is at the end of `in_dict` traversed with `keys` to `value`. :par...
python
def set_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also sets whatever is at the end of `in_dict` traversed with `keys` to `value`. :par...
[ "def", "set_dict_key_value", "(", "in_dict", ",", "keys", ",", "value", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "ordered_dict", "=", "False", ")", ":", "dict_pointer", ",", "last_key", "=", "_dict_rpartition", "(", "in_dict", ",", "keys", ",", "del...
Ensures that in_dict contains the series of recursive keys defined in keys. Also sets whatever is at the end of `in_dict` traversed with `keys` to `value`. :param dict in_dict: The dictionary to work with :param str keys: The delimited string with one or more keys. :param any value: The value to assign...
[ "Ensures", "that", "in_dict", "contains", "the", "series", "of", "recursive", "keys", "defined", "in", "keys", ".", "Also", "sets", "whatever", "is", "at", "the", "end", "of", "in_dict", "traversed", "with", "keys", "to", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictupdate.py#L204-L228
33,369
saltstack/salt
salt/utils/dictupdate.py
update_dict_key_value
def update_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also updates the dict, that is at the end of `in_dict` traversed with `keys`, with...
python
def update_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also updates the dict, that is at the end of `in_dict` traversed with `keys`, with...
[ "def", "update_dict_key_value", "(", "in_dict", ",", "keys", ",", "value", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "ordered_dict", "=", "False", ")", ":", "dict_pointer", ",", "last_key", "=", "_dict_rpartition", "(", "in_dict", ",", "keys", ",", "...
Ensures that in_dict contains the series of recursive keys defined in keys. Also updates the dict, that is at the end of `in_dict` traversed with `keys`, with `value`. :param dict in_dict: The dictionary to work with :param str keys: The delimited string with one or more keys. :param any value: The...
[ "Ensures", "that", "in_dict", "contains", "the", "series", "of", "recursive", "keys", "defined", "in", "keys", ".", "Also", "updates", "the", "dict", "that", "is", "at", "the", "end", "of", "in_dict", "traversed", "with", "keys", "with", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictupdate.py#L232-L266
33,370
saltstack/salt
salt/utils/dictupdate.py
append_dict_key_value
def append_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also appends `value` to the list that is at the end of `in_dict` traversed with `k...
python
def append_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also appends `value` to the list that is at the end of `in_dict` traversed with `k...
[ "def", "append_dict_key_value", "(", "in_dict", ",", "keys", ",", "value", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "ordered_dict", "=", "False", ")", ":", "dict_pointer", ",", "last_key", "=", "_dict_rpartition", "(", "in_dict", ",", "keys", ",", "...
Ensures that in_dict contains the series of recursive keys defined in keys. Also appends `value` to the list that is at the end of `in_dict` traversed with `keys`. :param dict in_dict: The dictionary to work with :param str keys: The delimited string with one or more keys. :param any value: The val...
[ "Ensures", "that", "in_dict", "contains", "the", "series", "of", "recursive", "keys", "defined", "in", "keys", ".", "Also", "appends", "value", "to", "the", "list", "that", "is", "at", "the", "end", "of", "in_dict", "traversed", "with", "keys", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictupdate.py#L270-L301
33,371
saltstack/salt
salt/utils/dictupdate.py
extend_dict_key_value
def extend_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also extends the list, that is at the end of `in_dict` traversed with `keys`, with...
python
def extend_dict_key_value( in_dict, keys, value, delimiter=DEFAULT_TARGET_DELIM, ordered_dict=False): ''' Ensures that in_dict contains the series of recursive keys defined in keys. Also extends the list, that is at the end of `in_dict` traversed with `keys`, with...
[ "def", "extend_dict_key_value", "(", "in_dict", ",", "keys", ",", "value", ",", "delimiter", "=", "DEFAULT_TARGET_DELIM", ",", "ordered_dict", "=", "False", ")", ":", "dict_pointer", ",", "last_key", "=", "_dict_rpartition", "(", "in_dict", ",", "keys", ",", "...
Ensures that in_dict contains the series of recursive keys defined in keys. Also extends the list, that is at the end of `in_dict` traversed with `keys`, with `value`. :param dict in_dict: The dictionary to work with :param str keys: The delimited string with one or more keys. :param any value: The...
[ "Ensures", "that", "in_dict", "contains", "the", "series", "of", "recursive", "keys", "defined", "in", "keys", ".", "Also", "extends", "the", "list", "that", "is", "at", "the", "end", "of", "in_dict", "traversed", "with", "keys", "with", "value", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/utils/dictupdate.py#L305-L340
33,372
saltstack/salt
salt/cli/batch.py
get_bnum
def get_bnum(opts, minions, quiet): ''' Return the active number of minions to maintain ''' partition = lambda x: float(x) / 100.0 * len(minions) try: if '%' in opts['batch']: res = partition(float(opts['batch'].strip('%'))) if res < 1: return int(math...
python
def get_bnum(opts, minions, quiet): ''' Return the active number of minions to maintain ''' partition = lambda x: float(x) / 100.0 * len(minions) try: if '%' in opts['batch']: res = partition(float(opts['batch'].strip('%'))) if res < 1: return int(math...
[ "def", "get_bnum", "(", "opts", ",", "minions", ",", "quiet", ")", ":", "partition", "=", "lambda", "x", ":", "float", "(", "x", ")", "/", "100.0", "*", "len", "(", "minions", ")", "try", ":", "if", "'%'", "in", "opts", "[", "'batch'", "]", ":", ...
Return the active number of minions to maintain
[ "Return", "the", "active", "number", "of", "minions", "to", "maintain" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/batch.py#L29-L46
33,373
saltstack/salt
salt/cli/batch.py
Batch.__gather_minions
def __gather_minions(self): ''' Return a list of minions to use for the batch run ''' args = [self.opts['tgt'], 'test.ping', [], self.opts['timeout'], ] selected_target_option = self.opts.get('selected_target_option...
python
def __gather_minions(self): ''' Return a list of minions to use for the batch run ''' args = [self.opts['tgt'], 'test.ping', [], self.opts['timeout'], ] selected_target_option = self.opts.get('selected_target_option...
[ "def", "__gather_minions", "(", "self", ")", ":", "args", "=", "[", "self", ".", "opts", "[", "'tgt'", "]", ",", "'test.ping'", ",", "[", "]", ",", "self", ".", "opts", "[", "'timeout'", "]", ",", "]", "selected_target_option", "=", "self", ".", "opt...
Return a list of minions to use for the batch run
[ "Return", "a", "list", "of", "minions", "to", "use", "for", "the", "batch", "run" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cli/batch.py#L115-L153
33,374
saltstack/salt
salt/modules/dummyproxy_service.py
status
def status(name, sig=None): ''' Return the status for a service via dummy, returns a bool whether the service is running. .. versionadded:: 2016.11.3 CLI Example: .. code-block:: bash salt '*' service.status <service name> ''' proxy_fn = 'dummy.service_status' resp = __p...
python
def status(name, sig=None): ''' Return the status for a service via dummy, returns a bool whether the service is running. .. versionadded:: 2016.11.3 CLI Example: .. code-block:: bash salt '*' service.status <service name> ''' proxy_fn = 'dummy.service_status' resp = __p...
[ "def", "status", "(", "name", ",", "sig", "=", "None", ")", ":", "proxy_fn", "=", "'dummy.service_status'", "resp", "=", "__proxy__", "[", "proxy_fn", "]", "(", "name", ")", "if", "resp", "[", "'comment'", "]", "==", "'stopped'", ":", "return", "False", ...
Return the status for a service via dummy, returns a bool whether the service is running. .. versionadded:: 2016.11.3 CLI Example: .. code-block:: bash salt '*' service.status <service name>
[ "Return", "the", "status", "for", "a", "service", "via", "dummy", "returns", "a", "bool", "whether", "the", "service", "is", "running", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/dummyproxy_service.py#L127-L146
33,375
saltstack/salt
salt/states/xmpp.py
send_msg
def send_msg(name, recipient, profile): ''' Send a message to an XMPP user .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipient: admins@xmpp.example.com/salt ...
python
def send_msg(name, recipient, profile): ''' Send a message to an XMPP user .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipient: admins@xmpp.example.com/salt ...
[ "def", "send_msg", "(", "name", ",", "recipient", ",", "profile", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", "''", "}", "if", "__opts__", "[", "'test'", "]...
Send a message to an XMPP user .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipient: admins@xmpp.example.com/salt name The message to send to the XMPP user
[ "Send", "a", "message", "to", "an", "XMPP", "user" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/xmpp.py#L31-L63
33,376
saltstack/salt
salt/states/xmpp.py
send_msg_multi
def send_msg_multi(name, profile, recipients=None, rooms=None): ''' Send a message to an list of recipients or rooms .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message'...
python
def send_msg_multi(name, profile, recipients=None, rooms=None): ''' Send a message to an list of recipients or rooms .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message'...
[ "def", "send_msg_multi", "(", "name", ",", "profile", ",", "recipients", "=", "None", ",", "rooms", "=", "None", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "None", ",", "'comment'", ":", ...
Send a message to an list of recipients or rooms .. code-block:: yaml server-warning-message: xmpp.send_msg: - name: 'This is a server warning message' - profile: my-xmpp-account - recipients: - admins@xmpp.example.com/salt - rooms: ...
[ "Send", "a", "message", "to", "an", "list", "of", "recipients", "or", "rooms" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/xmpp.py#L66-L116
33,377
saltstack/salt
salt/modules/mod_random.py
rand_int
def rand_int(start=1, end=10, seed=None): ''' Returns a random integer number between the start and end number. .. versionadded: 2015.5.3 start : 1 Any valid integer number end : 10 Any valid integer number seed : Optional hashable object .. versionchanged:: 2019...
python
def rand_int(start=1, end=10, seed=None): ''' Returns a random integer number between the start and end number. .. versionadded: 2015.5.3 start : 1 Any valid integer number end : 10 Any valid integer number seed : Optional hashable object .. versionchanged:: 2019...
[ "def", "rand_int", "(", "start", "=", "1", ",", "end", "=", "10", ",", "seed", "=", "None", ")", ":", "if", "seed", "is", "not", "None", ":", "random", ".", "seed", "(", "seed", ")", "return", "random", ".", "randint", "(", "start", ",", "end", ...
Returns a random integer number between the start and end number. .. versionadded: 2015.5.3 start : 1 Any valid integer number end : 10 Any valid integer number seed : Optional hashable object .. versionchanged:: 2019.2.0 Added seed argument. Will return the same...
[ "Returns", "a", "random", "integer", "number", "between", "the", "start", "and", "end", "number", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mod_random.py#L167-L194
33,378
saltstack/salt
salt/modules/mod_random.py
seed
def seed(range=10, hash=None): ''' Returns a random number within a range. Optional hash argument can be any hashable object. If hash is omitted or None, the id of the minion is used. .. versionadded: 2015.8.0 hash: None Any hashable object. range: 10 Any valid integer number ...
python
def seed(range=10, hash=None): ''' Returns a random number within a range. Optional hash argument can be any hashable object. If hash is omitted or None, the id of the minion is used. .. versionadded: 2015.8.0 hash: None Any hashable object. range: 10 Any valid integer number ...
[ "def", "seed", "(", "range", "=", "10", ",", "hash", "=", "None", ")", ":", "if", "hash", "is", "None", ":", "hash", "=", "__grains__", "[", "'id'", "]", "random", ".", "seed", "(", "hash", ")", "return", "random", ".", "randrange", "(", "range", ...
Returns a random number within a range. Optional hash argument can be any hashable object. If hash is omitted or None, the id of the minion is used. .. versionadded: 2015.8.0 hash: None Any hashable object. range: 10 Any valid integer number CLI Example: .. code-block:: bash...
[ "Returns", "a", "random", "number", "within", "a", "range", ".", "Optional", "hash", "argument", "can", "be", "any", "hashable", "object", ".", "If", "hash", "is", "omitted", "or", "None", "the", "id", "of", "the", "minion", "is", "used", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/mod_random.py#L197-L220
33,379
saltstack/salt
salt/auth/mysql.py
__get_connection_info
def __get_connection_info(): ''' Grab MySQL Connection Details ''' conn_info = {} try: conn_info['hostname'] = __opts__['mysql_auth']['hostname'] conn_info['username'] = __opts__['mysql_auth']['username'] conn_info['password'] = __opts__['mysql_auth']['password'] con...
python
def __get_connection_info(): ''' Grab MySQL Connection Details ''' conn_info = {} try: conn_info['hostname'] = __opts__['mysql_auth']['hostname'] conn_info['username'] = __opts__['mysql_auth']['username'] conn_info['password'] = __opts__['mysql_auth']['password'] con...
[ "def", "__get_connection_info", "(", ")", ":", "conn_info", "=", "{", "}", "try", ":", "conn_info", "[", "'hostname'", "]", "=", "__opts__", "[", "'mysql_auth'", "]", "[", "'hostname'", "]", "conn_info", "[", "'username'", "]", "=", "__opts__", "[", "'mysq...
Grab MySQL Connection Details
[ "Grab", "MySQL", "Connection", "Details" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/mysql.py#L83-L100
33,380
saltstack/salt
salt/auth/mysql.py
auth
def auth(username, password): ''' Authenticate using a MySQL user table ''' _info = __get_connection_info() if _info is None: return False try: conn = MySQLdb.connect(_info['hostname'], _info['username'], _info['pass...
python
def auth(username, password): ''' Authenticate using a MySQL user table ''' _info = __get_connection_info() if _info is None: return False try: conn = MySQLdb.connect(_info['hostname'], _info['username'], _info['pass...
[ "def", "auth", "(", "username", ",", "password", ")", ":", "_info", "=", "__get_connection_info", "(", ")", "if", "_info", "is", "None", ":", "return", "False", "try", ":", "conn", "=", "MySQLdb", ".", "connect", "(", "_info", "[", "'hostname'", "]", "...
Authenticate using a MySQL user table
[ "Authenticate", "using", "a", "MySQL", "user", "table" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/auth/mysql.py#L103-L127
33,381
saltstack/salt
salt/modules/uptime.py
create
def create(name, **params): '''Create a check on a given URL. Additional parameters can be used and are passed to API (for example interval, maxTime, etc). See the documentation https://github.com/fzaninotto/uptime for a full list of the parameters. CLI Example: .. code-block:: bash ...
python
def create(name, **params): '''Create a check on a given URL. Additional parameters can be used and are passed to API (for example interval, maxTime, etc). See the documentation https://github.com/fzaninotto/uptime for a full list of the parameters. CLI Example: .. code-block:: bash ...
[ "def", "create", "(", "name", ",", "*", "*", "params", ")", ":", "if", "check_exists", "(", "name", ")", ":", "msg", "=", "'Trying to create check that already exists : {0}'", ".", "format", "(", "name", ")", "log", ".", "error", "(", "msg", ")", "raise", ...
Create a check on a given URL. Additional parameters can be used and are passed to API (for example interval, maxTime, etc). See the documentation https://github.com/fzaninotto/uptime for a full list of the parameters. CLI Example: .. code-block:: bash salt '*' uptime.create http://e...
[ "Create", "a", "check", "on", "a", "given", "URL", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/uptime.py#L32-L60
33,382
saltstack/salt
salt/modules/uptime.py
delete
def delete(name): ''' Delete a check on a given URL CLI Example: .. code-block:: bash salt '*' uptime.delete http://example.org ''' if not check_exists(name): msg = "Trying to delete check that doesn't exists : {0}".format(name) log.error(msg) raise CommandExec...
python
def delete(name): ''' Delete a check on a given URL CLI Example: .. code-block:: bash salt '*' uptime.delete http://example.org ''' if not check_exists(name): msg = "Trying to delete check that doesn't exists : {0}".format(name) log.error(msg) raise CommandExec...
[ "def", "delete", "(", "name", ")", ":", "if", "not", "check_exists", "(", "name", ")", ":", "msg", "=", "\"Trying to delete check that doesn't exists : {0}\"", ".", "format", "(", "name", ")", "log", ".", "error", "(", "msg", ")", "raise", "CommandExecutionErr...
Delete a check on a given URL CLI Example: .. code-block:: bash salt '*' uptime.delete http://example.org
[ "Delete", "a", "check", "on", "a", "given", "URL" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/uptime.py#L63-L87
33,383
saltstack/salt
salt/modules/uptime.py
checks_list
def checks_list(): ''' List URL checked by uptime CLI Example: .. code-block:: bash salt '*' uptime.checks_list ''' application_url = _get_application_url() log.debug('[uptime] get checks') jcontent = requests.get('{0}/api/checks'.format(application_url)).json() return [x[...
python
def checks_list(): ''' List URL checked by uptime CLI Example: .. code-block:: bash salt '*' uptime.checks_list ''' application_url = _get_application_url() log.debug('[uptime] get checks') jcontent = requests.get('{0}/api/checks'.format(application_url)).json() return [x[...
[ "def", "checks_list", "(", ")", ":", "application_url", "=", "_get_application_url", "(", ")", "log", ".", "debug", "(", "'[uptime] get checks'", ")", "jcontent", "=", "requests", ".", "get", "(", "'{0}/api/checks'", ".", "format", "(", "application_url", ")", ...
List URL checked by uptime CLI Example: .. code-block:: bash salt '*' uptime.checks_list
[ "List", "URL", "checked", "by", "uptime" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/modules/uptime.py#L103-L116
33,384
saltstack/salt
salt/states/vagrant.py
_vagrant_call
def _vagrant_call(node, function, section, comment, status_when_done=None, **kwargs): ''' Helper to call the vagrant functions. Wildcards supported. :param node: The Salt-id or wildcard :param function: the vagrant submodule to call :param section: the name for the state call. :param comment: w...
python
def _vagrant_call(node, function, section, comment, status_when_done=None, **kwargs): ''' Helper to call the vagrant functions. Wildcards supported. :param node: The Salt-id or wildcard :param function: the vagrant submodule to call :param section: the name for the state call. :param comment: w...
[ "def", "_vagrant_call", "(", "node", ",", "function", ",", "section", ",", "comment", ",", "status_when_done", "=", "None", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "node", ",", "'changes'", ":", "{", "}", ",", "'result'", "...
Helper to call the vagrant functions. Wildcards supported. :param node: The Salt-id or wildcard :param function: the vagrant submodule to call :param section: the name for the state call. :param comment: what the state reply should say :param status_when_done: the Vagrant status expected for this s...
[ "Helper", "to", "call", "the", "vagrant", "functions", ".", "Wildcards", "supported", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/vagrant.py#L77-L127
33,385
saltstack/salt
salt/states/vagrant.py
_find_init_change
def _find_init_change(name, ret, **kwargs): ''' look for changes from any previous init of machine. :return: modified ret and kwargs ''' kwargs = salt.utils.args.clean_kwargs(**kwargs) if 'vm' in kwargs: kwargs.update(kwargs.pop('vm')) # the state processing eats 'runas' so we renam...
python
def _find_init_change(name, ret, **kwargs): ''' look for changes from any previous init of machine. :return: modified ret and kwargs ''' kwargs = salt.utils.args.clean_kwargs(**kwargs) if 'vm' in kwargs: kwargs.update(kwargs.pop('vm')) # the state processing eats 'runas' so we renam...
[ "def", "_find_init_change", "(", "name", ",", "ret", ",", "*", "*", "kwargs", ")", ":", "kwargs", "=", "salt", ".", "utils", ".", "args", ".", "clean_kwargs", "(", "*", "*", "kwargs", ")", "if", "'vm'", "in", "kwargs", ":", "kwargs", ".", "update", ...
look for changes from any previous init of machine. :return: modified ret and kwargs
[ "look", "for", "changes", "from", "any", "previous", "init", "of", "machine", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/vagrant.py#L197-L223
33,386
saltstack/salt
salt/states/vagrant.py
initialized
def initialized(name, **kwargs): r''' Defines a new VM with specified arguments, but does not start it. :param name: the Salt_id node name you wish your VM to have. Each machine must be initialized individually using this function or the "vagrant.running" function, or the vagrant.init execution mo...
python
def initialized(name, **kwargs): r''' Defines a new VM with specified arguments, but does not start it. :param name: the Salt_id node name you wish your VM to have. Each machine must be initialized individually using this function or the "vagrant.running" function, or the vagrant.init execution mo...
[ "def", "initialized", "(", "name", ",", "*", "*", "kwargs", ")", ":", "ret", "=", "{", "'name'", ":", "name", ",", "'changes'", ":", "{", "}", ",", "'result'", ":", "True", ",", "'comment'", ":", "'The VM is already correctly defined'", "}", "# define a ma...
r''' Defines a new VM with specified arguments, but does not start it. :param name: the Salt_id node name you wish your VM to have. Each machine must be initialized individually using this function or the "vagrant.running" function, or the vagrant.init execution module call. This command will not...
[ "r", "Defines", "a", "new", "VM", "with", "specified", "arguments", "but", "does", "not", "start", "it", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/states/vagrant.py#L226-L280
33,387
saltstack/salt
salt/proxy/nxos_api.py
init
def init(opts): ''' Open the connection to the Nexsu switch over the NX-API. As the communication is HTTP based, there is no connection to maintain, however, in order to test the connectivity and make sure we are able to bring up this Minion, we are executing a very simple command (``show clock``) ...
python
def init(opts): ''' Open the connection to the Nexsu switch over the NX-API. As the communication is HTTP based, there is no connection to maintain, however, in order to test the connectivity and make sure we are able to bring up this Minion, we are executing a very simple command (``show clock``) ...
[ "def", "init", "(", "opts", ")", ":", "proxy_dict", "=", "opts", ".", "get", "(", "'proxy'", ",", "{", "}", ")", "conn_args", "=", "copy", ".", "deepcopy", "(", "proxy_dict", ")", "conn_args", ".", "pop", "(", "'proxytype'", ",", "None", ")", "opts",...
Open the connection to the Nexsu switch over the NX-API. As the communication is HTTP based, there is no connection to maintain, however, in order to test the connectivity and make sure we are able to bring up this Minion, we are executing a very simple command (``show clock``) which doesn't come with ...
[ "Open", "the", "connection", "to", "the", "Nexsu", "switch", "over", "the", "NX", "-", "API", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/nxos_api.py#L142-L167
33,388
saltstack/salt
salt/proxy/nxos_api.py
rpc
def rpc(commands, method='cli', **kwargs): ''' Executes an RPC request over the NX-API. ''' conn_args = nxos_device['conn_args'] conn_args.update(kwargs) return __utils__['nxos_api.rpc'](commands, method=method, **conn_args)
python
def rpc(commands, method='cli', **kwargs): ''' Executes an RPC request over the NX-API. ''' conn_args = nxos_device['conn_args'] conn_args.update(kwargs) return __utils__['nxos_api.rpc'](commands, method=method, **conn_args)
[ "def", "rpc", "(", "commands", ",", "method", "=", "'cli'", ",", "*", "*", "kwargs", ")", ":", "conn_args", "=", "nxos_device", "[", "'conn_args'", "]", "conn_args", ".", "update", "(", "kwargs", ")", "return", "__utils__", "[", "'nxos_api.rpc'", "]", "(...
Executes an RPC request over the NX-API.
[ "Executes", "an", "RPC", "request", "over", "the", "NX", "-", "API", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/proxy/nxos_api.py#L203-L209
33,389
saltstack/salt
salt/cloud/__init__.py
communicator
def communicator(func): '''Warning, this is a picklable decorator !''' def _call(queue, args, kwargs): '''called with [queue, args, kwargs] as first optional arg''' kwargs['queue'] = queue ret = None try: ret = func(*args, **kwargs) queue.put('END') ...
python
def communicator(func): '''Warning, this is a picklable decorator !''' def _call(queue, args, kwargs): '''called with [queue, args, kwargs] as first optional arg''' kwargs['queue'] = queue ret = None try: ret = func(*args, **kwargs) queue.put('END') ...
[ "def", "communicator", "(", "func", ")", ":", "def", "_call", "(", "queue", ",", "args", ",", "kwargs", ")", ":", "'''called with [queue, args, kwargs] as first optional arg'''", "kwargs", "[", "'queue'", "]", "=", "queue", "ret", "=", "None", "try", ":", "ret...
Warning, this is a picklable decorator !
[ "Warning", "this", "is", "a", "picklable", "decorator", "!" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L60-L85
33,390
saltstack/salt
salt/cloud/__init__.py
enter_mainloop
def enter_mainloop(target, mapped_args=None, args=None, kwargs=None, pool=None, pool_size=None, callback=None, queue=None): ''' Manage a multiprocessing pool - If the queue d...
python
def enter_mainloop(target, mapped_args=None, args=None, kwargs=None, pool=None, pool_size=None, callback=None, queue=None): ''' Manage a multiprocessing pool - If the queue d...
[ "def", "enter_mainloop", "(", "target", ",", "mapped_args", "=", "None", ",", "args", "=", "None", ",", "kwargs", "=", "None", ",", "pool", "=", "None", ",", "pool_size", "=", "None", ",", "callback", "=", "None", ",", "queue", "=", "None", ")", ":",...
Manage a multiprocessing pool - If the queue does not output anything, the pool runs indefinitely - If the queue returns KEYBOARDINT or ERROR, this will kill the pool totally calling terminate & join and ands with a SaltCloudSystemExit exception notifying callers from the abnormal termination ...
[ "Manage", "a", "multiprocessing", "pool" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L88-L182
33,391
saltstack/salt
salt/cloud/__init__.py
create_multiprocessing
def create_multiprocessing(parallel_data, queue=None): ''' This function will be called from another process when running a map in parallel mode. The result from the create is always a json object. ''' salt.utils.crypt.reinit_crypto() parallel_data['opts']['output'] = 'json' cloud = Cloud(p...
python
def create_multiprocessing(parallel_data, queue=None): ''' This function will be called from another process when running a map in parallel mode. The result from the create is always a json object. ''' salt.utils.crypt.reinit_crypto() parallel_data['opts']['output'] = 'json' cloud = Cloud(p...
[ "def", "create_multiprocessing", "(", "parallel_data", ",", "queue", "=", "None", ")", ":", "salt", ".", "utils", ".", "crypt", ".", "reinit_crypto", "(", ")", "parallel_data", "[", "'opts'", "]", "[", "'output'", "]", "=", "'json'", "cloud", "=", "Cloud",...
This function will be called from another process when running a map in parallel mode. The result from the create is always a json object.
[ "This", "function", "will", "be", "called", "from", "another", "process", "when", "running", "a", "map", "in", "parallel", "mode", ".", "The", "result", "from", "the", "create", "is", "always", "a", "json", "object", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L2304-L2330
33,392
saltstack/salt
salt/cloud/__init__.py
destroy_multiprocessing
def destroy_multiprocessing(parallel_data, queue=None): ''' This function will be called from another process when running a map in parallel mode. The result from the destroy is always a json object. ''' salt.utils.crypt.reinit_crypto() parallel_data['opts']['output'] = 'json' clouds = salt...
python
def destroy_multiprocessing(parallel_data, queue=None): ''' This function will be called from another process when running a map in parallel mode. The result from the destroy is always a json object. ''' salt.utils.crypt.reinit_crypto() parallel_data['opts']['output'] = 'json' clouds = salt...
[ "def", "destroy_multiprocessing", "(", "parallel_data", ",", "queue", "=", "None", ")", ":", "salt", ".", "utils", ".", "crypt", ".", "reinit_crypto", "(", ")", "parallel_data", "[", "'opts'", "]", "[", "'output'", "]", "=", "'json'", "clouds", "=", "salt"...
This function will be called from another process when running a map in parallel mode. The result from the destroy is always a json object.
[ "This", "function", "will", "be", "called", "from", "another", "process", "when", "running", "a", "map", "in", "parallel", "mode", ".", "The", "result", "from", "the", "destroy", "is", "always", "a", "json", "object", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L2333-L2363
33,393
saltstack/salt
salt/cloud/__init__.py
run_parallel_map_providers_query
def run_parallel_map_providers_query(data, queue=None): ''' This function will be called from another process when building the providers map. ''' salt.utils.crypt.reinit_crypto() cloud = Cloud(data['opts']) try: with salt.utils.context.func_globals_inject( cloud.clouds[...
python
def run_parallel_map_providers_query(data, queue=None): ''' This function will be called from another process when building the providers map. ''' salt.utils.crypt.reinit_crypto() cloud = Cloud(data['opts']) try: with salt.utils.context.func_globals_inject( cloud.clouds[...
[ "def", "run_parallel_map_providers_query", "(", "data", ",", "queue", "=", "None", ")", ":", "salt", ".", "utils", ".", "crypt", ".", "reinit_crypto", "(", ")", "cloud", "=", "Cloud", "(", "data", "[", "'opts'", "]", ")", "try", ":", "with", "salt", "....
This function will be called from another process when building the providers map.
[ "This", "function", "will", "be", "called", "from", "another", "process", "when", "building", "the", "providers", "map", "." ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L2366-L2395
33,394
saltstack/salt
salt/cloud/__init__.py
CloudClient._opts_defaults
def _opts_defaults(self, **kwargs): ''' Set the opts dict to defaults and allow for opts to be overridden in the kwargs ''' # Let's start with the default salt cloud configuration opts = salt.config.DEFAULT_CLOUD_OPTS.copy() # Update it with the loaded configurati...
python
def _opts_defaults(self, **kwargs): ''' Set the opts dict to defaults and allow for opts to be overridden in the kwargs ''' # Let's start with the default salt cloud configuration opts = salt.config.DEFAULT_CLOUD_OPTS.copy() # Update it with the loaded configurati...
[ "def", "_opts_defaults", "(", "self", ",", "*", "*", "kwargs", ")", ":", "# Let's start with the default salt cloud configuration", "opts", "=", "salt", ".", "config", ".", "DEFAULT_CLOUD_OPTS", ".", "copy", "(", ")", "# Update it with the loaded configuration", "opts",...
Set the opts dict to defaults and allow for opts to be overridden in the kwargs
[ "Set", "the", "opts", "dict", "to", "defaults", "and", "allow", "for", "opts", "to", "be", "overridden", "in", "the", "kwargs" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L219-L257
33,395
saltstack/salt
salt/cloud/__init__.py
CloudClient.low
def low(self, fun, low): ''' Pass the cloud function and low data structure to run ''' l_fun = getattr(self, fun) f_call = salt.utils.args.format_call(l_fun, low) return l_fun(*f_call.get('args', ()), **f_call.get('kwargs', {}))
python
def low(self, fun, low): ''' Pass the cloud function and low data structure to run ''' l_fun = getattr(self, fun) f_call = salt.utils.args.format_call(l_fun, low) return l_fun(*f_call.get('args', ()), **f_call.get('kwargs', {}))
[ "def", "low", "(", "self", ",", "fun", ",", "low", ")", ":", "l_fun", "=", "getattr", "(", "self", ",", "fun", ")", "f_call", "=", "salt", ".", "utils", ".", "args", ".", "format_call", "(", "l_fun", ",", "low", ")", "return", "l_fun", "(", "*", ...
Pass the cloud function and low data structure to run
[ "Pass", "the", "cloud", "function", "and", "low", "data", "structure", "to", "run" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L259-L265
33,396
saltstack/salt
salt/cloud/__init__.py
CloudClient.list_sizes
def list_sizes(self, provider=None): ''' List all available sizes in configured cloud systems ''' mapper = salt.cloud.Map(self._opts_defaults()) return salt.utils.data.simple_types_filter( mapper.size_list(provider) )
python
def list_sizes(self, provider=None): ''' List all available sizes in configured cloud systems ''' mapper = salt.cloud.Map(self._opts_defaults()) return salt.utils.data.simple_types_filter( mapper.size_list(provider) )
[ "def", "list_sizes", "(", "self", ",", "provider", "=", "None", ")", ":", "mapper", "=", "salt", ".", "cloud", ".", "Map", "(", "self", ".", "_opts_defaults", "(", ")", ")", "return", "salt", ".", "utils", ".", "data", ".", "simple_types_filter", "(", ...
List all available sizes in configured cloud systems
[ "List", "all", "available", "sizes", "in", "configured", "cloud", "systems" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L267-L274
33,397
saltstack/salt
salt/cloud/__init__.py
CloudClient.list_images
def list_images(self, provider=None): ''' List all available images in configured cloud systems ''' mapper = salt.cloud.Map(self._opts_defaults()) return salt.utils.data.simple_types_filter( mapper.image_list(provider) )
python
def list_images(self, provider=None): ''' List all available images in configured cloud systems ''' mapper = salt.cloud.Map(self._opts_defaults()) return salt.utils.data.simple_types_filter( mapper.image_list(provider) )
[ "def", "list_images", "(", "self", ",", "provider", "=", "None", ")", ":", "mapper", "=", "salt", ".", "cloud", ".", "Map", "(", "self", ".", "_opts_defaults", "(", ")", ")", "return", "salt", ".", "utils", ".", "data", ".", "simple_types_filter", "(",...
List all available images in configured cloud systems
[ "List", "all", "available", "images", "in", "configured", "cloud", "systems" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L276-L283
33,398
saltstack/salt
salt/cloud/__init__.py
CloudClient.list_locations
def list_locations(self, provider=None): ''' List all available locations in configured cloud systems ''' mapper = salt.cloud.Map(self._opts_defaults()) return salt.utils.data.simple_types_filter( mapper.location_list(provider) )
python
def list_locations(self, provider=None): ''' List all available locations in configured cloud systems ''' mapper = salt.cloud.Map(self._opts_defaults()) return salt.utils.data.simple_types_filter( mapper.location_list(provider) )
[ "def", "list_locations", "(", "self", ",", "provider", "=", "None", ")", ":", "mapper", "=", "salt", ".", "cloud", ".", "Map", "(", "self", ".", "_opts_defaults", "(", ")", ")", "return", "salt", ".", "utils", ".", "data", ".", "simple_types_filter", "...
List all available locations in configured cloud systems
[ "List", "all", "available", "locations", "in", "configured", "cloud", "systems" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L285-L292
33,399
saltstack/salt
salt/cloud/__init__.py
CloudClient.min_query
def min_query(self, query_type='list_nodes_min'): ''' Query select instance information ''' mapper = salt.cloud.Map(self._opts_defaults()) mapper.opts['selected_query_option'] = 'list_nodes_min' return mapper.map_providers_parallel(query_type)
python
def min_query(self, query_type='list_nodes_min'): ''' Query select instance information ''' mapper = salt.cloud.Map(self._opts_defaults()) mapper.opts['selected_query_option'] = 'list_nodes_min' return mapper.map_providers_parallel(query_type)
[ "def", "min_query", "(", "self", ",", "query_type", "=", "'list_nodes_min'", ")", ":", "mapper", "=", "salt", ".", "cloud", ".", "Map", "(", "self", ".", "_opts_defaults", "(", ")", ")", "mapper", ".", "opts", "[", "'selected_query_option'", "]", "=", "'...
Query select instance information
[ "Query", "select", "instance", "information" ]
e8541fd6e744ab0df786c0f76102e41631f45d46
https://github.com/saltstack/salt/blob/e8541fd6e744ab0df786c0f76102e41631f45d46/salt/cloud/__init__.py#L318-L324